@import url("primitives.css");

/* ========================================================================
   Endex Advisor — design tokens + components.

   Tokens lifted from the design handoff (advisor-primitives.jsx :: T).
   The visual language is the canonical reference for this file.
   ======================================================================== */

/* ─── Reset / base ─── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.adv-body {
    background: var(--adv-bg);
    color: var(--adv-text);
    font-family: var(--adv-sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
button { font: inherit; }
a { color: inherit; text-decoration: none; }

/* ─── Animations ─── */
@keyframes adv-fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes adv-fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes adv-pulse  { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes adv-spin   { to { transform: rotate(360deg); } }

.adv-fade-up { animation: adv-fadeUp .55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.adv-fade-in { animation: adv-fadeIn .6s ease-out both; }
.adv-pulse   { animation: adv-pulse 1.4s ease-in-out infinite; }

/* ─── Layout: header + scrollable column ─── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    height: 68px;
    min-height: 68px;
    min-width: 0;
    padding: 0 32px;
    background: var(--adv-header-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--adv-border);
}
.adv-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-shrink: 0;
}
.adv-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--adv-teal);
    display: inline-block;
}
.adv-brand-name {
    font-family: var(--adv-serif);
    font-size: 24px;
    letter-spacing: -0.3px;
    color: var(--adv-text);
}
.adv-header-meta {
    font-family: var(--adv-mono);
    font-size: 13px;
    color: var(--adv-text-faint);
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.adv-header-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}
.adv-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 0 0 auto;
    font-family: var(--adv-sans);
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    color: var(--adv-text-faint);
    white-space: nowrap;
    transition: color .2s, opacity .2s;
}
.adv-pill-label {
    overflow: hidden;
    text-overflow: ellipsis;
    /* The pill sets line-height: 1 to size itself off its icon, which leaves the
       line box exactly as tall as the em — and `overflow: hidden`, needed for the
       ellipsis, then clips whatever hangs below the baseline. "parsing" lost the
       tails of its p and g. Give the label its own line box with room for a
       descender; the pill is still 22px tall, sized by the icon. */
    line-height: 1.4;
}
.adv-pill[data-state="done"] {
    color: var(--adv-text-dim);
}
.adv-pill[data-state="active"],
.adv-pill[data-state="asking"] {
    font-weight: 600;
    color: var(--adv-text);
}
.adv-pill-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid var(--adv-border-strong);
    background: transparent;
    color: var(--adv-text-faint);
    font-family: var(--adv-mono);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}
.adv-pill[data-state="done"] .adv-pill-icon {
    border-color: var(--adv-action);
    background: var(--adv-action);
    color: var(--adv-teal-ink);
}
.adv-pill[data-state="active"] .adv-pill-icon,
.adv-pill[data-state="asking"] .adv-pill-icon {
    border: 2px solid var(--adv-teal);
    color: var(--adv-teal);
}
.adv-pill[data-state="idle"] .adv-pill-icon {
    color: var(--adv-text-faint);
}
.adv-pill-connector {
    width: 20px;
    height: 1px;
    flex: 0 0 20px;
    margin: 0 12px;
    background: var(--adv-border-strong);
}
.adv-pill-connector[data-state="done"] { background: var(--adv-teal); }

.adv-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    position: relative;
    min-width: 0;
    flex-shrink: 0;
}
.adv-menu {
    position: relative;
    flex: 0 0 auto;
}
.adv-menu-toggle {
    height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--adv-border-strong);
    border-radius: 10px;
    background: transparent;
    color: var(--adv-text);
    font-family: var(--adv-sans);
    font-size: 15px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
    transition: border-color .15s, background .15s;
}
.adv-menu-toggle::-webkit-details-marker { display: none; }
.adv-menu-toggle::marker { display: none; }
.adv-menu-toggle:hover,
.adv-menu[open] > .adv-menu-toggle {
    border-color: var(--adv-text-dim);
    background: var(--adv-surface-alt);
}
.adv-menu-toggle:focus-visible {
    outline: none;
    border-color: var(--adv-teal);
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
.adv-menu-glyph {
    font-size: 18px;
    line-height: .8;
}
.adv-menu-panel {
    position: absolute;
    top: 52px;
    right: 0;
    z-index: 60;
    width: 280px;
    max-width: calc(100vw - 36px);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid var(--adv-border-strong);
    border-radius: 14px;
    background: var(--adv-surface-lift);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .25);
    color: var(--adv-text);
    font-size: 16px;
}
.adv-menu-item {
    min-height: 44px;
    width: 100%;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--adv-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: color .15s, background .15s;
}
.adv-menu-item:disabled { opacity: .55; cursor: not-allowed; }
.adv-menu-item:hover:not(:disabled) {
    background: var(--adv-surface-alt);
    color: var(--adv-text);
}
.adv-menu-item:focus-visible {
    outline: none;
    background: var(--adv-surface-alt);
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
.adv-menu-arrow { color: var(--adv-text-faint); }
.adv-menu-divider {
    height: 1px;
    margin: 6px 8px;
    background: var(--adv-border);
}
.adv-menu-row {
    min-height: 52px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--adv-text-dim);
}
/* "Start over" is a menu item now, while retaining its existing hook. */
.adv-cta-reset {
    appearance: none;
    font-family: var(--adv-sans);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}
.adv-logout { font-size: 16px; }

/* Retained for any legacy callers; header actions now live in .adv-menu. */
.adv-header-spacer,
.adv-header-divider { display: none; }

/* ─── Language toggle ─── */
.adv-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--adv-border-strong);
    border-radius: 999px;
    overflow: hidden;
    height: 44px;
    flex-shrink: 0;
    background: var(--adv-header-bg);
}
.adv-lang-form {
    display: contents; /* form is invisible; button inherits flex context */
}
.adv-lang-active,
.adv-lang-btn {
    font-family: var(--adv-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0 12px;
    height: 100%;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
}
.adv-lang-active {
    appearance: none;
    background: var(--adv-teal-soft);
    color: var(--adv-teal);
    border: none;
    cursor: default;
    user-select: none;
    opacity: 1; /* keep full opacity despite [disabled] */
}
.adv-lang-active:disabled {
    cursor: default; /* never show not-allowed on the active control */
}
.adv-lang-btn {
    appearance: none;
    border: none;
    border-left: 1px solid var(--adv-border-strong);
    background: transparent;
    color: var(--adv-text-dim);
    cursor: pointer;
    transition: color .15s, background .15s;
}
.adv-lang-active + .adv-lang-form .adv-lang-btn,
.adv-lang-form:first-child .adv-lang-btn {
    border-left: none;
}
.adv-lang-btn:hover {
    color: var(--adv-text);
    background: var(--adv-surface-lift);
}
.adv-lang-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
@media (max-width: 600px) {
    /* Login is the only page still carrying a fixed corner control (the menu —
       its split hero already owns the brand). Reserve top clearance so the
       control never lands on the shell on narrow viewports. Every other page
       now gets the header bar, which takes its own space in flow. */
    body.adv-body[data-page="login"] { padding-top: 72px; }
}

/* ─── Shared header: brand link, flat variant, corner placement ─── */
.adv-brand-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
    border-radius: 8px;
}
.adv-brand-home:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
/* Pages without the advisor's progress pills: same bar, quieter. */
.adv-header-flat { height: 60px; min-height: 60px; }

/* Inline placement: align the panel with the menu's right edge;
   narrow wrapping headers use the viewport anchor below. */
.adv-menu-inline > .adv-menu-panel { right: 0; left: auto; }

/* Login's placement: visible language switch and menu in the corner. */
.adv-menu-corner {
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 100;
}
.adv-menu-corner .adv-menu-toggle {
    height: 36px;
    background: var(--adv-header-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
@media (max-width: 600px) {
    .adv-menu-corner { top: 10px; right: 12px; }
    .site-header { padding: 0 18px; gap: 12px; }
}

/* Scroll container */
/* The advisor page is a two-row shell: a header of whatever height it needs, and
   a scroll area that takes the rest. Sizing the scroll area as `100vh - 68px`
   instead hardcodes the header's height in a second place — if the two ever
   disagree the body itself becomes scrollable, and because the header is sticky
   the transcript then slides under it and its first lines cannot be scrolled
   back into view. `dvh` keeps that true on mobile, where `100vh` counts the
   space behind the collapsing URL bar. The `calc()` below stays as the fallback
   for browsers without `dvh`. */
body.adv-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}
body.adv-app > .site-header { flex: 0 0 auto; }
body.adv-app > .adv-scroll {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}

.adv-scroll {
    height: calc(100vh - 68px);
    overflow-y: auto;
    /* Makes this the offsetParent, so app.js can measure a block's offset within
       the transcript exactly (see offsetWithin). */
    position: relative;
    background: var(--adv-bg);
    color: var(--adv-text);
    font-family: var(--adv-sans);
}
.adv-scroll::-webkit-scrollbar { width: 10px; }
.adv-scroll::-webkit-scrollbar-thumb { background: rgba(180, 220, 220, 0.08); border-radius: 5px; }
.adv-scroll::-webkit-scrollbar-thumb:hover { background: rgba(180, 220, 220, 0.18); }

.adv-page-inner {
    padding: 56px 32px 280px;
    max-width: 720px;
    margin: 0 auto;
}

/* ─── Advisor messages ─── */
.adv-identifier {
    font-family: var(--adv-mono);
    font-size: 10px;
    color: var(--adv-text-dim);
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.adv-identifier-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--adv-teal);
    display: inline-block;
}

.adv-msg {
    font-family: var(--adv-serif);
    font-variation-settings: "opsz" 22;
    font-size: 18px;
    line-height: 1.5;
    letter-spacing: -0.1px;
    color: var(--adv-text);
    margin: 0 0 16px;
}
.adv-msg-headline { font-weight: 400; font-size: 40px; line-height: 1.15; letter-spacing: -0.8px; margin-bottom: 14px; font-variation-settings: "opsz" 40; }
.adv-msg-sub      { font-size: 18px; color: var(--adv-text-dim); font-variation-settings: "opsz" 18; }
.adv-msg-dim      { color: var(--adv-text-dim); font-size: 18px; font-variation-settings: "opsz" 18; }

.app-aside {
    font-family: var(--adv-sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--adv-text-dim);
    margin-bottom: 18px;
    padding-left: 14px;
    border-left: 2px solid var(--adv-border);
}
.app-aside b { color: var(--adv-text); }
.app-aside i { font-style: italic; }
.adv-aside-warn { border-left-color: var(--adv-warn); }

.adv-question-card,
.adv-reloc-card {
    width: 100%;
    padding: clamp(20px, 3vw, 28px);
    border-radius: 16px;
    background: var(--adv-surface);
    border: 1px solid var(--adv-teal-dim);
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
}
.adv-question-card > .adv-step-label { margin: 0; }
.adv-question-card > .adv-msg,
.adv-reloc-card > .adv-msg { margin: 0; }
.adv-question-card > .adv-msg {
    font-size: 28px;
    line-height: 1.3;
    letter-spacing: -0.3px;
    font-variation-settings: "opsz" 28;
}
.adv-reloc-card > .adv-msg {
    font-size: 22px;
    line-height: 1.4;
    letter-spacing: -0.2px;
    font-variation-settings: "opsz" 22;
}
.adv-reloc-card > .app-aside { margin: 0; font-size: 16px; }

.adv-disclosure {
    min-width: 0;
}
.adv-rationale-disclosure {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
[data-block="allocation-ask"] > .adv-rationale-disclosure { margin-top: 20px; }
.adv-disclosure-toggle {
    min-height: 44px;
    padding: 11px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    appearance: none;
    border: 0;
    background: transparent;
    color: #4F6561;
    font-family: var(--adv-sans);
    font-size: 14px;
    line-height: 22px;
    text-align: left;
    cursor: pointer;
}
.adv-disclosure-toggle:hover { color: var(--adv-text); }
.adv-disclosure-toggle:focus-visible {
    outline: 2px solid #08775E;
    outline-offset: 2px;
}
.adv-disclosure-toggle > span:first-child {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.adv-disclosure-chevron {
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    color: #08775E;
}
.adv-disclosure-chevron svg {
    display: block;
    width: 16px;
    height: 16px;
    transform-origin: 8px 8px;
}
.adv-rationale-disclosure[data-open="true"] .adv-disclosure-chevron svg {
    transform: rotate(180deg);
}
.adv-disclosure-panel {
    max-width: 72ch;
    color: #4F6561;
    font-family: var(--adv-sans);
    font-size: 16px;
    line-height: 24px;
}

/* ─── Step labels ─── */
.adv-step-label {
    font-family: var(--adv-mono);
    font-size: 13px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin: 28px 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--adv-text-dim);
}
.adv-step-warn  { color: var(--adv-warn); }
.adv-step-teal  { color: var(--adv-teal); }
.adv-step-error { color: var(--adv-error); }
.adv-step-dot {
    width: 5px; height: 5px;
    border-radius: 3px;
    background: currentColor;
    box-shadow: 0 0 0 4px currentColor;
    opacity: 1;
    display: inline-block;
}
.adv-step-rule { flex: 1; height: 1px; background: var(--adv-border); }
.adv-question-card .adv-step-label {
    font-family: var(--adv-sans);
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
}
.adv-question-card .adv-step-dot {
    width: 28px;
    height: 28px;
    border: 2px solid var(--adv-teal);
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    color: var(--adv-teal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--adv-mono);
    font-size: 14px;
    line-height: 1;
}
/* The ring marks the question you are on; it is not a counter. Numbering it
   clashed with the header pills, which enumerate pipeline stages on a different
   axis (residency is the first question but the third stage). The label carries
   the ordinal in words — "First · residency". */
.adv-question-card .adv-step-dot:empty::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

/* ─── User answers ─── */
.adv-user-answer {
    width: 100%;
    margin-bottom: 18px;
    padding: clamp(16px, 2vw, 18px) clamp(18px, 2vw, 22px);
    border-radius: 14px;
    background: var(--adv-surface);
    border: 1px solid var(--adv-border);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}
.adv-answer-pill {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--adv-text);
    font-family: var(--adv-sans);
}
.adv-answer-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--adv-teal);
    color: var(--adv-teal-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--adv-mono);
    font-size: 14px;
    line-height: 1;
}
.adv-answer-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.adv-answer-caption {
    color: var(--adv-text-dim);
    font-size: 15px;
    line-height: 1.35;
}
.adv-answer-value {
    overflow-wrap: anywhere;
    color: var(--adv-text);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.35;
}
.adv-answer-edit {
    flex: 0 0 auto;
    color: var(--adv-text-dim);
    font-size: 15px;
    white-space: nowrap;
}
.adv-answer-edit:hover { color: var(--adv-text); }

