/* ============================================================
   Kookaburra Health — Marketing v2 (report-themed)
   Design tokens lifted from accounts/templates/accounts/reports/
   quarterly_audit.html so the marketing skin matches what the
   buyer actually receives each quarter.
   ============================================================ */

:root {
    /* Surfaces */
    --bg:           #FAF7F2;   /* warm parchment */
    --paper:        #FFFFFF;   /* card surface */
    --paper-alt:    #F5EFE3;   /* shaded band */

    /* Ink */
    --ink:          #1A2A28;   /* deep eucalypt-black */
    --ink-soft:     #4A5A55;
    --ink-mute:     #7A8580;
    --ink-faint:    #B5AE9F;

    /* Rules */
    --rule:         #DDD3C2;   /* hairline cream */
    --rule-soft:    #EDE6D8;

    /* Semantic accents — match report exactly */
    --accent:       #C8634A;   /* terracotta — primary brand */
    --accent-deep:  #A4523C;
    --accent-tint:  #F4E4DE;

    --strong:       #5B7B5A;   /* eucalypt sage — strengths */
    --strong-tint:  #E4EBE2;
    --on-track:     #6B8AA0;   /* steel blue — on-track */
    --on-track-tint:#E3EAF0;
    --watch:        #B89642;   /* honey/mustard — watch */
    --watch-tint:   #F1E8D2;
    --action:       #B05050;   /* deep rose — action */
    --action-tint:  #F1DCDA;

    /* Type */
    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans:  'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Layout */
    --container-w: 1080px;
    --pad-x:       clamp(1.25rem, 4vw, 2rem);
    --pad-y:       clamp(3rem, 7vw, 6rem);
    --radius-sm:   6px;
    --radius:      10px;
    --radius-lg:   14px;

    /* Tabular figures helper for stats */
    --tnum: "tnum" 1, "lnum" 1;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-deep); }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
    font-family: var(--serif);
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.015em;
    line-height: 1.15;
    font-weight: 400;
}
p { margin: 0 0 1rem; }

.container {
    width: 100%;
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 var(--pad-x);
}

/* ---------- Eyebrow + section header ---------- */
.eyebrow {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent);
    display: inline-block;
    margin-bottom: 0.75rem;
}
.eyebrow-ink { color: var(--ink-soft); }

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 400;
    margin: 0 auto;
    max-width: 720px;
}
.section-header .section-sub {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: var(--ink-soft);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
    text-decoration: none;
}
.btn-lg { padding: 0.95rem 1.6rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-deep);
    border-color: var(--accent-deep);
    color: #fff;
}
.btn-secondary {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--ink);
}
.btn-secondary:hover {
    background: var(--ink);
    color: var(--paper);
}
.btn:disabled, .btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------- Site header ---------- */
.site-header-v2 {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 247, 242, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--rule);
}
.site-header-v2 .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink);
    text-decoration: none;
}
.site-brand:hover { color: var(--ink); }
.brand-mark {
    display: block;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
.brand-wordmark {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}
.site-nav {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}
.site-nav a {
    color: var(--ink-soft);
}
.site-nav a:hover { color: var(--accent); }
.site-nav-login {
    padding: 0.4rem 0.95rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--ink) !important;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.site-nav-login:hover {
    border-color: var(--accent);
    background: var(--accent-tint);
}

/* ---------- Hero ---------- */
.hero {
    padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem);
    text-align: center;
}
.hero-eyebrow-row {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.85rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 999px;
    margin-bottom: 1.25rem;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
}
.hero-eyebrow-row .pulse {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(200,99,74,.5);
    animation: pulse 2.5s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(200,99,74,.55); }
    70%  { box-shadow: 0 0 0 8px rgba(200,99,74,0); }
    100% { box-shadow: 0 0 0 0 rgba(200,99,74,0); }
}
.hero h1 {
    font-family: var(--serif);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 auto 1rem;
    max-width: 820px;
}
.hero h1 em {
    font-style: italic;
    font-weight: 300;
    color: var(--ink-soft);
}
.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--ink-soft);
    max-width: 620px;
    margin: 0 auto 1.75rem;
    line-height: 1.55;
}
.hero-actions {
    display: inline-flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ---------- "Latest post" pill (kept for parity) ---------- */
.latest-post {
    margin: 0.5rem auto 0;
    text-align: center;
    padding: 0 var(--pad-x);
}
.latest-post-card {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.95rem 0.5rem 0.55rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.85rem;
    font-weight: 500;
    transition: border-color .15s ease, color .15s ease;
}
.latest-post-card:hover {
    border-color: var(--accent);
    color: var(--ink);
}
.latest-pill {
    padding: 0.15rem 0.55rem;
    background: var(--accent-tint);
    color: var(--accent-deep);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}
.latest-arrow { color: var(--ink-mute); }

/* ====================================================
   Integrations marquee — restyled for paper theme,
   class names unchanged so home_v2.html can reuse the
   existing _integration_logos partial verbatim.
   ==================================================== */
.integrations {
    padding: clamp(1rem, 2vw, 1.5rem) 0 clamp(0.5rem, 1.5vw, 1rem);
    overflow: hidden;
}
.integrations-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ink-mute);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin: 0 0 1rem;
}
.integrations-marquee {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding: 4px var(--pad-x);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}
.integrations-track {
    display: flex;
    gap: 0.85rem;
    width: max-content;
    animation: marquee 35s linear infinite;
}
.integrations-track-reverse { animation: marquee-reverse 40s linear infinite; }
.integrations-marquee:hover .integrations-track { animation-play-state: paused; }
.integration-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem 0.45rem 0.6rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink-soft);
    white-space: nowrap;
    transition: border-color .2s ease, color .2s ease, transform .2s ease, background .2s ease;
}
.integration-item:hover {
    border-color: var(--accent);
    color: var(--ink);
    background: var(--paper-alt);
    transform: translateY(-2px);
}
.integration-item svg { width: 18px; height: 18px; flex-shrink: 0; }
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes marquee-reverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .integrations-track, .integrations-track-reverse { animation: none; }
}
.integrations-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.82rem;
}
.integrations-dot { color: var(--ink-faint); }
.integrations-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--ink-mute);
    transition: color .15s ease;
}
.integrations-links a:hover { color: var(--accent); }
.integrations-links svg { transition: transform .15s ease; }
.integrations-links a:hover svg { transform: translateX(2px); }

