:root {
    color-scheme: light;
    --background: #fff;
    --app-canvas: #f4f6fa;
    --surface: #fff;
    --foreground: #172536;
    --muted: #506276;
    --rule: #d8e0e9;
    --accent: #244bc4;
    --accent-strong: #173ca8;
    --accent-soft: #eaf0ff;
    --rail: #111c36;
    --rail-text: #f7f9ff;
    --rail-muted: #b7c5df;
    --button-text: #fff;
    --error: #b42318;
    --warning: #86530b;
    --warning-soft: #fff3dc;
    --shadow: 0 14px 42px rgb(17 31 66 / 7%);
}
.request-section, .page-help { margin-block: 1rem; padding: 1rem; border: 1px solid var(--rule); border-radius: .6rem; background: var(--surface); }
.request-section > summary, .page-help > summary { cursor: pointer; font-weight: 650; padding-block: .4rem; }
.request-section form details { padding: .75rem; border: 1px solid var(--rule); border-radius: .4rem; }
.request-section form details > label { display: block; margin-top: .75rem; }
.request-section form details > input, .request-section form details > select { width: 100%; }
.next-action { padding: 1.25rem; border-inline-start: 4px solid var(--accent); background: var(--accent-soft); margin-block: 1rem; }
.primary-action { display: inline-block; padding: .75rem 1rem; background: var(--accent); color: var(--button-text); border-radius: .4rem; font-weight: 650; }
.help-trigger { min-width: 44px; min-height: 44px; padding: .3rem; border-radius: 50%; background: var(--surface); color: var(--accent); border: 1px solid var(--rule); }
.help-trigger[hidden], .help-text[hidden] { display: none; }
.help-text { display: block; color: var(--muted); font-size: .9rem; }
.help-popup { position: fixed; z-index: 50; width: min(19rem, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow-wrap: anywhere; padding: .75rem; color: var(--foreground); background: var(--surface); border: 1px solid var(--rule); border-radius: .4rem; box-shadow: var(--shadow); }
.help-popup::before { content: ""; position: absolute; inset: -8px 0; z-index: -1; }
@media print { .context-help, .page-help { display: none; } }
:root[data-theme="dark"] {
    color-scheme: dark;
    --background: #000;
    --app-canvas: #000;
    --surface: #101624;
    --foreground: #f3f6fd;
    --muted: #b5c0d4;
    --rule: #303c53;
    --accent: #9ab9ff;
    --accent-strong: #b7caff;
    --accent-soft: #192441;
    --rail: #0b1020;
    --rail-text: #f7f9ff;
    --rail-muted: #b7c5df;
    --button-text: #10172a;
    --error: #ffb4ab;
    --warning: #ffd08b;
    --warning-soft: #282014;
    --shadow: 0 14px 42px rgb(0 0 0 / 26%);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--foreground);
    font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea, select { font: inherit; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 44px;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: .62rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 7px;
    background: var(--accent);
    color: var(--button-text);
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
}
button:hover, .button:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--button-text); }
#scope-editor [data-scope-generate]:disabled {
    background: var(--rule);
    border-color: var(--rule);
    color: var(--muted);
    cursor: not-allowed;
}
.button-secondary, .theme-switch, .mobile-menu-head button, button[value="Declined"], .action-form button {
    background: var(--surface);
    color: var(--accent);
    border-color: var(--rule);
}
.button-secondary:hover, .theme-switch:hover, .mobile-menu-head button:hover, button[value="Declined"]:hover, .action-form button:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .5rem 1rem; background: var(--surface); }
.skip-link:focus { top: 1rem; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.035em; overflow-wrap: anywhere; }
h1 { margin: .2rem 0 1rem; font-size: clamp(2rem, 3vw, 2.65rem); }
h2 { margin: 0 0 1rem; font-size: 1.35rem; }
h3 { margin: 0 0 .7rem; font-size: 1.05rem; }
p { margin: 0 0 1rem; }
small, .hint { color: var(--muted); }
.eyebrow, .sidebar-label {
    display: block;
    margin: 0 0 .6rem;
    color: var(--accent);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.card, .workspace-main section, .client-main > section, .proposal-content {
    min-width: 0;
    border: 1px solid var(--rule);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.card { padding: 1.4rem; }
.workspace-main section { padding: 1.5rem; margin: 1.2rem 0; }
.workspace-main section section { box-shadow: none; }
.workspace-main > p, .workspace-main > nav, .workspace-main > h1,
.workspace-main > .validation-summary-errors { max-width: 1100px; }
.workspace-main nav[aria-label="Project"] { margin: 1.2rem 0; }
.workspace-main nav[aria-label="Project"], .project-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    border-bottom: 1px solid var(--rule);
    padding-bottom: .8rem;
}
.workspace-main nav[aria-label="Project"] a { text-decoration: none; font-weight: 650; }
.workspace-main nav[aria-label="Project"] a:hover { text-decoration: underline; }
.workspace-main > h1 + p { color: var(--muted); }
.page-subtitle { color: var(--muted); }
.workspace-shortcut { display: none; }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.section-heading p { color: var(--muted); font-size: .9rem; }
.projects-table { margin-top: 1.2rem; }
.projects-table th { background: var(--app-canvas); }
.projects-table td a { font-weight: 700; text-decoration: none; }
.status-badge { display: inline-block; padding: .2rem .55rem; border-radius: 5px; background: var(--accent-soft); color: var(--accent-strong); font-size: .73rem; font-weight: 750; }
.workspace-main > p:first-child { color: var(--muted); }
.workspace-main > p[role="status"], .client-main > p[role="status"] {
    padding: .8rem 1rem;
    background: var(--accent-soft);
    border-radius: 7px;
}
.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: inherit;
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    white-space: nowrap;
}
.brand-lockup:hover { color: inherit; }
.brand-lockup img { width: 30px; height: 30px; object-fit: contain; }
.theme-switch { min-height: 40px; padding: .5rem .75rem; font-size: .82rem; }
.app-shell { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: 100vh; }
.app-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
    min-height: 100vh;
    padding: 1.5rem .95rem 1.2rem;
    background: var(--rail);
    color: var(--rail-text);
}
.app-sidebar .brand-lockup { margin-bottom: .2rem; }
.app-sidebar .sidebar-label { color: var(--rail-muted); font-size: .62rem; }
.sidebar-workspace { padding: .8rem; border: 1px solid #40516d; border-radius: 8px; }
.sidebar-workspace a { display: block; color: var(--rail-text); font-weight: 700; text-decoration: none; }
.app-sidebar nav { display: grid; align-content: start; gap: .25rem; }
.app-sidebar nav a {
    display: block;
    padding: .65rem .75rem;
    border-radius: 7px;
    color: var(--rail-muted);
    text-decoration: none;
}
.app-sidebar nav a:hover, .app-sidebar nav a:focus-visible { background: #273b61; color: #fff; }
.app-sidebar nav a[aria-current="page"] { background: #2a416c; color: #fff; font-weight: 750; }
.sidebar-credit { margin-top: auto; padding-top: 1rem; border-top: 1px solid #40516d; color: var(--rail-muted); font-size: .75rem; }
.app-column { min-width: 0; background: var(--app-canvas); }
.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 76px;
    padding: .8rem clamp(1.25rem, 3vw, 2.15rem);
    border-bottom: 1px solid var(--rule);
    background: var(--surface);
}
.topbar-context { color: var(--muted); font-size: .85rem; }
.topbar-context span { margin-inline: .5rem; }
.topbar-actions { display: flex; align-items: center; gap: 1rem; }
.topbar-actions a { font-size: .83rem; font-weight: 700; }
.workspace-plan { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; padding: .65rem clamp(1.25rem, 3vw, 2.15rem); border-bottom: 1px solid var(--rule); background: var(--surface); font-size: .85rem; }
.plan-badge { display: inline-block; padding: .2rem .65rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--accent-strong); background: var(--accent-soft); font-weight: 700; }
.workspace-plan a { font-weight: 700; }
.workspace-main {
    display: block;
    width: min(1140px, 100%);
    min-height: calc(100vh - 76px);
    margin: 0 auto;
    padding: 2rem clamp(1.25rem, 3vw, 2.15rem) 4rem;
}
.workspace-main > section:first-of-type { margin-top: 1.5rem; }
.mobile-menu-button, .mobile-menu { display: none; }
.mobile-menu::backdrop { background: rgb(0 0 0 / 65%); }
.mobile-menu {
    width: min(330px, 88vw);
    max-height: 100vh;
    margin: 0 auto 0 0;
    padding: 1.25rem;
    border: 0;
    border-radius: 0 14px 14px 0;
    background: var(--surface);
    color: var(--foreground);
    box-shadow: var(--shadow);
}
.mobile-menu[open] { display: block; }
.mobile-menu-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.mobile-menu-head button { font-size: .8rem; }
.mobile-menu nav { display: grid; margin-top: 2rem; }
.mobile-menu nav a { padding: .8rem .25rem; border-bottom: 1px solid var(--rule); text-decoration: none; font-weight: 650; }
.account-shell { display: grid; grid-template-columns: minmax(300px, 42%) minmax(0, 1fr); min-height: 100vh; }
.account-story {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3rem;
    min-height: 100vh;
    padding: 2.4rem clamp(1.5rem, 3vw, 4rem);
    background: var(--rail);
    color: var(--rail-text);
}
.account-story .eyebrow { color: #b2c7ff; }
.account-story h2 { font-size: clamp(2rem, 3vw, 3rem); }
.account-story p { color: var(--rail-muted); }
.account-story ol { padding: 1.4rem 0 0 1.5rem; border-top: 1px solid #40516d; color: var(--rail-muted); }
.account-story li { padding: .5rem 0; }
.account-column { min-width: 0; }
.account-topbar { display: flex; justify-content: flex-end; align-items: center; min-height: 68px; padding: 1rem 2rem; }
.account-mobile-brand { display: none; }
.account-main { display: flex; justify-content: center; padding: clamp(1.5rem, 5vh, 4rem) 1.5rem 4rem; }
.account-card { width: min(480px, 100%); border: 0; box-shadow: none; }
.account-card .eyebrow { margin-bottom: 1rem; }
.account-card form { display: grid; gap: .55rem; }
.account-card > p:last-child { margin-top: 1.5rem; font-size: .9rem; }
.client-page { background: var(--app-canvas); }
.client-shell { max-width: 900px; margin: auto; padding: 1.5rem 1.4rem 4rem; }
.client-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.client-main { padding: 1.6rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.client-main > section { padding: 1.2rem 0; margin: 1.2rem 0; border: 0; border-top: 1px solid var(--rule); border-radius: 0; box-shadow: none; }
.client-footer { margin-top: 1.2rem; color: var(--muted); font-size: .76rem; text-align: center; }
.proposal-content { padding: 1.3rem; box-shadow: none; }
.proposal-branding-logo { display: block; max-width: min(100%, 240px); max-height: 120px; width: auto; height: auto; object-fit: contain; object-position: left center; }
.proposal-content h2 { font-size: 1.8rem; }
.proposal-content > p { color: var(--muted); overflow-wrap: anywhere; }
.proposal-content > .eyebrow { color: var(--accent); }
.proposal-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0; padding: 1.1rem; border: 1px solid var(--rule); border-radius: 9px; background: var(--accent-soft); }
.proposal-summary span, .proposal-summary small { display: block; color: var(--muted); font-size: .75rem; }
.proposal-summary strong { display: block; margin: .25rem 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.proposal-sections section { padding: 1.2rem 0; border-bottom: 1px solid var(--rule); }
.proposal-sections section:last-child { border-bottom: 0; }
.proposal-sections h3 { font-size: 1.05rem; }
.proposal-sections p { margin-bottom: 0; }
.proposal-meta { display: grid; grid-template-columns: minmax(130px, 1fr) 2fr; gap: .5rem 1rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); font-size: .8rem; }
.proposal-meta dt { color: var(--muted); }
.proposal-meta dd { margin: 0; overflow-wrap: anywhere; }
form { margin: 0; }
form + form { margin-top: .75rem; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.stacked-form { display: grid; gap: .65rem; max-width: 720px; }
.stacked-form > p { margin: .2rem 0 .6rem; color: var(--muted); font-size: .86rem; }
.stacked-form > button { justify-self: start; }
.project-form { max-width: none; }
.project-form-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr); gap: 1.25rem; }
.project-form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-field { display: grid; align-content: start; gap: .35rem; min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.field-help { margin: .2rem 0 0; color: var(--warning); font-size: .8rem; }
.setup-panel { padding: 1.25rem; border: 1px solid var(--rule); border-radius: 9px; background: var(--app-canvas); }
.setup-panel ol { margin: 1rem 0; padding-left: 1.4rem; }
.setup-panel li { padding: .45rem 0; }
.setup-panel p { color: var(--muted); font-size: .82rem; }
label { font-weight: 700; font-size: .88rem; }
input, textarea, select {
    width: 100%;
    min-height: 44px;
    padding: .62rem .8rem;
    border: 1px solid #a7b7c9;
    border-radius: 7px;
    background: var(--surface);
    color: var(--foreground);
}
:root[data-theme="dark"] input, :root[data-theme="dark"] textarea, :root[data-theme="dark"] select { border-color: #6d7b96; }
textarea { min-height: 110px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; margin-right: .45rem; accent-color: var(--accent); }
input[type="file"] { padding: .5rem; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.inline-form { display: flex; align-items: end; gap: .75rem; flex-wrap: wrap; }
.inline-form input { width: min(360px, 100%); }
.project-list { padding: 0; list-style: none; }
.project-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--rule);
    overflow-wrap: anywhere;
}
.project-list li:first-child { padding-top: .25rem; }
.project-list li:last-child { border-bottom: 0; }
.project-list li > a { font-weight: 700; text-decoration: none; }
.project-list span { display: block; color: var(--muted); font-size: .86rem; }
.project-list form { display: inline-block; margin: .5rem .5rem 0 0; }
.workspace-card { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.workspace-card:last-child { border: 0; }
.project-overview { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, 2fr); gap: .8rem 1.5rem; }
.project-overview dt { color: var(--muted); font-size: .84rem; }
.project-overview dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.preserve-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.validation-summary-errors {
    padding: .85rem 1rem;
    border-left: 4px solid var(--error);
    border-radius: 5px;
    background: var(--warning-soft);
    color: var(--foreground);
}
.field-validation-error { color: var(--error); font-weight: 650; font-size: .84rem; }
.action-form { margin-top: 1.4rem; }
fieldset { padding: 1rem; border: 1px solid var(--rule); border-radius: 8px; }
.stacked-form fieldset { display: grid; gap: .65rem; min-width: 0; }
.stacked-form fieldset > div:not([hidden]) { display: grid; gap: .4rem; }
legend { padding-inline: .4rem; font-weight: 700; }
.workspace-main details, .client-main details { margin-block: 1rem; }
.workspace-main summary, .client-main summary { min-height: 44px; padding-block: .65rem; cursor: pointer; font-weight: 650; }
.project-navigation a, nav[aria-label="Proposal steps"] a, nav[aria-label="Breadcrumb"] > * { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
nav[aria-label="Breadcrumb"] { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; }
nav[aria-label="Breadcrumb"] > * { max-width: 100%; }
nav[aria-label="Breadcrumb"] > * + *::before { content: ""; flex: 0 0 auto; height: 1em; margin-inline-end: .75rem; border-inline-start: 1px solid var(--muted); transform: rotate(15deg); }
.project-navigation a[aria-current], nav[aria-label="Proposal steps"] a[aria-current] { color: var(--foreground); font-weight: 750; text-decoration-thickness: 3px; }
.attention-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; padding: 0; list-style: none; }
.attention-list a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; padding: 1rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
.attention-list strong { font-size: 1.5rem; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
blockquote { margin: 1rem 0; padding: .85rem 1rem; border-left: 3px solid var(--accent); background: var(--accent-soft); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .8rem; text-align: left; border-bottom: 1px solid var(--rule); }
th { color: var(--muted); font-size: .75rem; }
.table-scroll { overflow-x: auto; }
@media (max-width: 850px) {
    .app-shell { display: block; }
    .app-sidebar { display: none; }
    .mobile-menu-button { display: inline-flex; }
    .topbar-context { display: none; }
    .workspace-main { padding: 1.3rem 1rem 3rem; }
    .workspace-shortcut { display: block; }
    .account-shell { grid-template-columns: 1fr; }
    .account-story { min-height: auto; padding: 1.2rem; }
    .account-story > div, .account-story > .sidebar-credit { display: none; }
    .account-main { padding-top: 1rem; }
    .project-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    .app-topbar { padding: .7rem 1rem; }
    .topbar-actions { gap: .5rem; }
    .topbar-actions a { font-size: .75rem; }
    .theme-switch { font-size: .75rem; }
    .workspace-main section, .client-main { padding: 1rem; }
    .project-overview { grid-template-columns: 1fr; gap: .15rem; }
    .project-overview dd { margin-bottom: .8rem; }
    .proposal-summary, .proposal-meta { grid-template-columns: 1fr; }
    .proposal-meta dd { margin-bottom: .45rem; }
    .client-shell { padding: .8rem .7rem 3rem; }
    .client-header .brand-lockup { font-size: .78rem; }
    .client-header .brand-lockup img { width: 24px; height: 24px; }
    .account-topbar { padding: .8rem 1rem; }
    .inline-form input { width: 100%; }
    .project-form-fields { grid-template-columns: 1fr; }
}
@media print {
    :root, :root[data-theme="dark"] { color-scheme: light; --foreground: #000; --surface: #fff; --background: #fff; --app-canvas: #fff; --muted: #333; }
    body { background: white; color: black; }
    .app-sidebar, .app-topbar, .account-story, .account-topbar, .client-header, .client-footer,
    .no-print, .mobile-menu, .mobile-menu-button, .skip-link { display: none !important; }
    .app-shell, .account-shell { display: block; }
    .workspace-main, .account-main, .client-main { width: 100%; max-width: none; margin: 0; padding: 0; min-height: 0; border: 0; box-shadow: none; }
    .workspace-main section, .proposal-content { break-inside: avoid; box-shadow: none; }
}
/* Public entry follows the wireframe's editorial hierarchy in Flightdeck colors. */
.site-header, .landing-main, .site-footer { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.site-header { display: flex; align-items: center; gap: 1.25rem; min-height: 86px; border-bottom: 1px solid var(--rule); }
.site-header nav { display: flex; align-items: center; gap: 1.2rem; margin-left: auto; }
.site-header nav a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; color: var(--foreground); font-size: .84rem; font-weight: 700; text-decoration: none; }
.site-header nav a:not(.button):hover { color: var(--accent); text-decoration: underline; }
.site-header .button { min-height: 44px; padding: .5rem .85rem; font-size: .8rem; }
.site-header .theme-switch { min-height: 44px; white-space: nowrap; }
.hero { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); padding: clamp(3.2rem, 7vw, 6.5rem) 0; }
.hero-copy .eyebrow { font-size: .68rem; }
.hero h1 { font-size: clamp(3.4rem, 6vw, 5rem); line-height: 1.02; font-weight: 800; }
.hero h1 span { color: var(--accent); }
.hero .lead { max-width: 560px; color: var(--muted); font-size: 1.12rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.7rem 0 .8rem; }
.small-note { color: var(--muted); font-size: .75rem; }
.example-panel { scroll-margin-top: 1rem; overflow: hidden; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); box-shadow: 0 22px 55px rgb(22 45 96 / 13%); }
.example-top { display: flex; align-items: center; gap: .85rem; min-height: 84px; padding: .75rem 1.25rem; background: var(--rail); color: var(--rail-text); }
.example-top img { width: 54px; height: 65px; object-fit: contain; }
.example-top span { display: block; color: var(--rail-muted); font-size: .74rem; }
.example-body { padding: 1.5rem; }
.example-body h2 { font-size: 1.4rem; }
.example-body > p:not(.eyebrow) { color: var(--muted); font-size: .88rem; }
.example-body blockquote { font-size: .9rem; }
.scope-example-items { list-style: none; padding: 0; margin: 1rem 0; }
.scope-example-items li { padding: .65rem 0; border-bottom: 1px solid var(--rule); font-weight: 600; }
.scope-example-items span { display: block; color: var(--muted); font-size: .75rem; font-weight: 400; }
.example-status { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0; }
.example-status span { padding: .25rem .55rem; border-radius: 5px; background: var(--accent-soft); color: var(--accent-strong); font-size: .74rem; font-weight: 700; }
.example-body dl { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 0; padding-top: 1rem; border-top: 1px solid var(--rule); }
.example-body dt { color: var(--muted); font-size: .72rem; }
.example-body dd { margin: .2rem 0 0; font-weight: 800; }
.proof-strip { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.25rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--muted); font-size: .77rem; }
.proof-strip span::before { content: "✓"; margin-right: .35rem; color: var(--accent); }
.landing-section { padding: clamp(3.5rem, 6vw, 5.5rem) 0; }
.landing-section > p:not(.eyebrow) { max-width: 650px; color: var(--muted); }
.landing-section h2 { font-size: clamp(2rem, 3vw, 2.7rem); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 2.3rem; }
.steps article { padding-top: 1rem; border-top: 1px solid var(--rule); }
.step-number { display: inline-block; margin-bottom: .75rem; color: var(--accent); font-size: .8rem; font-weight: 800; }
.steps p { color: var(--muted); font-size: .9rem; }
.landing-tint { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding-inline: 2rem; border-radius: 14px; background: var(--app-canvas); }
.landing-tint > div > p:not(.eyebrow) { color: var(--muted); }
.agreement-card { padding: 1.5rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.agreement-card p { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); font-size: .86rem; }
.agreement-card p span { color: var(--muted); text-align: right; }
.agreement-card small { display: block; margin-top: 1rem; }
.landing-cta { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin: 3rem 0; padding: 2rem; border-radius: 10px; background: var(--rail); color: var(--rail-text); }
.landing-cta h2 { margin-bottom: .3rem; }
.landing-cta p { margin: 0; color: var(--rail-muted); }
.landing-cta .button { white-space: nowrap; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .77rem; }
.site-footer a { color: var(--foreground); }
.signup-agreement { margin: .25rem 0; font-size: .875rem; line-height: 1.6; }
.legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.legal-links a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.app-legal-footer { padding: 1rem 1.5rem; color: var(--muted); font-size: .8rem; }
.app-legal-footer .legal-links, .client-footer .legal-links { justify-content: center; }
.public-intro { padding: clamp(2.5rem, 5vw, 4.5rem) 0 1.5rem; }
.public-intro h1 { max-width: 830px; font-size: clamp(2.2rem, 3.7vw, 3.2rem); }
.public-intro > p:last-child { color: var(--muted); }
.policy-content { max-width: 780px; padding-bottom: 3rem; line-height: 1.7; overflow-wrap: anywhere; }
.policy-navigation { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: 1.25rem; border: 1px solid var(--rule); border-radius: 8px; }
.policy-content section { margin-top: 2rem; }
.policy-content h2 { scroll-margin-top: 1rem; line-height: 1.3; }
.policy-content address { font-style: normal; }
.policy-content li + li { margin-top: .6rem; }
.plan-cards, .calculator-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.plan-card, .calculator-card { min-width: 0; padding: clamp(1.25rem, 2.4vw, 2rem); border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); }
.plan-card { display: flex; flex-direction: column; }
.plan-card-team { border: 2px solid var(--accent); }
.plan-card h2 { margin-bottom: 1.2rem; font-size: 1.15rem; }
.plan-card > p:not(.eyebrow, .plan-price) { color: var(--muted); font-size: .88rem; }
.plan-price { margin-bottom: .5rem; }
.plan-price strong { font-size: clamp(1.9rem, 3vw, 2.7rem); font-weight: 750; letter-spacing: -.035em; }
.plan-price span { color: var(--muted); font-size: .82rem; }
.feature-list { display: grid; gap: .8rem; margin: 1.2rem 0 1.7rem; padding: 0; list-style: none; font-size: .89rem; }
.feature-list li { display: grid; grid-template-columns: 1.1rem 1fr; gap: .45rem; }
.feature-list li::before { content: "✓"; color: var(--accent); font-weight: 800; }
.plan-card > .button { width: 100%; margin-top: auto; }
.comparison-section { padding: clamp(2.5rem, 5vw, 4rem) 0 1.5rem; }
.comparison-section h2, .calculator-explanation h2 { font-size: clamp(1.8rem, 2.6vw, 2.3rem); }
.comparison-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; }
.comparison-scroll table { min-width: 610px; }
.comparison-scroll thead { background: var(--app-canvas); }
.comparison-scroll th, .comparison-scroll td { padding: .9rem 1rem; }
.comparison-scroll tbody th { width: 40%; color: var(--foreground); font-size: .83rem; font-weight: 600; }
.comparison-scroll td { font-size: .83rem; }
.comparison-section > .small-note { margin-top: .65rem; }
.pricing-note { margin: 0 0 3rem; padding: 1.25rem 1.5rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--accent-soft); }
.pricing-note p { margin: .3rem 0 0; color: var(--foreground); font-size: .9rem; }
.audience-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.7rem; }
.audience-grid article { padding-top: 1rem; border-top: 1px solid var(--rule); }
.audience-grid p { color: var(--muted); font-size: .88rem; }
.home-pricing { padding-top: 1rem; }
.faq-section { padding-top: 1rem; }
.faq-section details { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.faq-section summary { display: flex; align-items: center; min-height: 44px; font-weight: 700; cursor: pointer; }
.faq-section summary::before { content: "▸"; margin-right: .55rem; color: var(--accent); }
.faq-section details[open] summary::before { content: "▾"; }
.faq-section details p { max-width: 720px; margin: .65rem 0 0; color: var(--muted); font-size: .9rem; }
.calculator-card h2 { margin-bottom: 1.5rem; font-size: clamp(1.7rem, 2.7vw, 2.3rem); }
.calculator-fields { display: grid; gap: .8rem; }
.calculator-field { display: grid; gap: .25rem; }
.calculator-field small { font-size: .74rem; }
.calculator-field .field-error { color: var(--error); font-size: .78rem; font-weight: 650; }
.calculator-card > .small-note { margin: 1rem 0 0; }
.calculator-total { display: block; min-height: 4rem; margin: .5rem 0; font-size: clamp(2.3rem, 4vw, 3.4rem); font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.calculator-breakdown { display: grid; gap: .5rem; margin: 1rem 0; padding: 1rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.calculator-breakdown div { display: flex; justify-content: space-between; gap: 1rem; }
.calculator-breakdown dt, .calculator-breakdown dd { margin: 0; font-size: .85rem; }
.calculator-breakdown dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.calculator-card > .button { width: 100%; }
.calculator-card > .button:disabled { opacity: .5; cursor: not-allowed; }
.calculator-card > #calculator-status { margin: .6rem 0 0; color: var(--error); font-size: .83rem; }
.calculator-card > #calculator-status:empty { display: none; }
.calculator-explanation { max-width: 720px; padding: clamp(2.5rem, 5vw, 4rem) 0; }
.calculator-explanation p { color: var(--muted); }
.noscript-note { width: min(1180px, calc(100% - 64px)); margin: 1rem auto; color: var(--error); }
@media (max-width: 850px) {
    .site-header, .landing-main, .site-footer { width: calc(100% - 40px); }
    .site-header { flex-wrap: wrap; padding: .8rem 0; }
    .site-header nav { order: 3; width: 100%; justify-content: space-between; margin: 0; }
    .hero { grid-template-columns: 1fr; padding: 3rem 0; }
    .example-panel { max-width: 600px; }
    .landing-tint { grid-template-columns: 1fr; gap: 1.5rem; }
    .calculator-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .site-header, .landing-main, .site-footer { width: calc(100% - 28px); }
    .site-header .brand-lockup { font-size: .83rem; }
    .site-header form { margin-left: auto; }
    .site-header nav { justify-content: flex-start; flex-wrap: wrap; gap: .2rem .65rem; }
    .site-header nav a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; font-size: .79rem; }
    .site-header nav .button { font-size: .78rem; padding-inline: .75rem; }
    .hero h1 { font-size: clamp(2.7rem, 11vw, 3.5rem); }
    .hero .lead { font-size: 1rem; }
    .proof-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: 1fr; gap: 1rem; }
    .audience-grid { grid-template-columns: 1fr; gap: .75rem; }
    .landing-tint { padding-inline: 1rem; }
    .landing-cta { flex-direction: column; align-items: start; padding: 1.4rem; }
    .agreement-card p { display: block; }
    .agreement-card p span { display: block; text-align: left; }
    .plan-cards { grid-template-columns: 1fr; }
    .plan-card, .calculator-card { padding: 1.25rem; }
    .noscript-note { width: calc(100% - 28px); }
}

.danger-zone { border: 1px solid #b42318; margin-block: 2rem; }
.danger-zone h2 { color: #b42318; }
.deletion-actions { margin-top: 1rem; }
button.danger, a.danger { background: #b42318; color: #fff; border: 1px solid #b42318; }
.deletion-dialog { max-width: min(36rem, calc(100vw - 2rem)); padding: 1.5rem; border: 2px solid #b42318; border-radius: .75rem; }
.deletion-dialog::backdrop { background: rgb(0 0 0 / 65%); }
[data-theme="dark"] .danger-zone { border-color: #ff8a80; }
[data-theme="dark"] .danger-zone h2 { color: #ff8a80; }
[data-theme="dark"] .deletion-dialog { background: #000; color: #fff; border-color: #ff8a80; }

.document-upload { min-width: 0; }
.document-dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: .85rem; padding: 1.75rem 1rem; border: 2px dashed var(--rule); border-radius: 1rem; background: var(--app-canvas); text-align: center; transition: border-color .15s, background-color .15s; }
.document-dropzone:focus-within, .document-dropzone.is-dragging { border-color: var(--accent); background: var(--accent-soft); outline: 3px solid var(--accent); outline-offset: 3px; }
.document-upload-icon { color: var(--accent); flex: none; }
.document-choose { margin: 0; cursor: pointer; }
.document-file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.document-selection-help, .document-limits { color: var(--muted); font-size: .9rem; }
.document-selection-help { margin: 0; }
.document-limits { margin-top: .75rem; }
.document-queue { list-style: none; padding: 0; margin-block: 1rem; display: grid; gap: .65rem; }
.document-queue-item { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; min-width: 0; padding: .85rem; border: 1px solid var(--rule); border-radius: .65rem; background: var(--surface); }
.document-queue-item > div { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; }
.document-queue-item button { font-size: .85rem; }
.document-queue-status { display: block; margin-top: .25rem; color: var(--muted); }
.document-queue-status.field-validation-error { color: var(--error); }
@media (prefers-reduced-motion: reduce) { .document-dropzone { transition: none; } }
.scope-edit-item { min-width: 0; margin-block: 1rem; padding: 1rem; border: 1px solid var(--rule); border-radius: .75rem; background: var(--surface); }
.scope-edit-item legend { padding-inline: .4rem; font-weight: 650; }
.scope-source-evidence { margin-block: .75rem; padding: .75rem; border-inline-start: 3px solid var(--accent); background: var(--accent-soft); overflow-wrap: anywhere; }
.scope-source-evidence summary { cursor: pointer; font-weight: 650; }
.scope-source-evidence blockquote { margin: .75rem 0; padding-inline-start: .75rem; border-inline-start: 2px solid var(--rule); white-space: pre-wrap; }
.scope-source-evidence p { margin-block: .75rem; }

/* Scope source cards and analysis feedback share explicit, accessible states. */
.scope-document-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .65rem; }
.scope-document-list[hidden] { display: none; }
.scope-document-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 28px auto; gap: .8rem; align-items: center; padding: .85rem 1rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); }
.scope-document-name { font-weight: 650; overflow-wrap: anywhere; line-height: 1.45; }
.scope-file-icon { position: relative; display: inline-flex; align-items: flex-end; justify-content: center; width: 38px; height: 44px; padding-bottom: 5px; border: 1.5px solid currentColor; border-radius: 5px; color: #3156af; background: #edf2ff; font-size: .62rem; font-weight: 800; letter-spacing: .03em; }
.scope-file-icon::before { content: ''; position: absolute; top: -1px; right: -1px; width: 10px; height: 10px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; border-radius: 0 4px 0 3px; background: var(--surface); }
.scope-file-icon[data-type='pdf'] { color: #b42318; background: #fff1f0; }
.scope-file-icon[data-type='txt'], .scope-file-icon[data-type='md'] { color: #47605c; background: #edf5f2; }
.scope-document-status { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 800; cursor: help; }
.scope-document-status[data-state='success'] { color: #147540; background: #e8f6ed; }
.scope-document-status[data-state='error'] { color: #b42318; background: #fff1f0; }
.scope-document-status[data-state='pending'] { color: #986800; }
.scope-document-status[data-state='info'] { color: var(--muted); background: var(--background); }
.scope-document-status::after { content: attr(data-tooltip); display: none; position: absolute; right: 0; bottom: calc(100% + 9px); z-index: 20; width: max-content; max-width: min(280px, 70vw); padding: .5rem .7rem; border: 1px solid var(--rule); border-radius: 7px; background: var(--foreground); color: var(--surface); font-size: .8rem; font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.scope-document-status:not([data-tooltip-dismissed='true']):hover::after, .scope-document-status:not([data-tooltip-dismissed='true']):focus-visible::after { display: block; }
.scope-document-remove { width: 44px; min-height: 44px; padding: .65rem; color: var(--muted); background: transparent; border-color: transparent; }
.scope-document-remove:hover { color: #b42318; border-color: #f6ccc8; background: #fff1f0; }
.scope-document-remove:disabled { opacity: .45; cursor: not-allowed; }
.scope-document-remove svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.scope-document-empty { color: var(--muted); padding: .75rem 0; }
.scope-analysis-banner { display: flex; align-items: flex-start; gap: .8rem; padding: 1rem 1.1rem; border: 1px solid var(--rule); border-left-width: 4px; border-radius: 9px; background: var(--accent-soft); color: var(--foreground); line-height: 1.5; }
.scope-analysis-banner:empty { display: none; }
.scope-analysis-banner[data-state='error'] { color: #92251c; background: #fff1f0; border-color: #e0a19b; }
.scope-analysis-banner[data-state='success'] { color: #17633c; background: #eaf7ef; border-color: #8fc5a4; }
.scope-analysis-banner[data-state='pending'] { color: #795400; background: #fff8df; border-color: #e6cb78; }
.scope-document-status[data-state='pending']::before, .scope-analysis-banner[data-state='pending']::before { content: ''; display: block; flex: 0 0 auto; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: scope-spin .9s linear infinite; }
.scope-analysis-banner[data-state='pending']::before { margin-top: .2rem; }
@keyframes scope-spin { to { transform: rotate(360deg); } }
:root[data-theme='dark'] .scope-analysis-banner[data-state='error'], :root[data-theme='dark'] .scope-document-status[data-state='error'] { color: #ffb4ab; background: #321b20; border-color: #92504b; }
:root[data-theme='dark'] .scope-analysis-banner[data-state='success'], :root[data-theme='dark'] .scope-document-status[data-state='success'] { color: #96e4b7; background: #152c24; border-color: #41845d; }
:root[data-theme='dark'] .scope-analysis-banner[data-state='pending'] { color: #f7d67b; background: #2d2818; border-color: #8b7438; }
:root[data-theme='dark'] .scope-document-status[data-state='pending'] { color: #f7d67b; }
@media (max-width: 480px) { .scope-document-row { gap: .5rem; padding: .7rem; grid-template-columns: 38px minmax(0, 1fr) 28px auto; } }
@media (prefers-reduced-motion: reduce) { .scope-document-status[data-state='pending']::before, .scope-analysis-banner[data-state='pending']::before { animation: none; } }