/* ─── Choices ─── */
.adv-choice {
    appearance: none;
    cursor: pointer;
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--adv-surface-alt);
    border: 1px solid var(--adv-border-strong);
    color: var(--adv-text);
    font-family: var(--adv-sans);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    transition: all .15s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-height: 48px;
}
.adv-choice:hover:not(:disabled) {
    border-color: var(--adv-teal);
    background: var(--adv-teal-soft);
    color: var(--adv-teal);
}
.adv-choice:focus-visible {
    outline: none;
    border-color: var(--adv-teal);
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
.adv-choice-primary {
    height: 48px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    border-color: var(--adv-action);
    background: var(--adv-action);
    color: var(--adv-teal-ink);
    flex-direction: row;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 600;
    transition: filter .15s, opacity .2s;
}
.adv-choice-primary:hover:not(:disabled) {
    background: var(--adv-action-hover);
    color: var(--adv-teal-ink);
    filter: none;
}
.adv-choice-danger {
    border-color: var(--adv-error);
    background: var(--adv-error-soft);
    color: var(--adv-error);
}
.adv-choice-danger:hover:not(:disabled) {
    border-color: var(--adv-error);
    background: var(--adv-error);
    color: var(--adv-surface);
}
.adv-choice:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transition: opacity .2s;
}
.adv-choice-label {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.35;
}
.adv-choice-sub {
    font-size: 15px;
    color: var(--adv-text-dim);
    margin-top: 0;
    font-weight: 400;
    line-height: 1.45;
}
.adv-choice-primary .adv-choice-sub { color: var(--adv-teal-dim); }
.adv-choice-check { color: var(--adv-teal); visibility: hidden; flex: 0 0 auto; }
.adv-choice.is-selected,
.adv-choice[aria-selected="true"] {
    border-color: var(--adv-teal);
    background: var(--adv-teal-soft);
    color: var(--adv-teal);
}
.adv-choice.is-selected .adv-choice-check,
.adv-choice[aria-selected="true"] .adv-choice-check { visibility: visible; }
.adv-choice-icon { margin-right: 6px; font-size: 15px; }
.adv-choice-download {
    flex: 2;
    text-align: center;
    padding: 16px 18px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}
.adv-choice-secondary {
    flex: 1;
    text-align: center;
    padding: 0 22px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    height: 48px;
    background: transparent;
    border-color: var(--adv-border-strong);
    color: var(--adv-text);
}
.adv-choice-secondary:hover:not(:disabled) {
    background: transparent;
    border-color: var(--adv-text-dim);
    color: var(--adv-text);
}
.adv-choice-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 0;
}
.adv-choice-row > .adv-choice { width: 100%; }

@media (max-width: 640px) {
    .adv-choice-row[data-mobile="stack"] { grid-template-columns: 1fr; }
}

.adv-alloc-fallback {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

/* ─── Drop zone ─── */
.adv-dropzone {
    border: 1.5px dashed var(--adv-border-strong);
    border-radius: 16px;
    text-align: center;
    color: var(--adv-text);
    background: var(--adv-surface);
    transition: border-color .15s;
    cursor: pointer;
    position: relative;
    padding: 32px 24px;
    margin-bottom: 20px;
}
.adv-dropzone-large { padding: 32px 24px; }
.adv-dropzone-small { padding: 18px 18px; }
.adv-dropzone:hover, .adv-dropzone.is-over {
    border-color: var(--adv-teal);
}
.adv-dropzone:focus-visible {
    outline: none;
    border-color: var(--adv-teal);
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
.adv-file-input {
    position: absolute;
    width: 0; height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}
.adv-dropzone-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 19px;
    line-height: 1.3;
    font-family: var(--adv-sans);
    font-weight: 500;
}
.adv-dropzone-small .adv-dropzone-label { font-size: 16px; }
.adv-dropzone-icon {
    font-size: 22px;
    opacity: 0.55;
}
.adv-dropzone-small .adv-dropzone-icon { font-size: 18px; }
.adv-dropzone-sub {
    margin-top: 6px;
    font-size: 15px;
    line-height: 1.45;
    color: var(--adv-text-dim);
    font-family: var(--adv-sans);
    letter-spacing: 0;
}
.adv-dropzone-sub .app-link {
    color: var(--adv-teal);
    /* An inline link is only as tall as its text — about 21px, well under the
       44px touch target. Give it a box and pull the box back out with matching
       negative margins, so the hit area grows without moving anything. */
    display: inline-block;
    padding: 12px 10px;
    margin: -12px -10px;
}

/* ─── File chips ─── */
[data-block="file-chip"].adv-file-chip,
[data-block="failed-file-chip"].adv-file-chip {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    background: var(--adv-surface);
    border: 1px solid var(--adv-border);
    border-radius: 12px;
    margin-bottom: 8px;
}
.adv-file-icon {
    width: 36px; height: 44px;
    border-radius: 5px;
    background: var(--adv-surface-lift);
    border: 1px solid var(--adv-border);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--adv-mono);
    font-size: 12px;
    color: var(--adv-teal);
    letter-spacing: 0.5px;
    flex: 0 0 36px;
}
.adv-file-meta { flex: 1; overflow: hidden; min-width: 0; }
.adv-file-name {
    font-family: var(--adv-sans);
    font-size: 17px;
    line-height: 1.3;
    color: var(--adv-text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.adv-file-size {
    font-family: var(--adv-mono);
    font-size: 14px;
    line-height: 1.35;
    color: var(--adv-text-dim);
    margin-top: 4px;
}
.adv-file-status {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
}
.adv-file-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--adv-teal);
    border-right-color: transparent;
    border-radius: 50%;
    animation: adv-spin .8s linear infinite;
}
.adv-file-check { color: var(--adv-teal); font-size: 20px; font-weight: 600; }
.adv-file-x     { color: var(--adv-error); font-size: 20px; font-weight: 600; }
[data-block="failed-file-chip"].adv-file-chip { border-color: var(--adv-error-border); }
.adv-file-icon-failed {
    background: var(--adv-error-soft);
    color: var(--adv-error);
    border-color: var(--adv-error-border);
}
[data-block="failed-file-chip"] .adv-file-size { color: var(--adv-error); }

/* ─── Parsing stages ─── */
.adv-parsing-stages {
    padding: 20px;
    border-radius: 14px;
    background: var(--adv-surface);
    border: 1px solid var(--adv-border);
    margin-bottom: 28px;
}
.adv-stage-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-family: var(--adv-mono);
    font-size: 15px;
    line-height: 1.4;
    transition: opacity .3s, color .3s;
}
.adv-stage-row[data-state="done"]     { color: var(--adv-text-dim); }
.adv-stage-row[data-state="active"]   { color: var(--adv-text); }
.adv-stage-row[data-state="upcoming"] { color: var(--adv-text-faint); opacity: 0.4; }
.adv-stage-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--adv-border-strong);
}
.adv-stage-row[data-state="done"]   .adv-stage-dot { background: var(--adv-teal); }
.adv-stage-row[data-state="active"] .adv-stage-dot { background: var(--adv-warn); }
.adv-stage-label { flex: 1; }
.adv-stage-meta { font-size: 13px; color: var(--adv-text-faint); }
.adv-stage-row[data-state="done"]   .adv-stage-meta { color: var(--adv-teal); }
.adv-stage-row[data-state="active"] .adv-stage-meta { color: var(--adv-warn); }

/* ─── Findings card ─── */
.adv-findings-card {
    padding: 20px 22px;
    border-radius: 14px;
    background: var(--adv-surface);
    border: 1px solid var(--adv-border);
    margin-bottom: 18px;
}
.adv-findings-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}
.adv-stat-value {
    font-family: var(--adv-serif);
    font-size: 38px;
    letter-spacing: -1.2px;
    line-height: 1;
    color: var(--adv-text);
}
.adv-stat-value-warn { color: var(--adv-warn); }
.adv-stat-value-teal { color: var(--adv-teal); }
.adv-stat-label {
    font-family: var(--adv-mono);
    font-size: 10px;
    color: var(--adv-text-dim);
    letter-spacing: 1.3px;
    text-transform: uppercase;
    margin-top: 6px;
}

.adv-findings-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--adv-border);
    gap: 12px;
    flex-wrap: wrap;
}
.adv-findings-meta-items {
    display: flex;
    gap: 16px;
    font-family: var(--adv-mono);
    font-size: 15px;
    line-height: 1.4;
    color: var(--adv-text-dim);
    flex-wrap: wrap;
}
.adv-findings-meta-items b { color: var(--adv-text); font-weight: 500; }

.adv-findings-table {
    min-width: 0;
    margin-top: 20px;
    border: 1px solid var(--adv-border);
    border-radius: 14px;
    overflow: hidden;
}
.adv-findings-list {
    min-width: 0;
    margin-top: 0;
    max-height: none;
    overflow-y: visible;
    padding-top: 0;
}
.adv-findings-list-header,
.adv-findings-row {
    display: grid;
    grid-template-columns: 90px 70px 80px 1fr 1fr;
    font-family: var(--adv-mono);
}
.adv-findings-list-header {
    /* Match the editable-row grid so headers line up with their fields. */
    grid-template-columns: 140px 92px 70px 116px minmax(132px, 1fr);
    gap: 6px;
    font-size: 13px;
    line-height: 1.2;
    color: var(--adv-text-faint);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 13px 20px;
    border-bottom: 1px solid var(--adv-border);
}
/* USD VALUE header sits over right-aligned value cells. */
.adv-findings-list-header span:last-child {
    text-align: right;
}
.adv-findings-row {
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    padding: 13px 20px;
    border-bottom: 1px solid var(--adv-border);
}
.adv-findings-row .adv-tx-date  { color: var(--adv-text-dim); }
.adv-findings-row .adv-tx-type  { font-weight: 600; }
.adv-tx-type[data-kind="VEST"]      { color: var(--adv-teal); }
.adv-tx-type[data-kind="ESPP"]      { color: var(--adv-teal); }
.adv-tx-type[data-kind="SELL"]      { color: var(--adv-warn); }
.adv-tx-type[data-kind="NSO"]       { color: var(--adv-teal); }
.adv-tx-type[data-kind="UNKNOWN"]   { color: var(--adv-text-dim); }
.adv-findings-row .adv-tx-qty   { color: var(--adv-text); }
.adv-findings-row .adv-tx-price { color: var(--adv-text-dim); }
.adv-findings-row .adv-tx-value { color: var(--adv-text); }