/* ---------- Problem line ---------- */
.problem-line {
    padding: clamp(2rem, 4vw, 3rem) 0;
    text-align: center;
}
.problem-line p {
    margin: 0 auto;
    font-family: var(--serif);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.25;
    max-width: 720px;
}
.problem-line .accent { color: var(--accent); font-style: italic; }

/* ---------- Performance feature sections ---------- */
.perf-section {
    padding: var(--pad-y) 0;
    border-top: 1px solid var(--rule);
}
.perf-section.perf-alt { background: var(--paper-alt); }
.perf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.perf-grid-reverse .perf-copy { order: 2; }
.perf-grid-reverse .perf-visual { order: 1; }
.perf-copy h2 {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 2.8vw, 2.1rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}
.perf-copy .perf-lead {
    font-family: var(--serif);
    font-size: 1.2rem;
    color: var(--ink);
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.35;
}
.perf-copy p {
    color: var(--ink-soft);
    line-height: 1.6;
}
.perf-visual {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(26,42,40,0.04), 0 14px 32px rgba(26,42,40,0.06);
}
@media (max-width: 780px) {
    .perf-grid { grid-template-columns: 1fr; }
    .perf-grid-reverse .perf-copy { order: 1; }
    .perf-grid-reverse .perf-visual { order: 2; }
}

/* ---------- What's in the report ---------- */
.report-contents {
    padding: var(--pad-y) 0;
    border-top: 1px solid var(--rule);
}
.report-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
@media (max-width: 880px) { .report-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .report-list { grid-template-columns: 1fr; } }
.report-list li {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.25rem 1.25rem 1.4rem;
    transition: border-color .15s ease, transform .15s ease;
}
.report-list li:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.report-list .tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--accent-tint);
    color: var(--accent-deep);
    margin-bottom: 0.75rem;
}
.report-list .tile-icon svg { width: 18px; height: 18px; }
.report-list h3 {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}
.report-list p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* ---------- Objections / FAQ ---------- */
.objections {
    padding: var(--pad-y) 0;
    background: var(--paper-alt);
    border-top: 1px solid var(--rule);
}
.objection-list {
    max-width: 760px;
    margin: 0 auto;
}
.objection {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 0;
    margin-bottom: 0.75rem;
    transition: border-color .15s ease;
}
.objection[open] { border-color: var(--accent); }
.objection summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--ink);
    position: relative;
    padding-right: 2.5rem;
}
.objection summary::-webkit-details-marker { display: none; }
.objection summary::after {
    content: "+";
    position: absolute;
    right: 1.25rem; top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-family: var(--sans);
    font-weight: 400;
    font-size: 1.25rem;
}
.objection[open] summary::after { content: "−"; }
.objection p, .objection ul {
    margin: 0 1.25rem 1.25rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.6;
}
.objection ul { padding-left: 1.1rem; }
.objection ul li { margin-bottom: 0.4rem; }

/* ---------- Pricing ---------- */
.pricing {
    padding: var(--pad-y) 0;
    border-top: 1px solid var(--rule);
}
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    max-width: 820px;
    margin: 0 auto;
}
@media (max-width: 720px) {
    .pricing-grid { grid-template-columns: 1fr; }
}
.pricing-card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
}
.pricing-card-featured {
    border-color: var(--accent);
    box-shadow: 0 1px 2px rgba(200,99,74,0.06), 0 18px 40px rgba(200,99,74,0.10);
}
.pricing-badge {
    position: absolute;
    top: -0.7rem;
    left: 1.5rem;
    padding: 0.25rem 0.7rem;
    background: var(--bg);
    color: var(--ink-mute);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    border: 1px solid var(--rule);
    border-radius: 999px;
}
.pricing-card-featured .pricing-badge {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-tint);
}
.pricing-price {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}
.pricing-price .price-now {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.025em;
    font-feature-settings: var(--tnum);
}
.pricing-price .price-unit {
    font-size: 0.9rem;
    color: var(--ink-mute);
}
.pricing-tagline {
    font-size: 0.95rem;
    color: var(--ink-soft);
    margin-bottom: 1.25rem;
}
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}
.pricing-features li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--rule-soft);
    font-size: 0.9rem;
    color: var(--ink-soft);
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}
.pricing-features li::before {
    content: "—";
    color: var(--accent);
    flex-shrink: 0;
}
.pricing-features li:last-child { border-bottom: 0; }
.pricing-features strong { color: var(--ink); font-weight: 600; }
.pricing-cta-form { margin-top: auto; }

