/* ─────────────────────────────────────────────────────────────────────────
   TL-360 prototype — clean, neutral, unbranded.
   One restrained accent, generous spacing, standard Bootstrap components.
   No bespoke design system; this is intentionally professional-but-plain so it
   reads as "substantially built, awaiting branding", not "early sketch".
   ───────────────────────────────────────────────────────────────────────── */

/* Self-hosted display + mono faces (Technical Editorial system) */
@font-face { font-family: "Archivo Variable"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("/fonts/archivo-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono Variable"; font-weight: 100 800; font-style: normal; font-display: swap; src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); }

:root {
    /* Critical 360 — Technical Editorial */
    --accent: #9ccc1f;          /* brand lime (sharpened) */
    --accent-bright: #c9e14b;   /* bright lime */
    --accent-dark: #7ea614;     /* darker lime for hover */
    --accent-ink: #4c6a0d;      /* readable lime-green for text/links on white */
    --ink: #0b120d;             /* near-black green — body text */
    --surface-dark: rgb(35, 40, 34); /* soft brand grey-green — dark surfaces */
    --muted: #5a6657;           /* muted green-grey */
    --line: #e4e7de;            /* border grey (light) */
    --bg: #ffffff;              /* crisp light ground */
    --bg-2: #f5f7f2;            /* subtle light panel */
    --banner: #b45309;          /* demo ribbon amber */
    --font-display: "Archivo Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, monospace;

    --bs-border-radius: 3px;
    --bs-border-radius-sm: 2px;
    --bs-border-radius-lg: 4px;
}

/* Mono micro-label — technical-editorial signature */
.mono-label {
    font-family: var(--font-mono);
    font-size: .7rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
    color: var(--accent-ink);
}
.mono-label--dark { color: var(--accent-bright); }
.mono-num { font-family: var(--font-mono); font-weight: 500; letter-spacing: .03em; }
/* Square green brand marker */
.brand-dot { display: inline-block; width: .26em; height: .26em; background: var(--accent); margin-left: .1em; vertical-align: baseline; }

html, body {
    font-family: var(--font-display);
    color: var(--ink);
    background: var(--bg);
    font-size: 15px;
}

a, .btn-link { color: var(--accent-ink); }
a:hover { color: var(--accent-dark); }