/* ─── Reloc form ─── */
.adv-reloc {
    padding: 20px;
    border-radius: 14px;
    background: var(--adv-surface-alt);
    border: 1px solid var(--adv-border-strong);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.adv-reloc-label { font-family: var(--adv-sans); font-size: 15px; font-weight: 500; color: var(--adv-text-dim); }
.adv-or-divider {
    text-align: center;
    font-family: var(--adv-mono);
    font-size: 10px;
    color: var(--adv-text-faint);
    letter-spacing: 1.2px;
    margin: 14px 0 10px;
}
.adv-reloc-confirm { margin-top: 4px; margin-bottom: 8px; text-align: right; }

/* ─── Form inputs ─── */
.adv-input {
    background: var(--adv-bg);
    border: 1px solid var(--adv-border-strong);
    color: var(--adv-text);
    font-family: var(--adv-sans);
    font-size: 18px;
    line-height: 1.3;
    padding: 0 16px;
    border-radius: 10px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    height: 52px;
    min-height: 52px;
}
.adv-input:focus {
    border-color: var(--adv-teal);
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
.adv-input-date {
    color-scheme: inherit;
    font-family: var(--adv-mono);
    font-variant-numeric: tabular-nums;
}
select.adv-input { cursor: pointer; }

/* ─── Allocation: breadcrumb / preview / form ─── */
.adv-breadcrumb-card {
    padding: 18px 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    background: var(--adv-warn-soft);
    border: 1px solid var(--adv-warn-border);
}
.adv-breadcrumb-header {
    font-family: var(--adv-mono);
    font-size: 13px;
    color: var(--adv-warn);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.adv-breadcrumb-row {
    font-family: var(--adv-sans);
    font-size: 16px;
    color: var(--adv-text);
    line-height: 1.5;
}
.adv-breadcrumb-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px 4px;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--adv-surface-alt);
    border: 1px solid var(--adv-border-strong);
    font-family: var(--adv-mono);
    font-size: 13px;
}
.adv-breadcrumb-note {
    font-family: var(--adv-sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--adv-text-faint);
    margin-top: 12px;
}

.adv-sells-preview {
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--adv-surface);
    border: 1px solid var(--adv-border-strong);
    margin-bottom: 20px;
}
.adv-sells-header {
    font-family: var(--adv-mono);
    font-size: 13px;
    color: var(--adv-text-dim);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.adv-sell-row {
    display: grid;
    grid-template-columns: 130px 80px 1fr 100px;
    font-family: var(--adv-mono);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    padding: 13px 0;
    border-bottom: 1px solid var(--adv-border);
    column-gap: 12px;
}
.adv-sell-row .adv-sell-date  { color: var(--adv-text-dim); }
.adv-sell-row .adv-sell-qty   { color: var(--adv-warn); }
.adv-sell-row .adv-sell-sold  { color: var(--adv-text-dim); }
.adv-sell-row .adv-sell-alloc { color: var(--adv-warn); text-align: right; }
.adv-sell-row .adv-sell-alloc[data-state="filled"] { color: var(--adv-teal); }

.adv-alloc-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
    border-radius: 16px;
    background: var(--adv-surface);
    border: 1px solid var(--adv-border-strong);
    margin-bottom: 20px;
}
.adv-alloc-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 32px;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--adv-surface-alt);
    border: 1px solid var(--adv-border);
    font-family: var(--adv-mono);
    font-size: 16px;
    min-width: 0;
}
.adv-alloc-copy { min-width: 0; }
.adv-alloc-primary {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
    white-space: nowrap;
}
.adv-alloc-row .ar-date  { color: var(--adv-text); }
.adv-alloc-row .ar-qty   { color: var(--adv-warn); font-weight: 600; }
.adv-alloc-row .ar-sold  { color: var(--adv-text-faint); }
.adv-alloc-row .ar-sold b { color: var(--adv-text-faint); font-weight: 400; }
.adv-alloc-status {
    display: block;
    margin-top: 3px;
    font-family: var(--adv-sans);
    font-size: 14px;
    line-height: 1.35;
}
.adv-alloc-row .ar-input {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 0;
}
/* The currency symbol reads as part of the value, so it matches the input's
   face — 16px mono — rather than sitting beside it as 14px faint sans. */
.adv-alloc-row .ar-input > span {
    color: var(--adv-text-dim);
    font-family: var(--adv-mono);
    font-size: 16px;
    padding-left: 8px;
    padding-right: 4px;
}
.adv-alloc-row .ar-input input {
    height: 44px;
    min-width: 0;
    font-family: var(--adv-mono);
    font-size: 16px;
    padding: 0 12px;
    border-radius: 8px;
    width: 100%;
    text-align: right;
}
/* Native spinners overlap the right-aligned value on a 0.01-step price field
   and buy nothing here; arrow keys still step the value. */
.adv-alloc-row .ar-input input::-webkit-outer-spin-button,
.adv-alloc-row .ar-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.adv-alloc-row .ar-input input {
    -moz-appearance: textfield;
    appearance: textfield;
}
.adv-alloc-row .ar-input input:focus {
    border-color: var(--adv-teal);
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
.adv-alloc-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    font-family: var(--adv-sans);
    /* Sized against the 44px input it annotates — at 18px the check read as an
       afterthought next to the row it is confirming. */
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
}
.adv-alloc-tick[data-state="filled"] { color: var(--adv-teal); }
.adv-alloc-tick[data-state="empty"] { color: var(--adv-text-faint); }

.adv-alloc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 0;
    gap: 16px;
    flex-wrap: wrap;
}
.adv-alloc-counter {
    font-family: var(--adv-sans);
    font-size: 15px;
    color: var(--adv-text-dim);
}
.adv-alloc-counter[data-state="full"] { color: var(--adv-teal); }
.adv-alloc-actions { display: flex; gap: 10px; }
.adv-alloc-actions .adv-choice { min-height: 44px; }

.adv-alloc-dropzone {
    padding: 28px 20px;
    border-radius: 14px;
    background: var(--adv-surface-alt);
    margin-bottom: 16px;
}
.adv-alloc-dropzone .adv-dropzone-label { font-size: 18px; }
.adv-alloc-dropzone .adv-dropzone-sub {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.45;
}
.adv-alloc-dropzone:focus-visible {
    outline: none;
    border-color: var(--adv-teal);
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
.adv-alloc-fallback { margin-top: 4px; }
.adv-alloc-fallback .app-link { min-height: 44px; padding: 10px 12px; }
[data-block="allocation-ask"] > .adv-step-label,
[data-block="alloc-csv-drop"] > .adv-step-label,
[data-block="alloc-manual"] > .adv-step-label,
[data-block="allocation-ask"] > .adv-msg {
    font-size: 28px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}
[data-block="allocation-ask"] > .adv-step-label,
[data-block="alloc-csv-drop"] > .adv-step-label,
[data-block="alloc-manual"] > .adv-step-label {
    font-family: var(--adv-mono);
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: 1.2px;
}
[data-block="allocation-ask"] > .app-aside {
    font-size: 16px;
    line-height: 1.5;
}
[data-block="alloc-csv-drop"] > .adv-msg,
[data-block="alloc-manual"] > .adv-msg,
[data-block="alloc-picker"] > .adv-msg,
[data-block="csv-breakdown"] > .adv-msg {
    font-size: 18px;
    line-height: 1.5;
}
.adv-alloc-actions .adv-choice-primary,
[data-block="csv-breakdown"] .adv-choice-primary,
[data-block="error-state"] .adv-choice-primary {
    min-height: 48px;
    border-color: var(--adv-teal);
    background: var(--adv-teal);
    color: var(--adv-teal-ink, var(--adv-bg));
    font-size: 17px;
    font-weight: 600;
}
.adv-alloc-actions .adv-choice-primary:hover:not(:disabled),
[data-block="csv-breakdown"] .adv-choice-primary:hover:not(:disabled),
[data-block="error-state"] .adv-choice-primary:hover:not(:disabled) {
    filter: none;
    background: var(--adv-action-hover);
    color: var(--adv-teal-ink, var(--adv-bg));
}

/* ─── CSV breakdown card ─── */
.adv-lot-card {
    padding: 22px 24px;
    border-radius: 14px;
    background: var(--adv-surface);
    border: 1px solid var(--adv-border-strong);
    margin-bottom: 18px;
}
.adv-lot-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--adv-mono);
    font-size: 13px;
    color: var(--adv-text-dim);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding-bottom: 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--adv-border);
}
.adv-lot-row {
    display: grid;
    grid-template-columns: 90px 1fr 110px auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-family: var(--adv-mono);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}
.adv-lot-qty { color: var(--adv-warn); font-weight: 600; }
.adv-lot-sep { color: var(--adv-text-faint); font-size: 14px; letter-spacing: 0.4px; }
.adv-lot-cb { color: var(--adv-text); text-align: right; }
.adv-lot-date { color: var(--adv-text-faint); font-size: 14px; }

.adv-lot-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--adv-border);
    font-family: var(--adv-sans);
    font-size: 15px;
    color: var(--adv-text);
}
.adv-lot-weighted {
    font-family: var(--adv-mono);
    font-size: 16px;
    color: var(--adv-teal);
    font-weight: 600;
}

/* ─── Multi-CSV: per-file status chips ─── */
.adv-file-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 18px;
}
.adv-file-chips .adv-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-family: var(--adv-mono);
    font-size: 13px;
    border: 1px solid var(--adv-border-strong);
    background: var(--adv-surface-alt);
    color: var(--adv-text);
    max-width: 100%;
}
.adv-file-chips .adv-file-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex: 0 0 auto;
}
.adv-file-chips .adv-file-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}
.adv-file-chips .adv-file-chip-meta { color: var(--adv-text-faint); font-size: 13px; }
.adv-file-chips .adv-file-chip[data-status="matched"] { border-color: var(--adv-teal-dim); background: var(--adv-teal-soft); }
.adv-file-chips .adv-file-chip[data-status="matched"] .adv-file-chip-icon { background: var(--adv-teal); color: var(--adv-teal-ink); }
.adv-file-chips .adv-file-chip[data-status="warn"] { border-color: var(--adv-warn-border); background: var(--adv-warn-soft); }
.adv-file-chips .adv-file-chip[data-status="warn"] .adv-file-chip-icon { background: var(--adv-warn); color: var(--adv-bg); }
.adv-file-chips .adv-file-chip[data-status="error"] { border-color: var(--adv-error-border); background: var(--adv-error-soft); }
.adv-file-chips .adv-file-chip[data-status="error"] .adv-file-chip-icon { background: var(--adv-error); color: var(--adv-surface); }
.adv-file-chips .adv-file-chip[data-status="duplicate"] { opacity: 0.75; }
.adv-file-chips .adv-file-chip[data-status="duplicate"] .adv-file-chip-icon { background: var(--adv-text-faint); color: var(--adv-surface-alt); }

/* ─── Multi-CSV: ambiguity picker (identical-quantity sales — always ask) ─── */
.adv-picker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 8px;
}
.adv-picker-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--adv-border-strong);
    background: var(--adv-surface-alt);
    color: var(--adv-text);
    cursor: pointer;
    font-family: var(--adv-sans);
    font-size: 16px;
    min-height: 44px;
    transition: border-color 0.15s ease, transform 0.1s ease;
}
.adv-picker-chip:hover { border-color: var(--adv-teal); transform: translateY(-1px); }
.adv-picker-chip:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--adv-teal-soft); }
.adv-picker-chip-date { font-family: var(--adv-mono); font-size: 16px; color: var(--adv-warn); font-weight: 600; }
.adv-picker-chip-meta { font-family: var(--adv-mono); font-size: 14px; color: var(--adv-text-dim); }

/* ─── Multi-CSV: sells still awaiting a price ─── */
.adv-still-need {
    margin: 8px 0 20px;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px dashed var(--adv-warn-border);
    background: var(--adv-warn-soft);
}
.adv-still-need-title {
    font-family: var(--adv-mono);
    font-size: 13px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--adv-warn);
    margin-bottom: 10px;
}
.adv-still-need .adv-sell-row:last-child { border-bottom: none; }

@media (max-width: 640px) {
    .adv-alloc-primary { white-space: normal; }
    .adv-alloc-form .adv-alloc-row[data-mobile="alloc-row"] {
        grid-template-columns: minmax(0, 1fr) 44px;
        grid-template-areas: "copy tick" "input input";
        row-gap: 10px;
        column-gap: 10px;
    }
    .adv-alloc-form .adv-alloc-row[data-mobile="alloc-row"] > .adv-alloc-copy { grid-area: copy; }
    .adv-alloc-form .adv-alloc-row[data-mobile="alloc-row"] > .ar-input { grid-area: input; }
    .adv-alloc-form .adv-alloc-row[data-mobile="alloc-row"] > .adv-alloc-tick { grid-area: tick; }
    .adv-alloc-row .ar-input input { height: 44px; }
    .adv-alloc-form { padding: 16px; }
    .adv-lot-card { padding: 18px; }
    .adv-lot-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
    .adv-lot-sep { grid-column: 1; }
    .adv-lot-cb { grid-column: 2; grid-row: 2; }
    .adv-lot-date { grid-column: 1 / -1; }
}

/* ─── Quarter ask ─── */
/* Five equal options in one row. The full year used to sit on its own full-width
   row with an arrow, which made it read as the call to action rather than the
   fifth choice. */
.adv-quarter-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    /* Room for the suggestion badge, which sits on the top edge of its card. */
    margin-top: 14px;
}
.adv-choice-quarter {
    position: relative;
    min-width: 0;
    min-height: 76px;
    padding: 16px 12px;
    border-radius: 12px;
    border: 1px solid var(--adv-border-strong);
    background: var(--adv-surface-alt);
    color: var(--adv-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
}
.adv-quarter-title {
    font-family: var(--adv-serif);
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: -0.3px;
}
.adv-quarter-caption {
    font-family: var(--adv-sans);
    font-size: 14px;
    line-height: 1.3;
    color: var(--adv-text-dim);
    font-weight: 400;
}
.adv-choice-quarter:hover:not(:disabled) {
    border-color: var(--adv-teal);
    background: var(--adv-surface-alt);
    color: var(--adv-text);
}
/* The suggestion is a hint, not a selection. Filling the card teal made it read
   as already chosen — and made the full-year row look like the only thing left
   to click. The card stays neutral; a badge carries how many transactions land
   in that quarter, and the line below spells it out. */
.adv-choice-quarter.is-suggested {
    border-color: var(--adv-teal-dim);
}
/* The badge straddles the card's top edge rather than sitting inside it: in a
   card a fifth of the row wide, a corner badge lands against the title and reads
   as a superscript on it. */
.adv-quarter-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--adv-teal);
    color: var(--adv-teal-ink);
    font-family: var(--adv-mono);
    font-size: 11px;
    line-height: 1.7;
    letter-spacing: 0.4px;
    font-weight: 500;
    white-space: nowrap;
}
/* The full year is the fifth card, so it only needs a title that fits one line
   at a fifth of the row. The year it refers to is in the caption underneath. */
.adv-choice-quarter-fy .adv-quarter-title {
    font-size: 18px;
    line-height: 1.35;
}
.adv-quarter-hint {
    margin: 14px 2px 0;
    font-size: 16px;
    line-height: 1.5;
    color: var(--adv-teal);
}