/* ---------- Final CTA ---------- */
.final-cta {
    padding: var(--pad-y) 0;
    background: var(--ink);
    color: var(--paper);
    text-align: center;
}
.final-cta h2 {
    font-family: var(--serif);
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 400;
    color: var(--paper);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}
.final-cta p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}
.final-cta .btn-primary {
    background: var(--accent);
    border-color: var(--accent);
}
.final-cta .btn-primary:hover {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--paper);
}

/* ---------- Footer ---------- */
.site-footer-v2 {
    padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
    background: var(--paper-alt);
    border-top: 1px solid var(--rule);
    color: var(--ink-soft);
}
.site-footer-v2 .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
@media (max-width: 760px) {
    .site-footer-v2 .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .site-footer-v2 .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.footer-brand .brand-mark { width: 40px; height: 40px; }
.footer-name {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 0.3rem;
}
.footer-tagline {
    font-size: 0.85rem;
    color: var(--ink-mute);
    margin: 0;
    line-height: 1.5;
}
.footer-col h4 {
    font-family: var(--sans);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-mute);
    font-weight: 700;
    margin-bottom: 0.6rem;
}
.footer-col ul {
    list-style: none;
    padding: 0; margin: 0;
}
.footer-col li { margin-bottom: 0.35rem; }
.footer-col a {
    color: var(--ink-soft);
    font-size: 0.9rem;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
    font-size: 0.8rem;
    color: var(--ink-mute);
    text-align: center;
}

/* ====================================================
   Sample-request lead-capture page (/v2/sample/)
   ==================================================== */
.sample-form-section {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5.5rem);
}
.sample-form-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
    max-width: 980px;
    margin: 0 auto;
}
@media (max-width: 820px) {
    .sample-form-wrap { grid-template-columns: 1fr; }
}
.sample-form-copy h1 {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0.25rem 0 1rem;
}
.sample-form-lede {
    font-size: 1.1rem;
    color: var(--ink-soft);
    line-height: 1.55;
    margin-bottom: 1.5rem;
}
.sample-form-meta {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--rule);
}
.sample-form-meta li {
    padding: 0.7rem 0 0.7rem 1.5rem;
    border-bottom: 1px solid var(--rule);
    font-size: 0.95rem;
    color: var(--ink-soft);
    position: relative;
}
.sample-form-meta li::before {
    content: "";
    position: absolute;
    left: 0; top: 1.1rem;
    width: 14px; height: 1px;
    background: var(--accent);
}

.sample-form-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2rem);
    box-shadow: 0 1px 2px rgba(26,42,40,0.04), 0 14px 32px rgba(26,42,40,0.06);
}
.form-row {
    margin-bottom: 1.1rem;
}
.form-row label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ink-mute);
    margin-bottom: 0.4rem;
}
.form-row input[type="email"],
.form-row input[type="text"],
.form-row input[type="tel"] {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--ink);
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.form-row input:focus {
    outline: 0;
    border-color: var(--accent);
    background: var(--paper);
    box-shadow: 0 0 0 3px rgba(200,99,74,0.12);
}
.field-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--ink-mute);
}
.field-error,
.form-errors {
    margin-top: 0.35rem;
    padding: 0.45rem 0.7rem;
    background: var(--action-tint);
    border-left: 3px solid var(--action);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.85rem;
    color: var(--action);
    font-weight: 500;
}
.form-fineprint {
    margin: 0.9rem 0 0;
    font-size: 0.8rem;
    color: var(--ink-mute);
    line-height: 1.5;
}

/* ====================================================
   Long-form legal pages (privacy, terms, data handling)
   ==================================================== */
.container-narrow { max-width: 760px; }
.legal { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.legal-header {
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--rule);
}
.legal-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 0.5rem;
}
.legal-header h1 {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0 0 0.5rem;
}
.legal-meta {
    font-size: 0.85rem;
    color: var(--ink-mute);
    margin: 0;
    font-feature-settings: var(--tnum);
}
.legal-lead-context {
    margin-top: 1rem;
    font-family: var(--serif);
    font-size: 1.05rem;
    color: var(--ink-soft);
    font-style: italic;
    line-height: 1.55;
}
.legal-toc {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
}
.legal-toc-label {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ink-mute);
    margin: 0 0 0.6rem;
}
.legal-toc ol {
    margin: 0;
    padding-left: 1.25rem;
    columns: 2;
    column-gap: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.7;
}
@media (max-width: 680px) {
    .legal-toc ol { columns: 1; }
}
.legal-toc a { color: var(--ink-soft); }
.legal-toc a:hover { color: var(--accent); }