/* Brand lime primary buttons with dark-green ink for legibility. */
.btn-primary {
    color: var(--ink);
    background-color: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
}
.btn-primary:hover { color: var(--ink); background-color: var(--accent-dark); border-color: var(--accent-dark); }
.btn-outline-secondary { color: var(--ink); border-color: var(--line); }
.btn-outline-secondary:hover { background: var(--surface-dark); border-color: var(--surface-dark); color: #fff; }
.btn-success { background-color: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.btn-success:hover { background-color: var(--accent-dark); border-color: var(--accent-dark); color: var(--ink); }
::selection { background: var(--accent-bright); color: var(--ink); }

h1 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; letter-spacing: -0.015em; }
h2 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
h1:focus, h2:focus { outline: none; }

/* ── Demo ribbon (only shown when DemoMode is on) ─────────────────────── */
.demo-ribbon {
    background: #eef4e0;
    color: var(--accent-ink, #4f6b0f);
    text-align: center;
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-weight: 700;
    padding: .3rem .75rem;
    border-bottom: 1px solid #dbe6c4;
}

/* ── Demo controls strip ──────────────────────────────────────────────── */
.demo-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    background: var(--surface-dark);
    color: #cfd6de;
    padding: .35rem .75rem;
    font-size: .78rem;
}
.demo-controls__label { font-weight: 700; color: #fff; margin-right: .3rem; text-transform: uppercase; letter-spacing: .04em; font-size: .68rem; }
.demo-controls__group { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .3rem; }
.demo-controls__hint { color: #93a08c; }
.demo-controls__spacer { flex: 1 1 auto; }
.demo-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    background: rgba(255,255,255,.07); color: #e6ebf1; text-decoration: none;
    border: 1px solid rgba(255,255,255,.16); border-radius: 3px;
    padding: .12rem .6rem; font-size: .75rem; cursor: pointer;
}
.demo-chip:hover { background: rgba(255,255,255,.14); color: #fff; }
.demo-chip--active { background: var(--accent); border-color: var(--accent-dark); color: var(--ink); font-weight: 600; }
.demo-chip__role { color: #9fb096; font-size: .68rem; }
.demo-chip--active .demo-chip__role { color: #33420f; }
.demo-chip--reset { background: #5b1d1d; border-color: #7a2626; color: #ffd9d9; }
.demo-chip--reset:hover { background: #7a2626; color: #fff; }

/* ── Layout ───────────────────────────────────────────────────────────── */
.page { display: flex; min-height: calc(100vh - 66px); }
.sidebar {
    width: 240px; flex-shrink: 0;
    background: var(--surface-dark);
}
main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.content { flex: 1 1 auto; max-width: 1180px; width: 100%; }
.app-footer { color: #cdd6c8; font-size: .78rem; padding-top: 1.75rem; padding-bottom: 1.5rem; margin-top: 2.5rem; background: var(--surface-dark); }
.app-footer a { color: var(--accent-bright); }
.app-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 1.5rem; max-width: 1180px; }
.app-footer__logo { height: 22px; width: auto; margin-bottom: .6rem; }
.app-footer__product { font-weight: 800; font-size: 1.2rem; color: #fff; margin-bottom: .5rem; }
.app-footer__product::after { content: ""; display: inline-block; width: 5px; height: 5px; background: var(--accent); margin-left: 4px; vertical-align: baseline; }
.app-footer__tag { color: var(--accent-bright); font-size: .72rem; letter-spacing: .02em; margin-bottom: .5rem; }
.app-footer__h { color: #fff; font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.app-footer__col { line-height: 1.7; }
.app-footer__legal { max-width: 1180px; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.1); color: #8fa08a; font-size: .7rem; line-height: 1.6; }
@media (max-width: 800px) { .app-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .app-footer__grid { grid-template-columns: 1fr; } }

/* Hide the mobile hamburger toggle on desktop (sidebar is always visible). */
.navbar-toggler { display: none; }
@media (max-width: 640.98px) {
    .page { flex-direction: column; }
    .sidebar { width: 100%; }
    /* Real, working hamburger: collapses the nav on phones, expands on tap. */
    .navbar-toggler {
        display: block; appearance: none; -webkit-appearance: none; cursor: pointer;
        width: 44px; height: 40px; margin: .5rem .75rem; border: 1px solid rgba(255,255,255,.22);
        border-radius: 6px; background: transparent; position: relative;
    }
    .navbar-toggler::before {
        content: "☰"; color: #fff; font-size: 1.3rem;
        position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    }
    .navbar-toggler:checked::before { content: "✕"; font-size: 1.05rem; }
    .navbar-toggler:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .nav-scrollable { display: none; }
    .navbar-toggler:checked ~ .nav-scrollable { display: block; }
}

/* Signed-in account footer at the bottom of the sidebar (product mode). */
.nav-account { margin-top: auto; padding: .75rem 1rem; border-top: 1px solid rgba(255,255,255,.08); }
.nav-account__name { color: #fff; font-weight: 700; font-size: .85rem; }
.nav-account__org { color: var(--accent-bright); font-size: .72rem; margin-bottom: .35rem; }
.nav-account .nav-link { padding-left: 0; }
.navbar-brand { font-weight: 700; letter-spacing: .04em; }

/* Brand lockup at the top of the sidebar */
.brand-lockup { padding: 1rem 1rem .9rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-product { display: block; color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.01em; line-height: 1; }
.brand-product:hover { color: #fff; }
.brand-product__sub { display: block; font-family: var(--font-mono); color: var(--accent-bright); font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-top: .3rem; }
/* White-label / co-brand customer logo in the sidebar */
.brand-logo { display: block; max-height: 34px; max-width: 180px; width: auto; margin-bottom: .2rem; }
.brand-by { margin-top: .85rem; }
.brand-by__label { display: block; color: #7f8f7a; font-size: .6rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: .3rem; }
.brand-by__logo { display: block; height: 20px; width: auto; opacity: .95; }
.nav-section { font-family: var(--font-mono); color: #8fa08a; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; padding: .9rem 1rem .2rem; }
.nav-ico { display: inline-block; width: 1.1rem; text-align: center; opacity: .85; }
.nav-scrollable .nav-link { color: #d9e4d2; border-radius: 3px; margin: 1px .5rem; padding: .4rem .6rem; }
.nav-scrollable .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-scrollable .nav-link.active { background: var(--accent); color: var(--ink); font-weight: 600; }

/* ── Metric tiles (super-admin console) ───────────────────────────────── */
.stat-card { border: 1px solid var(--line, #e4e7de); border-radius: 3px; padding: .9rem 1rem; background: #fff; height: 100%; }
.stat-card__num { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1; letter-spacing: -0.02em; }
.stat-card__label { font-family: var(--font-mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: #6b7a66; margin-top: .35rem; }

/* ── "In development" / roadmap treatment ─────────────────────────────── */
.nav-soon {
    font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    background: rgba(149,193,31,.18); color: var(--accent-bright);
    border: 1px solid rgba(149,193,31,.35); border-radius: 4px; padding: 0 .35em; margin-left: .35rem;
}
.wip__flag {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .68rem; font-weight: 700; letter-spacing: .1em;
    color: var(--accent-ink, #4f6b0f); background: #eef4e0; border: 1px solid #dbe6c4;
    border-radius: 3px; padding: .25rem .7rem; margin-bottom: .8rem;
}
.wip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.wip__list { list-style: none; margin: 0; padding: 0; }
.wip__list li { padding: .5rem 0 .5rem 1.4rem; border-top: 1px solid var(--line); position: relative; }
.wip__list li:first-child { border-top: none; }
.wip__list li::before {
    content: "○"; position: absolute; left: .2rem; top: .5rem; color: var(--muted); font-size: .8rem;
}
.planned-tag {
    font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: #92600a; background: #fef3d7; border: 1px solid #f5d78a; border-radius: 4px;
    padding: 0 .35em; margin-left: .3rem; vertical-align: middle;
}

/* ── Cards & tables ───────────────────────────────────────────────────── */
.card { border: 1px solid var(--line); border-radius: 4px; }
.card-header { background: #fff; border-bottom: 1px solid var(--line); font-weight: 600; }
.table { --bs-table-hover-bg: #f3f6fa; }
.table > thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 2px solid var(--line); }
.table td, .table th { vertical-align: middle; }

.stat-tile { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 1rem 1.1rem; }
.stat-tile__num { font-size: 1.7rem; font-weight: 700; line-height: 1; }
.stat-tile__label { color: var(--muted); font-size: .78rem; margin-top: .25rem; }

/* A stat tile/card rendered as a link — same look, clickable through to its page. */
a.stat-tile, a.stat-card { display: block; text-decoration: none; color: inherit; cursor: pointer;
    transition: border-color .12s, box-shadow .12s, transform .06s; }
a.stat-tile:hover, a.stat-card:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(20,30,10,.07); transform: translateY(-1px); color: inherit; }
a.stat-tile:focus-visible, a.stat-card:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

/* ── UI polish pass ─────────────────────────────────────────────────────── */
/* <summary> used as a button — kill the native disclosure triangle. */
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }

/* Keyboard focus rings on persistent chrome (sidebar nav, brand, footer, chips). */
.nav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.brand-product:focus-visible, .app-footer a:focus-visible, .demo-chip:focus-visible,
.nav-account .nav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Sidebar stays in view on long pages (desktop). */
@media (min-width: 641px) {
    .sidebar { position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow-y: auto; }
}

/* Alert banners speak the brand's status palette, not stock Bootstrap. */
.alert-success { background: #eef4e0; border-color: #cfe0a8; color: var(--accent-ink); }
.alert-warning { background: #fdf3d7; border-color: #f2d98c; color: #7a5a08; }
.alert-danger  { background: #fbeceb; border-color: #f0c2be; color: #a33a3a; }
.alert-info    { background: #eaf1f4; border-color: #cde0e6; color: #3a5a66; }
.alert-secondary { background: var(--bg-2); border-color: var(--line); color: var(--muted); }

/* Light filter chips for on-white toolbars (don't reuse the dark .demo-chip). */
.filter-chip { display:inline-flex; align-items:center; gap:.3rem; text-decoration:none; cursor:pointer;
    background:#fff; color:var(--ink); border:1px solid var(--line); border-radius:99px;
    padding:.15rem .7rem; font-size:.78rem; }
.filter-chip:hover { border-color:var(--accent-dark); color:var(--ink); }
.filter-chip--active { background:var(--accent); border-color:var(--accent-dark); color:var(--ink); font-weight:600; }
.filter-chip:focus-visible { outline:2px solid var(--accent-dark); outline-offset:2px; }

/* Shared card title, so heading sizes stop drifting page to page. */
.card-title { font-size:1.05rem; font-weight:700; letter-spacing:-.005em; margin:0 0 .75rem; }

/* Template question preview (expandable). */
.tpl-preview summary { cursor:pointer; color:var(--muted); }
.tpl-preview summary:hover .tpl-preview__toggle { text-decoration:underline; }
.tpl-preview__toggle { color:var(--accent-ink); font-weight:600; }
.tpl-preview[open] .tpl-preview__toggle::after { content:" (hide)"; }
.tpl-card--default { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }

.page-subtitle { color: var(--muted); margin-top: -.25rem; }

/* ── Status pills — the Critical 360 status language ──────────────────────
   Monospace, uppercase, letter-spaced, softly tinted, near-square corners.
   Semantic colours (ok / info / warn / bad / neutral) are shared everywhere:
   reviewer states, roles, plan tiers, subscription status. */
.pill, .badge-status {
    display: inline-block; font-family: var(--font-mono);
    font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    padding: .36em .62em; border-radius: 2px; line-height: 1; white-space: nowrap;
}
.pill--ok,      .st-ReviewCompleted { background: #e6f0d8; color: #4c6a0d; }
.pill--info,    .st-ReviewStarted   { background: #dde8f5; color: #2b5288; }
.pill--warn,    .st-NotificationSent { background: #f6e7c6; color: #8a5a10; }
.pill--bad                          { background: #f3dcdc; color: #a33a3a; }
.pill--neutral, .st-New             { background: #ececea; color: #55635a; }
.pill--brand                        { background: #eef4e0; color: #4c6a0d; }

/* ── Scoring grid (reviewer questionnaire) ────────────────────────────── */
.score-row { border-bottom: 1px solid var(--line); padding: .8rem 0; }
.score-scale { display: inline-flex; flex-wrap: wrap; gap: .18rem; }
.score-scale .score-pip { line-height: 0; cursor: pointer; }
.score-scale input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }
.score-pip-face {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.7rem; height: 1.7rem; border: 1px solid var(--line); border-radius: 3px;
    font-size: .78rem; user-select: none; background: #fff; line-height: 1;
}
.score-pip:hover .score-pip-face { border-color: var(--accent); }
.score-pip input:checked + .score-pip-face { background: var(--accent); border-color: var(--accent-dark); color: var(--ink); font-weight: 700; }
.score-pip--na {
    display: inline-flex; align-items: center; gap: .25rem;
    border: 1px solid var(--line); border-radius: 3px; padding: .25rem .5rem;
    font-size: .78rem; cursor: pointer; background: #fff;
}
.score-pip--na:hover { border-color: var(--accent); }

/* ── Report ───────────────────────────────────────────────────────────── */
.report-sheet { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 2rem; }
.bench-line { stroke-dasharray: 4 3; }
.legend-swatch { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; margin-right: .35rem; vertical-align: middle; }

/* ── Standalone shell (demo access gate) ──────────────────────────────── */
.review-shell { min-height: 100vh; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }

/* Public (pre-auth / pre-purchase) shell — subscribe & sign-in, no app nav. */
.public-shell { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.public-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.5rem; border-bottom: 1px solid var(--line); }
.public-brand { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.public-brand:hover { color: var(--ink); }
.public-main { flex: 1 1 auto; width: 100%; max-width: 960px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }

/* ── Reviewer questionnaire — one question per page (renders inside the portal) ── */
.q-center { display: flex; flex-direction: column; align-items: center; padding: .5rem 0 2rem; }
.q-card {
    background: #fff; border: 1px solid var(--line); border-radius: 4px;
    box-shadow: 0 10px 40px rgba(16,24,40,.06); padding: 2rem; width: 100%; max-width: 680px;
}
.q-card--narrow { max-width: 520px; }

.q-brand { font-weight: 800; letter-spacing: .01em; color: var(--ink); font-size: 1.1rem; }
.q-brand::after { content: ""; display: inline-block; width: .3em; height: .3em; background: var(--accent); margin-left: .12em; vertical-align: baseline; }
.q-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink, #4f6b0f); }
.q-h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.q-question { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; color: var(--ink); margin: .4rem 0 1.5rem; line-height: 1.25; }
.q-lede { color: var(--muted); margin-top: .75rem; white-space: pre-wrap; }
.q-points { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: .6rem; }
.q-points li { position: relative; padding-left: 1.5rem; color: #333; font-size: .95rem; }
.q-dot { position: absolute; left: 0; top: .45rem; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.q-meta-line { color: var(--muted); font-size: .85rem; margin-top: .5rem; }

/* Scoring blocks */
.q-block { margin-bottom: 1.5rem; }
.q-block--off { opacity: .4; }
.q-block__label { font-weight: 600; color: var(--ink); margin-bottom: .6rem; }
.q-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: .4rem; }
.q-pip {
    appearance: none; border: 1.5px solid var(--line); background: #fff; color: var(--ink);
    border-radius: 4px; min-height: 46px; font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: border-color .12s, background-color .12s, transform .05s;
}
.q-pip:hover:not(:disabled) { border-color: var(--accent); }
.q-pip:active:not(:disabled) { transform: translateY(1px); }
.q-pip--on { background: var(--accent); border-color: var(--accent-dark, #7ea614); color: var(--ink); font-weight: 800; }
.q-pip:disabled { cursor: default; }
.q-ends { display: flex; justify-content: space-between; margin-top: .4rem; font-size: .75rem; color: var(--muted); }

.q-na { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; color: var(--muted); font-size: .9rem; margin-top: .25rem; }
.q-na input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent-dark, #7ea614); }

.q-textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 4px; padding: .9rem 1rem; font: inherit; color: var(--ink); resize: vertical; }
.q-textarea:focus { border-color: var(--accent); }
.q-optional { font-size: .8rem; margin-top: .5rem; }

.q-hint { margin-top: 1rem; background: #fef3d7; border: 1px solid #f5d78a; color: #92600a; padding: .6rem .8rem; border-radius: 4px; font-size: .9rem; }

.q-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; }
.q-btn { appearance: none; border: none; border-radius: 4px; padding: .8rem 1.4rem; font-size: 1rem; font-weight: 700; cursor: pointer; transition: background-color .12s, transform .05s; }
.q-btn:active { transform: translateY(1px); }
.q-btn--primary { background: var(--accent); color: var(--ink); }
.q-btn--primary:hover { background: var(--accent-dark, #7ea614); }
.q-btn--ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }
.q-btn--ghost:hover:not(:disabled) { color: var(--ink); border-color: var(--muted); }
.q-btn:disabled { opacity: .4; cursor: default; }
.q-btn--lg { padding: 1rem 1.8rem; font-size: 1.05rem; }
.q-btn--sm { padding: .5rem 1.1rem; font-size: .9rem; }

.q-tick { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; background: var(--accent); color: var(--ink); font-size: 2rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.q-anon { color: var(--muted); font-size: .78rem; margin-top: 1rem; }
.q-linkbtn { background: none; border: none; padding: 0; color: var(--accent-ink, #4f6b0f); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.q-linkbtn:hover { color: var(--accent-dark, #7ea614); }

/* Keyboard focus — this is a public, anonymous, keyboard/screen-reader flow, so every
   control needs a clearly visible focus ring (was missing → WCAG 2.4.7 fail). */
.q-pip:focus-visible, .q-btn:focus-visible, .q-linkbtn:focus-visible, .q-textarea:focus-visible {
    outline: 2px solid var(--accent-dark, #7ea614); outline-offset: 2px;
}
.q-na input:focus-visible { outline: 2px solid var(--accent-dark, #7ea614); outline-offset: 2px; }

/* Progress header (sits at the top of the questionnaire card area) */
.q-top { width: 100%; max-width: 680px; margin: 0 auto 1rem; }
.q-top__row { padding: 0 .25rem .5rem; display: flex; align-items: center; justify-content: space-between; }
.q-top__brand { font-weight: 800; color: var(--ink); }
.q-top__meta { font-size: .82rem; color: var(--muted); font-weight: 600; }
.q-top__track { height: 4px; background: var(--line); }
.q-top__fill { height: 100%; background: var(--accent); transition: width .3s ease; }

@media (max-width: 520px) {
    .q-card { padding: 1.5rem 1.25rem; }
    .q-scale { grid-template-columns: repeat(5, 1fr); }
    .q-question { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .q-top__fill, .q-btn, .q-pip { transition: none; }
}

@media print {
    .proto-banner, .demo-controls, .sidebar, .app-footer, .no-print { display: none !important; }
    .page { display: block; }
    .report-sheet { border: none; padding: 0; }
    body { background: #fff; }
}

.blazor-error-boundary {
    background: #b32121; padding: 1rem; color: white;
}
.blazor-error-boundary::after { content: "An error has occurred." }

.validation-message { color: #e50000; }

/* ── Enriched report: the "so what" answer callout ─────────────────────── */
.insight-answer { background: #eef4e0; border: 1px solid #dbe6c4; border-left: 3px solid var(--accent); border-radius: 3px; padding: 1rem 1.2rem; }
.insight-answer .mono-label { color: var(--accent-ink); }

/* ── Outcome-tagged survey templates & tailoring ───────────────────────── */
.tpl-tailor { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap;
    background:#eef4e0; border:1px solid #dbe6c4; border-left:3px solid var(--accent); border-radius:3px; padding:.75rem 1rem; }
.tpl-card { transition: box-shadow .18s ease, transform .18s ease; }
.tpl-card:hover { box-shadow: 0 14px 30px -20px rgba(11,18,13,.4); transform: translateY(-2px); }
.tpl-insights { list-style:none; padding:0; margin:.3rem 0 0; }
.tpl-insights li { position:relative; padding-left:1rem; margin-bottom:.32rem; font-size:.85rem; line-height:1.4; }
.tpl-insights li::before { content:""; position:absolute; left:0; top:.5em; width:.34em; height:.34em; background:var(--accent); }
.tpl-check { display:flex; gap:.6rem; align-items:flex-start; padding:.5rem .1rem; border-bottom:1px solid var(--line); cursor:pointer; }
.tpl-check:last-of-type { border-bottom:none; }
.tpl-check input { margin-top:.25rem; flex:0 0 auto; }
.tpl-empty { border:1px dashed var(--line); border-radius:3px; padding:1.5rem; background:var(--bg-2); }
.tpl-section { border:1px solid var(--line); border-radius:3px; padding:.8rem 1rem; margin-bottom:.6rem; }
.tpl-qlist { margin:.4rem 0 0; padding-left:1.2rem; }
.tpl-qlist li { font-size:.9rem; margin-bottom:.22rem; }
.tpl-free { margin-top:.5rem; font-size:.82rem; color:var(--muted); font-style:italic; }

/* Small count badge on a nav link (e.g. partner applications awaiting review). */
.nav-badge { display:inline-block; min-width:1.1rem; text-align:center; margin-left:.4rem; padding:0 .35rem;
    font-family:var(--font-mono); font-size:.62rem; font-weight:700; line-height:1.35rem; height:1.1rem;
    background:var(--accent); color:var(--ink); border-radius:999px; vertical-align:middle; }

/* Seat-usage meter on the customer-success table. */
.usage-track { height:6px; background:var(--bg-2); border:1px solid var(--line); border-radius:3px; overflow:hidden; margin-top:2px; }
.usage-fill { height:100%; background:var(--accent); }

/* ── Selectable plan cards (partner onboarding: RRP vs wholesale vs margin) ── */
.plan-cards { display:flex; flex-direction:column; gap:.5rem; }
.plan-card { position:relative; display:flex; gap:.6rem; align-items:flex-start; border:1px solid var(--line);
    border-radius:4px; padding:.6rem .75rem; cursor:pointer; transition:border-color .15s ease, background-color .15s ease; }
.plan-card:hover { border-color:var(--accent-dark); }
.plan-card input { position:absolute; opacity:0; width:0; height:0; }
.plan-card__pick { flex:0 0 auto; width:16px; height:16px; border:1.5px solid var(--line); border-radius:50%; margin-top:3px; transition:all .15s ease; }
.plan-card:has(input:checked) { border-color:var(--accent); background:#f6f9ee; box-shadow:inset 0 0 0 1px var(--accent); }
.plan-card:has(input:checked) .plan-card__pick { border-color:var(--accent-dark); background:var(--accent); box-shadow:inset 0 0 0 3px #fff; }
.plan-card input:focus-visible + .plan-card__pick { outline:2px solid var(--accent); outline-offset:2px; }
.plan-card__main { flex:1 1 auto; min-width:0; }
.plan-card__name { font-weight:700; display:block; }
.plan-card__break { margin-top:.25rem; font-size:.83rem; line-height:1.55; }
.plan-card__break .pc-list { color:var(--muted); display:block; }
.plan-card__break .pc-disc { color:var(--accent-ink); display:block; }
.plan-card__break .pc-total { color:var(--ink); font-weight:700; display:block; }

/* ── Partner tier ladder (what they're working towards) ────────────────── */
.tier-ladder { display:flex; flex-direction:column; gap:.4rem; }
.tier-rung { border:1px solid var(--line); border-radius:4px; padding:.55rem .75rem; }
.tier-rung--current { border-color:var(--accent); background:#f6f9ee; box-shadow:inset 0 0 0 1px var(--accent); }
.tier-rung__name { font-weight:700; display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.tier-rung__meta { display:flex; justify-content:space-between; font-size:.8rem; margin-top:.15rem; gap:1rem; flex-wrap:wrap; }

/* Blazor error banner — hidden by default; Blazor's JS sets display:block only on a real
   circuit error. Without this rule the div renders as static content on every page. */
#blazor-error-ui { display:none; position:fixed; bottom:0; left:0; width:100%; z-index:1000;
    background:#fff8db; box-shadow:0 -1px 3px rgba(0,0,0,.15); padding:.6rem 1.25rem; font-size:.9rem; }
#blazor-error-ui .reload { margin-left:.5rem; }
#blazor-error-ui .dismiss { cursor:pointer; position:absolute; right:.75rem; top:.5rem; }

/* Partner's own-use subscription zone — a subtly distinct panel from the client-management area. */
.own-sub { border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:4px;
    background:var(--bg-2); padding:1rem 1.1rem; }

/* Subscribe page — billing toggle + plan cards */
.bill-toggle { display:inline-flex; border:1px solid var(--line); border-radius:999px; padding:3px; background:var(--bg-2); }
.bill-toggle input { position:absolute; opacity:0; width:0; height:0; }
.bill-toggle label { margin:0; padding:.4rem 1rem; border-radius:999px; cursor:pointer; font-size:.85rem; font-weight:600; color:var(--muted); transition:.12s; }
.bill-toggle input:checked + label { background:var(--accent); color:var(--ink); }
.bill-toggle input:focus-visible + label { outline:2px solid var(--accent-dark); outline-offset:2px; }

.sub-plans { display:grid; grid-template-columns:repeat(3,1fr); gap:.75rem; margin-bottom:1.5rem; }
@media (max-width:640px) { .sub-plans { grid-template-columns:1fr; } }
.sub-plan { position:relative; display:block; border:1px solid var(--line); border-radius:4px; padding:1rem 1.1rem; cursor:pointer; transition:border-color .12s, box-shadow .12s, background-color .12s; }
.sub-plan:hover { border-color:var(--accent-dark); }
.sub-plan input { position:absolute; opacity:0; width:0; height:0; }
.sub-plan:has(input:checked) { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); background:#f6f9ee; }
.sub-plan:has(input:focus-visible) { outline:2px solid var(--accent-dark); outline-offset:2px; }
.sub-plan__pick { position:absolute; top:.9rem; right:.9rem; width:16px; height:16px; border:1.5px solid var(--line); border-radius:50%; }
.sub-plan:has(input:checked) .sub-plan__pick { border-color:var(--accent-dark); background:var(--accent); box-shadow:inset 0 0 0 3px #fff; }
.sub-plan__name { font-weight:700; font-size:1.05rem; display:block; }
.sub-plan__price { display:block; font-size:1.3rem; font-weight:800; margin-top:.4rem; letter-spacing:-.01em; }
.sub-plan__vat { color:var(--muted); font-size:.8rem; font-weight:600; }
.sub-plan__save { display:inline-block; margin-top:.4rem; font-size:.72rem; font-weight:700; color:var(--accent-ink); background:#eef4e0; padding:.12rem .5rem; border-radius:4px; }
.sub-plan__detail { display:block; color:var(--muted); font-size:.82rem; margin-top:.55rem; }
.sub-plan__feats { list-style:none; margin:.7rem 0 0; padding:.7rem 0 0; border-top:1px solid var(--line); font-size:.8rem; }
.sub-plan__feats li { position:relative; padding-left:1.15rem; margin-bottom:.35rem; color:var(--ink); line-height:1.4; }
.sub-plan__feats li::before { content:""; position:absolute; left:0; top:.34rem; width:7px; height:7px; background:var(--accent); }
.sub-plan__feats-head { font-weight:700; color:var(--muted); padding-left:0 !important; font-size:.74rem; text-transform:uppercase; letter-spacing:.03em; }
.sub-plan__feats-head::before { display:none; }

/* In-app "your plan includes / upgrade adds" panel */
.plan-feats { list-style:none; margin:0; padding:0; font-size:.86rem; }
.plan-feats li { position:relative; padding-left:1.15rem; margin-bottom:.3rem; color:var(--ink); line-height:1.4; }
.plan-feats li::before { content:""; position:absolute; left:0; top:.34rem; width:7px; height:7px; background:var(--accent); }
.plan-feats__head { font-weight:700; color:var(--muted); padding-left:0 !important; font-size:.74rem; text-transform:uppercase; letter-spacing:.03em; margin-bottom:.4rem; }
.plan-feats__head::before { display:none; }
.plan-feats--muted li::before { background:var(--line); }
.plan-upsell { background:#f6f8f1; border:1px solid var(--line); border-radius:4px; padding:.85rem 1rem; }

/* Reviewee multi-select picker */
.rev-picker { max-height:240px; overflow-y:auto; border:1px solid var(--line); border-radius:4px; }
.rev-item { display:flex; align-items:center; gap:.6rem; padding:.4rem .7rem; border-bottom:1px solid var(--line); cursor:pointer; margin:0; }
.rev-item:last-child { border-bottom:0; }
.rev-item:hover { background:#f6f8f1; }
.rev-item__name { font-size:.92rem; }
.rev-item__dept { margin-left:auto; color:var(--muted); font-size:.8rem; }

/* Bulk-add example box */
.bulk-eg { border:1px solid var(--line); border-radius:4px; overflow:hidden; }
.bulk-eg__label { display:block; background:#f6f8f1; padding:.35rem .7rem; font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); border-bottom:1px solid var(--line); }
.bulk-eg__rows { padding:.55rem .7rem; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.82rem; color:var(--ink); display:flex; flex-direction:column; gap:.15rem; overflow-x:auto; }
.bulk-eg__rows span { white-space:nowrap; }

/* Account page — label/value rows */
.acct-rows > div { display:flex; justify-content:space-between; gap:1rem; padding:.5rem 0; border-bottom:1px solid var(--line); font-size:.9rem; }
.acct-rows > div:last-child { border-bottom:0; }
.acct-rows > div > span:last-child { font-weight:600; text-align:right; }

/* ── Branded badge (square-dot mark) ───────────────────────────────────────── */
.brand-badge {
    display: inline-grid; place-items: center; width: 60px; height: 60px;
    border: 1.5px solid var(--accent); border-radius: 8px;
    color: var(--accent-ink); background: #f3f8e8;
}
.brand-badge svg { display: block; }

/* ── First-run spotlight tour ──────────────────────────────────────────────── */
@keyframes welcome-fade { from { opacity: 0; } to { opacity: 1; } }
.tour { position: fixed; inset: 0; z-index: 2000; }
.tour[hidden] { display: none; }
.tour__dim {
    position: fixed; inset: 0; background: rgba(11, 18, 13, .6);
    animation: welcome-fade .2s ease;
}
.tour__spot {
    position: fixed; border-radius: 6px; pointer-events: none;
    box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px rgba(11, 18, 13, .6);
    transition: left .28s ease, top .28s ease, width .28s ease, height .28s ease;
}
.tour__pop {
    position: fixed; width: 328px; max-width: calc(100vw - 2rem);
    background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
    box-shadow: 0 18px 50px rgba(11, 18, 13, .3);
    padding: 1.3rem 1.3rem 1rem; animation: welcome-fade .2s ease;
}
.tour__skip {
    position: absolute; top: .75rem; right: .9rem;
    background: none; border: none; color: var(--muted);
    font-size: .78rem; font-weight: 600; cursor: pointer; padding: .2rem;
}
.tour__skip:hover { color: var(--ink); }
.tour__ico { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; color: var(--accent-ink); margin-bottom: .8rem; }
.tour__ico svg { display: block; }
.tour__step { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-ink); }
.tour__pop h3 { font-size: 1.2rem; margin: .3rem 0 .45rem; }
.tour__pop p { font-size: .9rem; line-height: 1.55; color: var(--muted); margin-bottom: 0; }
.tour__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 1.2rem; }
.tour__dots { display: flex; gap: .4rem; }
.tour__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background .2s; }
.tour__dot.active { background: var(--accent); }