@media (max-width: 640px) {
    /* Two per row leaves the full year alone on the third; let it take the width
       rather than sit next to a gap. */
    .adv-quarter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .adv-choice-quarter-fy { grid-column: 1 / -1; }
    .adv-choice-quarter-fy .adv-quarter-title { font-size: 22px; }
}
[data-block="quarter-ask"] > .adv-step-label {
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: 1.2px;
}
[data-block="quarter-ask"] > .adv-msg {
    font-size: 28px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}
[data-block="quarter-ask"] > .app-aside {
    font-size: 16px;
    line-height: 1.5;
}

/* ─── Review ─── */
.adv-review-card {
    padding: 28px;
    border-radius: 16px;
    background: linear-gradient(180deg, var(--adv-surface-lift), var(--adv-surface-alt));
    border: 1px solid var(--adv-border-strong);
    margin-bottom: 24px;
}
.adv-review-header {
    font-family: var(--adv-mono);
    font-size: 13px;
    color: var(--adv-text-dim);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.adv-review-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    font-family: var(--adv-sans);
    font-size: 16px;
    color: var(--adv-text);
}
.adv-review-row > span:first-child { font-weight: 500; }
.adv-review-row > span:last-child  {
    font-family: var(--adv-mono);
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.adv-review-caption {
    display: block; font-weight: 400; font-size: 14px;
    color: var(--adv-text-faint); margin-top: 2px;
}
.adv-review-row[data-indent="true"]    { padding-left: 18px; color: var(--adv-text-dim); }
.adv-review-row[data-style="total"] {
    padding: 18px 0 8px;
    font-family: var(--adv-serif);
    font-size: 28px;
    font-weight: 400;
}
.adv-review-row[data-style="total"] > span:last-child {
    font-family: var(--adv-serif);
    color: var(--adv-teal);
}
.adv-review-divider {
    height: 1px;
    background: var(--adv-border);
    margin: 10px 0;
}
.adv-review-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.adv-review-disclaimer {
    margin-top: 24px;
    padding-left: 0;
    border-left: none;
    opacity: 1;
    color: var(--adv-text-faint);
    font-size: 15px;
    line-height: 1.55;
    text-wrap: pretty;
}
.adv-review-disclaimer a { color: var(--adv-teal); font-size: 15px; }
.adv-review-disclaimer a:hover { text-decoration: underline; }
.adv-review-error {
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--adv-error-soft);
    border: 1px solid var(--adv-error-border, var(--adv-error));
    color: var(--adv-error);
    font-family: var(--adv-sans);
    font-size: 16px;
    line-height: 1.5;
}

.adv-review-recovery { margin-top: 16px; }