.legal-body {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink-soft);
}
.legal-body .lead {
    font-family: var(--serif);
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--ink);
    margin: 0 0 1.5rem;
}
.legal-body h2 {
    font-family: var(--serif);
    font-size: clamp(1.4rem, 2.2vw, 1.7rem);
    font-weight: 400;
    color: var(--ink);
    margin: 2.5rem 0 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rule);
    letter-spacing: -0.015em;
}
.legal-body h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.legal-body h3 {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--ink);
    margin: 1.5rem 0 0.5rem;
    letter-spacing: -0.005em;
}
.legal-body p { margin: 0 0 1rem; }
.legal-body ul, .legal-body ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.legal-body li { margin-bottom: 0.4rem; }
.legal-body strong { color: var(--ink); font-weight: 600; }
.legal-body em { color: var(--ink); }
.legal-body a {
    color: var(--accent);
    border-bottom: 1px dotted var(--accent);
}
.legal-body a:hover {
    color: var(--accent-deep);
    border-bottom-color: var(--accent-deep);
}
.legal-body code {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    background: var(--rule-soft);
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
}
.legal-footer-link {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
    font-size: 0.9rem;
    color: var(--ink-mute);
}

/* ====================================================
   Buy continue (Stripe checkout auto-submit page)
   ==================================================== */
.buy-continue { padding: clamp(4rem, 10vw, 7rem) 0; }
.buy-continue-card {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: 0 1px 2px rgba(26,42,40,0.04), 0 14px 32px rgba(26,42,40,0.06);
}
.buy-continue-card h1 {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
}
.buy-continue-card p {
    color: var(--ink-soft);
    margin-bottom: 1.5rem;
}

/* ====================================================
   Auth pages (login, signup, password reset)
   ==================================================== */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem) var(--pad-x);
}
.auth-card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: 0 1px 2px rgba(26,42,40,0.04), 0 18px 40px rgba(26,42,40,0.06);
}
.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}
.auth-logo {
    display: inline-block;
    margin-bottom: 0.75rem;
}
.auth-logo img {
    display: block;
    width: 56px;
    height: 56px;
}
.auth-header h1 {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin: 0 0 0.3rem;
    line-height: 1.2;
}
.auth-subtitle {
    color: var(--ink-mute);
    font-size: 0.95rem;
    margin: 0;
}

.auth-messages { margin-bottom: 1.25rem; }
.alert {
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.alert-success { background: var(--strong-tint);   border-left-color: var(--strong);   color: var(--strong); }
.alert-info,
.alert-warning { background: var(--watch-tint);    border-left-color: var(--watch);    color: #8E7332; }
.alert-error,
.alert-danger  { background: var(--action-tint);   border-left-color: var(--action);   color: var(--action); }

.auth-form .form-group { margin-bottom: 1.1rem; }
.auth-form label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ink-mute);
    margin-bottom: 0.4rem;
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form input[type="tel"] {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--ink);
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.auth-form input:focus {
    outline: 0;
    border-color: var(--accent);
    background: var(--paper);
    box-shadow: 0 0 0 3px rgba(200,99,74,0.12);
}
.auth-form input::placeholder { color: var(--ink-faint); }
.auth-form .form-help {
    font-size: 0.8rem;
    color: var(--ink-mute);
    margin: 0.35rem 0 0;
}
.auth-form .form-error {
    margin: 0.35rem 0 0;
    padding: 0.35rem 0.55rem;
    background: var(--action-tint);
    border-left: 3px solid var(--action);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.8rem;
    color: var(--action);
    font-weight: 500;
}
.auth-form .btn-submit { width: 100%; margin-top: 0.5rem; }

.auth-form .consent-row { margin-top: 0.25rem; margin-bottom: 1rem; }
.auth-form .consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--ink-soft);
    line-height: 1.5;
    font-weight: 400;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: 0;
}
.auth-form .consent-label input[type="checkbox"] {
    width: auto;
    margin: 0.15rem 0 0;
    padding: 0;
    flex-shrink: 0;
    accent-color: var(--accent);
    cursor: pointer;
}
.auth-form .consent-label a {
    color: var(--ink);
    border-bottom: 1px dotted var(--ink-mute);
}
.auth-form .consent-label a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
}
.auth-footer p {
    font-size: 0.9rem;
    color: var(--ink-mute);
    margin: 0;
}
.auth-footer a { color: var(--accent); font-weight: 600; }
.auth-footer a:hover { color: var(--accent-deep); }
.auth-link {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--ink-mute);
    margin-top: 0.8rem;
}
.auth-link:hover { color: var(--accent); }

/* ====================================================
   Dashboard chrome (nav + main area + cards)
   ==================================================== */
.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}
.dashboard-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--rule);
    padding: 0.7rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}
.dashboard-nav-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.dashboard-logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1rem;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.dashboard-logo img { display: block; flex-shrink: 0; }
.dashboard-nav-links {
    display: flex;
    gap: 0.25rem;
    flex: 1;
}
.dashboard-nav-links a {
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-mute);
    border-radius: 999px;
    transition: color .15s ease, background .15s ease;
    text-decoration: none;
}
.dashboard-nav-links a:hover {
    color: var(--ink);
    background: var(--rule-soft);
}
.dashboard-nav-links a.active {
    color: var(--accent);
    background: var(--accent-tint);
}
.dashboard-nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
}
.user-email { color: var(--ink-mute); font-feature-settings: var(--tnum); }
.logout-link { color: var(--ink-mute); }
.logout-link:hover { color: var(--accent); }

.dashboard-main {
    flex: 1;
    padding: 2.25rem 0 3.5rem;
}
.dashboard-messages { margin-bottom: 1.5rem; }

