/* ExpertPage design system (Milestone 32.6).
   One stylesheet for every page — runtime and Studio. Plain CSS, no build
   step, no external fonts. Clean, modern, credible; nothing clever. */

:root {
    /* Color scheme: near-black ink on a soft gray page, white surfaces,
       a confident indigo primary, and quiet semantic tones. */
    --ink: #171a21;
    --muted: #5b6472;
    --bg: #f5f6f8;
    --surface: #ffffff;
    --border: #e3e6eb;

    /* Navy & gold theme: navy for structure and links, gold for actions. */
    --primary: #1d3a6e;
    --primary-hover: #14213d;
    --primary-soft: #e9eef8;
    --accent: #fca311;
    --accent-hover: #e79408;
    --accent-ink: #14213d;

    --ok-ink: #22713a;
    --ok-soft: #e9f6ee;
    /* Brighter green for status lights: --ok-ink is tuned for text on light
       backgrounds and is too dark to read as "glowing". */
    --ok-dot: #22c55e;
    --ok-halo: rgba(34, 197, 94, 0.22);
    /* Halo for the gold accent, used by the in-progress status dot. */
    --accent-halo: rgba(252, 163, 17, 0.25);
    --warn-ink: #8a6d00;
    --warn-soft: #fdf3d0;
    --danger-ink: #b00020;
    --danger-soft: #fbeaec;

    --radius: 10px;
    --shadow: 0 1px 2px rgba(23, 26, 33, 0.06);
}

/* ----- base ---------------------------------------------------------------- */

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 20px;
}

.page { padding: 28px 20px 48px; }

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 28px 0 10px; }
h3 { font-size: 1rem; margin: 20px 0 6px; }

/* Demo mode: sample Q&A rendered as a chat conversation, so it is
   unmistakable which is the question and which is the answer. Questions sit
   right (like a message you sent); answers sit left (like a reply), each
   fading/sliding in on load — pure CSS, no JavaScript. */
.demo-chat { margin: 14px 0 8px; display: flex; flex-direction: column; }

.demo-bubble {
    max-width: 78%;
    border-radius: 14px;
    padding: 10px 14px;
    margin: 6px 0;
    font-size: 0.95rem;
    line-height: 1.5;
    /* Long emails/URLs in an answer must wrap, never force sideways scroll. */
    overflow-wrap: anywhere;
    opacity: 0;
    animation: demo-bubble-in 0.45s ease forwards;
}

/* The message text keeps its own paragraph breaks (LLM answers arrive as
   plain text with newlines); pre-line turns them into line breaks instead of
   collapsing everything into one wall of text. */
.demo-bubble-text { display: block; white-space: pre-line; }

.demo-bubble-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
    opacity: 0.75;
}

.demo-bubble-q {
    align-self: flex-end;
    background: var(--primary-soft);
    color: var(--primary);
    border-bottom-right-radius: 4px;
}

.demo-bubble-a {
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-bottom-left-radius: 4px;
}

@keyframes demo-bubble-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .demo-bubble { animation: none; opacity: 1; }
    /* The dot keeps its glow; only the pulsing stops. */
    .step-dot { animation: none; }
}

/* Signed-out hint beside the Ask button: asking is real, sign-in comes at
   the moment of submitting, not before. */
.ask-signin-hint { margin-left: 10px; font-size: 0.85rem; }

/* ----- expert masthead ------------------------------------------------------ */

.expert-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}
.expert-head h1 { margin: 0; }

/* A monogram from the expert's initial: gives the page an identity without
   requiring authors to upload anything. The colour is chosen from the expert's
   name (runtime/web.py, _mark_colour), so two experts look different at a
   glance and each one looks the same on every visit. Every shade is dark
   enough to carry white text. */