[data-block="review"] > .adv-step-label {
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: 1.2px;
}
[data-block="review"] > [data-role="review-intro"] {
    font-size: 18px;
    line-height: 1.5;
    color: var(--adv-text-dim);
}
/* ─── Generic helpers / links ─── */
.app-link {
    background: transparent;
    border: none;
    padding: 10px 0;
    color: var(--adv-text-dim);
    font-family: var(--adv-sans);
    font-size: 15px;
    line-height: 1.4;
    cursor: pointer;
}
.app-link:hover { color: var(--adv-text); }
.app-link:focus-visible {
    outline: none;
    border-radius: 6px;
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
.adv-warn { color: var(--adv-warn); font-weight: 600; }
.adv-teal { color: var(--adv-teal); font-weight: 600; }

/* ─── Login page ─── */
/* Login keeps its own full-bleed split layout (and takes the corner menu, not
   the header bar), so it still centres at the body level. */
body.adv-body[data-page="login"],
body.adv-body[data-page="backoffice"] {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
}
/* Every other centred page is a two-row shell: the shared header, then a main
   that takes the rest and centres the card inside it. Centring on `body` would
   centre the header too. */
body.adv-body[data-page="my-filings"],
body.adv-body[data-page="check-email"],
body.adv-body[data-page="link-expired"],
body.adv-body[data-page="link-confirm"],
body.adv-body[data-page="waitlist"],
body.adv-body[data-page="account-delete"],
body.adv-body[data-page="account-deleted"] {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.page-center {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
}
.adv-login-shell {
    max-width: 420px;
    width: 100%;
}
.adv-login-layout {
    max-width: none;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.adv-login-hero {
    min-height: 100vh;
    padding: 64px 72px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    border-right: 1px solid var(--adv-border);
}
.adv-login-brand {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--adv-text);
    letter-spacing: 0;
    text-transform: none;
}
.adv-login-brand .adv-identifier-dot {
    width: 8px;
    height: 8px;
}
.adv-login-brand-name {
    font-family: var(--adv-serif);
    font-size: 24px;
    line-height: 1;
    letter-spacing: -0.3px;
}
.adv-login-brand-tagline {
    margin-left: 6px;
    font-family: var(--adv-mono);
    font-size: 13px;
    line-height: 1;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--adv-text-faint);
}
.adv-login-hero-copy {
    max-width: 440px;
}
.adv-login-hero-title {
    margin: 0 0 20px;
    font-family: var(--adv-serif);
    font-size: 48px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1px;
    color: var(--adv-text);
    text-wrap: pretty;
}
.adv-login-hero-body {
    margin: 0;
    color: var(--adv-text-dim);
    font-family: var(--adv-sans);
    font-size: 18px;
    line-height: 1.5;
    text-wrap: pretty;
}
.adv-login-trust {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 28px;
    color: var(--adv-text-faint);
    font-family: var(--adv-sans);
    font-size: 15px;
    line-height: 1.4;
}
/* The interpuncts orphan at the end of a wrapped line; the gap separates the
   signals on its own, so drop them once the row can wrap. */
.adv-login-trust > span[aria-hidden="true"] { display: none; }
.adv-login-form-panel {
    position: relative;
    min-height: 100vh;
    padding: 64px 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.adv-login-form-content {
    width: 100%;
    max-width: 420px;
}
.adv-login-eyebrow {
    margin: 0 0 14px;
    color: var(--adv-text-faint);
    font-family: var(--adv-mono);
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.adv-login-shell .adv-identifier {
    margin-bottom: 22px;
    font-size: 13px;
    letter-spacing: 1.2px;
}
.adv-login-shell:not(.adv-login-layout) .adv-msg-headline {
    font-size: 40px;
    line-height: 1.15;
    letter-spacing: -0.8px;
    font-variation-settings: "opsz" 40;
}
.adv-login-shell .adv-msg {
    margin-bottom: 20px;
}
.adv-login-shell .adv-msg-sub,
.adv-login-tagline {
    color: var(--adv-text-dim);
    font-size: 18px !important;
    line-height: 1.5;
}
body.adv-body[data-page="login"] {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    overflow-x: hidden;
}
body.adv-body[data-page="login"] .adv-login-shell .adv-msg-headline {
    margin-bottom: 8px;
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -0.4px;
    font-variation-settings: "opsz" 32;
}
.adv-login-form { display: flex; flex-direction: column; gap: 12px; }
.adv-login-form .adv-login-label {
    margin: 8px 0 0;
    gap: 0;
    font-family: var(--adv-sans);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--adv-text-dim);
}
.adv-login-form .adv-login-label .adv-step-dot,
.adv-login-form .adv-login-label .adv-step-rule {
    display: none;
}
.adv-login-form .adv-input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 18px;
    line-height: 1.4;
}
.adv-login-form .adv-input:focus {
    border-color: var(--adv-teal);
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
.adv-privacy-back { display: inline-block; margin-bottom: 22px; }
.adv-login-form .adv-choice {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 12px;
    text-align: center;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    font-size: 17px;
    font-weight: 600;
}
.adv-login-form .adv-choice-primary {
    border-color: var(--adv-action);
    background: var(--adv-action);
    color: var(--adv-teal-ink);
    transition: filter .2s, opacity .2s, box-shadow .2s;
}
.adv-login-form .adv-choice-primary:hover:not(:disabled) {
    background: var(--adv-action-hover);
    filter: none;
}
.adv-login-form .adv-choice:focus-visible,
.adv-login-form .adv-choice-primary:focus-visible {
    outline: none;
    border-color: var(--adv-teal);
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
.adv-login-form .adv-choice:disabled {
    opacity: .4;
    transition: opacity .2s;
}
.adv-msg-address {
    font-family: var(--adv-mono);
    font-size: 15px;
    color: var(--adv-teal);
    margin: -10px 0 24px;
    overflow-wrap: anywhere;
}
.adv-login-error {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--adv-error-soft);
    border: 1px solid var(--adv-error-border);
    color: var(--adv-error);
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.45;
}
.adv-login-foot {
    margin-top: 28px;
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
    color: var(--adv-text-faint);
}
.adv-login-foot a { color: var(--adv-text-dim); }
.adv-login-foot a:hover { color: var(--adv-text); }
.adv-login-foot a:focus-visible {
    outline: none;
    border-radius: 4px;
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
body.adv-body[data-page="login"] .adv-lang-btn:focus-visible,
body.adv-body[data-page="waitlist"] .adv-lang-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}

@media (max-width: 899px) {
    .adv-login-layout {
        display: flex;
        flex-direction: column;
    }
    .adv-login-hero {
        min-height: auto;
        padding: 48px 32px 40px;
        border-right: none;
        border-bottom: 1px solid var(--adv-border);
    }
    .adv-login-form-panel {
        min-height: auto;
        padding: 88px 32px 56px;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .adv-login-hero {
        /* Leave room for the visible language switch and corner menu. */
        padding: 76px 24px 36px;
        gap: 32px;
    }
    .adv-login-brand-tagline {
        margin-left: 2px;
        font-size: 11px;
        letter-spacing: 1px;
    }
    .adv-login-hero-title {
        font-size: 40px;
        letter-spacing: -0.8px;
    }
    .adv-login-form-panel {
        padding: 88px 24px 48px;
    }
}

/* ─── Privacy page ─── */
body.adv-body[data-page="privacy"] .adv-flow { padding: 40px 24px 80px; }
.adv-privacy-wrap { max-width: 720px; margin: 0 auto; }
.adv-privacy-wrap h1 {
    font-family: var(--adv-serif);
    font-size: 40px;
    line-height: 1.15;
    margin: 24px 0 14px;
    letter-spacing: -0.8px;
    color: var(--adv-text);
}
.adv-privacy-wrap h2 {
    font-family: var(--adv-serif);
    font-size: 28px;
    margin: 36px 0 12px;
    color: var(--adv-text);
    letter-spacing: -0.3px;
}
.adv-privacy-wrap p,
.adv-privacy-wrap li {
    font-family: var(--adv-sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--adv-text-dim);
    margin: 0 0 12px;
}
.adv-privacy-wrap strong { color: var(--adv-text); }
.adv-privacy-wrap ul { margin: 0 0 16px; padding-left: 22px; }
.adv-privacy-wrap a { color: var(--adv-teal); }
.adv-privacy-wrap a:hover { text-decoration: underline; }
.adv-privacy-foot {
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--adv-border);
    font-size: 15px;
    color: var(--adv-text-faint);
}

/* ─── NAV payment guide ─── */
body.adv-body[data-page="how-to-pay"] .adv-flow { padding: 40px 24px 80px; }
.adv-paychart-wrap { max-width: 980px; }
.adv-paychart-lede { max-width: 720px; font-size: 16px !important; }
.adv-paychart-before {
    max-width: 720px;
    margin: 24px 0 30px;
    padding: 18px 20px 10px;
    border: 1px solid var(--adv-border-strong);
    border-radius: 12px;
    background: var(--adv-surface-alt);
}
.adv-paychart-before h2 { margin-top: 0; }
.adv-paychart-question {
    padding: 18px 22px;
    border: 1px solid var(--adv-teal-dim);
    border-radius: 12px;
    background: var(--adv-teal-soft);
    color: var(--adv-text);
    font-family: var(--adv-serif);
    font-size: 21px;
    line-height: 1.35;
    text-align: center;
}
.adv-paychart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.adv-paychart-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--adv-border-strong);
    border-radius: 12px;
    background: var(--adv-surface-alt);
}
.adv-paychart-card h2 { margin: 8px 0 14px; }
.adv-paychart-card ol,
.adv-paychart-card ul { padding-left: 22px; }
.adv-paychart-answer {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--adv-teal-soft);
    color: var(--adv-teal);
    font-family: var(--adv-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.adv-paychart-note {
    margin: 16px 0 !important;
    padding: 12px 14px;
    border-left: 3px solid var(--adv-warn);
    background: var(--adv-warn-soft);
}
.adv-paychart-facts { margin-bottom: 0 !important; }
.adv-paychart-accounts {
    width: 100%;
    margin: 16px 0;
    border: 1px solid var(--adv-border-strong);
    border-radius: 9px;
}
.adv-paychart-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--adv-sans);
    font-size: 12px;
    color: var(--adv-text-dim);
}
.adv-paychart-table th,
.adv-paychart-table td {
    padding: 10px 11px;
    border-right: 1px solid var(--adv-border);
    border-bottom: 1px solid var(--adv-border);
    text-align: left;
    vertical-align: top;
}
.adv-paychart-table th:last-child,
.adv-paychart-table td:last-child { border-right: none; }
.adv-paychart-table tbody tr:last-child td { border-bottom: none; }
.adv-paychart-table th {
    background: var(--adv-surface-lift);
    color: var(--adv-text);
    font-weight: 600;
}
.adv-paychart-account-name { display: block; margin-top: 4px; font-size: 11px; }
.adv-paychart-stacked-label { display: none; }
.adv-paychart-mono {
    display: block;
    font-family: var(--adv-mono) !important;
    color: var(--adv-text) !important;
    font-size: 13px;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    user-select: text;
}
.adv-paychart-iban { font-size: 12px; }
.adv-paychart-card code.adv-paychart-mono { display: inline; }
@media (max-width: 720px) {
    .adv-paychart-table,
    .adv-paychart-table tbody,
    .adv-paychart-table tr,
    .adv-paychart-table td { display: block; width: 100%; box-sizing: border-box; }
    .adv-paychart-table thead { display: none; }
    .adv-paychart-table td { border: none; padding: 6px 12px; }
    .adv-paychart-table tr { padding: 10px 0; }
    .adv-paychart-table tr + tr { border-top: 1px solid var(--adv-border); }
    .adv-paychart-stacked-label { display: block; margin-bottom: 4px; font-size: 11px; }
}
.adv-paychart-reference { color: var(--adv-text) !important; }
.adv-paychart-foreign {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--adv-border);
}
.adv-paychart-foreign h3 {
    margin: 0 0 10px;
    color: var(--adv-text);
    font-family: var(--adv-serif);
    font-size: 18px;
}
.adv-paychart-footnote {
    margin-top: 22px !important;
    color: var(--adv-text-faint) !important;
    font-size: 12px !important;
}
.adv-paychart-footnote .adv-paychart-mono { display: inline-block; font-size: 12px; }
.adv-paychart-sources { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.adv-filings-payment-link {
    margin: -12px 0 18px;
    font-size: 13px;
}
.adv-filings-payment-link a { color: var(--adv-teal); }

@media (max-width: 720px) {
    .adv-paychart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    body.adv-body[data-page="how-to-pay"] .adv-flow { padding: 28px 16px 56px; }
    .adv-paychart-card { padding: 18px 16px; }
    .adv-paychart-question { padding: 16px; font-size: 19px; }
}

/* ─── Help / export guide page ─── */
body.adv-body[data-page="help"] { padding: 0 0 96px; font-size: 17px; line-height: 1.5; }
.adv-help-header, .adv-help-wrap {
    --adv-help-text-2: #4d5f63;
    --adv-help-text-3: #5d6f73;
    --adv-help-border: rgba(18,52,50,.24);
    --adv-help-ink: #2c3a3d;
    --adv-teal: #07674f;
}
.adv-help-header {
    min-height: 68px; padding: 14px 32px; border-bottom: 1px solid var(--adv-border);
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    position: sticky; top: 0; z-index: 5; background: var(--adv-header-bg); backdrop-filter: blur(8px);
}
.adv-help-brand, .adv-help-header-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.adv-help-brand { font-size: 15px; color: var(--adv-help-text-2); }
.adv-help-brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--adv-teal); }
.adv-help-wordmark { font: 24px var(--adv-serif); letter-spacing: -.3px; color: var(--adv-text); }
.adv-help-back {
    min-height: 40px; padding: 8px 16px; border: 1px solid var(--adv-help-border);
    border-radius: 10px; color: var(--adv-text); font-size: 15px;
}
.adv-help-wrap { max-width: 1280px; margin: 0 auto; padding: 56px clamp(0px, (100vw - 330px) / 2, 32px) 0; }
.adv-help-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(330px,1fr)); gap: 44px; align-items: start; }
.adv-help-instructions { min-width: 0; }
.adv-help-title-block { max-width: 640px; margin-bottom: 40px; }
.adv-help-eyebrow { font: 13px/1.5 var(--adv-mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--adv-help-text-3); margin: 0 0 14px; }
.adv-help-title-block h1 { font: 400 40px/1.14 var(--adv-serif); letter-spacing: -.8px; margin: 0 0 14px; text-wrap: pretty; }
.adv-help-intro { font-size: 17px; color: var(--adv-help-text-2); margin: 0; text-wrap: pretty; }
.adv-help-intro b { font-weight: 600; color: var(--adv-text); }
.adv-help-track { scroll-margin-top: 120px; }
.adv-help-track + .adv-help-track { margin-top: 30px; }
.adv-help-track h2 {
    display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
    font: 400 13px/1.5 var(--adv-mono); letter-spacing: 1.3px; text-transform: uppercase; color: var(--adv-help-text-3);
}
.adv-help-track h2 > span:first-child { flex: 1; height: 1px; background: var(--adv-border); }
.adv-help-track h2 > span:last-child { color: var(--adv-help-text-2); }
.adv-help-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.adv-help-step {
    display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 12px 14px 12px 10px;
    border-radius: 12px; border: 0; cursor: pointer; background: transparent; text-align: left; width: 100%;
    line-height: 1.5; transition: background .2s;
}
.adv-help-step:hover, .adv-help-step[aria-current] { background: var(--adv-surface); }
.adv-help-number {
    width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font: 14px var(--adv-mono); margin-top: 1px; color: var(--adv-help-text-3); border: 1px solid var(--adv-help-border);
}
.adv-help-done .adv-help-number { color: var(--adv-teal); border-color: var(--adv-teal); }
.adv-help-step[aria-current] .adv-help-number { background: var(--adv-teal); color: #fff; border-color: var(--adv-teal); }
.adv-help-step-content { min-width: 0; }
.adv-help-step-title { display: block; font-size: 17px; font-weight: 500; color: var(--adv-help-text-2); text-wrap: pretty; }
.adv-help-step[aria-current] .adv-help-step-title { color: var(--adv-text); }
.adv-help-step-body { display: block; font-size: 15px; color: var(--adv-help-text-2); margin-top: 6px; text-wrap: pretty; }
.adv-help-enhanced .adv-help-step:not([aria-current]) .adv-help-step-body { display: none; }
.adv-help-enhanced .adv-help-step[aria-current] .adv-help-step-body { animation: hxRise .3s ease both; }
.adv-help-callout { margin-top: 18px; padding: 16px 18px; border-radius: 12px; font-size: 15px; display: flex; gap: 12px; align-items: flex-start; }
.adv-help-callout-warn { background: var(--adv-warn-soft); border: 1px solid var(--adv-warn-border); color: var(--adv-text); }
.adv-help-callout-warn > span:first-child { color: var(--adv-warn); }
.adv-help-walkthrough { min-width: 0; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 108px; }
.adv-help-frame {
    border: 1px solid var(--adv-help-border); border-radius: 16px; overflow: hidden; background: #eceff1;
    position: relative; box-shadow: 0 24px 60px -30px rgba(0,0,0,.7); color: #5d6f73; color-scheme: light;
    container-type: inline-size; container-name: adv-help;
}
.adv-help-chrome { height: 38px; background: #dde3e4; border-bottom: 1px solid #ccd4d5; display: flex; align-items: center; gap: 14px; padding: 0 14px; }
.adv-help-dots { display: flex; gap: 6px; }
.adv-help-dots > span { width: 9px; height: 9px; border-radius: 50%; background: #c2cbcc; }
.adv-help-address { flex: 1; min-width: 0; height: 20px; border-radius: 6px; background: #eef2f2; display: flex; align-items: center; padding: 0 10px; font: 12px var(--adv-mono); color: #5d6f73; }
.adv-help-stage { position: relative; height: 604px; overflow: hidden; }
/* The idle nav items are wireframe filler, but they are still rendered text: #8b999c
   read 2.94:1 on white. #5d6f73 clears 4.5:1, and the weight drop keeps Library —
   the item the step is actually pointing at — dominant. */
.adv-help-portal-nav { height: 62px; background: #fff; border-bottom: 1px solid #e2e7e8; display: flex; align-items: center; gap: 24px; padding: 0 20px; position: relative; z-index: 3; font-size: 14px; font-weight: 500; color: #5d6f73; }
.adv-help-library { font-weight: 600; }
.adv-help-portal-logo { width: 22px; height: 22px; border-radius: 6px; background: #cdd6d8; flex: none; }
.adv-help-library { display: inline-flex; flex-direction: column; gap: 1px; padding: 5px 10px; border-radius: 8px; color: #5d6f73; transition: background .3s; }
.adv-help-library small { font-size: 12px; font-weight: 400; color: #5d6f73; white-space: nowrap; }
.adv-help-library.adv-help-hot, .adv-help-dropdown .adv-help-hot { background: rgba(11,142,110,.12); color: #07674f; font-weight: 600; }
.adv-help-dropdown { position: absolute; top: 58px; left: 104px; width: 196px; background: #fff; border: 1px solid #d5dcdd; border-radius: 8px; box-shadow: 0 18px 40px -18px rgba(20,40,45,.4); padding: 4px 0; z-index: 4; animation: hxDrop .28s ease both; }
.adv-help-dropdown > div { padding: 11px 16px; font-size: 14px; transition: background .3s; }
.adv-help-target { position: relative; }
.adv-help-cursor {
    position: absolute; right: 16px; bottom: -9px; width: 15px; height: 15px; border-radius: 50%;
    background: rgba(11,142,110,.92); box-shadow: 0 0 0 5px rgba(11,142,110,.2),0 2px 6px rgba(0,0,0,.25);
    animation: hxCursor .3s ease both; pointer-events: none;
}
.adv-help-cursor-menu { right: 12px; top: calc(50% - 7.5px); bottom: auto; }
.adv-help-cursor-date { right: -6px; bottom: -9px; }
.adv-help-cursor-download { right: -9px; }
.adv-help-page { padding: 22px 20px 26px; position: relative; }
.adv-help-page-title { font-size: 18px; font-weight: 600; color: var(--adv-help-ink); }
.adv-help-doc-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.adv-help-statement-button { font-size: 13px; font-weight: 600; padding: 11px 20px; border-radius: 999px; background: #e2e6e7; color: #3c4a4d; border: 1.5px solid #6d7c80; transition: background .3s; }
.adv-help-statement-button.adv-help-hot { background: #0b8e6e; color: #00130e; border-color: #0b8e6e; animation: hxRing 1.9s ease-out infinite; }
.adv-help-doc-row { display: flex; align-items: center; gap: 14px; padding: 13px 2px; border-bottom: 1px solid #dfe5e6; }
.adv-help-document-icon { width: 24px; height: 30px; border-radius: 3px; background: #dbe2e3; flex: none; }
.adv-help-doc-row > span:nth-child(2) { flex: 1; min-width: 0; font-size: 14px; }
.adv-help-doc-row > span:last-child { font: 12px var(--adv-mono); white-space: nowrap; }
.adv-help-portal-note { font-size: 13px; color: #4d5f63; margin: 16px 0 0; text-wrap: pretty; }
.adv-help-tx-period { font-size: 13px; margin: 4px 0 16px; }
.adv-help-tx-row {
    /* The date column is wider than "08 Mar 2024" needs (79px at 12px mono) so the
       cursor dot has clear cell to sit in — at 82px it landed on the date itself. */
    display: grid; grid-template-columns: 100px minmax(0,1fr) 58px 74px; gap: 12px; align-items: center;
    padding: 13px 10px; margin: 0 -8px; border-radius: 6px; border-bottom: 1px solid #dfe5e6; font-size: 12px; transition: background .3s;
}
.adv-help-tx-row.adv-help-hot { background: rgba(11,142,110,.16); }
.adv-help-tx-date { font: 12px/1.5 var(--adv-mono); color: #3f6b3f; text-decoration: underline; }
.adv-help-hot .adv-help-tx-date { color: #07674f; }
.adv-help-tx-kind { min-width: 0; font-size: 14px; }
.adv-help-hot .adv-help-tx-kind { color: #22343a; font-weight: 600; }
.adv-help-tx-ref { display: block; font: 12px/1.5 var(--adv-mono); color: #5d6f73; overflow-wrap: anywhere; }
.adv-help-tx-row.adv-help-hot, .adv-help-hot .adv-help-tx-ref { color: #4d5f63; }
.adv-help-tx-qty { font-family: var(--adv-mono); }
.adv-help-tx-row > span:nth-last-child(-n+2) { text-align: right; }
.adv-help-detail-heading { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.adv-help-detail-heading > span:last-child { font: 12px var(--adv-mono); }
.adv-help-detail-ref { font: 12px/1.5 var(--adv-mono); margin: 3px 0 18px; }
.adv-help-allocations { border: 1px solid #e2e7e8; border-radius: 8px; background: #fff; transition: border-color .3s; }
.adv-help-allocations.adv-help-hot { border-color: rgba(11,142,110,.45); }
.adv-help-alloc-heading { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid #e9eded; }
.adv-help-alloc-heading > span:first-child { font-size: 13px; font-weight: 600; letter-spacing: 1.1px; color: var(--adv-help-ink); }
.adv-help-show { font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 7px; border: 1px solid #d7dedf; color: #3c4a4d; transition: background .3s; }
.adv-help-show.adv-help-hot { background: #0b8e6e; color: #00130e; border-color: #0b8e6e; }
.adv-help-show .adv-help-cursor { right: 8px; }
/* Opaque on purpose: the hxRise transform makes this a stacking context, and without
   a background of its own a contrast checker resolves straight past it to the page background. */
.adv-help-alloc-expanded { animation: hxRise .3s ease both; background: #fff; }
.adv-help-alloc-row { display: grid; grid-template-columns: minmax(0,1fr) 92px 62px; gap: 10px; padding: 11px 16px; border-bottom: 1px solid #f0f3f3; font-size: 13px; }
.adv-help-alloc-row:nth-child(3) { background: #fafbfb; }
.adv-help-alloc-row > span:first-child { min-width: 0; }
.adv-help-alloc-row > span:not(:first-child) { font-family: var(--adv-mono); text-align: right; }
.adv-help-alloc-row:not(.adv-help-alloc-columns) > span:nth-child(2) { color: var(--adv-help-ink); }
.adv-help-alloc-columns { padding-top: 9px; padding-bottom: 9px; font: 12px/1.5 var(--adv-mono); letter-spacing: .6px; text-transform: uppercase; border-bottom-color: #e9eded; }
.adv-help-download-row { display: flex; justify-content: flex-end; padding: 12px 16px; }
.adv-help-download { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; background: #0b8e6e; color: #00130e; border: 1px solid #0b8e6e; animation: hxRing 1.9s ease-out infinite; }
.adv-help-csv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.adv-help-csv-chips > span:first-child { font-size: 13px; color: #4d5f63; margin-right: 2px; }
.adv-help-csv-chip { font: 12px/1.5 var(--adv-mono); padding: 6px 10px; border-radius: 7px; background: #fff; border: 1px solid #d7dedf; animation: hxChip .3s ease .05s both; }
.adv-help-csv-pending { border: 1px dashed #c4cdcf; animation-delay: .4s; }
.adv-help-overlay { position: absolute; inset: 0; background: rgba(28,44,48,.42); display: flex; align-items: center; justify-content: center; z-index: 6; animation: hxRise .25s ease both; }
.adv-help-modal { width: min(340px,90%); background: #fff; border-radius: 10px; box-shadow: 0 30px 60px -20px rgba(15,35,40,.55); padding: 22px; animation: hxDrop .3s ease both; }
.adv-help-modal-title { font-size: 17px; font-weight: 600; color: var(--adv-help-ink); margin-bottom: 8px; }
.adv-help-modal p { font-size: 12px; color: #4d5f63; margin: 0 0 18px; text-wrap: pretty; }
.adv-help-date-label { font-size: 12px; font-weight: 600; color: var(--adv-help-ink); margin-bottom: 5px; }
.adv-help-date-row { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.adv-help-date-row > span:first-child { flex: 1; height: 36px; border: 1px solid #cfd8d9; border-radius: 6px; display: flex; align-items: center; padding: 0 11px; font: 13px var(--adv-mono); color: var(--adv-help-ink); }
.adv-help-calendar { width: 30px; height: 30px; border: 1.5px solid #6d7c80; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #4d5f63; }
.adv-help-export-row { display: flex; justify-content: flex-end; margin-top: 20px; }
.adv-help-export { padding: 11px 22px; border-radius: 999px; font-size: 14px; font-weight: 600; background: #0b8e6e; color: #00130e; animation: hxRing 1.9s ease-out .3s infinite; }
.adv-help-export .adv-help-cursor { right: 14px; }
.adv-help-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.adv-help-periods { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adv-help-periods > span { font: 13px/1.5 var(--adv-mono); letter-spacing: 1.2px; text-transform: uppercase; color: var(--adv-help-text-3); margin-right: 4px; }
.adv-help-period { cursor: pointer; font: 13px/1.5 var(--adv-mono); padding: 7px 12px; border-radius: 8px; transition: background .2s; background: transparent; color: var(--adv-help-text-2); border: 1px solid var(--adv-help-border); }
.adv-help-period[aria-pressed="true"] { background: var(--adv-teal-soft); color: var(--adv-teal); border-color: var(--adv-teal); }
.adv-help-playback { display: flex; align-items: center; gap: 14px; }
.adv-help-play { cursor: pointer; min-height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--adv-help-border); display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--adv-text); background: transparent; }
.adv-help-period:hover, .adv-help-play:hover { border-color: var(--adv-teal); }
.adv-help-wrap button:focus-visible, .adv-help-header a:focus-visible { outline: 2px solid var(--adv-teal); outline-offset: 3px; }
.adv-help-counter { font: 13px var(--adv-mono); color: var(--adv-help-text-3); white-space: nowrap; }
.adv-help-progress { height: 3px; border-radius: 2px; background: var(--adv-surface-alt); overflow: hidden; }
.adv-help-progress > span { display: block; height: 100%; background: var(--adv-teal); width: 14.285714%; transition: width .35s ease; }
.adv-help-caption { font-size: 15px; color: var(--adv-help-text-2); text-wrap: pretty; }
.adv-help-period-description { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.adv-help-footer { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--adv-border); font-size: 15px; color: var(--adv-help-text-3); max-width: 760px; text-wrap: pretty; }
.adv-help-footer p { margin: 0 0 12px; }
.adv-help-wrap [hidden] { display: none !important; }
/* Container adjustments preserve legible text and the fixed stage on narrow screens. */
@container adv-help (max-width: 480px) {
    .adv-help-portal-nav { gap: 10px; padding: 0 12px; font-size: 12px; }
    .adv-help-portal-logo { display: none; }
    .adv-help-library { padding: 5px 4px; }
    .adv-help-library small { white-space: normal; max-width: 126px; }
    .adv-help-dropdown { left: 64px; }
    .adv-help-page { padding: 18px 12px; }
    .adv-help-statement-button { padding: 11px 14px; }
    .adv-help-doc-row { gap: 8px; }
    .adv-help-tx-row { grid-template-columns: 62px minmax(0,1fr) 24px 64px; gap: 6px; padding: 12px 6px; margin: 0; }
    .adv-help-tx-kind { font-size: 12px; }
    .adv-help-detail-heading { gap: 4px; }
    .adv-help-detail-ref { margin-bottom: 12px; }
    .adv-help-alloc-heading { padding: 10px; }
    .adv-help-alloc-row { grid-template-columns: minmax(0,1fr) 84px 28px; gap: 6px; padding: 8px 10px; font-size: 12px; line-height: 1.35; }
    .adv-help-alloc-columns { letter-spacing: 0; }
    .adv-help-csv-chips { margin-top: 12px; gap: 6px; }
}
@keyframes hxDrop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes hxRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes hxChip { 0% { opacity: 0; transform: translateY(-6px); } 100% { opacity: 1; transform: none; } }
@keyframes hxRing { 0% { box-shadow: 0 0 0 0 rgba(11,142,110,.5); } 70% { box-shadow: 0 0 0 13px rgba(11,142,110,0); } 100% { box-shadow: 0 0 0 0 rgba(11,142,110,0); } }
@keyframes hxCursor { 0% { opacity: 0; transform: scale(.7); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .adv-help-wrap *, .adv-help-wrap *::before, .adv-help-wrap *::after { animation: none !important; transition: none !important; }
}
.adv-help-inline {
    margin: 8px 0 0;
    font-size: 15px;
}
.adv-help-inline .app-link {
    color: var(--adv-teal);
    display: inline-block;
    padding: 12px 10px;
    margin: -12px -10px;
}

/* ─── Findings equation (replaces 4-stat grid) ─── */
.adv-findings-eq {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.adv-eq-stat { min-width: 76px; }
.adv-eq-stat[data-total="true"] { min-width: 96px; }
.adv-eq-num {
    font-family: var(--adv-serif);
    font-size: 40px;
    font-variation-settings: "opsz" 40;
    letter-spacing: -1px;
    line-height: 1;
    color: var(--adv-text);
}
.adv-eq-stat[data-total="true"] .adv-eq-num {
    font-size: 40px;
    font-variation-settings: "opsz" 40;
}
.adv-eq-num[data-accent="warn"] { color: var(--adv-warn); }
.adv-eq-label {
    font-family: var(--adv-sans);
    font-size: 15px;
    line-height: 1.35;
    letter-spacing: 0;
    margin-top: 8px;
    color: var(--adv-text-dim);
}
.adv-eq-op {
    font-family: var(--adv-serif);
    font-size: 28px;
    font-variation-settings: "opsz" 28;
    color: var(--adv-text-faint);
    height: 40px;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

/* Editable transaction list */
.adv-edit-hint-host { margin-top: 20px; }
.adv-edit-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 0;
    border-radius: 10px;
    background: var(--adv-teal-soft);
    border: 1px solid var(--adv-teal-dim);
    font-family: var(--adv-sans);
    font-size: 15px;
    color: var(--adv-teal);
    font-weight: 500;
    line-height: 1.4;
}
.adv-findings-row-edit {
    display: grid;
    grid-template-columns: 140px 92px 70px 116px minmax(132px, 1fr);
    align-items: center;
    font-family: var(--adv-mono);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    padding: 13px 20px;
    border-bottom: 1px solid var(--adv-border);
    gap: 6px;
    position: relative;
}
.adv-findings-row-edit:last-child {
    border-bottom: none;
}
.adv-findings-row-edit[data-confidence="LOW"] {
    background: var(--adv-warn-soft);
    box-shadow: inset 3px 0 var(--adv-warn);
}
.adv-findings-row-edit[data-confidence="LOW"] .adv-cell {
    border-color: var(--adv-warn-border);
}
.adv-confidence-warning {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--adv-warn);
    font-family: var(--adv-sans);
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    pointer-events: none;
}
.adv-findings-row-edit .adv-tx-value {
    color: var(--adv-text);
    text-align: right;
}
.adv-cell {
    appearance: none;
    background: color-mix(in srgb, var(--adv-teal) 5%, transparent);
    border: 1px solid var(--adv-border);
    border-radius: 10px;
    padding: 9px 10px;
    font-family: var(--adv-mono);
    font-size: 16px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    color: var(--adv-text);
    width: 100%;
    min-height: 44px;
    transition: border-color .15s, background .15s, box-shadow .15s;
    min-width: 0;
}
.adv-cell:hover {
    border-color: var(--adv-teal);
    background: color-mix(in srgb, var(--adv-teal) 11%, transparent);
}
.adv-cell:focus {
    outline: none;
    border-color: var(--adv-teal);
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
select.adv-cell { cursor: pointer; font-weight: 600; }
.adv-cell-price-wrap {
    display: flex;
    align-items: center;
    gap: 0;
}
.adv-cell-price-wrap > span {
    color: var(--adv-text-faint);
    padding-left: 8px;
    font-family: var(--adv-mono);
    font-size: 16px;
}
.adv-cell-price-wrap .adv-cell { color: var(--adv-text-dim); padding-left: 4px; }

/* ─── Allocation decision buttons (new design) ─── */
.adv-choice-decision {
    width: 100%;
    flex: 1;
    text-align: left;
    align-items: stretch;
    padding: 18px 20px;
    min-height: 72px;
    border-radius: 14px;
    background: var(--adv-surface);
    border-color: var(--adv-border-strong);
}
.adv-decision-row {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}
.adv-decision-body { flex: 1; min-width: 0; }
.adv-decision-eyebrow {
    font-family: var(--adv-mono);
    font-size: 13px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--adv-text-faint);
    margin-bottom: 8px;
    font-weight: 500;
}
.adv-choice-primary .adv-decision-eyebrow { color: var(--adv-teal-dim); }
.adv-decision-title { font-size: 17px; font-weight: 600; line-height: 1.3; }
.adv-decision-sub {
    font-size: 15px;
    line-height: 1.45;
    color: var(--adv-text-dim);
    margin-top: 3px;
    font-weight: 400;
}
.adv-choice-primary .adv-decision-sub { color: var(--adv-teal-dim); }
.adv-decision-chevron {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    opacity: 0.75;
}
.adv-choice-primary .adv-decision-chevron { opacity: 0.9; }

/* ─── Review: sign-off CTA + disclaimer ─── */
.adv-signoff-cta {
    width: 100%;
    margin-bottom: 18px;
    padding: 18px 20px;
}
.adv-signoff-cta[data-open="true"] { margin-bottom: 0; }
.adv-signoff-seal {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--adv-teal-dim);
    color: var(--adv-teal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-family: var(--adv-serif);
}
.adv-signoff-panel {
    padding: 16px 20px;
    border-radius: 12px;
    margin: 10px 0 18px;
    background: var(--adv-teal-soft);
    border: 1px solid var(--adv-teal-dim);
}
.adv-signoff-panel-eyebrow {
    font-family: var(--adv-mono);
    font-size: 13px;
    color: var(--adv-teal);
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 500;
}
.adv-signoff-panel-body {
    font-family: var(--adv-sans);
    font-size: 16px;
    color: var(--adv-text);
    line-height: 1.6;
}
.adv-signoff-panel-foot {
    font-family: var(--adv-sans);
    font-size: 15px;
    color: var(--adv-text-dim);
    margin-top: 10px;
}
.adv-liability {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 18px;
    background: var(--adv-teal-soft);
    border: 1px solid var(--adv-teal-dim);
}
.adv-liability-icon {
    color: var(--adv-teal);
    font-size: 16px;
    line-height: 1.5;
    flex: 0 0 auto;
}
.adv-liability-text {
    font-family: var(--adv-sans);
    font-size: 16px;
    color: var(--adv-text-dim);
    line-height: 1.5;
}
.adv-liability-text b { color: var(--adv-text); }

.adv-submit-gate > .adv-step-label,
.adv-pilot-confirm > .adv-step-label {
    font-size: 13px;
    letter-spacing: 1.2px;
}
.adv-submit-gate > .adv-msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--adv-teal-soft);
    border: 1px solid var(--adv-teal-dim);
    color: var(--adv-text);
    font-family: var(--adv-sans);
    font-size: 16px;
    line-height: 1.5;
    text-wrap: pretty;
}
.adv-submit-gate > .adv-msg::before {
    content: '●';
    color: var(--adv-teal);
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 1.5;
}
.adv-consent-row {
    margin: 20px 0 16px;
}
.adv-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--adv-text-dim);
    font-family: var(--adv-sans);
    font-size: 16px;
    line-height: 1.5;
}
.adv-consent-label input {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    flex: 0 0 auto;
    accent-color: var(--adv-teal);
}
.adv-consent-label input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--adv-teal-soft);
}
.adv-gate-submit-wrap { display: flex; justify-content: flex-start; }
.adv-gate-submit-wrap .adv-choice-primary {
    min-height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    border-color: var(--adv-teal);
    background: var(--adv-teal);
    color: var(--adv-teal-ink, var(--adv-bg));
    font-size: 17px;
    font-weight: 600;
}
.adv-gate-submit-wrap .adv-choice-primary:hover:not(:disabled) {
    filter: none;
    background: var(--adv-action-hover);
    color: var(--adv-teal-ink, var(--adv-bg));
}
.adv-pilot-confirm {
    padding: 28px;
    border-radius: 16px;
    background: var(--adv-surface);
    border: 1px solid var(--adv-border-strong);
}
.reconciliation-receipt-title {
    margin: 0 0 12px;
    font: 400 28px/1.2 var(--adv-serif);
    color: var(--adv-text);
}
.adv-pilot-confirm > .adv-msg {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 20px;
}
.adv-pilot-confirm [data-role="confirm-period"] {
    padding: 16px 20px;
    border-left: none;
    border-radius: 12px;
    background: var(--adv-teal-soft);
    border: 1px solid var(--adv-teal-dim);
    color: var(--adv-text-dim);
    font-size: 16px;
    line-height: 1.5;
}
.adv-pilot-confirm .adv-choice-secondary {
    min-height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    font-size: 17px;
}

/* ─── Error state ─── */
.adv-error-card {
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--adv-error-soft);
    border: 1px solid var(--adv-error-border);
    /* The failed-file chip renders straight after this card; without a gap the
       two boxes touch and read as one broken container. */
    margin-bottom: 12px;
}
.adv-error-block .adv-error-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    color: var(--adv-error);
    font-family: var(--adv-sans);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
}
.adv-error-heading .adv-step-dot,
.adv-error-heading .adv-step-rule { display: none; }
.adv-error-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
}
.adv-error-message {
    margin: 0 0 14px;
    color: var(--adv-text-dim);
    font-family: var(--adv-sans);
    font-size: 16px;
    line-height: 1.5;
}
.adv-error-card > [data-role="detail"] {
    margin: 0;
    padding: 0;
    border-left: none;
    color: var(--adv-text-dim);
    font-size: 15px;
    line-height: 1.5;
}
.adv-error-card > [data-role="actions"] {
    margin: 18px 0 0;
}
.adv-error-card > [data-role="actions"] .adv-choice {
    min-height: 48px;
    font-size: 17px;
}
.adv-error-block [data-block="year-mismatch"] .app-aside,
[data-block="year-mismatch"] .app-aside {
    padding: 16px 20px;
    border-left: none;
    border-radius: 12px;
    background: var(--adv-warn-soft);
    border: 1px solid var(--adv-warn-border);
    font-size: 16px;
}

/* ─── Hidden attribute behavior (defensive) ─── */
[hidden] { display: none !important; }

/* ─── No-script fallback ─── */
.adv-noscript {
    padding: 32px;
    text-align: center;
    font-family: var(--adv-sans);
    color: var(--adv-text-dim);
}

/* ─── Mobile pass (≤ 640px) ─── */
@media (max-width: 640px) {
    .adv-page-inner { padding: 36px 18px 220px; }

    [data-mobile="stack"] { flex-direction: column; align-items: stretch; }
    [data-mobile="stack"] > * { width: 100%; flex: 1 1 auto; }

    [data-mobile="stats-2"] { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }

    [data-mobile="stats-eq"] { gap: 10px; }
    [data-mobile="stats-eq"] .adv-eq-stat[data-total="true"] .adv-eq-num { font-size: 36px; font-variation-settings: "opsz" 36; }
    [data-mobile="stats-eq"] .adv-eq-num { font-size: 26px; font-variation-settings: "opsz" 26; }
    [data-mobile="stats-eq"] .adv-eq-op { font-size: 20px; height: 36px; }
    /* At 390px the three stats plus their operators no longer fit on one line,
       and wrapping stranded a "+" at the end of a row. Lay the equation out as
       a grid so each operator always sits between the two stats it joins. */
    [data-mobile="stats-eq"] {
        display: grid;
        grid-template-columns: auto auto minmax(0, 1fr);
        align-items: start;
        column-gap: 10px;
        row-gap: 14px;
        flex-wrap: nowrap;
    }
    [data-mobile="stats-eq"] .adv-eq-stat { min-width: 0; }
    [data-mobile="stats-eq"] .adv-eq-stat[data-total="true"] { min-width: 0; grid-column: 1; }
    [data-mobile="stats-eq"] .adv-eq-label { font-size: 14px; }

    [data-mobile="tx-scroll"] { overflow-x: auto; max-height: 320px; }
    [data-mobile="tx-scroll"] > .adv-findings-row-edit,
    [data-mobile="tx-scroll"] > .adv-findings-list-header { min-width: 620px; }

    [data-mobile="meta-stack"] { flex-direction: column; align-items: flex-start; gap: 10px; }
    [data-mobile="meta-stack"] > * { flex-wrap: wrap; }

    [data-mobile="reloc"] { flex-direction: column; align-items: stretch; gap: 8px; }
    [data-mobile="reloc"] > select,
    [data-mobile="reloc"] > input { width: 100%; }

    .adv-alloc-row[data-mobile="alloc-row"] {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "date qty" "sold sold" "input input";
        row-gap: 8px; column-gap: 10px;
    }
    .adv-alloc-row[data-mobile="alloc-row"] > .ar-date  { grid-area: date; }
    .adv-alloc-row[data-mobile="alloc-row"] > .ar-qty   { grid-area: qty; text-align: right; }
    .adv-alloc-row[data-mobile="alloc-row"] > .ar-sold  { grid-area: sold; }
    .adv-alloc-row[data-mobile="alloc-row"] > .ar-input { grid-area: input; }

    [data-mobile="quarter-2"] { flex-wrap: wrap; gap: 6px; }
    [data-mobile="quarter-2"] > * { flex: 1 1 calc(50% - 4px); }
    /* Full year drops to its own full-width row: Q1 Q2 / Q3 Q4 / Full year. */
    [data-mobile="quarter-2"] > .adv-choice-quarter-fy { flex-basis: 100%; }

    .adv-findings-list { overflow-x: auto; max-height: 320px; }
    .adv-findings-list > * { min-width: 460px; }

    [data-mobile="breadcrumb"] { font-size: 13px; line-height: 2; }

    [data-mobile="header"] {
        grid-template-columns: auto minmax(0, 1fr) auto;
        height: 68px;
        min-height: 68px;
        gap: 10px;
        padding: 0 18px;
        overflow: visible;
    }
    [data-mobile="header"] .adv-brand-name { font-size: 22px; }
    [data-mobile="header"] .adv-header-pills {
        justify-content: flex-start;
        overflow: hidden;
    }
    [data-mobile="header"] .adv-pill {
        gap: 6px;
        font-size: 14px;
    }
    /* Only the active step keeps its label on small screens; the rest are circles,
       otherwise five pills overflow and clip mid-word. */
    [data-mobile="header"] .adv-pill[data-state="idle"] .adv-pill-label,
    [data-mobile="header"] .adv-pill[data-state="done"] .adv-pill-label { display: none; }
    [data-mobile="header"] .adv-pill-connector {
        width: 2px;
        flex-basis: 2px;
        margin: 0 2px;
    }
    [data-mobile="header"] .adv-header-actions { gap: 8px; }
    [data-mobile="header"] [data-mobile="meta"] { display: none; }
    [data-mobile="header"] .adv-menu-toggle {
        width: 40px;
        padding: 0;
        justify-content: center;
        gap: 0;
    }
    [data-mobile="header"] .adv-menu-label { display: none; }
    [data-mobile="header"] .adv-menu-panel { right: 0; }

    [data-mobile="greeting-h1"] .adv-msg-headline { font-weight: 400; font-size: 24px; }

    .adv-sell-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "date qty" "sold alloc";
        row-gap: 4px;
    }
    .adv-sell-row .adv-sell-date  { grid-area: date; }
    .adv-sell-row .adv-sell-qty   { grid-area: qty; text-align: right; }
    .adv-sell-row .adv-sell-sold  { grid-area: sold; }
    .adv-sell-row .adv-sell-alloc { grid-area: alloc; }
}

/* ── Pilot · My Filings (Plan 5) — external so the strict CSP (style-src 'self') serves it ── */
.adv-filings-shell { max-width: 960px; }
.adv-filing-card {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    border: 1px solid var(--adv-border-strong); border-radius: 12px;
    padding: 16px 18px; margin-top: 12px;
}
.adv-filing-period { font-family: var(--adv-serif); font-size: 22px; }
.adv-filing-meta   { font-size: 15px; color: var(--adv-text-dim); }
.adv-filing-badge  { font-size: 15px; color: var(--adv-warn); }
.adv-filing-empty  { margin-top: 14px; }
.adv-filing-actions { margin-top: 20px; }

/* ── Pilot · My Filings — Annual Summary panel (foundation piece #4) ── */
.adv-summary-card {
    width: 100%; box-sizing: border-box;
    border: 1px solid var(--adv-border-strong); border-radius: 12px;
    padding: 16px 18px; margin-top: 16px; margin-bottom: 8px;
    background: var(--adv-surface-alt);
}
.adv-summary-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 4px;
}
.adv-summary-title { min-width: 0; margin: 0; font-weight: 400; font-family: var(--adv-serif); font-size: 24px; color: var(--adv-text); }
.adv-summary-sub   { font-size: 15px; color: var(--adv-text-dim); margin: 0 0 14px; }
.adv-summary-dl    { font-size: 15px; white-space: nowrap; padding: 8px 14px; }
.adv-summary-scroll { overflow-x: auto; max-width: 100%; }
.adv-summary-scroll:focus-visible { outline: 2px solid var(--adv-ink-accent); outline-offset: 2px; }
.adv-summary-scroll-hint { display: none; color: var(--adv-text-dim); font-size: 14px; margin: 0 0 8px; }
.adv-summary-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 15px; color: var(--adv-text); }
.adv-summary-table th:first-child, .adv-summary-table td:first-child { min-width: 180px; }
.adv-summary-table th, .adv-summary-table td {
    padding: 10px 12px; text-align: left;
    border-bottom: 1px solid var(--adv-border);
}
.adv-summary-table td:nth-child(5) { white-space: nowrap; }
.adv-summary-table th { font-weight: 600; color: var(--adv-text-dim); }
.adv-summary-table th.adv-num, .adv-summary-table td.adv-num {
    text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.adv-summary-annual td {
    font-style: italic; color: var(--adv-text-dim);
    border-top: 1px dashed var(--adv-border-strong);
}
.adv-summary-annual td.adv-num { font-style: normal; }
.adv-summary-total td {
    font-weight: 700; border-top: 2px solid var(--adv-border-strong); border-bottom: none;
}
.adv-summary-badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 14px;
    background: var(--adv-warn-soft); color: var(--adv-warn);
}
.adv-summary-badge-ok { background: var(--adv-teal-soft); color: var(--adv-ink-accent); }
.adv-summary-badge-muted { background: var(--adv-surface-alt); color: var(--adv-text-faint); }
.adv-summary-note { font-size: 15px; color: var(--adv-text-faint); margin: 12px 0 0; }

/* ── Pilot · My Filings — first-time empty state ("How a filing works") ── */
.adv-filings-shell-empty { max-width: 720px; }

.adv-how-panel {
    margin-top: 26px;
    border: 1px solid var(--adv-border-strong);
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--adv-surface-lift), var(--adv-surface));
}
.adv-how-head {
    display: flex; align-items: center; gap: 9px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--adv-border);
}
.adv-how-head-dot {
    width: 5px; height: 5px; border-radius: 3px;
    background: var(--adv-teal); flex: 0 0 auto;
}
.adv-how-eyebrow {
    font-family: var(--adv-mono);
    font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase;
    font-weight: 500; color: var(--adv-text-faint);
}
.adv-how-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
}
.adv-how-step {
    padding: 24px 24px 26px;
    border-right: 1px solid var(--adv-border);
}
.adv-how-step:last-child { border-right: none; }
.adv-how-step-head {
    display: flex; align-items: center; gap: 11px; margin-bottom: 13px;
}
.adv-how-step-k { color: var(--adv-text-faint); }
.adv-how-num {
    width: 28px; height: 28px; border-radius: 999px; flex: 0 0 auto;
    background: var(--adv-teal-soft); border: 1px solid var(--adv-teal-dim);
    color: var(--adv-teal);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--adv-mono); font-size: 14px; font-weight: 600;
}
.adv-how-title {
    font-family: var(--adv-sans); font-size: 18px; line-height: 1.3;
    letter-spacing: -0.1px; font-weight: 500; color: var(--adv-text);
    margin-bottom: 8px;
}
.adv-how-desc {
    font-family: var(--adv-sans); font-size: 15px; line-height: 1.6;
    color: var(--adv-text-dim);
}
.adv-how-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    padding: 20px 24px;
    border-top: 1px solid var(--adv-border);
}
.adv-how-note {
    margin: 0; max-width: 360px;
    font-family: var(--adv-sans); font-size: 15px; line-height: 1.6;
    color: var(--adv-text-faint);
}
.adv-how-cta { flex: 0 0 auto; padding: 14px 26px; font-size: 17px; }

@media (max-width: 600px) {
    .adv-how-grid { grid-template-columns: 1fr; }
    .adv-how-step { border-right: none; border-bottom: 1px solid var(--adv-border); }
    .adv-how-step:last-child { border-bottom: none; }
    .adv-how-foot { flex-direction: column; align-items: stretch; }
    .adv-how-note { max-width: none; }
    .adv-how-cta { text-align: center; }
}

/* ─── Landing page (public /) ─── */
body.adv-body[data-page="landing"] .adv-flow { padding: 40px 24px 80px; }
.adv-landing-wrap { max-width: 640px; margin: 0 auto; }

.adv-landing-hero { margin-bottom: 56px; }
.adv-landing-h1 {
    font-size: 34px;
    margin: 0 0 14px;
    font-variation-settings: "opsz" 34;
    font-weight: 500;
}
.adv-landing-lede { font-size: 17px !important; margin-bottom: 28px; }

.adv-landing-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.adv-landing-btn {
    text-decoration: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 20px;
}

.adv-landing-section { margin-bottom: 44px; }
.adv-landing-h2 {
    font-family: var(--adv-mono);
    font-size: 10px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--adv-text-dim);
    font-weight: 500;
    margin: 0 0 18px;
}
.adv-landing-body {
    font-family: var(--adv-sans);
    font-size: 15px;
    line-height: 1.65;
    color: var(--adv-text-dim);
    margin: 0 0 18px;
}

.adv-landing-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.adv-landing-step { display: flex; gap: 14px; align-items: flex-start; }
.adv-landing-step-num {
    font-family: var(--adv-mono);
    font-size: 11px;
    color: var(--adv-teal);
    background: var(--adv-teal-soft);
    border: 1px solid var(--adv-border-strong);
    border-radius: 50%;
    width: 24px; height: 24px;
    flex: none;
    display: flex; align-items: center; justify-content: center;
    margin-top: 2px;
}
.adv-landing-step-title {
    font-family: var(--adv-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--adv-text);
    margin: 0 0 4px;
}
.adv-landing-step-body {
    font-family: var(--adv-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--adv-text-dim);
    margin: 0;
}

.adv-landing-beta {
    background: var(--adv-surface);
    border: 1px solid var(--adv-border);
    border-radius: 12px;
    padding: 24px;
}
.adv-landing-beta .adv-landing-btn { display: inline-flex; }

.adv-landing-foot {
    border-top: 1px solid var(--adv-border);
    padding-top: 22px;
    font-family: var(--adv-sans);
    font-size: 13px;
    color: var(--adv-text-faint);
}
.adv-landing-foot p { margin: 0 0 6px; }
.adv-landing-foot a { color: var(--adv-text-dim); }
.adv-landing-foot a:hover { color: var(--adv-teal); }

@media (max-width: 520px) {
    body.adv-body[data-page="landing"] .adv-flow { padding-top: 28px; }
    .adv-landing-h1 { font-size: 27px; }
    .adv-landing-actions .adv-landing-btn { flex: 1 1 100%; }
}

/* Help's wrapping header can put its menu in the middle of a narrow row.
   Anchor that panel to the viewport so all navigation remains reachable. */
@media (max-width: 600px) {
    .adv-menu-inline > .adv-menu-panel {
        position: fixed;
        left: 18px;
        right: 18px;
        width: auto;
    }
}

/* Quarter-first intake */
.intake-period, .intake-statements { max-width: 1000px; margin: 36px auto; display: flex; flex-direction: column; gap: 20px; }
.intake-period { max-width: 840px; gap: 24px; }
.intake-title { margin: 0; font: 400 38px/1.2 'Newsreader', serif; color: #11302c; }
.intake-sub { margin: 0; color: #4f6561; line-height: 1.5; }
.intake-label { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-weight: 600; }
.intake-year { width: 180px; }
.intake-quarters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.intake-quarter { background: #fff; border: 1px solid #c7d5d1; border-radius: 12px; padding: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; cursor: pointer; color: #11302c; }
.intake-quarter strong { font-size: 24px; }
.intake-quarter span { color: #4f6561; }
.intake-quarter[aria-pressed="true"] { border: 2px solid #08775e; padding: 23px; }
.intake-range { margin: 0; font-weight: 600; }
.intake-period > .adv-choice { align-self: flex-start; }
.intake-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.intake-period-summary { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.intake-drop { background: #fff; border: 1px dashed #658076; border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; }
.intake-drop p { margin: 0; }
.intake-drop[aria-disabled="true"] { opacity: .6; cursor: wait; }
.intake-link { color: #08775e; text-decoration: underline; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; align-self: flex-start; }
.intake-link:disabled { opacity: .6; cursor: default; }
.intake-file { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid #c7d5d1; padding: 12px 0; }
.intake-file-kind { width: 48px; flex-shrink: 0; color: #4f6561; font-size: 12px; }
.intake-file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.intake-file .intake-link { align-self: center; }
.intake-error { color: #8f3434; }
.intake-live-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.intake-activity { width: 16px; height: 16px; flex: 0 0 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: adv-spin .8s linear infinite; animation-play-state: paused; }
.intake-actions .adv-choice[aria-busy="true"]:disabled { background: #08775e; border-color: #08775e; height: auto; min-height: 48px; padding: 10px 22px; opacity: 1; cursor: wait; gap: 10px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .intake-activity { animation: none; } }
.intake-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
@media (max-width: 640px) {
  .intake-period, .intake-statements { margin: 24px auto; }
  .intake-title { font-size: 32px; }
  .intake-quarters { grid-template-columns: repeat(2, 1fr); }
  .intake-heading { align-items: flex-start; flex-direction: column; }
  .intake-actions { align-items: stretch; flex-direction: column; }
  .intake-file-kind { width: 32px; }
}
.adv-page-inner.intake-page { max-width: 1000px; }
.intake-downstream { display: grid; gap: 18px; }
.intake-downstream-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.intake-drop .adv-choice { align-self: flex-start; }
.intake-link { min-height: 44px; display: inline-flex; align-items: center; }
#adv-pills.intake-progress { gap: 16px; }
@media (max-width: 640px) {
  #adv-pills.intake-progress .adv-pill:not([data-state="active"]) { display: none; }
}

/* Transaction price review */
.price-review { max-width: 1000px; margin: 0 auto; display: grid; gap: 18px; }
.price-review-card { background: var(--adv-surface, #fff); border-radius: 12px; padding: 24px; display: grid; gap: 12px; }
.price-review-card h2, .price-review-card h3, .price-review-card p { margin: 0; }
.price-review-card h2 { font-size: 20px; }
.price-review-card h3 { font-size: 16px; }
.price-review-panel { background: #eef2f0; border-radius: 8px; padding: 20px; display: grid; gap: 10px; overflow-wrap: anywhere; }
.price-review-values { font-variant-numeric: tabular-nums; font-size: 20px; line-height: 1.5; }
/* Verified recovery: show the source value before the value used. */
.price-review-panel--precision { background: transparent; padding: 0; gap: 16px; }
.price-review-panel--precision > strong { font-size: 20px; line-height: 28px; }
.price-review-precision-intro { font-size: 18px; line-height: 28px; }
.price-review-comparison { display: flex; align-items: center; gap: 24px; }
.price-review-price { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 8px; padding: 20px 0; }
.price-review-price-label { font-size: 14px; line-height: 22px; color: var(--adv-muted, #4f6561); }
.price-review-price-number { font-family: var(--adv-mono); font-size: 28px; line-height: 38px; font-variant-numeric: tabular-nums; }
.price-review-price--used { padding: 20px; background: #e4f1ec; border-radius: 8px; }
.price-review-price--used .price-review-price-label { color: var(--adv-text, #11302c); font-weight: 600; }
.price-review-price-arrow { flex: 0 0 auto; font-size: 28px; color: var(--adv-muted, #4f6561); }
.price-review-precision-source { font-size: 16px; line-height: 24px; color: var(--adv-muted, #4f6561); }
@media (max-width: 640px) {
    .price-review-comparison { flex-direction: column; align-items: stretch; gap: 8px; }
    .price-review-price { flex: auto; padding: 12px 0; }
    .price-review-price--used { padding: 16px; }
    .price-review-price-number { font-size: 24px; line-height: 34px; }
    .price-review-price-arrow { display: none; }
}
.price-review-warning { color: #744800; }
.price-review-math { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.price-review-upload { border: 1px dashed #658076; border-radius: 8px; padding: 18px; display: grid; gap: 12px; }
.price-review-file { color: #08775e; text-decoration: underline; cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.price-review-file input { max-width: 100%; color: #11302c; }
.price-review details { overflow-x: auto; }
.price-review summary { cursor: pointer; color: #08775e; }
@media (max-width: 640px) {
    .price-review-card { padding: 20px; }
    .price-review-values { display: grid; font-size: 18px; }
    .price-review .adv-choice { width: 100%; }
}
.price-review-values { display: flex; flex-wrap: wrap; gap: 12px 48px; }
.price-review-file { position: relative; width: fit-content; }
.price-review-file input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.price-review-file[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.price-review-file:focus-within { outline: 2px solid #08775e; outline-offset: 3px; }
@media (max-width: 640px) { .price-review-values { display: grid; gap: 8px; } }

/* Next-step actions follow the receipt and notices, as on other intake steps. */
.intake-processed { max-width: 936px; gap: 24px; }
.intake-processed .intake-heading { flex-wrap: wrap; gap: 24px; }
.intake-processed .intake-period-summary { flex: 0 0 auto; max-width: 100%; }
.intake-processed .intake-ready-sub { font-size: 18px; }
.intake-ready-review { align-self: flex-start; }
.intake-ready-actions { border-top: 1px solid #c7d5d1; padding-top: 24px; }
.intake-receipts { border-top: 1px solid #c7d5d1; }
.intake-processed-status { color: #08775e; }
.intake-receipt-icon { width: 24px; height: 28px; flex: 0 0 auto; fill: none; stroke: #4f6561; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) {
  .intake-ready-review { align-self: stretch; }
}

/* Export guide selector and independent document tabs. */
.adv-help-top { display:flex; align-items:center; justify-content:space-between; gap:32px; }
.adv-help-top .adv-help-title-block { margin-bottom: 28px; }
.adv-help-broker-select { width: min(380px, 100%); display:grid; gap:8px; margin-bottom:28px; }
.adv-help-broker-select label, .adv-help-request label { font-weight:600; }
.adv-help-broker-select select, .adv-help-request input { width:100%; padding:14px 16px; border:1px solid #658076; border-radius:8px; background:#fff; color:#11302c; font:inherit; }
.adv-help-tabs { display:flex; border-bottom:1px solid #c7d5d1; margin-bottom:32px; }
.adv-help-tabs button { flex:1; text-align:left; padding:18px 24px; background:transparent; border:0; border-bottom:3px solid transparent; color:#4f6561; font:inherit; cursor:pointer; }
.adv-help-tabs button[aria-selected="true"] { background:#fff; border-bottom-color:#08775e; color:#11302c; font-weight:600; }
.adv-help-tabs small { display:block; font-size:14px; font-weight:400; margin-top:5px; }
.adv-help-track h2 { display:block; font:400 30px/1.2 var(--adv-serif); text-transform:none; letter-spacing:0; color:var(--adv-text); }
.adv-help-track > p { color:var(--adv-help-text-2); }
.adv-help-other { display:grid; grid-template-columns:1fr 1.2fr; gap:48px; align-items:start; }
.adv-help-other h2 { font:400 32px/1.2 var(--adv-serif); margin:0 0 16px; }
.adv-help-request { background:#fff; border:1px solid #c7d5d1; border-radius:12px; padding:32px; }
.adv-help-request form { display:grid; gap:10px; }
.adv-help-request p { margin:0 0 12px; color:#4f6561; }
.adv-help-request [role="alert"] { color:#8f3434; }
.adv-help-request button { background:#08775e; color:#fff; border:0; border-radius:8px; padding:15px 24px; font:600 17px var(--adv-sans); cursor:pointer; }
@media (max-width:700px) { .adv-help-top { display:block; } .adv-help-other { grid-template-columns:1fr; gap:24px; } .adv-help-tabs button { padding:14px 10px; } .adv-help-request { padding:24px; } }

@media (max-width: 600px) {
    .adv-summary-head { align-items: stretch; flex-direction: column; }
    .adv-summary-dl { width: 100%; justify-content: center; }
    .adv-summary-scroll-hint { display: block; }
    .adv-login-layout { display: flex; }
    .adv-login-hero { display: contents; }
    .adv-login-brand { order: 0; margin: 76px 24px 0; padding: 0; }
    .adv-login-form-panel { order: 1; padding: 32px 24px 40px; }
    .adv-login-hero-copy { order: 2; padding: 24px 24px 0; }
    .adv-login-hero-title { overflow-wrap: anywhere; }
    .adv-login-trust { order: 3; padding: 24px 24px 40px; }
    .adv-help-header { min-height: 68px; padding: 10px 16px; flex-wrap: nowrap; }
    .adv-help-brand { min-width: 0; flex-wrap: nowrap; }
    .adv-help-brand > span:nth-child(n+3) { display: none; }
    .adv-help-header-actions { gap: 8px; flex-wrap: nowrap; }
    .adv-help-header .adv-menu-toggle { width: 40px; padding: 0; justify-content: center; }
    .adv-help-header .adv-menu-label { display: none; }
    .adv-help-back { display: none; }
}
@media (max-width: 1000px) {
    .adv-summary-scroll-hint { display: block; }
}