.dashboard-header {
    margin-bottom: 2rem;
}
.dashboard-header h1 {
    font-family: var(--serif);
    font-size: clamp(1.75rem, 3vw, 2.2rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin: 0 0 0.4rem;
}
.dashboard-header p {
    color: var(--ink-soft);
    font-size: 1rem;
    margin: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}
.dashboard-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.5rem 1.75rem;
}
.dashboard-card h3 {
    font-family: var(--sans);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ink-mute);
    margin: 0 0 1rem;
}
.card-status {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--ink);
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-dot.success { background: var(--strong); }
.status-dot.warning { background: var(--watch); }
.status-dot.error   { background: var(--action); }
.status-dot.muted   { background: var(--ink-faint); }
.card-action { margin-top: 1rem; }
.card-meta {
    margin-top: 0.6rem;
    font-size: 0.875rem;
    color: var(--ink-mute);
    line-height: 1.45;
}

@media (max-width: 760px) {
    .dashboard-nav-inner {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .dashboard-nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    .dashboard-nav-user { margin-left: auto; }
}

/* btn-sm for dashboard secondary actions */
.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.85rem; }

/* ====================================================
   Legacy v1 token aliases — safety net so any per-page
   inline <style> blocks that still reference old token
   names render in v2 paper colours instead of breaking.
   New code should use the canonical v2 names directly.
   ==================================================== */
:root {
    --ink-muted:        var(--ink-mute);
    --border:           var(--rule);
    --border-soft:      var(--rule-soft);
    --surface:          var(--paper-alt);
    --surface-card:     var(--paper);
    --surface-elevated: var(--paper-alt);
    --accent-soft:      var(--accent-tint);
    --font-display:     var(--serif);
}

/* ====================================================
   Consolidated dashboard — status strip + accordions
   ==================================================== */
.dash-standalone { max-width: 760px; }
.dashboard-header-tight { margin-bottom: 1.25rem; }
.dashboard-header-tight h1 { margin-bottom: 0.2rem; }
.dashboard-header-tight p { font-size: 0.95rem; }

/* At-a-glance status strip */
.status-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--ink-soft);
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}
.status-chip:hover { border-color: var(--accent); background: var(--paper-alt); }
.status-chip-label {
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ink-mute);
}
.status-chip-value { color: var(--ink); font-weight: 500; }

/* Accordion section (native <details>) */
.dash-section {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
}
.dash-section > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    user-select: none;
}
.dash-section > summary::-webkit-details-marker { display: none; }
.dash-section-title {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.dash-section-status {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}
.dash-chevron { color: var(--ink-mute); transition: transform .2s ease; flex-shrink: 0; }
.dash-section[open] > summary .dash-chevron { transform: rotate(180deg); }
.dash-section-body {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--rule-soft);
    padding-top: 1.25rem;
}

/* Pills used in section summaries */
.pill {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}
.pill-success { background: var(--strong-tint); color: var(--strong); }
.pill-error   { background: var(--action-tint); color: var(--action); }
.pill-muted   { background: var(--rule-soft);   color: var(--ink-mute); }

/* ── PMS connection status banner + form ── */
.api-key-status {
    display: flex;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
}
.api-key-status.success { background: var(--strong-tint); border: 1px solid var(--strong); }
.api-key-status.success .status-icon { color: var(--strong); }
.api-key-status.error { background: var(--action-tint); border: 1px solid var(--action); }
.api-key-status.error .status-icon { color: var(--action); }
.status-icon { flex-shrink: 0; }
.status-content strong { display: block; margin-bottom: 0.15rem; color: var(--ink); }
.status-content p { margin: 0; font-size: 0.85rem; color: var(--ink-mute); }

.api-key-form .form-group { margin-bottom: 1.1rem; }
.api-key-form label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ink-mute);
    margin-bottom: 0.4rem;
}
.api-key-form input,
.api-key-form select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-size: 1rem;
    font-family: var(--sans);
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    color: var(--ink);
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.api-key-form input:focus,
.api-key-form select:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--paper);
    box-shadow: 0 0 0 3px rgba(200,99,74,0.12);
}
.form-help { font-size: 0.8rem; color: var(--ink-mute); margin-top: 0.35rem; line-height: 1.45; }
.security-note {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.95rem;
    background: var(--on-track-tint);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--on-track);
    margin-bottom: 1.25rem;
}
.security-note svg { flex-shrink: 0; }
.next-hint {
    background: var(--accent-tint);
    border: 1px solid rgba(200,99,74,0.2);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.95rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 0 0 1.25rem;
}
.next-hint strong { color: var(--accent); }
.form-error { color: var(--action); font-size: 0.8rem; margin: 0.35rem 0 0; font-weight: 500; }
.legal-link { margin: 1rem 0 0; font-size: 0.75rem; color: var(--ink-mute); line-height: 1.45; }
.legal-link a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.legal-link a:hover { color: var(--accent); }
.consent-row { margin: 0 0 1.1rem; }
.api-key-form .consent-label,
.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--ink-soft);
    line-height: 1.5;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
}
.consent-label input[type="checkbox"] {
    width: auto; margin: 0.15rem 0 0; padding: 0; flex-shrink: 0;
    accent-color: var(--accent); cursor: pointer;
}

