/* Stitch File2Finance visual system: restrained surfaces, evergreen actions, compact hierarchy. */
:root {
  color-scheme: light;
  font-family: 'Instrument Sans', Arial, sans-serif;
  color: #172f2d;
  background: #f8faf8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #173432;
  --muted: #647874;
  --line: #d9e3de;
  --green: #00342e;
  --green-dark: #0f4c44;
  --mint: #cee4df;
  --orange: #a66a12;
  --shadow: 0 12px 32px rgba(20, 48, 43, .055);
  --surface: #fff;
  --surface-soft: #f1f6f3;
  --heading-font: 'Wix Madefor Display', 'Instrument Sans', Arial, sans-serif;
  --number-font: 'Source Code Pro', monospace;
}
body { background: #f8faf8; color: var(--ink); font-family: 'Instrument Sans', Arial, sans-serif; }
h1,h2,h3,h4,.form-heading h1,.hero h1,.hero-card h2,.plan-card h3,.section-heading h2,.page-heading h2 { font-family: var(--heading-font); }
code,pre,.plan-price,.metric-card strong,.usage-number { font-family: var(--number-font); }
a { color: var(--green-dark); }
.site-header { height: 64px; padding: 0 max(24px, calc((100vw - 1120px)/2)); background: #fff; border-color: #e2e9e5; box-shadow: none; backdrop-filter: none; }
.brand { width: 190px; height: 48px; gap: 18px; overflow: visible; flex:none; }
.brand img { width: 116px; height: 42px; }
.brand-product { color: var(--ink); border-left: 1px solid var(--line); padding-left: 16px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.secure-indicator { background: #f6faf8; border-color: var(--line); color: #4e6862; font-size: 11px; padding: 7px 11px; }
.button { min-height: 38px; padding: 9px 14px; border-radius: 5px; box-shadow: none; font-size: 12px; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.button:hover { transform: none; box-shadow: none; }
.button-primary { color: #fff; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.button-outline,.button-quiet { background: #fff; border-color: #ccd9d4; color: var(--green); }
.button-outline:hover,.button-quiet:hover { background: #f2f7f4; border-color: #9bb9af; }
.button-cancel { background:#fff; border-color:#d89a94; color:#a3342c; }
.button-cancel:hover { background:#fff4f2; border-color:#bd6259; }
#cancel-extraction[hidden] { display:none!important; }
.upload-card .button-row #cancel-extraction { min-height:38px; }
.text-button,.back-link { color: var(--green-dark); }
.eyebrow { color: #647c74; font-size: 10px; letter-spacing: .13em; }
.public-home { max-width: none; margin: 0; padding: 0; }
.practice-hero { max-width: 1120px; min-height: 352px; margin: auto; padding: 48px 0 42px; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .88fr); gap: 64px; }
.hero h1 { max-width: 610px; font-size: clamp(36px, 4.2vw, 52px); line-height: 1.08; letter-spacing: -.035em; color: var(--ink); }
.hero h1 span { color: var(--ink); }
.practice-hero .hero-copy h1 span { color: var(--ink); }
.hero-lede { max-width: 600px; margin: 15px 0 19px; color: #5e716c; font-size: 14px; line-height: 1.55; }
.hero-actions { gap: 9px; }
.hero-actions p { flex-basis: 100%; margin-top: 2px; color: #657871; }
.hero-card { max-width: 440px; padding: 22px; border: 1px solid var(--line); border-radius: 9px; box-shadow: none; }
.hero-card:after { width: 140px; height: 140px; right: -95px; top: -95px; background: #e3f1ed; }
.hero-card-top { margin-bottom: 16px; }
.hero-card h2 { font-size: 16px; letter-spacing: -.01em; }
.status-pill { gap: 6px; padding: 5px 8px; border: 0; background: #e8f4ef; color: var(--green-dark); font-size: 10px; }
.workflow-steps { display: grid; gap: 14px; list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.workflow-steps li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.workflow-step-number { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; font-size: 10px; font-weight: 700; }
.workflow-steps strong { display:block; font-size: 12px; }
.workflow-steps p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.benefits-section { padding: 26px max(24px, calc((100vw - 1040px)/2)) 30px; background: #f3f6f3; border-top: 1px solid #e1e8e3; border-bottom: 1px solid #e1e8e3; }
.section-heading { align-items: end; }
.section-heading h2,.page-heading h2 { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.section-heading>div>p:not(.eyebrow),.section-heading>p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.benefit-grid { display:grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-top: 17px; }
.benefit-card { min-height: 100px; padding: 13px 14px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow:none; }
.benefit-icon { display:block; color: var(--green-dark); font-size: 15px; line-height: 1; }
.benefit-card h3 { margin: 8px 0 4px; font: 600 12px 'Instrument Sans',sans-serif; }
.benefit-card p { margin:0; color:var(--muted); font-size:10px; line-height:1.45; }
.plans-section { padding: 30px max(24px, calc((100vw - 1040px)/2)) 28px; border:0; background:#f8faf8; }
.plans-section .section-heading { align-items:end; }
.plans-section .section-heading h2 { font-size: 22px; }
.plans-section .section-heading>div>p:not(.eyebrow) { max-width: 620px; }
.reset-time { flex:none; border:1px solid var(--line); border-radius:5px; padding:7px 10px; background:#fff; font-size:10px!important; }
.plan-grid { gap:12px; margin-top:17px; }
.plan-card { display:flex; flex-direction:column; min-height:210px; padding:16px; background:#fff; border:1px solid #d7e0db; border-radius:7px; box-shadow:none; }
.plan-card h3 { font:600 15px 'Instrument Sans',sans-serif; }
.plan-top>span { font-size:8px; letter-spacing:.08em; }
.plan-price { margin:12px 0 2px; color:#162e2d; font-size:27px; font-weight:600; letter-spacing:-.04em; }
.plan-price small { font:400 10px 'Instrument Sans',sans-serif; color:var(--muted); letter-spacing:0; }
.plan-tax { margin:0 0 10px; font-size:9px; }
.plan-card ul { gap:6px; margin:0 0 14px; flex:1; }
.plan-card li { font-size:10px; line-height:1.4; }
.plan-featured { border:1.5px solid var(--green-dark); box-shadow:none; }
.plan-ribbon { top:10px; right:12px; padding:4px 7px; border-radius:4px; background:#e4f0ed; font-size:8px; }
.plans-footnote { margin-top:10px; font-size:9px; }
.public-footer { max-width:1120px; margin:auto; padding:13px 0; border-top:1px solid var(--line); font-size:9px; }
.public-footer #legal-links { display:flex; flex-wrap:wrap; gap:12px; }
.public-footer a { margin:0; }

/* Signup: match the Stitch two-column layout and make every form section scannable. */
#signup-view.narrow-view { width:min(1120px,100%); max-width:1120px; margin:0 auto; padding:20px 24px 56px; }
#signup-view>.back-link { margin:0 0 10px; font-size:12px; }
#signup-view .form-card { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(285px,.72fr); align-items:start; gap:14px 26px; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
#signup-view .form-heading,#signup-view .signup-progress,#signup-view .secure-note { grid-column:1/-1; }
#signup-view .form-heading { align-items:flex-start; gap:14px; margin:0; padding:21px 24px 3px; }
#signup-view .form-heading .seal-mark { width:38px; height:38px; border-radius:9px; background:linear-gradient(135deg,#00665c,#0d987f); }
#signup-view .form-heading h1 { font-size:30px; line-height:1.15; letter-spacing:-.025em; }
#signup-view .form-heading p:last-child { margin-top:5px; }
#signup-view .signup-progress { margin:0 24px 4px; }
#signup-view .signup-progress ol { gap:8px; }
#signup-view .signup-progress li { padding:8px 7px; border-width:1px; border-style:solid; border-color:transparent transparent var(--line); }
#signup-view .signup-progress li.is-current { border-bottom-color:var(--green); color:var(--green); }
#signup-view .signup-progress li.is-complete { border-bottom-color:#89b9a8; }
#signup-view .signup-progress li>span,#signup-view .signup-progress li.is-current>span,#signup-view .signup-progress li.is-complete>span { width:22px; height:22px; border-color:var(--green); background:var(--green); font-size:10px; }
#signup-view .signup-progress li strong { font-size:11px; }
#signup-view .chosen-plan { grid-column:2; grid-row:3; position:sticky; top:84px; margin:0; padding:18px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); font-size:13px; line-height:1.6; box-shadow:none; }
#signup-view .chosen-plan:before { content:'SELECTED PLAN'; display:block; margin-bottom:9px; color:#647970; font-size:9px; font-weight:700; letter-spacing:.12em; }
#signup-view #signup-form,#signup-view #verify-email-form { grid-column:1; grid-row:3; min-width:0; margin:0; }
#signup-view #signup-form { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
#signup-view #signup-form .signup-section { min-width:0; margin:0; padding:17px 18px; border:1px solid var(--line); border-radius:8px; background:#fff; box-shadow:none; }
#signup-view #signup-form .form-section-title,#signup-view #signup-form legend { margin:0 0 12px; padding:0; color:var(--ink); font:600 16px var(--heading-font); }
#signup-view #signup-form .address-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 14px; }
#signup-view #signup-form .address-fields legend { grid-column:1/-1; float:left; width:100%; }
#signup-view #signup-form .address-fields label:last-of-type { grid-column:1/-1; }
#signup-view #signup-form .signup-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px 12px; }
#signup-view #signup-form .signup-field-wide { grid-column:1/-1; }
#signup-view #signup-form label:not(.check-label) { display:grid; gap:5px; color:#283f3b; font-size:11px; line-height:1.35; }
#signup-view #signup-form input:not([type=checkbox]):not([type=file]):not([type=color]),#signup-view #signup-form select { width:100%; height:38px; padding:0 10px; border:1px solid #d3dfd9; border-radius:5px; background:#fff; color:var(--ink); font:400 12px 'Instrument Sans',sans-serif; }
#signup-view #signup-form input::placeholder { color:#899791; }
#signup-view #signup-form input:focus-visible,#signup-view #signup-form select:focus-visible,#signup-view #signup-form button:focus-visible,#signup-view #signup-form a:focus-visible { outline:3px solid rgba(15,76,68,.18); outline-offset:2px; border-color:#5d978a; }
#signup-view #signup-form .postcode-lookup-row { gap:6px; }
#signup-view #signup-form .postcode-lookup-button { min-height:36px; padding:0 10px; font-size:10px; }
#signup-view #signup-form .field-hint { color:#71827c; font-size:10px; line-height:1.4; }
#signup-view #signup-form .billing-same-label { grid-column:1/-1; margin-top:1px; }
#signup-view #signup-form .billing-same-label input { width:14px!important; height:14px!important; accent-color:var(--green); }
#signup-view #signup-form .branding-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(230px,1fr); align-items:start; gap:14px; margin-top:12px; padding-top:12px; border-top:1px solid #e7ece8; }
#signup-view #signup-form .logo-upload-field input[type=file] { width:100%; min-height:44px; padding:7px; border:1px solid #d3dfd9; border-radius:5px; font-size:10px; }
#signup-view #signup-form .brand-colour-picker { display:flex; align-items:center; gap:8px; min-height:34px; }
#signup-view #signup-form .logo-preview { width:34px; height:34px; object-fit:contain; padding:3px; border:1px solid var(--line); border-radius:5px; background:#fff; }
.brand-colour-options { display:flex; align-items:center; gap:5px; }
.brand-colour-swatch { display:inline-grid; place-items:center; width:20px; height:20px; padding:0; border:1px solid rgba(22,47,43,.22); border-radius:50%; background:var(--swatch-color); cursor:pointer; }
.brand-colour-swatch[aria-pressed="true"] { outline:2px solid #fff; box-shadow:0 0 0 2px var(--green); }
#signup-view #signup-form input[type=color] { width:30px; height:30px; padding:2px; border:1px solid var(--line); border-radius:5px; background:#fff; cursor:pointer; }
.brand-colour-value { color:#4d625b; font:500 9px var(--number-font); }
#signup-view #signup-form .legal-signup-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; }
#signup-view #signup-form .legal-signup-heading h2 { margin:0 0 9px; font:600 16px var(--heading-font); }
#signup-view #signup-form .draft-pill { align-self:flex-start; padding:4px 7px; border-radius:12px; background:#fff2cc; color:#795717; font-size:9px; }
#signup-view #signup-form .test-mode-signup-note { margin:0 0 10px; font-size:11px; }
#signup-view #signup-form .consent-box { display:grid; gap:7px; margin:0; padding:9px 10px; border:0; border-radius:5px; background:#f7f9f7; }
#signup-view #signup-form .consent-box .check-label { gap:8px; color:#536660!important; font-size:10px!important; line-height:1.45; }
#signup-view #signup-form .check-label input { width:14px!important; height:14px!important; accent-color:var(--green); }
#signup-view #signup-form .button-wide { width:100%; }
#signup-view .secure-note { max-width:100%; margin:0; padding:12px 24px 18px; border-top:1px solid var(--line); font-size:10px; }
#signup-view #verify-email-form { align-content:start; padding:17px 18px; border:1px solid var(--line); border-radius:8px; background:#fff; }
#signup-view #verify-email-form .form-section-title { font:600 19px var(--heading-font); }

/* Workspace screens share the same light, low-noise visual language. */
#app-view { display:grid; grid-template-columns:248px minmax(0,1fr); min-height:calc(100vh - 64px); background:#f8faf8; }
.app-sidebar { position:sticky; top:64px; display:flex; flex-direction:column; width:auto; height:calc(100vh - 64px); padding:17px 14px; background:#f3f6f3; border-right:1px solid var(--line); color:var(--ink); box-shadow:none; }
.brand-sidebar { width:100%; height:42px; margin:0 0 13px; }
.brand-sidebar img { width:122px; height:40px; }
.sidebar-label { margin:7px 9px 10px; color:#71827c; font-size:9px; font-weight:700; letter-spacing:.12em; }
.firm-side-card { display:flex; align-items:center; gap:9px; padding:9px; border:1px solid var(--line); border-radius:6px; background:#fff; }
.firm-side-card strong { display:block; font-size:11px; }
.firm-side-card small { display:block; max-width:155px; margin-top:2px; overflow:hidden; color:var(--muted); font-size:9px; text-overflow:ellipsis; }
.firm-avatar { width:30px; height:30px; flex:none; border:1px solid var(--line); border-radius:5px; background:#fff; color:var(--green); font-size:11px; }
.app-nav { display:grid; gap:4px; margin-top:16px; }
.nav-item { display:flex; align-items:center; gap:9px; min-height:36px; padding:7px 9px; border:0; border-radius:5px; background:transparent; color:#405853; text-align:left; font-size:11px; }
.nav-item span { width:17px; color:var(--green-dark); text-align:center; }
.nav-item:hover,.nav-item.is-active { background:var(--mint); color:var(--green); }
.sidebar-bottom { margin-top:auto; }
.support-note { display:flex; gap:8px; align-items:flex-start; padding:10px; border-top:1px solid var(--line); color:var(--green-dark); }
.support-note strong,.support-note small { display:block; }
.support-note strong { font-size:10px; }
.support-note small { margin-top:3px; color:var(--muted); font-size:9px; line-height:1.4; }
.logout-button { width:100%; padding:8px; border:1px solid var(--line); border-radius:5px; background:#fff; color:var(--ink); font-size:10px; }
.app-main { min-width:0; background:#f8faf8; }
.app-topbar { min-height:68px; position:sticky; top:64px; padding:11px clamp(18px,3vw,38px); background:#fff; border-bottom:1px solid var(--line); box-shadow:none; backdrop-filter:none; }
.app-topbar h1 { color:var(--ink); font:600 16px var(--heading-font); }
.app-main>section:not(.app-topbar) { padding:22px clamp(18px,3vw,38px) 28px; }
.dashboard-grid { gap:12px; }
.metric-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.metric-card,.surface-card { border:1px solid var(--line); border-radius:7px; background:#fff; box-shadow:none; }
.metric-card { min-height:86px; padding:13px; }
.metric-card>span { color:#596e67; font-size:10px; }
.metric-card strong { display:block; margin:7px 0 2px; font-size:22px; font-weight:500; }
.metric-card small,.muted-copy { color:var(--muted); }
.surface-card { padding:16px; }
.surface-heading { margin-bottom:12px; }
.surface-heading h3 { font:600 16px var(--heading-font); }
.usage-track { height:8px; border-radius:5px; background:#e6ede9; }
.usage-track span { border-radius:5px; background:var(--green-dark); }
.welcome-row h2 { color:var(--ink); font:600 24px var(--heading-font); }
.workspace-status-strip { display:flex; align-items:center; gap:9px; min-height:38px; margin:0 0 15px; padding:7px 10px; border:1px solid var(--line); border-radius:6px; background:#f3f6f3; }
.workspace-status-label { color:#536760; font-size:10px; font-weight:600; }
.workspace-status-pill { display:inline-flex; align-items:center; min-height:22px; padding:3px 9px; border-radius:999px; background:#d8f3e5; color:#0b462b; font-size:9px; font-weight:700; }
.workspace-status-pill.is-warning { background:#fef3c7; color:#78350f; }
.workspace-status-detail { margin-left:auto; color:var(--muted); font-size:10px; }
.overview-heading { margin-bottom:13px; }
.overview-heading h2 { margin:3px 0 4px; font-size:22px; }
.overview-heading p:last-child { margin:0; color:var(--muted); font-size:11px; }
.shared-allowance-card { grid-column:1 / -1; }
.workspace-address-row strong { max-width:70%; overflow-wrap:anywhere; text-align:right; }
.quick-actions-card { min-height:150px; }
.quick-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:13px; }
.quick-actions .button { min-height:34px; padding:7px 10px; font-size:10px; }
.quota-action,.dashboard-info,.setup-list li { border-color:var(--line); }
.tab-panel .upload-card,.table-wrap,.results-table,.team-list { border-color:var(--line); }
input,select,textarea { accent-color:var(--green); }
:focus-visible { outline-color:rgba(15,76,68,.34); }

@media(max-width:900px) {
  .practice-hero { padding:38px 24px; gap:28px; }
  .benefits-section,.plans-section { padding-left:24px; padding-right:24px; }
  .public-footer { margin:0 24px; }
  #signup-view.narrow-view { padding-left:18px; padding-right:18px; }
  #signup-view .form-card { grid-template-columns:minmax(0,1.35fr) minmax(245px,.75fr); gap:12px 16px; }
  #app-view { grid-template-columns:220px minmax(0,1fr); }
}
@media(max-width:720px) {
  .site-header { height:58px; padding:0 14px; }
  .brand { width:auto; gap:10px; }
  .brand img { width:99px; }
  .brand-product { padding-left:10px; font-size:11px; }
  .header-right { gap:6px; }
  .header-right .secure-indicator { display:none; }
  .practice-hero { grid-template-columns:1fr; min-height:0; padding:34px 18px 30px; gap:22px; }
  .hero h1 { font-size:clamp(34px,9vw,46px); }
  .hero-lede { font-size:13px; }
  .hero-card { justify-self:stretch; max-width:none; }
  .benefits-section,.plans-section { padding:23px 16px; }
  .section-heading { align-items:flex-start; flex-direction:column; gap:7px; }
  .benefit-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .plan-grid { grid-template-columns:1fr; gap:11px; }
  .plan-card { min-height:0; }
  .reset-time { align-self:flex-start; }
  .public-footer { margin:0 16px; align-items:flex-start; flex-direction:column; gap:8px; }
  #signup-view.narrow-view { width:100%; padding:16px 14px 40px; }
  #signup-view .form-card { display:flex; flex-direction:column; gap:12px; }
  #signup-view .form-heading { padding:10px 4px 0; }
  #signup-view .signup-progress { width:100%; margin:0 0 3px; }
  #signup-view .chosen-plan { position:static; order:2; width:100%; }
  #signup-view #signup-form,#signup-view #verify-email-form { width:100%; order:3; }
  #signup-view #signup-form .signup-fields,#signup-view #signup-form .address-fields { grid-template-columns:1fr; }
  #signup-view #signup-form .signup-field-wide,#signup-view #signup-form .address-fields label:last-of-type { grid-column:1; }
  #signup-view #signup-form .branding-row { grid-template-columns:1fr; }
  #signup-view .secure-note { order:4; padding:12px 4px; }
  #app-view { display:block; min-height:calc(100vh - 58px); padding-bottom:62px; }
  .app-sidebar { position:fixed; inset:auto 0 0; z-index:20; width:100%; height:62px; padding:4px 8px; border-top:1px solid var(--line); border-right:0; background:#fff; }
  .app-sidebar>.brand-sidebar,.app-sidebar>.sidebar-label,.app-sidebar>.firm-side-card,.app-sidebar>.support-note { display:none; }
  .app-nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; margin:0; }
  .nav-item { flex-direction:column; justify-content:center; gap:1px; min-height:48px; padding:3px; font-size:9px; text-align:center; }
  .nav-item span { font-size:14px; }
  .sidebar-bottom { display:none; }
  .app-topbar { top:58px; }
  .app-main>section:not(.app-topbar) { padding:18px 14px 26px; }
  .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workspace-status-detail { flex-basis:100%; margin-left:0; }
  .workspace-status-strip { flex-wrap:wrap; }
  .shared-allowance-card { grid-column:auto; }
  .quick-actions { display:grid; grid-template-columns:1fr; }
}
@media(max-width:420px) {
  .benefit-grid { grid-template-columns:1fr; }
  .header-plan-link { padding:8px 9px; font-size:10px; }
  .signup-progress li strong { font-size:9px!important; }
}
/* Final Stitch parity overrides: scoped after the legacy practice styles so the intended compact hierarchy wins. */
#public-home .practice-hero {
  min-height: 0;
  padding-top: 30px;
  padding-bottom: 32px;
  gap: 42px;
}
#public-home .practice-hero .hero-copy h1 {
  max-width: 560px;
  margin: 12px 0 10px;
  font-size: clamp(32px, 3.15vw, 43px);
  line-height: 1.04;
  letter-spacing: -.04em;
}
#public-home .practice-hero .hero-lede {
  max-width: 560px;
  margin: 10px 0 16px;
  font-size: 12px;
  line-height: 1.52;
}
#public-home .practice-workflow {
  max-width: 420px;
  padding: 18px;
}
#public-home .practice-workflow .hero-card-top { margin-bottom: 13px; }
#public-home .practice-workflow .workflow-steps { gap: 11px; }
#public-home .practice-workflow .workflow-steps li { grid-template-columns: 22px minmax(0, 1fr); gap: 9px; }
#public-home .practice-workflow .workflow-steps p { font-size: 10px; }
#public-home .plan-card { min-height: 210px; }

#login-view.narrow-view { width: min(100%, 560px); max-width: 560px; padding-top: clamp(28px, 9vh, 82px); }
#login-view .login-card { padding: 26px; border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 48, 43, .045); }
#login-view .form-heading { gap: 13px; margin-bottom: 19px; }
#login-view .form-heading h1 { font-size: 25px; line-height: 1.16; }
#login-view .form-heading p:last-child { font-size: 12px; }
#login-view .login-card form { gap: 13px; }

#provision-view.narrow-view { width: min(100%, 720px); max-width: 720px; padding-top: clamp(24px, 8vh, 70px); }
#provision-view .provision-card { padding: 26px; border-radius: 8px; box-shadow: none; }
#provision-view .provision-card h1 { font-size: 26px; line-height: 1.18; letter-spacing: -.025em; }
#provision-view .provision-copy { max-width: 580px; font-size: 12px; line-height: 1.55; }

.document-kind-tabs { display: flex; gap: 4px; margin: 0 0 16px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: #f3f6f3; }
.document-kind-tab { flex: 1; min-height: 34px; padding: 7px 9px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #536760; font-size: 11px; font-weight: 600; }
.document-kind-tab:hover { background: #fff; }
.document-kind-tab.is-active { border-color: #d7e0db; background: #fff; color: var(--green); box-shadow: 0 1px 2px rgba(20,48,43,.06); }
.document-kind-tab:focus-visible { outline: 2px solid rgba(15,76,68,.45); outline-offset: 2px; }

@media(max-width:900px) {
  #public-home .practice-hero { gap: 28px; }
  #public-home .practice-hero .hero-copy h1 { font-size: clamp(32px, 4vw, 40px); }
}
@media(max-width:720px) {
  #public-home .practice-hero { padding: 26px 18px 24px; gap: 20px; }
  #public-home .practice-hero .hero-copy h1 { max-width: 560px; font-size: clamp(31px, 8.2vw, 39px); }
  #public-home .practice-hero .hero-lede { font-size: 12px; }
  #public-home .practice-workflow { max-width: none; padding: 16px; }
  #login-view.narrow-view { width: 100%; padding: 32px 14px 45px; }
  #login-view .login-card,#provision-view .provision-card { padding: 20px; }
  #provision-view.narrow-view { width: 100%; padding: 26px 14px 45px; }
  .document-kind-tabs { gap: 2px; padding: 3px; }
  .document-kind-tab { min-height: 38px; padding: 6px 4px; font-size: 10px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important; } }

/* Workspace shell follows the Stitch app frame: firm navigation owns the left rail, workspace content owns the header. */
body.is-workspace > .site-header { display:none; }
body.is-workspace #app-view { min-height:100vh; grid-template-columns:210px minmax(0,1fr); }
body.is-workspace .app-sidebar { top:0; height:100vh; padding:16px 12px; background:#fff; }
body.is-workspace .brand-sidebar { display:flex; align-items:center; gap:10px; height:38px; margin:0 3px 12px; padding:0; background:transparent; }
body.is-workspace .brand-sidebar img { width:88px; height:36px; }
body.is-workspace .brand-sidebar::after { content:'File2Finance'; display:block; padding-left:10px; border-left:1px solid var(--line); color:var(--ink); font-size:11px; font-weight:700; white-space:nowrap; }
body.is-workspace .sidebar-label { margin:7px 8px 8px; }
body.is-workspace .firm-side-card { padding:8px; }
body.is-workspace .app-topbar { top:0; min-height:62px; padding:10px 24px; }
body.is-workspace .app-topbar .eyebrow { margin:0 0 3px; font-size:8px; }
body.is-workspace .app-topbar h1 { font-size:18px; }
body.is-workspace .app-main>section:not(.app-topbar) { padding:18px 24px 26px; }
body.is-workspace .workspace-status-strip { margin-bottom:12px; }
body.is-workspace .overview-heading { margin-bottom:12px; }
body.is-workspace .metric-grid { gap:9px; }
body.is-workspace .metric-card { min-height:78px; padding:11px 12px; }
body.is-workspace .metric-card strong { margin:5px 0 1px; font-size:20px; }
body.is-workspace .dashboard-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:11px; margin-top:11px; }
body.is-workspace .shared-allowance-card { grid-column:1 / -1; }
body.is-workspace .surface-card { padding:14px; }
body.is-workspace .surface-heading { margin-bottom:10px; }
body.is-workspace .setup-list li { padding:9px 0; }
body.is-workspace .quick-actions-card { min-height:0; }

@media(max-width:900px) {
  body.is-workspace #app-view { grid-template-columns:190px minmax(0,1fr); }
  body.is-workspace .app-main>section:not(.app-topbar) { padding-left:17px; padding-right:17px; }
}
@media(max-width:720px) {
  body.is-workspace #app-view { display:block; min-height:100vh; padding-bottom:62px; }
  body.is-workspace .app-sidebar { top:auto; height:62px; padding:4px 8px; }
  body.is-workspace .app-topbar { top:0; min-height:58px; padding:8px 14px; }
  body.is-workspace .app-main>section:not(.app-topbar) { padding:14px 12px 24px; }
  body.is-workspace .dashboard-grid { grid-template-columns:1fr; }
  body.is-workspace .shared-allowance-card { grid-column:auto; }
}

/* Clearer marketing, account creation, and workspace controls. */
#public-home .practice-hero .hero-lede { font-size:15px; line-height:1.65; }
#public-home .workflow-steps p { font-size:13px; line-height:1.5; }
#public-home .workflow-steps strong { font-size:14px; }
#public-home .benefits-section .section-heading>p,
#public-home .plans-section .section-heading>div>p:last-child { font-size:13px; }
#public-home .benefit-card { min-height:126px; padding:17px; }
#public-home .benefit-card h3 { font-size:14px; }
#public-home .benefit-card p { font-size:13px; line-height:1.5; }
#public-home .plan-grid { gap:18px; margin-top:24px; }
#public-home .plan-card { min-height:340px; padding:23px; }
#public-home .plan-card .plan-top h3 { font-size:19px; }
#public-home .plan-card .plan-top>span { font-size:10px; }
#public-home .plan-card .plan-price { font-size:35px; }
#public-home .plan-card .plan-price small { font-size:12px; }
#public-home .plan-card li { font-size:14px; line-height:1.5; }
#public-home .plan-card ul { gap:11px; margin:17px 0 20px; }
#public-home .plan-card .button { min-height:42px; font-size:13px; }
#public-home .plan-featured .plan-ribbon { position:static; align-self:flex-end; order:-1; width:max-content; margin:0 0 9px; }
#public-home .plans-footnote { font-size:12px; }

#signup-view #signup-identity-form,
#signup-view #signup-form,
#signup-view #verify-email-form { grid-column:1; grid-row:3; min-width:0; margin:0; }
#signup-view #signup-identity-form { display:grid; align-content:start; gap:15px; padding:20px; border:1px solid var(--line); border-radius:8px; background:#fff; }
#signup-view #signup-identity-form .form-section-title { margin:0; color:var(--ink); font:600 20px var(--heading-font); }
#signup-view #signup-identity-form label { display:grid; gap:7px; color:#283f3b; font-size:14px; font-weight:700; }
#signup-view #signup-identity-form input { height:48px; padding:0 12px; border:1px solid #d3dfd9; border-radius:6px; background:#fff; color:var(--ink); font-size:15px; }
#signup-view #signup-identity-form input:focus-visible { outline:3px solid rgba(15,76,68,.18); outline-offset:2px; border-color:#5d978a; }
.password-requirements { display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; list-style:none; margin:0; padding:0; color:#61736f; font-size:12px; }
.password-requirements li { display:flex; align-items:center; gap:7px; }
.password-requirements li>span { color:#879791; font-weight:800; }
.password-requirements li.is-met { color:#147b59; font-weight:700; }
.password-requirements li.is-met>span { color:#147b59; }
#login-view #password-reset-complete-form .password-requirements { margin:-5px 0 5px; }
.employee-form .password-requirements { grid-column:2; margin:-5px 0 4px; }
.signup-form-actions { display:flex; justify-content:flex-end; align-items:center; gap:10px; }
.signup-form-actions .button-primary { min-width:220px; }
#signup-view .signup-progress ol { grid-template-columns:repeat(4,minmax(0,1fr)); }
#signup-view #verify-email-form .check-label { margin:0; }

.firm-side-card { width:100%; color:var(--ink); text-align:left; cursor:pointer; transition:border-color .15s ease,box-shadow .15s ease; }
.firm-side-card:hover,.firm-side-card:focus-visible { border-color:#73b6a2; box-shadow:0 0 0 3px rgba(8,127,112,.12); }
.profile-trigger-copy { display:block; min-width:0; flex:1; }
.firm-side-card .profile-trigger-copy strong { max-width:100%; font-size:13px; }
.firm-side-card .profile-trigger-copy small { max-width:100%; font-size:11px; }
.profile-trigger-arrow { color:var(--muted); font-size:21px; line-height:1; }
.profile-popover { position:fixed; z-index:40; top:118px; left:calc(min(245px, 20vw) + 12px); width:min(310px,calc(100vw - 28px)); padding:18px; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); box-shadow:0 18px 48px rgba(16,42,35,.2); }
.profile-popover-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:15px; padding-bottom:13px; border-bottom:1px solid var(--line); }
.profile-popover-heading strong,.profile-popover-heading small { display:block; }
.profile-popover-heading strong { font-size:15px; font-weight:800; }
.profile-popover-heading small { margin-top:4px; color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.profile-popover-heading button { display:grid; place-items:center; width:30px; height:30px; padding:0; border:1px solid var(--line); border-radius:6px; background:transparent; color:var(--ink); font-size:20px; }

/* Homepage copy hierarchy and high-contrast plan selection. */
#public-home .practice-hero .hero-copy h1 { max-width:760px; font-size:clamp(40px,4.2vw,56px); line-height:1.08; }
#public-home .practice-hero .hero-lede { max-width:620px; margin:16px 0 22px; font-size:16px; line-height:1.6; }
#public-home .practice-workflow .hero-card-top h2 { font-size:19px; }
#public-home .workflow-steps { gap:15px; }
#public-home .workflow-steps strong { font-size:16px; font-weight:800; }
#public-home .workflow-steps p { font-size:14px; line-height:1.5; }
#public-home .benefits-section .section-heading h2 { font-size:27px; line-height:1.2; }
#public-home .benefit-grid { gap:16px; margin-top:20px; }
#public-home .benefit-card { display:flex; min-height:116px; align-items:center; gap:14px; padding:20px; border:1px solid #cfe2db; border-top:5px solid #0b8b78; border-radius:13px; background:linear-gradient(160deg,#fff 30%,#f0f8f5); box-shadow:0 8px 22px rgba(15,65,53,.06); }
#public-home .benefit-icon { display:grid; flex:0 0 42px; width:42px; height:42px; place-items:center; border-radius:11px; background:#d9eee7; color:#087b69; }
#public-home .benefit-icon svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
#public-home .benefit-card h3 { margin:0; color:#123c36; font-size:18px; font-weight:800; line-height:1.35; }
#public-home .plans-section { padding-top:40px; padding-bottom:42px; background:#edf4f1; }
#public-home .plans-section .section-heading h2 { font-size:29px; line-height:1.2; }
#public-home .plans-section .section-heading>div>p:last-child { margin-top:8px; color:#49645d; font-size:15px; line-height:1.5; }
#public-home .reset-time { padding:10px 14px; color:#174d43; font-size:14px; font-weight:700; }
#public-home .plan-grid { gap:20px; margin-top:26px; }
#public-home .plan-card { min-height:390px; padding:25px; border:1px solid #b8d4ca; border-top:6px solid #168b77; border-radius:15px; background:linear-gradient(155deg,#fff 34%,#f5fbf8); box-shadow:0 12px 28px rgba(16,63,52,.09); transition:transform .16s ease,box-shadow .16s ease; }
#public-home .plan-card:hover { transform:translateY(-3px); box-shadow:0 17px 34px rgba(16,63,52,.14); }
#public-home .plan-card .plan-top h3 { color:#123c36; font-size:23px; font-weight:800; }
#public-home .plan-card .plan-price { margin-top:15px; font-size:40px; font-weight:800; }
#public-home .plan-card .plan-price small { color:#355c53; font-size:14px; font-weight:700; }
#public-home .plan-card ul { gap:13px; margin:20px 0 23px; }
#public-home .plan-card li { padding-left:19px; color:#213e39; font-size:15px; font-weight:700; line-height:1.45; }
#public-home .plan-card li strong { font-weight:800; }
#public-home .plan-card li:before { left:0; color:#07836f; font-size:16px; }
#public-home .plan-card .button { min-height:48px; font-size:15px; }
#public-home .plan-card:nth-child(3) { border-top-color:#457eb2; }
#public-home .plan-featured { border:2px solid #087b69; border-top:7px solid #005d4d; background:linear-gradient(155deg,#effaf5 15%,#fff 88%); box-shadow:0 15px 34px rgba(0,76,62,.16); }
#public-home .plan-featured .plan-ribbon { margin-bottom:11px; padding:7px 11px; border:1px solid #a8d6c6; border-radius:999px; background:#d9f1e8; color:#064a3e; font-size:11px; font-weight:800; letter-spacing:.04em; }
#public-home .plans-footnote { margin-top:15px; color:#49645d; font-size:14px; line-height:1.5; }

@media(max-width:900px) {
  #public-home .plan-card { padding:21px; }
  #public-home .plan-card li { font-size:14px; }
}
@media(max-width:720px) {
  #public-home .practice-hero .hero-copy h1 { font-size:clamp(34px,8.5vw,44px); }
  #public-home .practice-hero .hero-lede { font-size:15px; }
  #public-home .workflow-steps strong { font-size:15px; }
  #public-home .workflow-steps p { font-size:14px; }
  #public-home .benefits-section .section-heading h2 { font-size:23px; }
  #public-home .benefit-card { min-height:108px; padding:17px; }
  #public-home .benefit-card h3 { font-size:16px; }
  #public-home .plans-section .section-heading h2 { font-size:25px; }
  #public-home .reset-time { white-space:normal; }
  #public-home .plan-grid { gap:14px; }
  #public-home .plan-card { min-height:0; padding:22px; }
  #public-home .plan-card .plan-price { font-size:38px; }
}
@media(max-width:420px) {
  #public-home .benefit-card { min-height:92px; }
}
.profile-firm-label { margin:14px 0 3px; color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
#profile-firm-name { font-size:15px; }
.profile-role { margin:4px 0 15px; color:var(--muted); font-size:12px; }
.theme-setting { display:flex!important; justify-content:space-between; align-items:center; gap:14px; padding-top:14px; border-top:1px solid var(--line); color:var(--ink)!important; }
.theme-setting span strong,.theme-setting span small { display:block; }
.theme-setting span strong { font-size:13px; }
.theme-setting span small { margin-top:3px; color:var(--muted); font-size:11px; font-weight:400; }
.theme-setting input { width:42px!important; height:23px!important; accent-color:var(--green); }
.mobile-profile-trigger { display:none; width:34px; height:34px; padding:0; border:1px solid var(--line); border-radius:50%; background:var(--green); color:#fff; font-size:12px; font-weight:800; }

/* The profile panel is portalled to body and placed beside its trigger so sticky headers cannot cover it. */
.profile-popover { z-index:80; max-height:min(420px,calc(100vh - 24px)); max-height:min(420px,calc(100dvh - 24px)); overflow-y:auto; overscroll-behavior:contain; }

/* Wider, more readable workspace dashboard and extraction screens. */
body.is-workspace #app-view { grid-template-columns:245px minmax(0,1fr); }
body.is-workspace .app-main { background:#f4f7f5; }
body.is-workspace .app-main>section:not(.app-topbar) { max-width:1700px; margin:0 auto; padding:30px clamp(28px,4vw,66px) 40px; }
body.is-workspace .app-topbar { padding:14px clamp(28px,4vw,66px); }
body.is-workspace .app-topbar .eyebrow { font-size:10px; }
body.is-workspace .app-topbar h1 { font-size:23px; font-weight:800; }
body.is-workspace .workspace-status-strip { min-height:46px; margin-bottom:19px; padding:10px 14px; }
body.is-workspace .workspace-status-label,.workspace-status-detail { font-size:13px; font-weight:700; }
body.is-workspace .workspace-status-pill { min-height:26px; font-size:12px; }
body.is-workspace .overview-heading { margin-bottom:18px; }
body.is-workspace .overview-heading h2 { font-size:27px; font-weight:800; }
body.is-workspace .overview-heading p:last-child { font-size:14px; }
body.is-workspace .metric-grid { gap:14px; }
body.is-workspace .metric-card { min-height:112px; padding:18px; }
body.is-workspace .metric-card>span { font-size:13px; font-weight:700; }
body.is-workspace .metric-card strong { margin:9px 0 4px; font-size:27px; font-weight:800; }
body.is-workspace .metric-card small { font-size:12px; }
body.is-workspace .dashboard-grid { gap:16px; margin-top:17px; }
body.is-workspace .surface-card { padding:20px; }
body.is-workspace .surface-heading { margin-bottom:16px; }
body.is-workspace .surface-heading h3 { font-size:18px; font-weight:800; }
body.is-workspace .setup-list li { padding:12px 0; font-size:13px; }
body.is-workspace .quick-actions .button { min-height:40px; padding:9px 13px; font-size:12px; }
body.is-workspace .nav-item { min-height:42px; font-size:13px; font-weight:700; }
body.is-workspace .firm-side-card { min-height:60px; }
body.is-workspace .firm-side-card .profile-trigger-copy strong { font-size:14px; }
body.is-workspace .firm-side-card .profile-trigger-copy small { font-size:12px; }

body.theme-dark.is-workspace { color-scheme:dark; --ink:#f0f6f3; --muted:#bdcbc5; --line:#465951; --surface:#1d2925; --surface-soft:#273631; --mint:#28483e; background:#111916; color:var(--ink); }
body.theme-dark.is-workspace #app-view,body.theme-dark.is-workspace .app-main { background:#111916; color:var(--ink); }
body.theme-dark.is-workspace .app-sidebar,body.theme-dark.is-workspace .app-topbar,body.theme-dark.is-workspace .metric-card,body.theme-dark.is-workspace .surface-card,body.theme-dark.is-workspace .firm-side-card,body.theme-dark.is-workspace .profile-popover,body.theme-dark.is-workspace .logout-button { background:#1d2925; color:var(--ink); border-color:var(--line); }
body.theme-dark.is-workspace .app-topbar { background:rgba(29,41,37,.96); }
body.theme-dark.is-workspace .workspace-status-strip,body.theme-dark.is-workspace .usage-track,body.theme-dark.is-workspace .document-kind-tabs,body.theme-dark.is-workspace .team-list,body.theme-dark.is-workspace .table-wrap,body.theme-dark.is-workspace .results-table,body.theme-dark.is-workspace .upload-card,body.theme-dark.is-workspace .quota-action { background:#202e29; color:var(--ink); border-color:var(--line); }
body.theme-dark.is-workspace .nav-item { color:#d2e1db; }
body.theme-dark.is-workspace .nav-item:hover,body.theme-dark.is-workspace .nav-item.is-active { background:#2e4d42; color:#f5fffb; }
body.theme-dark.is-workspace .workspace-status-label,body.theme-dark.is-workspace .metric-card>span,body.theme-dark.is-workspace .surface-heading h3,body.theme-dark.is-workspace .overview-heading h2,body.theme-dark.is-workspace .app-topbar h1,body.theme-dark.is-workspace .app-topbar .eyebrow,body.theme-dark.is-workspace .firm-side-card strong { color:var(--ink); }
body.theme-dark.is-workspace input:not([type=checkbox]):not([type=file]):not([type=color]),body.theme-dark.is-workspace select,body.theme-dark.is-workspace textarea { background:#131c19; color:var(--ink); border-color:#465850; }
body.theme-dark.is-workspace .button-outline,body.theme-dark.is-workspace .button-quiet { background:#25332e; color:var(--ink); border-color:#52645b; }
body.theme-dark.is-workspace .plan-chip { background:#263831; color:#bde8d7; border-color:#3c5d4e; }
body.theme-dark.is-workspace .brand-sidebar { background:transparent; }
body.theme-dark.is-workspace .profile-popover-heading,body.theme-dark.is-workspace .theme-setting { border-color:var(--line); }
body.theme-dark.is-workspace .team-user,body.theme-dark.is-workspace .setup-list li,body.theme-dark.is-workspace .workspace-address-row { border-color:var(--line); }
body.theme-dark.is-workspace .results-area,body.theme-dark.is-workspace .table-scroll,body.theme-dark.is-workspace .extraction-help,body.theme-dark.is-workspace .disclosure-box,body.theme-dark.is-workspace .management-grid .surface-card { background:#1d2925; color:var(--ink); border-color:var(--line); }
body.theme-dark.is-workspace .result-table { color:var(--ink); }
body.theme-dark.is-workspace .result-table th { background:#263831; color:#dce9e3; border-color:var(--line); }
body.theme-dark.is-workspace .result-table td { border-color:var(--line); }
body.theme-dark.is-workspace .result-table tr.row-rejected { background:#382d22; }
body.theme-dark.is-workspace .result-tag { background:#263831; color:#bde8d7; }
body.theme-dark.is-workspace .result-tag.reject,body.theme-dark.is-workspace .status-badge.reject { background:#453322; color:#f0c48a; }
body.theme-dark.is-workspace .status-badge { background:#234838; color:#b4ebce; }
body.theme-dark.is-workspace .dropzone,body.theme-dark.is-workspace .document-kind-tab { background:#202e29; color:var(--ink); border-color:var(--line); }
body.theme-dark.is-workspace .document-kind-tab.is-active { background:#2e4d42; color:#f5fffb; }
body.theme-dark.is-workspace .workspace-notice { background:#3b3020; color:#f4d197; border-color:#67502c; }
body.theme-dark.is-workspace .workspace-notice.is-ok { background:#20392f; color:#b9e6d2; border-color:#365f4c; }
body.theme-dark.is-workspace .dashboard-info,body.theme-dark.is-workspace .results-heading { border-color:var(--line); }
/* Several workspace labels use fixed brand colors in light mode. Override those colors here so they remain readable on dark surfaces. */
body.theme-dark.is-workspace .muted-copy,
body.theme-dark.is-workspace .page-heading>div>p:not(.eyebrow),
body.theme-dark.is-workspace .overview-heading>div>p:not(.eyebrow),
body.theme-dark.is-workspace .dashboard-info>span,
body.theme-dark.is-workspace .metric-card small,
body.theme-dark.is-workspace .employee-form label,
body.theme-dark.is-workspace .password-requirements,
body.theme-dark.is-workspace .profile-firm-label,
body.theme-dark.is-workspace .profile-role,
body.theme-dark.is-workspace .profile-popover-heading small,
body.theme-dark.is-workspace .profile-trigger-copy small,
body.theme-dark.is-workspace .field-hint,
body.theme-dark.is-workspace .team-user small,
body.theme-dark.is-workspace .dashboard-info strong,
body.theme-dark.is-workspace .workspace-address-row strong { color:#d4e2dc; }
body.theme-dark.is-workspace .eyebrow { color:#9bb7ac; }
body.theme-dark.is-workspace .dashboard-info strong { font-weight:750; }
body.theme-dark.is-workspace .dashboard-info strong { color:#d4e2dc; }
body.theme-dark.is-workspace .employee-form label { color:#d4e2dc; }
body.theme-dark.is-workspace .password-requirements li.is-met,
body.theme-dark.is-workspace .password-requirements li.is-met>span { color:#74dfad; }
body.theme-dark.is-workspace a:not(.button),body.theme-dark.is-workspace .text-button { color:#8be0c2; }
body.theme-dark.is-workspace .profile-reset-password { width:100%; margin:8px 0 2px; padding:9px 11px; border:1px solid #526a60; border-radius:7px; background:#263831; color:#e8f5ef; font:700 13px var(--body-font); text-align:left; cursor:pointer; }
body.theme-dark.is-workspace .profile-reset-password:hover,body.theme-dark.is-workspace .profile-reset-password:focus-visible { border-color:#82d6b8; outline:2px solid #82d6b8; outline-offset:1px; }
.profile-reset-password { width:100%; margin:8px 0 2px; padding:9px 11px; border:1px solid var(--line); border-radius:7px; background:var(--surface-soft); color:var(--ink); font:700 13px var(--body-font); text-align:left; cursor:pointer; }
.profile-reset-feedback { margin:8px 0 0; font-size:12px; line-height:1.45; }
.profile-reset-feedback.is-error { color:#b42318; }
.profile-reset-feedback.is-success { color:#147b59; }
body.is-workspace .form-feedback.is-ok { color:#147b59; font-weight:700; }
body.theme-dark.is-workspace .form-feedback.is-ok { color:#83e1b3; }
body.theme-dark.is-workspace .profile-reset-feedback.is-error { color:#ffaaa3; }
body.theme-dark.is-workspace .profile-reset-feedback.is-success { color:#83e1b3; }

#public-home .plan-card { min-height:430px; }
#public-home .plan-price-stack { margin:14px 0 8px; }
#public-home .plan-reference { display:flex; align-items:center; gap:7px; margin:0; color:#647b74; font-size:12px; font-weight:700; }
#public-home .plan-reference del { color:#71817c; font-size:15px; font-weight:600; }
#public-home .plan-card .plan-price { display:flex; align-items:baseline; flex-wrap:wrap; gap:5px; margin:3px 0 0; }
#public-home .plan-card .plan-price span { font-size:40px; font-weight:800; letter-spacing:-.04em; }
#public-home .plan-card .plan-price small { font-size:13px; font-weight:700; }
#public-home .plan-card li:first-child { color:#006b5e; }
#public-home .plans-footnote { max-width:1000px; margin:18px auto 0; color:#405e56; font-size:14px; line-height:1.55; }
.login-back-home { justify-self:start; margin:0 0 4px; font-size:14px; font-weight:700; }
body.is-workspace .plan-card { min-height:0; }

@media(max-width:900px) {
  body.is-workspace #app-view { grid-template-columns:205px minmax(0,1fr); }
  body.is-workspace .app-main>section:not(.app-topbar) { padding-left:22px; padding-right:22px; }
  .profile-popover { left:217px; }
}
@media(max-width:720px) {
  #public-home .plan-card { min-height:0; }
  #public-home .plan-card .plan-price span { font-size:36px; }
  #signup-view .form-card { display:flex; flex-direction:column; gap:18px; }
  #signup-view .form-heading,#signup-view .signup-progress,#signup-view .chosen-plan,#signup-view #signup-identity-form,#signup-view #signup-form,#signup-view #verify-email-form,#signup-view .secure-note { width:100%; }
  #signup-view #signup-identity-form,#signup-view #signup-form,#signup-view #verify-email-form { order:3; }
  #signup-view .chosen-plan { order:2; }
  .password-requirements { grid-template-columns:1fr; }
  .employee-form .password-requirements { grid-column:1; }
  .signup-form-actions { flex-direction:column-reverse; align-items:stretch; }
  .signup-form-actions .button-primary { min-width:0; }
  body.is-workspace .app-topbar { top:0; }
  body.is-workspace .app-topbar h1 { font-size:19px; }
  body.is-workspace .app-main>section:not(.app-topbar) { padding:20px 16px 28px; }
  body.is-workspace .metric-card { min-height:100px; }
  body.is-workspace .metric-card strong { font-size:25px; }
  .mobile-profile-trigger { display:inline-grid; place-items:center; }
  .profile-popover { top:auto; right:12px; bottom:74px; left:auto; }
}

/* Keep the workspace rail and its sign-out action inside the visible viewport. */
body.is-workspace #app-view { min-height:calc(100dvh - var(--workspace-banner-height, 0px)); }
body.is-workspace .app-sidebar { height:calc(100dvh - var(--workspace-banner-height, 0px)); max-height:calc(100dvh - var(--workspace-banner-height, 0px)); min-height:0; overflow:hidden; }
body.is-workspace .app-nav { min-height:0; flex:0 1 auto; overflow-y:auto; overscroll-behavior:contain; }
body.is-workspace .sidebar-bottom { flex:0 0 auto; z-index:2; }

/* Submitted signup fields show their correction inline and in the field itself. */
#signup-view .signup-field-error { display:block; margin:2px 0 0; color:#b42318; font-size:12px; font-weight:700; line-height:1.4; }
#signup-view input.is-invalid,#signup-view select.is-invalid,#signup-view textarea.is-invalid { border-color:#b42318!important; box-shadow:0 0 0 2px rgba(180,35,24,.14)!important; }
#signup-view input[type=checkbox].is-invalid { outline:2px solid #b42318; outline-offset:2px; accent-color:#b42318; }
#signup-view .form-feedback:not(.is-ok) { color:#b42318; font-weight:700; }

@media(max-width:720px) {
  body.is-workspace .sidebar-bottom { display:block; position:absolute; right:8px; bottom:4px; width:calc((100vw - 25px)/4); margin:0; }
  body.is-workspace .support-note { display:none; }
  body.is-workspace .logout-button { width:100%; min-height:44px; margin:0; padding:8px 3px; border:0; background:transparent; color:#536760; font-size:9px; font-weight:700; }
}

/* Profile menu and billing review dialog */
body.is-workspace .profile-popover {
  position: fixed; z-index: 1200; width: min(390px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 24px)); max-height: min(620px, calc(100dvh - 24px));
  overflow: auto; overscroll-behavior: contain; padding: 16px; border: 1px solid var(--line);
  border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 24px 72px rgba(9, 35, 28, .24);
}
body.is-workspace .profile-popover-heading { display: grid; grid-template-columns: 48px minmax(0, 1fr) 34px; align-items: center; gap: 12px; padding: 2px 0 15px; }
.profile-avatar-chip { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--green); color: var(--brand-ink, #fff); font-size: 16px; font-weight: 800; }
.profile-heading-copy { min-width: 0; }
.profile-heading-copy strong,.profile-heading-copy small { display: block; overflow-wrap: anywhere; }
.profile-heading-copy strong { color: var(--ink); font-size: 15px; font-weight: 800; }
.profile-heading-copy small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.profile-popover-heading > button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft, #f4f8f6); color: var(--ink); font-size: 20px; }
.profile-workspace-summary { display: grid; gap: 4px; margin: 14px 0 10px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft, #f4f8f6); }
.profile-workspace-summary .profile-firm-label { margin: 0; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.profile-workspace-summary > strong { color: var(--ink); font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.profile-role { color: var(--muted); font-size: 12px; }
.profile-account-actions { display: grid; gap: 7px; margin: 10px 0; }
.profile-action-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 16px; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 9px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.profile-action-row:hover,.profile-action-row:focus-visible { border-color: var(--line); background: var(--surface-soft, #f4f8f6); outline: none; }
.profile-action-row:disabled { cursor: wait; opacity: .65; }
.profile-action-icon { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--green-dark, #075b50); }
.profile-action-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.profile-action-row > span:nth-child(2) { min-width: 0; }
.profile-action-row strong,.profile-action-row small { display: block; }
.profile-action-row strong { color: var(--ink); font-size: 13px; font-weight: 800; }
.profile-action-row small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.profile-action-chevron { color: var(--muted); font-size: 20px; text-align: center; }
.profile-action-danger strong { color: #a23d38; }
.profile-action-danger .profile-action-icon { color: #a23d38; }
.profile-inline-form { display: grid; gap: 9px; margin: 10px 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft, #f4f8f6); }
.profile-inline-form label { color: var(--ink); font-size: 12px; font-weight: 750; }
.profile-inline-form input { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
.profile-inline-form input:focus { border-color: var(--green); outline: 3px solid color-mix(in srgb, var(--green), transparent 82%); }
.profile-inline-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.profile-text-button,.profile-small-primary { min-height: 36px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 750; cursor: pointer; }
.profile-small-primary { border-color: var(--green); background: var(--green); color: var(--brand-ink, #fff); }
.profile-verify-copy { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.profile-reset-feedback { margin: 10px 0; padding: 10px 12px; border-radius: 10px; color: #812d26; background: #fff0ed; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.profile-reset-feedback.is-success { color: #075b40; background: #eaf7f0; }
.profile-reset-feedback.is-info { color: #31566a; background: #edf5f9; }
.profile-reset-feedback.is-error { color: #812d26; background: #fff0ed; }
body.is-workspace .theme-setting { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding: 13px 4px 2px; border-top: 1px solid var(--line); }
.theme-setting-copy strong,.theme-setting-copy small { display: block; }
.theme-setting-copy strong { color: var(--ink); font-size: 13px; font-weight: 800; }
.theme-setting-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.theme-setting input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--green); }
.plan-change-dialog { width: min(480px, calc(100vw - 28px)); max-width: none; max-height: calc(100dvh - 28px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 18px; background: transparent; color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.28); }
.plan-change-dialog::backdrop { background: rgba(7, 20, 17, .58); backdrop-filter: blur(3px); }
.plan-change-card { position: relative; display: grid; gap: 13px; padding: 28px; border-radius: 18px; background: #fff; color: var(--ink); }
.plan-change-card > .eyebrow { margin: 0; color: var(--green-dark, #075b50); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.plan-change-card h2 { margin: 0; color: var(--ink); font-size: 24px; font-weight: 850; }
.plan-dialog-intro,.plan-change-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.plan-change-price,.plan-change-detail { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft, #f4f8f6); }
.plan-change-price { border-color: color-mix(in srgb, var(--green), var(--line) 65%); background: color-mix(in srgb, var(--green), #fff 94%); }
.plan-change-price span,.plan-change-detail span { color: var(--muted); font-size: 12px; }
.plan-change-price strong { color: var(--green-dark, #075b50); font-size: 21px; font-weight: 850; }
.plan-change-detail strong { color: var(--ink); font-size: 13px; font-weight: 800; text-align: right; }
.plan-dialog-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 20px; cursor: pointer; }
.plan-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.plan-dialog-actions .button { min-height: 42px; }
.plan-dialog-actions button:disabled { opacity: .6; cursor: wait; }

/* Keep secondary dashboard text clear when a firm enables the dark theme. */
body.theme-dark.is-workspace .muted-copy,
body.theme-dark.is-workspace .page-heading > div > p:not(.eyebrow),
body.theme-dark.is-workspace .overview-heading > div > p:not(.eyebrow),
body.theme-dark.is-workspace .dashboard-info > span,
body.theme-dark.is-workspace .dashboard-info strong,
body.theme-dark.is-workspace .metric-card small,
body.theme-dark.is-workspace .employee-form label,
body.theme-dark.is-workspace .password-requirements,
body.theme-dark.is-workspace .password-requirements li,
body.theme-dark.is-workspace .profile-firm-label,
body.theme-dark.is-workspace .profile-role,
body.theme-dark.is-workspace .profile-popover-heading small,
body.theme-dark.is-workspace .profile-trigger-copy small,
body.theme-dark.is-workspace .field-hint,
body.theme-dark.is-workspace .team-user small,
body.theme-dark.is-workspace .dashboard-info strong,
body.theme-dark.is-workspace .workspace-address-row strong,
body.theme-dark.is-workspace .plan-change-dialog .plan-dialog-intro,
body.theme-dark.is-workspace .plan-change-dialog .plan-change-note,
body.theme-dark.is-workspace .plan-change-dialog .plan-change-detail span { color: #e0ebe6 !important; }
body.theme-dark.is-workspace .dashboard-info strong,
body.theme-dark.is-workspace .management-grid .dashboard-info strong { color: #f3faf6 !important; }
body.theme-dark.is-workspace a:not(.button),body.theme-dark.is-workspace .link-button { color: #8ee2c1; }
body.theme-dark.is-workspace input::placeholder,body.theme-dark.is-workspace textarea::placeholder { color: #b8c9c1; opacity: 1; }
body.theme-dark.is-workspace .profile-popover { background: #1d2925; color: var(--ink); border-color: #52675d; }
body.theme-dark.is-workspace .profile-workspace-summary,
body.theme-dark.is-workspace .profile-inline-form,
body.theme-dark.is-workspace .profile-action-row:hover,
body.theme-dark.is-workspace .profile-action-row:focus-visible { background: #263832; border-color: #52675d; }
body.theme-dark.is-workspace .profile-avatar-chip { color: #fff; }
body.theme-dark.is-workspace .profile-action-row strong,
body.theme-dark.is-workspace .profile-workspace-summary > strong,
body.theme-dark.is-workspace .profile-heading-copy strong,
body.theme-dark.is-workspace .theme-setting-copy strong { color: #f3faf6; }
body.theme-dark.is-workspace .profile-action-icon,
body.theme-dark.is-workspace .profile-popover-heading > button,
body.theme-dark.is-workspace .profile-text-button,
body.theme-dark.is-workspace .profile-inline-form input { background: #131c19; color: #f3faf6; border-color: #52675d; }
body.theme-dark.is-workspace .profile-small-primary { background: var(--green); color: #fff; }
body.theme-dark.is-workspace .profile-action-danger strong,
body.theme-dark.is-workspace .profile-action-danger .profile-action-icon { color: #ffaaa1; }
body.theme-dark.is-workspace .profile-reset-feedback.is-success { color: #a4ebc6; background: #183b2d; }
body.theme-dark.is-workspace .profile-reset-feedback.is-info { color: #c5e6f5; background: #203944; }
body.theme-dark.is-workspace .profile-reset-feedback.is-error { color: #ffc2b8; background: #4a2927; }
body.theme-dark.is-workspace .plan-change-dialog { border-color: #52675d; }
body.theme-dark.is-workspace .plan-change-card,
body.theme-dark.is-workspace .plan-dialog-close { background: #1d2925; color: #f3faf6; border-color: #52675d; }
body.theme-dark.is-workspace .plan-change-card h2,
body.theme-dark.is-workspace .plan-change-detail strong { color: #f3faf6; }
body.theme-dark.is-workspace .plan-change-price,
body.theme-dark.is-workspace .plan-change-detail { background: #263832; border-color: #52675d; }
body.theme-dark.is-workspace .plan-change-price strong { color: #9ce8c5; }

/* Upload controls are keyboard accessible and provide clear source/review cues. */
.dropzone { position: relative; }
.dropzone.is-dragging,.dropzone:focus-visible { border-color: #087f70; outline: 3px solid rgba(8,127,112,.16); background: #edf8f3; }
.file-picker-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.file-selection { width: 100%; margin: 2px 0 0; color: #526a63; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.review-actions { min-width: 220px; }
.review-actions .button { min-height: 34px; padding: 7px 10px; margin: 0 4px 4px 0; font-size: 11px; }
.review-actions [data-review-action="accept"] { color: #086c4c; border-color: #b9dfcd; }
.review-actions [data-review-action="reject"] { color: #9a4f24; border-color: #ebcfb7; }
.confidence-rating { display: inline-flex; align-items: center; border-radius: 20px; padding: 5px 9px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.confidence-rating.high { color: #116b4b; background: #e4f5eb; }
.confidence-rating.medium { color: #895814; background: #fff3d5; }
.confidence-rating.low { color: #98432c; background: #ffede7; }
.status-badge.review { background:#fff3d5; color:#895814; }
.receipt-review-tag { display:inline-flex; margin:5px 0 0 4px; border-radius:14px; padding:4px 8px; color:#895814; background:#fff3d5; font-size:11px; font-weight:800; white-space:nowrap; }
.result-tag.review { color:#895814; background:#fff3d5; }
.result-table tr.row-review { background:#fffdf5; }
body.theme-dark.is-workspace .file-selection { color: #e0ebe6; }
body.theme-dark.is-workspace .dropzone.is-dragging,body.theme-dark.is-workspace .dropzone:focus-visible { background: #1e3b32; border-color: #78d2ae; }
body.theme-dark.is-workspace .confidence-rating.high { color: #baf0d2; background: #214536; }
body.theme-dark.is-workspace .confidence-rating.medium { color: #ffe2a2; background: #493b21; }
body.theme-dark.is-workspace .confidence-rating.low { color: #ffc2b8; background: #4a2927; }
body.theme-dark.is-workspace .status-badge.review,body.theme-dark.is-workspace .receipt-review-tag,body.theme-dark.is-workspace .result-tag.review { color:#ffe2a2; background:#493b21; }
body.theme-dark.is-workspace .result-table tr.row-review { background:#322f22; }
@media (max-width: 600px) {
  body.is-workspace .profile-popover { width: min(390px, calc(100vw - 24px)); padding: 13px; }
  .plan-change-card { padding: 24px 18px 18px; }
  .plan-dialog-actions { flex-direction: column-reverse; }
  .plan-dialog-actions .button { width: 100%; }
}
.profile-inline-form[hidden],.profile-action-row[hidden],.profile-reset-feedback[hidden],.plan-change-dialog [hidden] { display: none !important; }

.activity-retention-note { display:flex; flex-wrap:wrap; gap:5px 12px; align-items:center; margin:0 0 14px; padding:13px 15px; border:1px solid var(--line); border-radius:7px; background:var(--mint); color:var(--ink); font-size:12px; line-height:1.5; }
.activity-retention-note strong { color:var(--green-dark); }
.activity-selection-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 12px; padding:10px 12px; border:1px solid var(--line); border-radius:6px; background:var(--surface,#fff); color:var(--muted); font-size:12px; }
.activity-selection-bar .button { min-height:36px; padding:8px 12px; white-space:nowrap; }
.activity-run-select { display:flex; align-items:center; justify-content:center; width:28px; min-height:32px; cursor:pointer; }
.activity-run-select input { width:18px; height:18px; accent-color:var(--green); cursor:pointer; }
.activity-run-select input:disabled { cursor:not-allowed; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.activity-run-list { display:grid; gap:8px; }
.activity-run { display:grid; grid-template-columns:32px minmax(180px,1.4fr) minmax(100px,.8fr) minmax(100px,.7fr) auto; gap:12px; align-items:center; padding:13px 14px; border:1px solid var(--line); border-radius:6px; background:var(--surface,#fff); }
.activity-run-main strong,.activity-run-main small,.activity-run-cell strong,.activity-run-cell small { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.activity-run-main strong { color:var(--ink); font-size:13px; }
.activity-run-main small,.activity-run-cell small { margin-top:4px; color:var(--muted); font-size:11px; }

/* Plan comparison and workspace-wide notification inbox. */
body.is-workspace .app-topbar { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.topbar-left { display:flex; align-items:center; gap:13px; min-width:0; }
.topbar-left > div { min-width:0; }
.notifications-trigger { position:relative; display:grid; place-items:center; flex:none; width:38px; height:38px; padding:8px; border:1px solid var(--line); border-radius:10px; background:var(--surface,#fff); color:var(--ink); }
.notifications-trigger svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.notifications-trigger:hover,.notifications-trigger:focus-visible { background:var(--surface-soft,#f4f8f6); }
.notification-unread-count { position:absolute; top:-6px; right:-6px; display:grid; place-items:center; min-width:18px; height:18px; padding:0 4px; border:2px solid var(--surface,#fff); border-radius:99px; background:#b42318; color:#fff; font-size:9px; font-weight:850; line-height:1; }
.plan-options-dialog { width:min(1180px,calc(100vw - 32px)); max-width:none; max-height:min(92dvh,900px); padding:0; overflow:auto; border:1px solid var(--line); border-radius:16px; background:var(--surface,#fff); color:var(--ink); box-shadow:0 24px 80px rgba(0,0,0,.32); }
.plan-options-dialog::backdrop { background:rgba(7,20,17,.66); backdrop-filter:blur(3px); }
.plan-options-panel { position:relative; padding:30px; }
.plan-options-panel > .eyebrow { margin:0 0 7px; color:var(--green-dark); font-size:10px; font-weight:850; letter-spacing:.14em; }
.plan-options-panel h2 { margin:0; color:var(--ink); font-size:25px; font-weight:850; }
.plan-options-intro { margin:7px 48px 17px 0; color:var(--muted); font-size:13px; line-height:1.5; }
.current-plan-strip { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:17px; padding:11px 14px; border:1px solid var(--line); border-radius:9px; background:var(--surface-soft,#f4f8f6); }
.current-plan-strip span { color:var(--muted); font-size:12px; }
.current-plan-strip strong { color:var(--ink); font-size:13px; font-weight:850; text-align:right; text-transform:capitalize; }
.plan-options-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:stretch; }
.comparison-plan-card { min-width:0; min-height:390px; padding:25px; border-color:var(--line); border-radius:15px; background:linear-gradient(155deg,#fff 34%,#f5fbf8); box-shadow:0 12px 28px rgba(16,63,52,.09); }
.comparison-plan-card .plan-top { display:flex; justify-content:space-between; align-items:center; gap:8px; min-height:32px; }
.comparison-plan-card .plan-top h3 { margin:0; color:var(--ink); font-size:23px; font-weight:850; }
.comparison-plan-card .current-plan-tag,.comparison-plan-card .plan-ribbon { position:static; flex:none; width:max-content; margin:0; padding:5px 8px; border:1px solid var(--line); border-radius:99px; background:var(--surface-soft,#f4f8f6); color:var(--muted); font-size:9px; font-weight:850; letter-spacing:.03em; }
.comparison-plan-card .plan-ribbon { border-color:#a8d6c6; background:#d9f1e8; color:#064a3e; }
.comparison-plan-card .plan-price-stack { margin:12px 0 7px; }
.comparison-plan-card .plan-reference { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:0; color:var(--muted); font-size:10px; font-weight:700; }
.comparison-plan-card .plan-reference del { color:var(--muted); font-size:12px; }
.comparison-plan-card .plan-price { display:flex; align-items:baseline; flex-wrap:wrap; gap:5px; margin:15px 0 0; color:var(--green-dark); font-size:40px; font-weight:850; letter-spacing:-.035em; }
.comparison-plan-card .plan-price small { color:var(--muted); font-size:14px; font-weight:700; letter-spacing:0; }
.comparison-plan-card ul { display:grid; gap:13px; margin:20px 0 23px; padding:0; list-style:none; flex:1; }
.comparison-plan-card li { position:relative; padding-left:19px; color:var(--ink); font-size:15px; font-weight:700; line-height:1.45; }
$116px; font-weight:900; }
.comparison-plan-card li strong { font-weight:800; }
.comparison-plan-card .plan-option-action { width:100%; min-height:48px; padding:8px 10px; font-size:15px; }
.comparison-plan-card .plan-option-action:disabled { opacity:.72; cursor:default; transform:none; }
.comparison-plan-card.is-current-plan { border-color:var(--green); box-shadow:0 0 0 1px var(--green); }
.notification-panel { position:fixed; z-index:100; display:flex; flex-direction:column; width:min(440px,calc(100vw - 24px)); max-height:min(760px,82dvh); overflow:hidden; border:1px solid var(--line); border-radius:14px; background:var(--surface,#fff); color:var(--ink); box-shadow:0 18px 54px rgba(0,0,0,.28); }
.notification-panel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:18px 18px 13px; border-bottom:1px solid var(--line); }
.notification-panel-heading .eyebrow { margin:0 0 4px; color:var(--green-dark); font-size:9px; }
.notification-panel-heading h2 { margin:0; color:var(--ink); font-size:19px; font-weight:850; }
.notification-unread-summary { display:block; margin-top:4px; color:var(--muted); font-size:11px; }
.notification-close { display:grid; place-items:center; width:32px; height:32px; flex:none; border:1px solid var(--line); border-radius:8px; background:var(--surface-soft,#f4f8f6); color:var(--ink); font-size:20px; }
.notification-list { display:grid; align-content:start; gap:8px; min-height:70px; max-height:min(48dvh,430px); overflow:auto; padding:10px 12px; overscroll-behavior:contain; }
.notification-empty { margin:0; padding:18px 8px; color:var(--muted); font-size:12px; line-height:1.5; text-align:center; }
.notification-item { padding:11px 12px; border:1px solid var(--line); border-radius:9px; background:var(--surface,#fff); }
.notification-item.is-unread { border-left:3px solid var(--green); background:var(--surface-soft,#f6faf8); }
.notification-item-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.notification-item-heading strong { color:var(--ink); font-size:13px; font-weight:850; line-height:1.4; overflow-wrap:anywhere; }
.notification-item-heading time { flex:none; color:var(--muted); font-size:9px; }
.notification-item p { margin:7px 0 0; color:var(--ink); font-size:12px; line-height:1.5; overflow-wrap:anywhere; white-space:pre-wrap; }
.notification-read-button { margin-top:8px; padding:3px 0; border:0; background:transparent; color:var(--green-dark); font-size:10px; font-weight:800; }
.announcement-tools { margin-top:auto; padding:14px 16px 16px; border-top:1px solid var(--line); background:var(--surface-soft,#f4f8f6); }
.announcement-tools-heading { display:grid; gap:3px; margin-bottom:10px; }
.announcement-tools-heading strong { color:var(--ink); font-size:12px; font-weight:850; }
.announcement-tools-heading small { color:var(--muted); font-size:10px; line-height:1.4; }
.announcement-tools form { display:grid; gap:7px; }
.announcement-tools label { color:var(--ink); font-size:10px; font-weight:800; }
.announcement-tools input,.announcement-tools textarea { width:100%; border:1px solid var(--line); border-radius:7px; padding:9px 10px; background:var(--surface,#fff); color:var(--ink); font:inherit; font-size:12px; }
.announcement-tools textarea { min-height:84px; resize:vertical; line-height:1.45; }
.announcement-tools form .button { min-height:38px; margin-top:2px; padding:8px 11px; font-size:11px; }
.notification-feedback { margin:9px 0 0; padding:8px 9px; border-radius:7px; color:var(--ink); background:var(--surface,#fff); font-size:11px; line-height:1.4; }
.notification-feedback.is-success { color:#12613f; background:#e5f5ec; }
.notification-feedback.is-error { color:#922f26; background:#fff0ed; }
.plan-options-dialog[open] { display:block; }
.plan-options-dialog [hidden],.notification-panel [hidden] { display:none !important; }

/* Firm profile editing is separated from the compact profile menu. */
.firm-details-dialog { width:min(900px,calc(100vw - 28px)); max-width:none; max-height:min(92dvh,900px); padding:0; overflow:auto; border:1px solid var(--line); border-radius:18px; background:transparent; color:var(--ink); box-shadow:0 24px 80px rgba(0,0,0,.32); }
.firm-details-dialog::backdrop { background:rgba(7,20,17,.66); backdrop-filter:blur(3px); }
.firm-details-card { position:relative; display:grid; gap:16px; padding:28px; background:var(--surface,#fff); color:var(--ink); }
.firm-details-card > .eyebrow { margin:0; color:var(--green-dark,#075b50); font-size:11px; font-weight:850; letter-spacing:.1em; }
.firm-details-card h2 { margin:0; color:var(--ink); font-size:25px; font-weight:850; }
.firm-details-intro { margin:-10px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
.firm-details-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.firm-details-section { min-width:0; margin:0; padding:14px; border:1px solid var(--line); border-radius:13px; background:var(--surface-soft,#f5f8f6); }
.firm-details-section legend { padding:0 5px; color:var(--ink); font-size:13px; font-weight:850; }
.firm-details-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.firm-details-fields-two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.firm-details-fields label { display:grid; align-content:start; gap:5px; min-width:0; color:var(--ink); font-size:12px; font-weight:750; }
.firm-details-fields input:not([type="file"]):not([type="color"]),.firm-details-fields select { width:100%; min-width:0; min-height:40px; padding:8px 10px; border:1px solid var(--line); border-radius:9px; background:var(--surface,#fff); color:var(--ink); font:inherit; }
.firm-details-fields input[type="file"] { width:100%; min-width:0; color:var(--ink); font:inherit; font-size:11px; }
.firm-details-fields input[type="color"] { width:100%; height:40px; padding:4px; border:1px solid var(--line); border-radius:9px; background:var(--surface,#fff); }
.firm-details-fields input:focus,.firm-details-fields select:focus { border-color:var(--green); outline:3px solid color-mix(in srgb,var(--green),transparent 82%); }
.firm-details-fields .field-hint,.firm-details-section > .field-hint { color:var(--muted); font-size:11px; line-height:1.45; }
.firm-details-fields .field-hint { margin:0; }
.firm-details-section > .field-hint { margin:8px 0 0; }
.firm-details-section .check-label { margin:0 0 10px; color:var(--ink); font-size:12px; }
.firm-brand-fields { align-items:start; }
.profile-logo-preview-wrap { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.profile-firm-logo-preview { width:78px; height:54px; object-fit:contain; padding:5px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.firm-details-actions { display:flex; justify-content:flex-end; gap:10px; padding-top:2px; }
.firm-details-actions .button { min-height:42px; }
.firm-details-actions button:disabled { opacity:.6; cursor:wait; }
.firm-details-card [hidden] { display:none !important; }
body.theme-dark.is-workspace .firm-details-dialog { border-color:#52675d; }
body.theme-dark.is-workspace .firm-details-card { background:#111; color:#f3faf6; }
body.theme-dark.is-workspace .firm-details-card h2,body.theme-dark.is-workspace .firm-details-section legend,body.theme-dark.is-workspace .firm-details-fields label { color:#f3faf6; }
body.theme-dark.is-workspace .firm-details-intro,body.theme-dark.is-workspace .firm-details-fields .field-hint,body.theme-dark.is-workspace .firm-details-section > .field-hint { color:#c4d2cc; }
body.theme-dark.is-workspace .firm-details-section { background:#191919; border-color:#4d5c55; }
body.theme-dark.is-workspace .firm-details-fields input:not([type="file"]):not([type="color"]),body.theme-dark.is-workspace .firm-details-fields select { background:#090909; color:#f3faf6; border-color:#59665f; }
body.theme-dark.is-workspace .firm-details-fields input[type="file"] { color:#f3faf6; }
body.theme-dark.is-workspace .firm-details-fields input[type="color"] { background:#090909; border-color:#59665f; }
body.theme-dark.is-workspace .firm-details-section .check-label { color:#f3faf6; }
@media(max-width:680px) {
  .firm-details-card { padding:22px 16px 16px; }
  .firm-details-layout { grid-template-columns:1fr; }
  .firm-details-fields { grid-template-columns:1fr; }
  .firm-details-actions { flex-direction:column-reverse; }
  .firm-details-actions .button { width:100%; }
}
@media (max-width: 920px) {
  .plan-options-dialog { width:min(700px,calc(100vw - 24px)); }
  .plan-options-grid { grid-template-columns:1fr; gap:10px; }
  .comparison-plan-card { min-height:0; }
  .comparison-plan-card ul { grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:18px; }
}
@media (max-width: 720px) {
  .topbar-left { gap:8px; }
  .notifications-trigger { width:34px; height:34px; padding:7px; }
  .app-topbar { gap:8px; }
  .plan-options-panel { padding:24px 16px 16px; }
  .plan-options-panel h2 { font-size:21px; }
  .current-plan-strip { align-items:flex-start; flex-direction:column; gap:4px; }
  .current-plan-strip strong { text-align:left; }
  .comparison-plan-card { padding:16px; }
  .comparison-plan-card ul { grid-template-columns:1fr; }
  .notification-panel { max-height:calc(100dvh - 24px); }
}
.activity-run-cell strong { color:var(--ink); font-size:12px; }
.activity-run-status { display:inline-flex!important; width:max-content; max-width:100%; padding:4px 8px; border-radius:999px; background:var(--mint); color:var(--green-dark)!important; font-size:10px!important; font-weight:700; text-transform:capitalize; }
.activity-run-status.is-failed { background:#fff1ee; color:#9f3325!important; }
.activity-run .button { min-height:34px; padding:7px 10px; white-space:nowrap; }
.activity-report-card { margin-top:14px; }
.activity-report-message { margin:5px 0 14px; padding:12px; border-radius:6px; background:#fff5e9; color:#694716; font-size:13px; line-height:1.5; }
body.theme-dark.is-workspace .activity-retention-note { background:#20312d; color:#e2eee8; }
body.theme-dark.is-workspace .activity-selection-bar { background:#17221f; color:#c0d0ca; }
body.theme-dark.is-workspace .activity-run { background:#17221f; }
body.theme-dark.is-workspace .activity-run-status.is-failed { background:#492b28; color:#ffd2c9!important; }
body.theme-dark.is-workspace .activity-report-message { background:#3f3423; color:#ffe4b6; }
@media(max-width:720px) {
  .activity-selection-bar { align-items:flex-start; flex-direction:column; }
  .activity-selection-bar .button { width:100%; }
  .activity-run { grid-template-columns:28px minmax(0,1fr) auto; gap:9px 10px; }
  .activity-run-select { grid-column:1; grid-row:1 / span 3; }
  .activity-run-main { grid-column:2 / -1; }
  .activity-run .button { grid-column:3; grid-row:2 / span 2; }
}

/* Keep invoice review compact and read-only. Use the workbook when extracted values need correction. */
.result-table--invoice { width:100%; min-width:960px; table-layout:fixed; }
.result-table--invoice th,.result-table--invoice td { padding:8px 7px; font-size:11px; overflow-wrap:anywhere; }
.result-table--invoice th { line-height:1.25; }
.result-table--invoice td { vertical-align:middle; }
.result-table--invoice .invoice-col--include { width:52px; text-align:center; }
.result-table--invoice .invoice-col--invoice-number { width:105px; }
.result-table--invoice .invoice-col--date { width:98px; }
.result-table--invoice .invoice-col--supplier { width:150px; }
.result-table--invoice .invoice-col--item-name { width:135px; }
.result-table--invoice .invoice-col--old-vat,.result-table--invoice .invoice-col--vat { width:82px; }
.result-table--invoice .invoice-col--old-total,.result-table--invoice .invoice-col--total { width:88px; }
.result-table--invoice .invoice-col--status { width:145px; }
.result-table--invoice .invoice-col--confidence { width:83px; }
.result-table--invoice .invoice-col--document-type { width:112px; }
.result-table--invoice .invoice-col--corrects-invoice { width:118px; }
.result-table--invoice .invoice-col--correction-reference { width:135px; }
.result-table--invoice .invoice-col--source-page { width:145px; }
.result-table--invoice .invoice-col--review { width:148px; }
.result-table--invoice td.invoice-col--include input[type=checkbox] { width:18px; min-width:0; height:18px; margin:0; accent-color:var(--green); }
.result-table--invoice .source-reference>a { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.result-table--invoice .source-reference small { display:block; margin-top:4px; font-size:10px; }
.result-table--invoice .status-badge { white-space:nowrap; }
.result-table--invoice .field-hint { display:block; max-width:100%; margin-top:5px; line-height:1.35; }
.result-table--invoice .review-actions { display:flex; flex-wrap:wrap; gap:5px; }
.result-table--invoice .review-actions .button { min-height:29px; padding:5px 8px; font-size:10px; }
.extract-progress { color:var(--muted); font-size:12px; }
.extract-progress>div:first-child { gap:12px; align-items:center; font-size:12px; }
.extract-progress>div:first-child #extract-progress-label { flex:1 1 auto; }
.extract-progress>div:first-child span { overflow-wrap:anywhere; }
.extract-progress .usage-track { height:8px; overflow:hidden; }
.extract-progress .usage-track>span { display:block; height:100%; transition:width .25s ease; }
.extract-progress .usage-track>span.is-processing { width:34%!important; background:linear-gradient(90deg,#0a806f 0%,#57c4a3 45%,#c2f0df 50%,#57c4a3 55%,#0a806f 100%); background-size:220% 100%; animation:invoice-progress-indeterminate 1.5s ease-in-out infinite; }
@keyframes invoice-progress-indeterminate { from { transform:translateX(-110%); } to { transform:translateX(310%); } }
@media(prefers-reduced-motion:reduce) { .extract-progress .usage-track>span.is-processing { width:34%!important; transform:none; animation:none; background:#45ad91; } }
body.theme-dark.is-workspace .extract-progress { color:#d4e2dc; }
body.theme-dark.is-workspace .button-cancel { background:#171112; border-color:#92574e; color:#ffd0c9; }
body.theme-dark.is-workspace .button-cancel:hover { background:#261819; border-color:#c06f62; }
body.theme-dark.is-workspace .extract-progress .usage-track { background:#35443e; }

/* Keep workspace navigation and account actions anchored to the viewport. */
body.is-workspace #app-view { min-height:100dvh; grid-template-columns:245px minmax(0,1fr); }
body.is-workspace .app-main { grid-column:2; min-width:0; }
body.is-workspace .app-sidebar {
  position:fixed; inset:var(--workspace-banner-height, 0px) auto 0 0; z-index:30;
  width:245px; height:auto; max-height:none; min-height:0; overflow:hidden;
  display:flex; flex-direction:column; align-items:stretch;
}
body.is-workspace .app-nav { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
body.is-workspace .app-nav { align-content:start; }
body.is-workspace .sidebar-bottom {
  flex:0 0 auto; margin-top:auto; padding:12px 4px 4px; border-top:1px solid var(--line);
  background:inherit;
}
body.is-workspace .support-note { min-height:54px; padding:9px 4px 12px; color:#31564e; }
body.is-workspace .support-note strong { color:var(--ink); font-size:11px; }
body.is-workspace .support-note small { color:#5b7069; font-size:11px; line-height:1.45; }
body.is-workspace .logout-button {
  min-height:42px; padding:9px 12px; border:1px solid var(--line); border-radius:9px;
  background:#f7faf8; color:var(--ink); font-size:12px; font-weight:700;
}
body.is-workspace .logout-button:hover { border-color:#48a88e; background:#eaf6f1; color:#075b50; }
body.is-workspace .logout-button:focus-visible,
body.is-workspace .overview-refresh-button:focus-visible,
body.is-workspace .overview-extract-button:focus-visible { outline:3px solid #58b998; outline-offset:2px; }
body.theme-dark.is-workspace .sidebar-bottom { border-color:var(--line); }
body.theme-dark.is-workspace .support-note { color:#d8eee4; }
body.theme-dark.is-workspace .support-note strong,
body.theme-dark.is-workspace .support-note small { color:#d8eee4; }
body.theme-dark.is-workspace .logout-button { background:#263832; color:#f0f6f3; }
body.theme-dark.is-workspace .logout-button:hover { background:#315044; color:#fff; }

/* Give dashboard actions a clear brand treatment and add a compact refresh control. */
body.is-workspace .overview-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
body.is-workspace .overview-refresh-button { min-height:42px; padding:9px 13px; gap:8px; color:#31564e; }
body.is-workspace .overview-refresh-button svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
body.is-workspace .overview-refresh-button.is-refreshing svg { animation:overview-refresh-spin .8s linear infinite; }
@keyframes overview-refresh-spin { to { transform:rotate(360deg); } }
body.is-workspace .button-primary:not(:disabled) {
  color:#fff; background:linear-gradient(135deg,#087f70,#09977b); border-color:#087f70;
  box-shadow:0 8px 18px rgba(8,127,112,.2);
}
body.is-workspace .button-primary:not(:disabled):hover {
  background:linear-gradient(135deg,#076b5e,#087f70); border-color:#076b5e;
  box-shadow:0 10px 22px rgba(8,127,112,.26);
}
body.is-workspace .overview-extract-button { min-height:46px; padding:11px 17px; font-size:13px; }
body.theme-dark.is-workspace .overview-refresh-button { background:#25332e; color:#eaf5f0; border-color:#52645b; }

@media(max-width:900px) and (min-width:721px) {
  body.is-workspace #app-view { grid-template-columns:205px minmax(0,1fr); }
  body.is-workspace .app-sidebar { width:205px; }
  body.is-workspace .support-note { align-items:flex-start; }
}
@media(max-width:720px) {
  body.is-workspace #app-view { display:block; min-height:100vh; padding-bottom:62px; }
  body.is-workspace .app-main { grid-column:auto; }
  body.is-workspace .app-sidebar {
    inset:auto 0 0; width:100%; height:62px; max-height:62px; padding:4px 8px calc(4px + env(safe-area-inset-bottom));
    display:grid; grid-template-columns:minmax(0,1fr) 78px; gap:5px; border-top:1px solid var(--line);
  }
  body.is-workspace .app-nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px; margin:0; overflow:visible; }
  body.is-workspace .sidebar-bottom { display:flex; position:static; width:auto; margin:0; padding:0; border:0; align-items:center; }
  body.is-workspace .support-note { display:none; }
  body.is-workspace .logout-button { width:100%; min-height:44px; margin:0; padding:5px 3px; border-radius:8px; background:#f7faf8; font-size:10px; }
  body.is-workspace .overview-actions { width:100%; justify-content:flex-start; }
  body.is-workspace .overview-extract-button { flex:1 1 auto; }
}

/* Public home page theme selector; keep the theme choice compact in the header. */
.home-theme-picker { display:inline-flex; align-items:center; gap:2px; padding:3px; border:1px solid var(--line); border-radius:7px; background:var(--surface-soft); }
.home-theme-picker[hidden] { display:none; }
.home-theme-picker button { min-height:30px; padding:5px 9px; border:0; border-radius:5px; background:transparent; color:var(--muted); font:600 11px 'Instrument Sans',Arial,sans-serif; cursor:pointer; }
.home-theme-picker button[aria-pressed="true"] { background:var(--surface); color:var(--green); box-shadow:0 1px 3px rgba(20,48,43,.12); }
.home-theme-picker button:focus-visible { outline:2px solid var(--green-dark); outline-offset:2px; }
body.theme-dark .home-theme-picker { background:#171a19; border-color:#404946; }
body.theme-dark .home-theme-picker button { color:#bfc8c5; }
body.theme-dark .home-theme-picker button[aria-pressed="true"] { background:#303634; color:#f1f2f3; box-shadow:none; }
body.theme-dark .home-theme-picker button:focus-visible { outline-color:#99d1c6; }
@media(max-width:720px) {
  .home-theme-picker { gap:0; padding:2px; }
  .home-theme-picker button { min-height:27px; padding:4px 6px; font-size:10px; }
}
