:root {
  --ink: #17342b;
  --muted: #65736c;
  --brand: #1d6a50;
  --brand-dark: #154d3b;
  --brand-soft: #eaf4ee;
  --paper: #ffffff;
  --canvas: #f4f6f3;
  --line: #dce3de;
  --danger: #b4232c;
  --danger-soft: #fff0f0;
  --warning: #89570a;
  --warning-soft: #fff7e6;
  --success: #18754b;
  --shadow: 0 14px 35px rgb(20 52 43 / 8%);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; background: var(--canvas); }
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 230px;
  pointer-events: none;
  background: radial-gradient(circle at 90% 0%, #dcefe4 0, transparent 55%);
  z-index: -1;
}
button, input, select, textarea { font: inherit; }
button, .button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(1.75rem, 5vw, 2.35rem); letter-spacing: -.04em; }
h2 { font-size: 1.15rem; letter-spacing: -.015em; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.shell { min-height: 100vh; padding-bottom: 88px; }
.main { width: min(100%, 1280px); margin: 0 auto; padding: 18px 16px 44px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.practice-identity { display: flex; align-items: center; min-width: 0; gap: 10px; }
.practice-identity strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.practice-identity > div > span { display: block; color: var(--muted); font-size: .8rem; }
.avatar { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 13px; background: var(--ink); color: #fff; font-size: 1.08rem; font-weight: 800; line-height: 1; box-shadow: 0 8px 20px rgb(23 52 43 / 18%); }
.page-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-heading p { margin: 0; }

.sidebar { display: none; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.025em; }
.brand-logo { display: block; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 13px; box-shadow: 0 8px 20px rgb(23 52 43 / 18%); }
.nav-link { display: flex; min-height: 46px; align-items: center; gap: 12px; padding: 0 14px; border-radius: 12px; color: #54655d; text-decoration: none; font-weight: 650; }
.nav-link:hover, .nav-link.active { background: var(--brand-soft); color: var(--brand-dark); }
.nav-icon { width: 22px; text-align: center; font-size: 1.1rem; }
.nav-spacer { flex: 1; }
.sidebar-footer { color: var(--muted); font-size: .75rem; }
.mobile-nav { position: fixed; z-index: 10; inset: auto 10px 10px; display: grid; grid-template-columns: repeat(3, 1fr); padding: 7px; border: 1px solid rgb(220 227 222 / 90%); border-radius: 18px; background: rgb(255 255 255 / 94%); box-shadow: 0 15px 40px rgb(15 45 35 / 16%); backdrop-filter: blur(12px); }
.mobile-nav .nav-link { min-height: 56px; flex-direction: column; justify-content: center; gap: 3px; padding: 0 8px; font-size: .72rem; }
.mobile-nav .nav-icon { font-size: 1.18rem; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.stack { display: grid; gap: 14px; }
.two-column { display: grid; gap: 16px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; }
.section-heading .badge { flex: 0 0 auto; }
.panel-note { padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); font-size: .88rem; }

.button, button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 12px; padding: 9px 15px; background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; font-weight: 720; line-height: 1.2; }
.button:hover, button:hover { background: var(--brand-dark); }
.button.secondary, button.secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.button.secondary:hover, button.secondary:hover { border-color: #b7c7bd; background: #f7faf8; }
.button.ghost, button.ghost { background: transparent; color: var(--muted); }
.button.danger, button.danger { background: var(--danger); }
.button.small-button, button.small-button { min-height: 44px; padding: 7px 11px; border-radius: 10px; font-size: .82rem; }
button:disabled { cursor: not-allowed; opacity: .55; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-button { width: 44px; padding: 0; }

label { display: grid; gap: 7px; color: #3e4f47; font-size: .87rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid #cfd9d3; border-radius: 12px; padding: 10px 12px; background: #fff; color: var(--ink); outline: none; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(29 106 80 / 12%); }
.field-help { margin: -2px 0 0; color: var(--muted); font-size: .79rem; font-weight: 450; }
form + .field-help { margin-top: 8px; }
.form-grid { display: grid; gap: 13px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.inline-form > label { min-width: min(100%, 210px); flex: 1; }
.checkbox { display: flex; min-height: 44px; align-items: center; gap: 9px; font-weight: 600; }
.checkbox input { width: 20px; min-height: 20px; accent-color: var(--brand); }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; padding: 5px; border-radius: 13px; background: #edf1ee; }
.segmented label { display: flex; min-height: 42px; align-items: center; justify-content: center; cursor: pointer; border-radius: 9px; color: var(--muted); }
.segmented input { position: absolute; width: 1px; height: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgb(20 45 36 / 10%); }
.choice-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; border: 0; padding: 0; }
.choice-group legend { margin-bottom: 7px; color: #3e4f47; font-size: .87rem; font-weight: 700; }
.choice-card { display: flex; min-width: 0; align-items: center; gap: 9px; border: 1px solid #cfd9d3; border-radius: 12px; padding: 10px; cursor: pointer; }
.choice-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px rgb(29 106 80 / 10%); }
.choice-card input { width: 18px; min-height: 18px; flex: 0 0 auto; accent-color: var(--brand); }
.choice-card span { display: grid; min-width: 0; gap: 2px; }
.choice-card small { color: var(--muted); font-weight: 500; }

.flash { margin-bottom: 16px; padding: 13px 15px; border: 1px solid; border-radius: 13px; font-weight: 620; }
.flash.success { border-color: #a7d8bd; background: #eaf8f0; color: #125c38; }
.flash.error { border-color: #efb0b2; background: var(--danger-soft); color: #8d1820; }
.flash.warning { border-color: #e5c47e; background: var(--warning-soft); color: var(--warning); }
.email-verification-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.email-verification-banner form { flex: 0 0 auto; }
.badge { display: inline-flex; min-height: 25px; align-items: center; border-radius: 999px; padding: 3px 9px; background: #edf2ef; color: #516058; font-size: .76rem; font-weight: 750; }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.success { background: #e5f6ed; color: var(--success); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.eyebrow { margin: 0 0 6px; color: var(--brand); font-size: .76rem; font-weight: 820; letter-spacing: .08em; text-transform: uppercase; }

.dashboard-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dashboard-title h1 { margin: 0; }
.inline-select { width: auto; min-height: 42px; border: 0; border-bottom: 2px solid #b6c9bf; border-radius: 0; padding: 4px 30px 4px 4px; background-color: transparent; font-size: inherit; font-weight: inherit; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 18px; color: var(--muted); }
.stats strong { color: var(--ink); }
.deadline-list { display: grid; gap: 10px; }
.deadline-row { position: relative; display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.deadline-row.overdue { border-color: #efb4b7; background: linear-gradient(90deg, var(--danger-soft), #fff 34%); }
.deadline-row.filed { background: #f7faf8; color: var(--muted); }
.deadline-main { min-width: 0; }
.deadline-main a { display: block; overflow: hidden; color: var(--ink); font-weight: 780; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.deadline-main p { margin: 3px 0 0; color: var(--muted); font-size: .86rem; }
.deadline-date { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.deadline-date strong { white-space: nowrap; }
.countdown { color: var(--muted); font-size: .82rem; font-weight: 700; }
.overdue .countdown { color: var(--danger); }
.sent-status { color: var(--brand); font-size: .78rem; font-weight: 700; }
.monitoring { margin-top: 18px; border-style: dashed; box-shadow: none; opacity: .78; }
.empty-state { padding: 34px 16px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 1.05rem; }

.client-list { display: grid; gap: 10px; }
.client-card { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.client-card.paused { opacity: .67; }
.client-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.client-title a:first-child { color: var(--ink); font-weight: 800; text-decoration: none; }
.client-meta { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; color: var(--muted); font-size: .82rem; }
.client-meta strong { display: block; margin-top: 2px; color: var(--ink); font-weight: 700; }
.client-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.legend { display: flex; gap: 16px; margin: 10px 0; color: var(--muted); font-size: .82rem; }
.table-only { display: none; }
.search-bar { position: relative; }
.search-bar input { padding-left: 40px; }
.search-bar::before { content: "⌕"; position: absolute; z-index: 1; left: 14px; top: 10px; color: var(--muted); font-size: 1.25rem; }
.bulk-results { display: grid; gap: 7px; margin-top: 12px; }
.bulk-result { padding: 9px 11px; border-radius: 10px; background: #f0f4f1; font-size: .84rem; }
.bulk-result.error { background: var(--danger-soft); color: var(--danger); }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #e5ebe7; }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: var(--brand); transition: width .2s ease; }

.detail-grid { display: grid; gap: 16px; }
.info-list { display: grid; gap: 0; margin: 0; }
.info-list > div { display: grid; grid-template-columns: 1fr 1.25fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid #edf0ee; }
.info-list > div:last-child { border: 0; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; text-align: right; font-weight: 700; word-break: break-word; }
.danger-zone { border-color: #efc1c3; }
.danger-zone h2 { color: var(--danger); }

.login-shell { display: grid; min-height: 100vh; padding: 22px; place-items: center; }
.login-card { width: min(100%, 420px); padding: 28px; }
.login-card .brand { margin-bottom: 36px; }
.login-card h1 { font-size: 2rem; }
.login-card .button { width: 100%; margin-top: 5px; }
.login-footnote { margin: 24px 0 0; text-align: center; color: var(--muted); font-size: .78rem; }
.auth-card { width: min(100%, 480px); }
.auth-inline-link { margin-top: -5px; text-align: right; font-size: .84rem; }
.terms-checkbox { align-items: flex-start; }
.terms-checkbox input { margin-top: 2px; flex: 0 0 auto; }
.gate-note { display: grid; gap: 10px; margin: 22px 0; }
.gate-note p { margin: 0; }
.gate-actions { margin-top: 20px; }
.gate-plans { display: grid; gap: 9px; margin: 18px 0; }
.gate-plans button { width: 100%; }
.gate-danger { margin-top: 28px; border: 1px solid #efc1c3; border-radius: 14px; padding: 16px; }
.invoice-list { display: grid; gap: 0; }
.invoice-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #edf0ee; }
.invoice-row:last-child { border-bottom: 0; }
.invoice-row > div { display: grid; gap: 2px; min-width: 0; }
.invoice-row > div:last-child { text-align: right; }
.invoice-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invoice-row span { color: var(--muted); font-size: .79rem; }

.htmx-indicator { opacity: 0; transition: opacity .15s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.htmx-request { cursor: progress; }

.admin-shell { min-height: 100vh; }
.admin-topbar { border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 94%); }
.admin-topbar-inner { display: flex; width: min(100%, 1120px); margin: 0 auto; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px; }
.admin-menu-toggle { display: none; }
.admin-menu { display: contents; }
.admin-menu-account { display: contents; }
.admin-menu-email { display: none; }
.admin-nav { display: flex; flex: 1 1 100%; gap: 8px; overflow-x: auto; }
.admin-nav a { flex: 0 0 auto; padding: 9px 11px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.admin-nav a:hover, .admin-nav a.active { background: var(--brand-soft); color: var(--brand-dark); }
.admin-main { width: min(100%, 1120px); margin: 0 auto; min-width: 0; padding: 22px 16px 50px; }
.admin-main > *, .admin-main .card { min-width: 0; max-width: 100%; }
.admin-table { display: none; }
.admin-tenant-cards { display: grid; min-width: 0; max-width: 100%; gap: 12px; }
.admin-tenant-cards > *, .admin-tenant-cards article > div:first-child { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.admin-tenant-cards .info-list > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.admin-tenant-cards .info-list dt, .admin-tenant-cards .info-list dd { min-width: 0; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; }
.admin-actions form { margin: 0; }
.admin-comped-form { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-comped-form input { width: auto; min-height: 44px; }
.admin-tenant-cards .admin-actions, .admin-tenant-cards .admin-actions > form, .admin-tenant-cards .admin-comped-form, .admin-tenant-cards .admin-comped-form label { min-width: 0; max-width: 100%; }
.admin-tenant-cards .admin-comped-form { width: 100%; }
.admin-tenant-cards .admin-comped-form label { flex: 1 1 100%; }
.admin-tenant-cards .admin-comped-form input { width: 100%; min-width: 0; }
.admin-datetime { white-space: nowrap; }
.admin-scroll { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
.admin-scroll:focus-visible { outline: 3px solid rgb(29 106 80 / 22%); outline-offset: 3px; }
.admin-scroll table { width: 100%; min-width: 680px; border-collapse: collapse; }
.admin-log { max-height: 360px; overflow: auto; margin: 0; border-radius: 12px; padding: 14px; background: #10251f; color: #dcebe4; font: .78rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.admin-form-card { max-width: 680px; }

.public-body { background: var(--canvas); }
.public-shell { display: flex; min-height: 100vh; flex-direction: column; }
.public-header { display: flex; width: min(100%, 960px); margin: 0 auto; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 94%); }
.public-nav { display: flex; width: 100%; align-items: center; gap: 4px; overflow-x: auto; }
.public-nav a { flex: 0 0 auto; border-radius: 10px; padding: 10px 11px; color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 700; }
.public-nav a:hover, .public-nav a.active { background: var(--brand-soft); color: var(--brand-dark); }
.public-nav .public-signup { background: var(--brand); color: #fff; }
.public-nav .public-signup:hover { background: var(--brand-dark); color: #fff; }
.public-main { width: min(100%, 960px); flex: 1; margin: 0 auto; padding: 30px 16px 50px; }
.public-placeholder { min-height: 42vh; display: grid; align-content: center; justify-items: start; gap: 8px; }
.public-placeholder h1 { margin: 0; }
.public-footer { display: flex; flex-direction: column; gap: 8px; padding: 22px 16px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .82rem; }
.public-footer nav { display: flex; flex-wrap: wrap; gap: 8px; }
.marketing-page { display: grid; width: 100%; gap: 46px; }
.marketing-page p { color: #43564e; line-height: 1.7; }
.marketing-hero { position: relative; overflow: hidden; border: 1px solid #cfe0d7; border-radius: 28px; padding: 42px 22px; background: linear-gradient(145deg, #fff 0%, #f2f8f4 68%, #e3f1e8 100%); box-shadow: var(--shadow); }
.marketing-hero::after { position: absolute; right: -72px; bottom: -92px; width: 210px; height: 210px; border: 34px solid rgb(29 106 80 / 8%); border-radius: 50%; content: ""; }
.marketing-hero-copy { position: relative; z-index: 1; max-width: 700px; }
.marketing-hero h1 { max-width: 660px; margin-bottom: 18px; font-size: clamp(2.35rem, 8vw, 4.6rem); line-height: .98; letter-spacing: -.058em; }
.marketing-lead { max-width: 680px; font-size: clamp(1.08rem, 2.4vw, 1.3rem); }
.marketing-price { margin: 24px 0 0; color: var(--brand-dark) !important; font-size: 1.06rem; font-weight: 800; }
.marketing-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.marketing-actions .button { width: 100%; text-align: center; }
.marketing-grid { display: grid; gap: 14px; }
.marketing-card, .marketing-feature, .pricing-card, .pricing-included, .pricing-notes { border: 1px solid var(--line); background: var(--paper); box-shadow: 0 10px 28px rgb(20 52 43 / 5%); }
.marketing-card { border-radius: var(--radius); padding: 24px 20px; }
.marketing-card h2, .marketing-feature h2 { margin-bottom: 10px; color: var(--brand-dark); font-size: 1.18rem; }
.marketing-card p, .marketing-feature p { margin-bottom: 0; }
.marketing-feature { position: relative; overflow: hidden; border-radius: 14px; padding: 22px 20px 22px 24px; }
.marketing-feature::before { position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--brand); content: ""; }
.marketing-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; border-radius: 24px; padding: 28px 22px; background: var(--brand-dark); color: #fff; }
.marketing-cta h2 { margin-bottom: 8px; color: #fff; font-size: clamp(1.55rem, 4vw, 2rem); }
.marketing-cta p { margin-bottom: 0; color: #dcebe4; }
.marketing-cta .button { flex: 0 0 auto; background: #fff; color: var(--brand-dark); }
.pricing-page { max-width: 760px; margin: 0 auto; }
.pricing-intro { text-align: center; }
.pricing-intro h1 { margin-bottom: 10px; font-size: clamp(2.4rem, 8vw, 4rem); }
.pricing-intro .marketing-lead { margin: 0 auto; }
.pricing-grid { display: grid; gap: 14px; }
.pricing-card { border-radius: 22px; padding: 28px 22px; text-align: center; }
.pricing-card h2 { margin-bottom: 16px; color: var(--brand-dark); font-size: 1.15rem; }
.pricing-card p:last-child { margin-bottom: 0; }
.pricing-amount { margin-bottom: 12px; color: var(--ink) !important; font-size: clamp(1.65rem, 6vw, 2.3rem); font-weight: 850; letter-spacing: -.04em; }
.pricing-card-link { display: block; border-radius: 22px; color: inherit; cursor: pointer; text-decoration: none; }
.pricing-card-link .pricing-card { height: 100%; transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; }
.pricing-card-link .pricing-card h2, .pricing-card-link .pricing-card p { transition: color .2s ease; }
.pricing-card-link:hover .pricing-card, .pricing-card-link:focus-visible .pricing-card { background: var(--brand); color: #fff; }
.pricing-card-link:hover .pricing-card h2, .pricing-card-link:hover .pricing-card p, .pricing-card-link:focus-visible .pricing-card h2, .pricing-card-link:focus-visible .pricing-card p { color: #fff !important; }
.pricing-card-link:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 3px; }
.pricing-included, .pricing-notes { border-radius: 22px; padding: 26px 22px; }
.pricing-included-lead { color: var(--ink) !important; font-size: 1.08rem; font-weight: 800; }
.pricing-included ul { display: grid; gap: 12px; margin: 20px 0 0; padding-left: 22px; }
.pricing-included li { padding-left: 4px; color: #43564e; line-height: 1.55; }
.pricing-included li::marker { color: var(--brand); }
.pricing-notes { display: grid; gap: 0; background: #f9fbf9; box-shadow: none; }
.pricing-notes p { margin: 0; padding: 15px 0; border-bottom: 1px solid var(--line); }
.pricing-notes p:first-child { padding-top: 0; }
.pricing-notes p:last-child { padding-bottom: 0; border-bottom: 0; }
.legal-document { width: 100%; max-width: 70ch; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; background: var(--paper); box-shadow: var(--shadow); }
.legal-document h1 { margin-bottom: 18px; }
.legal-document h2 { margin: 30px 0 12px; font-size: 1.3rem; }
.legal-document h3 { margin: 24px 0 10px; }
.legal-document p, .legal-document li { color: #33483f; line-height: 1.68; }
.legal-document ul { padding-left: 22px; }
.legal-document hr { margin: 26px 0; border: 0; border-top: 1px solid var(--line); }
.legal-table-wrap { margin: 16px 0 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.legal-table-wrap table { width: 100%; min-width: 600px; border-collapse: collapse; }
.legal-table-wrap th, .legal-table-wrap td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-table-wrap th { background: var(--brand-soft); color: var(--brand-dark); font-size: .78rem; }
.legal-table-wrap tr:last-child td { border-bottom: 0; }

@media (max-width: 767px) {
  .admin-topbar-inner { justify-content: space-between; }
  .admin-menu-toggle { display: inline-grid; width: 44px; min-height: 44px; flex: 0 0 auto; place-content: center; gap: 4px; padding: 8px; }
  .admin-menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentcolor; }
  .admin-menu { display: none; width: 100%; min-width: 0; flex: 1 1 100%; flex-direction: column; gap: 10px; padding-top: 4px; }
  .admin-menu.is-open { display: flex; }
  .admin-nav { width: 100%; flex: 0 0 auto; flex-direction: column; gap: 4px; overflow: visible; }
  .admin-nav a { width: 100%; padding: 11px 12px; }
  .admin-menu-account { display: grid; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
  .admin-menu-email { display: block; overflow-wrap: anywhere; margin: 0; color: var(--muted); font-size: .84rem; }
  .admin-menu-account form, .admin-menu-account button { width: 100%; }
  .admin-page-email { display: none; }
}

@media (min-width: 720px) {
  .main { padding: 28px 28px 54px; }
  .two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(260px, .75fr) minmax(0, 1.55fr); align-items: start; }
  .deadline-row { grid-template-columns: minmax(220px,1.5fr) minmax(170px,.8fr) auto; align-items: center; }
  .deadline-date { display: block; text-align: right; }
  .deadline-date .countdown { display: block; margin-top: 3px; }
  .client-meta { grid-template-columns: repeat(4, minmax(100px,1fr)); }
  .form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.cols-2 .full { grid-column: 1 / -1; }
  .public-header { flex-wrap: nowrap; padding: 18px 28px; }
  .public-nav { width: auto; }
  .public-main { padding: 46px 28px 70px; }
  .public-footer { flex-direction: row; flex-wrap: wrap; justify-content: space-between; padding: 24px 28px; }
  .marketing-page { gap: 60px; }
  .marketing-hero { padding: 70px 56px; }
  .marketing-actions { flex-direction: row; }
  .marketing-actions .button { width: auto; }
  .marketing-pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .marketing-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .marketing-cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 34px 38px; }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-card, .pricing-included, .pricing-notes { padding: 32px; }
  .legal-document { padding: 38px 42px; }
}

@media (min-width: 1000px) {
  .shell { display: grid; grid-template-columns: 245px minmax(0, 1fr); padding-bottom: 0; }
  .sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; gap: 28px; padding: 28px 20px; border-right: 1px solid var(--line); background: rgb(255 255 255 / 88%); backdrop-filter: blur(14px); }
  .sidebar nav { display: grid; gap: 6px; }
  .mobile-nav { display: none; }
  .main { width: min(100%, 1120px); padding: 32px 36px 60px; }
  .topbar { margin-bottom: 44px; }
  .card-pad { padding: 22px; }
  .client-list.cards-only { display: none; }
  .table-only { display: block; overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; }
  th { padding: 11px 10px; border-bottom: 1px solid var(--line); color: var(--muted); text-align: left; font-size: .76rem; letter-spacing: .035em; text-transform: uppercase; }
  td { padding: 13px 10px; border-bottom: 1px solid #edf0ee; vertical-align: middle; font-size: .88rem; }
  tbody tr:last-child td { border-bottom: 0; }
  th a { color: inherit; text-decoration: none; }
  .table-actions { display: flex; flex-wrap: wrap; gap: 5px; }
  .admin-topbar-inner { flex-wrap: nowrap; padding: 16px 36px; }
  .admin-nav { flex-basis: auto; }
  .admin-main { padding: 32px 36px 60px; }
  .admin-table { display: block; overflow-x: auto; }
  .admin-table table { table-layout: fixed; }
  .admin-table th:nth-child(1) { width: 21%; }
  .admin-table th:nth-child(2) { width: 13%; }
  .admin-table th:nth-child(3) { width: 8%; }
  .admin-table th:nth-child(4) { width: 10%; }
  .admin-table th:nth-child(5) { width: 6%; }
  .admin-table th:nth-child(6), .admin-table th:nth-child(7) { width: 13%; }
  .admin-table th:nth-child(8) { width: 16%; }
  .admin-table td:first-child { overflow-wrap: anywhere; }
  .admin-table th:nth-child(2), .admin-table td:nth-child(2) { padding-right: 14px; }
  .admin-table th:nth-child(3), .admin-table td:nth-child(3) { padding-left: 14px; }
  .admin-table td:nth-child(2) .badge { max-width: 100%; white-space: nowrap; }
  .admin-table tbody tr:has(.admin-comped-details[open]) > td { vertical-align: top; }
  .admin-table .admin-actions { display: grid; align-items: start; gap: 7px; }
  .admin-table .admin-actions > form button { width: 100%; }
  .admin-table .admin-comped-details { width: 100%; }
  .admin-table .admin-comped-details summary { cursor: pointer; color: var(--brand); font-size: .76rem; font-weight: 800; line-height: 1.3; }
  .admin-table .admin-comped-panel { display: grid; gap: 7px; margin-top: 7px; }
  .admin-table .admin-comped-panel form { width: 100%; }
  .admin-table .admin-comped-form { display: grid; align-items: stretch; gap: 6px; }
  .admin-table .admin-comped-form input { width: 100%; min-width: 0; }
  .admin-table .admin-comped-panel button { width: 100%; }
  .admin-table .small-button { min-height: 38px; padding: 6px 8px; font-size: .76rem; }
  .admin-tenant-cards { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.demo-page { gap: 38px; }
.demo-intro { display: grid; gap: 14px; max-width: 760px; }
.demo-intro h1 { margin: 0; font-size: clamp(2.25rem, 8vw, 4.4rem); line-height: 1; letter-spacing: -.052em; }
.demo-eyebrow, .demo-step-number { margin: 0; color: var(--brand); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.demo-responsibility { margin: 4px 0 0; padding: 16px 18px; border-left: 4px solid var(--brand); border-radius: 0 12px 12px 0; background: var(--brand-soft); }
.demo-walkthrough { display: grid; gap: 28px; }
.demo-step { display: grid; gap: 18px; padding: 20px; border: 1px solid #d7e3dc; border-radius: 22px; background: #fff; box-shadow: 0 14px 36px rgb(23 52 43 / 8%); }
.demo-step-copy { display: grid; align-content: start; gap: 8px; }
.demo-step-copy h2, .demo-step-copy p { margin: 0; }
.demo-shot { display: grid; min-width: 0; min-height: 220px; margin: 0; place-items: center; overflow: hidden; border: 1px solid #cbdad2; border-radius: 15px; background: linear-gradient(145deg, #eef6f1, #f9fbfa); }
.demo-shot img { display: block; width: 100%; height: auto; color: var(--muted); font-size: .86rem; text-align: center; }
.demo-shot-mobile img { width: min(100%, 420px); }
.demo-cta { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; padding: 28px 24px; border-radius: 22px; background: var(--brand-dark); color: #fff; }
.demo-cta h2, .demo-cta p { margin: 0; color: inherit; }
.demo-cta div { display: grid; gap: 8px; }
.demo-cta .button { flex: 0 0 auto; background: #fff; color: var(--brand-dark); }

@media (min-width: 720px) {
  .demo-page { gap: 54px; }
  .demo-walkthrough { gap: 34px; }
  .demo-step { grid-template-columns: minmax(190px, .72fr) minmax(0, 1.7fr); gap: 30px; align-items: center; padding: 30px; }
  .demo-step:nth-child(even) { grid-template-columns: minmax(0, 1.7fr) minmax(190px, .72fr); }
  .demo-step:nth-child(even) .demo-step-copy { grid-column: 2; }
  .demo-step:nth-child(even) .demo-shot { grid-column: 1; grid-row: 1; }
  .demo-shot { min-height: 320px; }
  .demo-cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 34px 38px; }
}

.registration-paused { max-width: 680px; }
.registration-paused-reason { display: grid; gap: 10px; }
.registration-paused-reason p, .registration-paused > p { margin: 0; }
.admin-registration-card textarea { width: 100%; resize: vertical; }