/* ── Disconnect PMS control (destructive, understated) ── */
.disconnect-form { margin: 0; }
.btn-disconnect {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    color: var(--action);
    background: var(--paper);
    border: 1px solid var(--action);
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.btn-disconnect:hover { background: var(--action); color: #fff; }
.disconnect-note { margin: 0.6rem 0 0; font-size: 0.8rem; color: var(--ink-mute); }

/* ── Billing: active-subscription card + plans grid ── */
.billing-card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.5rem; }
.billing-card.error { border-color: var(--action); }
.billing-plan { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--rule); }
.plan-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.plan-header h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; margin: 0; }
.plan-badge {
    background: var(--accent); color: #fff;
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 0.25rem 0.55rem; border-radius: 999px;
}
.plan-badge-neutral { background: var(--paper-alt); color: var(--ink-mute); border: 1px solid var(--rule); }
.upgrade-form { margin: 0 0 0.75rem; }
.plan-price { display: flex; align-items: baseline; gap: 0.5rem; }
.price-amount { font-family: var(--serif); font-size: 2rem; font-weight: 400; letter-spacing: -0.02em; }
.price-period { color: var(--ink-mute); font-size: 0.9rem; }
.billing-details { margin-bottom: 1.25rem; }
.detail-row { display: flex; justify-content: space-between; padding: 0.65rem 0; border-bottom: 1px solid var(--rule-soft); }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--ink-mute); font-size: 0.9rem; }
.detail-value { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.billing-actions { }
.billing-note { margin-top: 0.7rem; font-size: 0.82rem; color: var(--ink-mute); }
.billing-alert {
    display: flex; align-items: flex-start; gap: 0.875rem;
    padding: 1rem 1.1rem; background: var(--watch-tint); border: 1px solid var(--watch);
    border-radius: var(--radius-sm); margin-bottom: 1.25rem;
}
.billing-alert svg { flex-shrink: 0; color: var(--action); margin-top: 2px; }
.billing-alert.warning { background: var(--watch-tint); border-color: var(--watch); }
.billing-alert.warning svg { color: #8E7332; }
.billing-alert div { flex: 1; }
.billing-alert strong { display: block; margin-bottom: 0.25rem; color: var(--ink); }
.billing-alert p { margin: 0; font-size: 0.85rem; color: var(--ink-mute); }
.billing-alert a { color: var(--accent); font-weight: 600; }
.no-sub-intro { margin-bottom: 1.25rem; }
.no-sub-intro h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; margin: 0 0 0.3rem; }
.no-sub-intro p { margin: 0; color: var(--ink-mute); font-size: 0.9rem; }
.plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
@media (max-width: 720px) { .plans-grid { grid-template-columns: 1fr; } }
.plan-card {
    background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
    padding: 1.5rem; display: flex; flex-direction: column;
}
.plan-card-featured { border: 2px solid var(--accent); box-shadow: 0 8px 24px rgba(200,99,74,0.12); position: relative; }
.plan-card-badge {
    align-self: flex-start; background: var(--paper-alt); border: 1px solid var(--rule); color: var(--ink-mute);
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 0.25rem 0.625rem; border-radius: 999px; margin-bottom: 1rem;
}
.plan-card-badge-featured { background: var(--accent); color: #fff; border-color: var(--accent); }
.plan-card-price { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.5rem; }
.plan-card-amount { font-family: var(--serif); font-size: 2rem; font-weight: 400; letter-spacing: -0.02em; }
.plan-card-unit { color: var(--ink-mute); font-size: 0.875rem; }
.plan-card-tagline { color: var(--ink-mute); font-size: 0.875rem; margin: 0 0 1rem; }
.plan-card-features { list-style: none; padding: 0; margin: 0 0 1.5rem; flex: 1; }
.plan-card-features li { padding: 0.35rem 0 0.35rem 1.25rem; position: relative; color: var(--ink-soft); font-size: 0.85rem; }
.plan-card-features li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 600; }
.plans-footnote { color: var(--ink-mute); font-size: 0.75rem; margin: 0; }
.plans-footnote a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.plans-footnote a:hover { color: var(--accent); }

/* ── Reports list ── */
.reports-list { display: flex; flex-direction: column; gap: 0.6rem; }
.report-row {
    display: flex; align-items: center; gap: 1rem;
    background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
}
.report-row-icon {
    width: 38px; height: 38px; background: var(--accent-tint); color: var(--accent-deep);
    border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.report-row-meta { flex: 1; min-width: 0; }
.report-row-meta h3 { margin: 0 0 0.1rem; font-size: 0.95rem; color: var(--ink); display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--serif); font-weight: 500; }
.report-pill {
    display: inline-block; background: var(--paper-alt); color: var(--ink-mute); border: 1px solid var(--rule);
    font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 0.125rem 0.5rem; border-radius: 999px;
}
.report-row-sub { margin: 0; color: var(--ink-mute); font-size: 0.8rem; }
.reports-empty {
    text-align: center; background: var(--paper); border: 1px dashed var(--rule); border-radius: var(--radius);
    padding: 2.5rem 1.5rem; color: var(--ink-mute);
}
.reports-empty svg { margin-bottom: 1rem; }
.reports-empty h3 { margin: 0 0 0.5rem; font-family: var(--serif); font-size: 1.1rem; font-weight: 500; color: var(--ink); }
.reports-empty p { margin: 0 auto; max-width: 420px; font-size: 0.875rem; }
.reports-empty-meta { margin-top: 0.75rem !important; font-size: 0.8rem !important; color: var(--ink-faint) !important; }

/* ====================================================
   Live score (dashboard Reports section)
   ==================================================== */
.live-score {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--rule);
}
.ls-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.ls-title {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    margin: 0.1rem 0 0;
}
.ls-sample-badge {
    flex-shrink: 0;
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--watch);
    background: var(--watch-tint);
    border: 1px solid var(--watch);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