.expert-mark {
    flex: 0 0 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
}
.expert-mark.mark-0 { background: #1d3a6e; }  /* navy — the platform primary */
.expert-mark.mark-1 { background: #0f766e; }  /* teal */
.expert-mark.mark-2 { background: #6d28d9; }  /* violet */
.expert-mark.mark-3 { background: #9a3412; }  /* rust */
.expert-mark.mark-4 { background: #b91c1c; }  /* red */
.expert-mark.mark-5 { background: #15803d; }  /* green */

.expert-byline { margin: 2px 0 0; font-size: 0.9rem; color: var(--muted); }

/* What the expert covers, from the registry's tags. */
.topic-chips { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.topic-chip {
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 999px;
    padding: 3px 11px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* The "all experts" link, now at the foot of the page. */
.subnav-foot { margin-top: 26px; }

/* The ask box leads the page, so it gets a line of framing above it and a
   little emphasis of its own — a visitor from a shared link should see what
   to do before they see how much there is to read. */
.ask-invite {
    margin: 18px 0 8px;
    font-weight: 600;
}
.ask-card { border-color: var(--primary); }

/* Heading above the pre-generated samples, separating them from the
   visitor's own exchange. */
.demo-heading {
    margin: 22px 0 4px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

/* "Ask this yourself" on a sample question. */
.ask-this {
    margin-top: 8px;
    padding: 2px 10px;
    font-size: 0.8rem;
}

/* Collapsed long answers. The closed state shows a truncated preview and the
   cue; open shows the full text. */
.answer-more summary {
    cursor: pointer;
    list-style: none;
}
.answer-more summary::-webkit-details-marker { display: none; }
.answer-more summary::after {
    content: "Show full answer";
    display: inline-block;
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
}
/* When open, the preview would repeat the first lines of the full text, so it
   is hidden — but the summary itself must stay, or there is nothing left to
   click to collapse it again. */
.answer-more[open] summary .demo-bubble-text { display: none; }
.answer-more[open] summary::after { content: "Show less"; margin: 0 0 6px; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

p.lede, .muted { color: var(--muted); }

pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 0.9rem;
}

/* ----- header & footer ----------------------------------------------------- */

.site-header {
    /* The brand bar: deep navy with a gold wordmark. */
    background: #14213d;
    border-bottom: 1px solid #0e1830;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
}

.brand {
    /* Masthead: the mark beside the wordmark, baseline-aligned. */
    display: inline-flex;
    align-items: center;
    gap: 9px;
    /* Masthead wordmark: a serif display stack (no external fonts) set
       against the sans body gives it a distinct, editorial character. */
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
        "Times New Roman", serif;
    font-weight: 700;
    font-size: 1.55rem;
    color: var(--accent);
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.brand:hover { text-decoration: none; color: #ffd166; }
/* The mark, drawn in whatever colour the text has. The PNG's alpha channel
   is used as a MASK over a currentColor fill, so the mark is styled by the
   same rules as the wordmark beside it — the same gold, and the same hover
   brightening, always in sync. Hidden (text-only header) on the rare browser
   without mask support, where the fallback would be a solid gold rectangle. */
.brand-mark { display: none; }
@supports (mask: url("")) or (-webkit-mask: url("")) {
    .brand-mark {
        display: block;
        width: 38px;
        height: 22px;
        background: currentColor;
        -webkit-mask: url("/static/mark-wide.png") no-repeat center / contain;
        mask: url("/static/mark-wide.png") no-repeat center / contain;
    }
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.92rem;
}
.site-nav a { color: rgba(255, 255, 255, 0.8); }
.site-nav a:hover { color: #fca311; text-decoration: none; }
.nav-user { color: rgba(255, 255, 255, 0.55); }

.site-footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    padding: 20px 0 32px;
}

/* ----- buttons ------------------------------------------------------------- */

button, .btn {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
}
button:hover, .btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    text-decoration: none;
    color: var(--accent-ink);
}

.btn-secondary, table button, .actions button {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
}
.btn-secondary:hover, table button:hover, .actions button:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

table button, .actions button { padding: 4px 10px; font-size: 0.85rem; }

/* ----- forms --------------------------------------------------------------- */

label { font-weight: 600; font-size: 0.92rem; }

input[type="text"], input[type="email"], input[type="url"],
input[type="number"], textarea {
    width: 100%;
    max-width: 560px;
    padding: 9px 12px;
    margin-top: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}
textarea { max-width: 100%; }
input:focus, textarea:focus {
    outline: 2px solid var(--primary-soft);
    border-color: var(--primary);
}

form p { margin: 14px 0; }

/* ----- cards & lists ------------------------------------------------------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin: 14px 0;
}

.expert-list { list-style: none; padding: 0; margin: 16px 0; }
.expert-list li {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    margin-bottom: 12px;
}
.expert-list a { font-weight: 600; font-size: 1.05rem; }
.expert-list .desc { color: var(--muted); margin: 4px 0 0; }

/* ----- tables -------------------------------------------------------------- */

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 0.92rem;
}
th, td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
th {
    background: var(--bg);
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
tr:last-child td { border-bottom: none; }

.table-scroll { overflow-x: auto; }

/* ----- badges & banners ---------------------------------------------------- */

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--bg);
    color: var(--muted);
    border: 1px solid var(--border);
    vertical-align: middle;
}
.badge-published { background: var(--ok-soft); color: var(--ok-ink); border-color: transparent; }
.badge-review { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.badge-edited { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }

.banner {
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 14px 0;
    background: var(--primary-soft);
}
/* Banners whose whole content is one interpolated string keep the line breaks
   of that string (LLM review notes, multi-line errors). This must NOT be the
   default: on a banner containing markup, pre-wrap also preserves the HTML
   indentation between the tags, which inflates it into a large, oddly spaced
   panel. */
.banner-text { white-space: pre-wrap; }
/* Paragraphs and lists inside a banner sit tight against its padding. */
.banner > :first-child { margin-top: 0; }
.banner > :last-child { margin-bottom: 0; }
.banner ul { margin: 6px 0 0; padding-left: 20px; }
.banner-ok { background: var(--ok-soft); color: var(--ok-ink); }
.banner-warn { background: var(--warn-soft); color: var(--warn-ink); }
.banner-error { background: var(--danger-soft); color: var(--danger-ink); }

/* ----- studio flow nav ----------------------------------------------------- */

.subnav {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 6px;
}
.subnav a { color: var(--muted); }
.subnav a:hover { color: var(--primary); }

.kicker {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 4px;
}

/* ----- chat / answer ------------------------------------------------------- */

.answer-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius);
    padding: 16px 18px;
    white-space: pre-wrap;
}

.lock-box {
    background: var(--warn-soft);
    border-radius: var(--radius);
    padding: 16px 18px;
    max-width: 520px;
}
.lock-box p:first-child { margin-top: 0; }
.lock-box p:last-child { margin-bottom: 0; }

/* ----- legal pages & disclaimer (Milestone 34) ------------------------------ */

.legal { max-width: 720px; }
.legal h2 { margin-top: 26px; }
.legal li { margin-bottom: 8px; }

.disclaimer {
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 8px;
}

.footer-links { margin-left: 10px; }
.footer-links a { color: var(--muted); }

/* ----- landing page (Milestone 33.7) ---------------------------------------- */

.hero {
    text-align: center;
    padding: 10px 0 40px;
}

.hero-title {
    font-size: 2.5rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto 26px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 10px;
}

.hero-note { font-size: 0.88rem; }

.btn-large {
    padding: 12px 24px;
    font-size: 1.05rem;
    border-radius: 10px;
}

.section-title {
    text-align: center;
    font-size: 1.4rem;
    margin: 48px 0 22px;
}

/* A CSS-only mockup of an expert page: browser chrome + URL + mini profile. */
.hero-mocks {
    /* A horizontal slider (pure CSS scroll-snap, no JavaScript): each mockup
       is wide enough to show its FULL URL; about two fit in view and the
       third peeks in from the right, inviting a swipe/scroll. */
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* No visible scrollbar: the third card peeking in from the right is the
       slide affordance; the bar itself is just clutter. */
    scrollbar-width: none;
    padding: 4px 2px 12px;
    margin: 24px 0 18px;
}

.hero-mocks::-webkit-scrollbar { display: none; }

/* Slider controls. The strip scrolls by swipe or trackpad, but a plain mouse
   had no way to reach the later examples — and with the scrollbar hidden, no
   hint they existed. Arrows sit outside the strip so they never cover a card;
   dots double as a count ("there are eight of these") and as jump targets. */
.mock-slider {
    display: flex;
    align-items: center;
    gap: 6px;
}
.mock-slider .hero-mocks { flex: 1 1 auto; min-width: 0; }

.mock-nav {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(20, 33, 61, 0.18);
    background: var(--surface);
    color: var(--primary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(10, 14, 25, 0.14);
}
.mock-nav:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
/* Kept in the layout when disabled, so the strip never shifts sideways as you
   reach either end. */
.mock-nav:disabled { opacity: 0.3; cursor: default; }

.mock-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 2px 0 4px;
}
.mock-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 33, 61, 0.22);
    cursor: pointer;
}
.mock-dot:hover { background: rgba(20, 33, 61, 0.42); }
.mock-dot.is-current { background: var(--accent); }

.browser-mock {
    flex: 0 0 400px;
    scroll-snap-align: center;
    margin: 0;
    background: var(--surface);
    border: 1px solid rgba(20, 33, 61, 0.14);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(10, 14, 25, 0.22);
    overflow: hidden;
    text-align: left;
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(180deg, #1b2f57, #142544);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 9px 12px;
}

.browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.browser-url {
    margin-left: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.browser-url strong { color: var(--accent); }

.browser-body { padding: 16px 18px 18px; }
.mock-kicker {
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 2px;
}
.mock-title { margin: 0 0 4px; font-size: 1.12rem; }
.mock-desc { margin: 0 0 12px; color: var(--muted); font-size: 0.87rem; }

.mock-ask {
    display: flex;
    gap: 8px;
    align-items: center;
}
.mock-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.85rem;
    color: var(--muted);
    background: var(--bg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mock-btn {
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 0.85rem;
}

.hero-tagline { margin: 12px 0 0; font-size: 1.08rem; }

.steps-two {
    grid-template-columns: repeat(2, 1fr);
    max-width: 720px;
    margin: 0 auto 14px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
.step h3 { margin: 12px 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.step-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.feature { margin: 0; }
.feature h3 { margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.vision-quote {
    text-align: center;
    max-width: 620px;
    margin: 56px auto;
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--ink);
    border-left: 3px solid var(--primary);
    padding-left: 20px;
    text-align: left;
}

.cta-band {
    text-align: center;
    background: var(--primary-hover);
    color: #fff;
    border-radius: var(--radius);
    padding: 36px 24px;
    margin: 24px 0 8px;
}
.cta-band h2 { margin: 0 0 16px; color: #fff; }
.cta-band p { margin: 0; }
/* Text and links on the navy band: the page defaults (dark ink, navy links)
   are invisible against it. */
.cta-band .cta-secondary { margin-top: 14px; color: rgba(255, 255, 255, 0.75); }
.cta-band a:not(.btn) { color: var(--accent); text-decoration: underline; }
.cta-band a:not(.btn):hover { color: #ffd166; }

/* ----- expert setup checklist (Studio hub, Milestone 34.6) ----------------- */

/* The numbered path an author follows to get an expert online. The state
   (done / current / blocked) is decided in studio/web.py; these rules only
   make that state visible at a glance. */

.steps-list { list-style: none; padding: 0; margin: 16px 0 28px; }

/* Scoped under .steps-list: the landing page's "how it works" cards use a
   .step class of their own, and an unscoped rule here silently restyled them
   (found as garbled landing copy, 2026-07-27). */
.steps-list .step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    margin-bottom: 10px;
}

/* The current step is the one thing on the page that should catch the eye. */
.steps-list .step-current { border-color: var(--primary); border-left: 4px solid var(--primary); }
/* A blocked step stays legible but visibly out of reach. */
.steps-list .step-blocked { opacity: 0.65; }

/* The marker column is a status light, never a number — the step number is
   already written into each title, and showing both reads as double numbering.
   Done is a green glowing dot; current is an arrow; not-yet is a grey dot. */
.steps-list .step-mark {
    flex: 0 0 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--muted);
}
/* One dot shape for all three states; only the colour changes. Each state sets
   --dot and --dot-halo, so a single glow and a single animation serve them
   all. */
.step-dot {
    --dot: var(--ok-dot);
    --dot-halo: var(--ok-halo);
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--dot);
    /* Two rings: a soft halo and a wider bloom — the "glow". */
    box-shadow: 0 0 0 3px var(--dot-halo), 0 0 9px 2px var(--dot);
    animation: step-dot-pulse 2.4s ease-in-out infinite;
}

/* In progress: the same glowing dot in the action colour, so "done" and
   "current" read as one family rather than a dot and an arrow. */
.step-dot-current {
    --dot: var(--accent);
    --dot-halo: var(--accent-halo);
}

/* Not-yet-available: same dot, no colour, no glow, no pulse. */
.step-dot-off {
    background: var(--border);
    box-shadow: none;
    animation: none;
}

@keyframes step-dot-pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--dot-halo), 0 0 9px 2px var(--dot); }
    50%      { box-shadow: 0 0 0 5px var(--dot-halo), 0 0 14px 3px var(--dot); }
}

.steps-list .step-body { flex: 1 1 auto; min-width: 0; }
.steps-list .step-title { margin: 0; font-weight: 600; }
.steps-list .step-detail { margin: 4px 0 0; font-size: 0.9rem; }
.steps-list .step-action { flex: 0 0 auto; text-align: right; }
.steps-list .step-links { margin: 8px 0 0; font-size: 0.85rem; }
/* The files chosen in the upload form, listed before they are sent. Empty
   until the script fills it, so it takes up no room on first load. */
.upload-selection {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    font-size: 0.9rem;
}
.upload-selection li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 6px 4px 10px;
    margin-top: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow-wrap: anywhere;
}
.upload-remove { padding: 2px 8px; font-size: 0.8rem; flex: 0 0 auto; }
.upload-selection:empty { margin: 0; }

/* The expert's public address, shown on the publish step. Long handles and
   slugs must wrap rather than push the card sideways. */
.steps-list .step-url {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.warn-text { color: var(--warn-ink); }

/* Field hints in the creation wizard. The "Public" flag matters: an author
   filling in a form has no way to know which of these fields a visitor reads,
   and the description is the storefront's summary. */
.field-hint { font-size: 0.85rem; color: var(--muted); }
.public-flag {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 4px;
    padding: 1px 6px;
    margin-right: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Where the public page stops showing an answer (Studio demo preview): the
   text above the line is what a scanning visitor reads, the dimmed text below
   it is hidden behind "Show full answer". */
.preview-cut {
    display: block;
    border-top: 1px dashed var(--primary);
    margin: 10px 0 6px;
    padding-top: 5px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
}
.preview-tail { opacity: 0.55; }

/* ----- button variants ----------------------------------------------------- */

.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-quiet {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
}
.btn-quiet:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

button:disabled, button[disabled] {
    background: var(--bg);
    border-color: var(--border);
    color: var(--muted);
    cursor: not-allowed;
}
button:disabled:hover { background: var(--bg); border-color: var(--border); color: var(--muted); }

/* ----- danger zone --------------------------------------------------------- */

.danger-heading { color: var(--danger-ink); }
.card-danger { border-color: var(--danger-ink); }
.card-danger p { margin: 10px 0; }
.btn-danger { background: var(--surface); border-color: var(--danger-ink); color: var(--danger-ink); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger-ink); color: var(--danger-ink); }

/* ----- small screens ------------------------------------------------------- */

@media (max-width: 600px) {
    .page { padding-top: 18px; }
    h1 { font-size: 1.35rem; }
    th, td { padding: 8px 10px; }
    .header-inner { padding-top: 10px; padding-bottom: 10px; }
    .hero { padding-top: 6px; }
    .hero-title { font-size: 1.7rem; }
    .steps, .steps-two, .feature-grid { grid-template-columns: 1fr; }
    /* Touch devices swipe the strip; the arrows would only steal width. */
    .mock-nav { display: none; }
    /* One mockup per view on phones; the next card peeks in to invite a swipe. */
    .browser-mock { flex-basis: 86%; }
    /* Full URLs matter more than window-chrome decoration on small screens:
       drop the dots and let the URL wrap instead of truncating. */
    .browser-dot { display: none; }
    .browser-url {
        margin-left: 0;
        white-space: normal;
        overflow-wrap: anywhere;
        text-overflow: clip;
        line-height: 1.35;
    }
    /* Chat bubbles use nearly the full width on phones — 78% of a small
       screen makes long answers needlessly tall and cramped. */
    .demo-bubble { max-width: 94%; }
    /* 16px stops iOS Safari from auto-zooming when the ask box is tapped. */
    input[type="text"], input[type="email"], input[type="url"],
    input[type="number"], textarea { font-size: 16px; }
    /* A step's action drops below its text rather than squeezing beside it. */
    .steps-list .step { flex-wrap: wrap; }
    .steps-list .step-action { flex-basis: 100%; text-align: left; margin-top: 10px; }
}
