/* ─────────────────────────────────────────────────────────────────────────
   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%; }
    .navbar-toggler { display: block; }
}
.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; }
.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; }

/* ── "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; }

.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; }

/* ── 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 { outline: none; 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-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); }

/* 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; }