.ls-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--paper-alt);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}
.ls-hero-score { flex-shrink: 0; }
.ls-hero-value {
    display: block;
    font-family: var(--serif);
    font-size: 3.25rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ink);
    font-feature-settings: var(--tnum);
}
.ls-hero-suffix { font-size: 1.4rem; color: var(--ink-mute); font-weight: 300; }
.ls-hero-delta { display: block; margin-top: 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--ink-mute); }
.ls-hero-delta.up { color: var(--strong); }
.ls-hero-delta.down { color: var(--action); }
.ls-hero-label { border-left: 1px solid var(--rule); padding-left: 1.5rem; }
.ls-hero-label strong { font-family: var(--serif); font-size: 1.05rem; font-weight: 500; color: var(--ink); }
.ls-hero-label p { margin: 0.3rem 0 0; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 560px) {
    .ls-hero { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .ls-hero-label { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1rem; }
}

.ls-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}
@media (max-width: 900px) { .ls-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .ls-grid { grid-template-columns: 1fr; } }
.ls-tile {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-left-width: 3px;
    border-radius: var(--radius-sm);
    padding: 0.85rem 0.95rem 0.9rem;
}
.ls-tile.ls-strong   { border-left-color: var(--strong); }
.ls-tile.ls-on-track { border-left-color: var(--on-track); }
.ls-tile.ls-watch    { border-left-color: var(--watch); }
.ls-tile.ls-action   { border-left-color: var(--action); }
.ls-tile-label {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ink-mute);
    line-height: 1.3;
    min-height: 1.7em;
}
.ls-tile-value {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0.3rem 0 0.5rem;
    font-feature-settings: var(--tnum);
}
.ls-tile-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}
.ls-pill {
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: var(--rule-soft);
    color: var(--ink-soft);
    white-space: nowrap;
}
.ls-strong   .ls-pill { background: var(--strong-tint);   color: var(--strong); }
.ls-on-track .ls-pill { background: var(--on-track-tint); color: var(--on-track); }
.ls-watch    .ls-pill { background: var(--watch-tint);    color: #8E7332; }
.ls-action   .ls-pill { background: var(--action-tint);   color: var(--action); }
.ls-delta { font-size: 0.72rem; font-weight: 600; color: var(--ink-mute); font-feature-settings: var(--tnum); white-space: nowrap; }
.ls-delta.up { color: var(--strong); }
.ls-delta.down { color: var(--action); }
.ls-tile-hint { font-size: 0.72rem; color: var(--ink-mute); line-height: 1.35; }
.ls-note {
    margin: 1rem 0 0;
    padding: 0.7rem 0.95rem;
    background: var(--watch-tint);
    border-left: 3px solid var(--watch);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.85rem;
    color: var(--ink-soft);
    line-height: 1.5;
}
.ls-note a { color: var(--accent); font-weight: 600; }

/* Insufficient-data tile + real-data footer */
.ls-tile.ls-empty { border-left-color: var(--rule); opacity: 0.75; }
.ls-tile.ls-empty .ls-tile-value { color: var(--ink-mute); }
.ls-pill-empty { background: var(--rule-soft); color: var(--ink-mute); }
.ls-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--rule-soft);
}
.ls-synced { font-size: 0.8rem; color: var(--ink-mute); }
.ls-refresh-form { margin: 0; }

/* ── Data chat — full-page Claude-style layout ───────────────────────── */
/* The chat page fills the viewport below the dashboard nav (footer hidden). */
body.chat-page { overflow: hidden; }
.chat-page .dashboard { height: 100vh; display: flex; flex-direction: column; }
.chat-page .dashboard-main { flex: 1; min-height: 0; padding: 0; }
.chat-page .dashboard-main > .container {
    max-width: none; width: 100%; height: 100%;
    margin: 0; padding: 0;
    display: flex; flex-direction: column;
}

/* Centred card for the gated (upsell / connect) states. */
.chat-gate { max-width: 640px; margin: 3rem auto; padding: 0 1.5rem; }

/* Two-pane shell: Recents sidebar + chat. */
.chat-shell { flex: 1; min-height: 0; display: flex; }

.chat-sidebar {
    width: 260px; flex-shrink: 0;
    display: flex; flex-direction: column; gap: 1rem;
    padding: 1rem 0.75rem;
    background: var(--paper-alt);
    border-right: 1px solid var(--rule);
    min-height: 0;
}
.chat-new-btn {
    display: block;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink); font-weight: 600; font-size: 0.9rem;
    transition: border-color .15s ease, color .15s ease;
}
.chat-new-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.chat-recents { display: flex; flex-direction: column; min-height: 0; }
.chat-recents-head {
    padding: 0 0.35rem 0.45rem;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--ink-mute);
}
.chat-recent-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; }
.chat-recent {
    display: block;
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-sm);
    color: var(--ink); font-size: 0.88rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-recent:hover { background: var(--paper); }
.chat-recent.active { background: var(--paper); color: var(--accent-deep); font-weight: 600; }

.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }

.chat-log {
    flex: 1; min-height: 0; overflow-y: auto;
    display: flex; flex-direction: column; gap: 0.9rem;
    padding: 1.6rem;
}
.chat-msg { display: flex; width: 100%; max-width: 768px; margin: 0 auto; }
.chat-msg-user { justify-content: flex-end; }
.chat-msg-assistant { justify-content: flex-start; }
.chat-bubble {
    max-width: 80%;
    padding: 0.7rem 0.95rem;
    border-radius: var(--radius);
    line-height: 1.55;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.chat-msg-user .chat-bubble {
    background: var(--accent); color: var(--paper);
    border-bottom-right-radius: var(--radius-sm);
}
.chat-msg-assistant .chat-bubble {
    background: var(--paper-alt); color: var(--ink);
    border-bottom-left-radius: var(--radius-sm);
    white-space: normal;          /* rendered Markdown handles its own spacing */
}
/* Rendered-Markdown styling inside assistant bubbles. */
.chat-msg-assistant .chat-bubble > :first-child { margin-top: 0; }
.chat-msg-assistant .chat-bubble > :last-child { margin-bottom: 0; }
.chat-bubble h3, .chat-bubble h4, .chat-bubble h5, .chat-bubble h6 {
    font-family: var(--serif); line-height: 1.25; margin: 0.7rem 0 0.35rem;
}
.chat-bubble h3 { font-size: 1.05rem; }
.chat-bubble h4 { font-size: 0.98rem; }
.chat-bubble h5, .chat-bubble h6 { font-size: 0.92rem; }
.chat-bubble p { margin: 0.5rem 0; }
.chat-bubble ul, .chat-bubble ol { margin: 0.45rem 0; padding-left: 1.3rem; }
.chat-bubble li { margin: 0.15rem 0; }
.chat-bubble li > ul, .chat-bubble li > ol { margin: 0.15rem 0; }
.chat-bubble code {
    background: rgba(0, 0, 0, 0.06); padding: 0.05rem 0.32rem;
    border-radius: 4px; font-size: 0.88em;
}
.chat-bubble hr { border: none; border-top: 1px solid var(--rule); margin: 0.75rem 0; }
.chat-bubble a { color: var(--accent-deep); text-decoration: underline; }
.chat-bubble table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.55rem 0;
    font-size: 0.88rem;
    display: block;
    overflow-x: auto;          /* horizontal scroll on narrow bubbles */
}
.chat-bubble th, .chat-bubble td {
    border: 1px solid var(--rule);
    padding: 0.35rem 0.6rem;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}
.chat-bubble th { background: var(--paper); font-weight: 700; }
.chat-thinking { color: var(--ink-mute); }
.chat-dots {
    display: inline-block;
    min-width: 1.8em;          /* reserve room for "..." so the bubble doesn't jump */
    text-align: left;
    font-size: 1.4rem; line-height: 1; letter-spacing: 2px;
    color: var(--ink-mute);
}
.chat-empty { color: var(--ink-mute); margin: auto; max-width: 620px; text-align: center; }
.chat-empty-title { font-family: var(--serif); color: var(--ink); margin: 0 0 0.4rem; }
.chat-empty > p { margin: 0 0 1.25rem; }
.chat-suggestion-groups {
    display: flex; flex-direction: column; gap: 1rem;
    text-align: left; max-width: 640px; margin: 0 auto;
}
.chat-suggestion-group { display: flex; flex-direction: column; gap: 0.45rem; }
.chat-suggestion-cat {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--accent-deep);
}
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chat-suggestion {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem; color: var(--ink);
    transition: border-color .15s ease, background .15s ease;
}
.chat-suggestion:hover { border-color: var(--accent); background: var(--accent-tint); }

.chat-input {
    display: flex; gap: 0.6rem; align-items: flex-end;
    width: 100%; max-width: 768px; margin: 0 auto; box-sizing: border-box;
    padding: 0.4rem 1.6rem 0;
}
.chat-input textarea {
    flex: 1; resize: none;
    font-family: var(--sans); font-size: 0.95rem; line-height: 1.5;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--paper); color: var(--ink);
    max-height: 160px;
}
.chat-input textarea:focus { outline: none; border-color: var(--accent); }
.chat-input .btn { white-space: nowrap; min-width: 4.5rem; }
.chat-input .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-disclaimer {
    width: 100%; max-width: 768px; margin: 0 auto; box-sizing: border-box;
    padding: 0.5rem 1.6rem 0.9rem;
    font-size: 0.78rem; color: var(--ink-mute); text-align: center;
}

@media (max-width: 640px) {
    .chat-sidebar { width: 168px; }
    .chat-log, .chat-input, .chat-disclaimer { padding-left: 1rem; padding-right: 1rem; }
}

/* ── Patient-level (Practice+) add-on price on the data-tier screen ───── */
.addon-price { display: flex; align-items: baseline; gap: 0.3rem; margin: 0.4rem 0 0.9rem; }
.addon-amount { font-family: var(--serif); font-size: 2rem; color: var(--ink); }
.addon-period { color: var(--ink-mute); }
