/* =========================================================================
   Mustard Seed Live AI — shared design system
   =========================================================================

   One stylesheet for both live screens: the attorney reference feed and the
   videographer control room. They used to be styled separately, which is why
   they felt like two different products bolted together. Everything visual now
   comes from the tokens at the top of this file, so the two screens stay in
   step and a change to the brand is a change in one place.

   Design intent, in plain terms:
     - Reading comes first. The feed is the product; everything else recedes.
     - Open space instead of boxes inside boxes. Hairlines and breathing room
       do the separating, not heavy borders.
     - Generous default sizes. Counsel can still push text much larger, but it
       should already be comfortable before anyone touches a button.
     - Calm surface, one accent. Rose gold means "this matters"; if everything
       were rose gold, nothing would be.

   Fonts are served from this machine (see fonts/fonts.css). Nothing in here
   reaches out to the internet.
   ========================================================================= */

@import url('fonts/fonts.css');

/* ------------------------------------------------------------------ tokens */
:root {
    /* Brand. Rose gold is the single accent across the whole platform. */
    --accent-rose: #e3aaa4;
    --accent-rose-bright: #f4cbc5;
    --accent-rose-deep: #c0817b;

    /* Layered navy. Each step up is a surface that sits closer to the reader. */
    --ink-900: #070a12;
    --ink-800: #0b0f19;
    --ink-700: #111725;
    --ink-600: #18202f;

    /* Surfaces are translucent so the background depth shows through. */
    --surface-1: rgba(255, 255, 255, 0.028);
    --surface-2: rgba(255, 255, 255, 0.045);
    --surface-3: rgba(255, 255, 255, 0.065);

    /* Hairlines. Deliberately faint — they suggest structure, not cages. */
    --line-faint: rgba(227, 170, 164, 0.10);
    --line-soft: rgba(227, 170, 164, 0.18);
    --line-strong: rgba(227, 170, 164, 0.34);

    /* Text. Kept at AA contrast or better against the navy background. */
    --text-main: #f6f7f9;
    --text-muted: #b9c2d0;
    --text-faint: #7f8b9d;

    /* Functional states. These earn their colour by carrying meaning. */
    --state-live: #f2717f;
    --state-live-glow: rgba(242, 113, 127, 0.28);
    --state-standby: #e3b341;
    --state-ok: #6dc48f;

    /* Type */
    --font-ui: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;

    /* Rhythm. An 8px base keeps spacing consistent without a lookup table. */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 48px;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.28), 0 12px 32px rgba(0, 0, 0, 0.22);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 44px rgba(0, 0, 0, 0.3);

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

    /* Legacy names kept alive so existing page CSS and inline styles that
       reference them keep working while the pages move over. */
    --border-color: var(--line-strong);
    --bg-dark: var(--ink-800);
    --card-bg: rgba(17, 23, 37, 0.92);
}

/* ------------------------------------------------------------------- reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: var(--font-ui);
    color: var(--text-main);
    background: var(--ink-800);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
    line-height: 1.55;
}

/* The background is built from soft pools of light rather than a flat fill.
   It reads as depth at a glance and costs nothing to render. */
body.msla-app {
    background:
        radial-gradient(1100px 620px at 78% -8%, rgba(227, 170, 164, 0.085), transparent 62%),
        radial-gradient(880px 540px at 8% 104%, rgba(227, 170, 164, 0.055), transparent 60%),
        linear-gradient(168deg, var(--ink-900) 0%, var(--ink-800) 46%, #0d1320 100%);
    background-attachment: fixed;
}

/* ---------------------------------------------------------------- app shell */
/* A column: bar on top, content filling everything left over, notice at the
   bottom. The feed grows with the window instead of living in a fixed box. */
/* The shell is exactly one screen tall and never scrolls itself. That is what
   keeps the reading area a contained, scrolling box instead of letting the page
   run on for thousands of pixels as the proceeding goes forward. */
.app-shell {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-stage {
    flex: 1;
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: var(--sp-5) var(--sp-6) var(--sp-4);
    display: flex;
    gap: var(--sp-5);
    align-items: stretch;
    min-height: 0;
}

/* The reading column. min-width:0 is what stops long unbroken words from
   forcing the column wider than its share of the row. */
.stage-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

/* Side rail — exhibits for counsel, tools for the videographer. */
.stage-rail {
    width: 300px;
    flex: 0 0 300px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.stage-rail--wide {
    width: 360px;
    flex-basis: 360px;
}

/* ------------------------------------------------------------------ top bar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    padding: var(--sp-3) var(--sp-6);
    background: rgba(7, 10, 18, 0.82);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--line-faint);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex-shrink: 0;
    /* The brand is a link back to the home page, but it should read as a
       wordmark rather than as underlined body text. */
    text-decoration: none;
    color: inherit;
    transition: opacity 0.16s var(--ease);
}

.topbar-brand:hover {
    opacity: 0.82;
}

.topbar-brand img {
    height: 40px;
    width: auto;
    border-radius: var(--radius-sm);
}

.topbar-wordmark {
    font-family: var(--font-display);
    font-size: 21px;
    line-height: 1.1;
    letter-spacing: 0.01em;
    color: var(--text-main);
    white-space: nowrap;
}

/* Pages that predate the design system carry their own .nav-title rule. This
   selector is one notch more specific, so the wordmark reads the same on every
   page in the platform without editing each page's own stylesheet. */
span.topbar-wordmark {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--text-main);
    white-space: nowrap;
}

/* v2.1.5: bigger brand (Option A) and rose gold "Live AI" on every page.
   The extra "html body a" makes these win over older per-page rules. */
html body a.topbar-brand { gap: 16px; }
html body a.topbar-brand img { height: 72px; width: auto; }
html body a.topbar-brand span.topbar-wordmark { font-size: 34px; }

html body a.topbar-brand span.topbar-wordmark em,
span.topbar-wordmark em,
.topbar-wordmark em {
    /* Shiny rose gold to match the mountains, slanted a little more. */
    font-style: italic;
    display: inline-block;
    font-size: inherit;
    letter-spacing: inherit;
    transform: skewX(-9deg);
    padding-right: 0.12em;
    background: linear-gradient(100deg, #fde6df 0%, #e9aea5 24%, #b5716a 47%, #f8d6ce 60%, #cf8e86 79%, #fbe1da 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.3)) drop-shadow(0 0 10px rgba(244, 203, 197, 0.25));
}

@media (max-width: 720px) {
    html body a.topbar-brand { gap: 12px; }
    html body a.topbar-brand img { height: 64px; }
    html body a.topbar-brand span.topbar-wordmark { font-size: 29px; }
}

/* Case identity sits centre-left, quiet but always available. */
.topbar-case {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding-left: var(--sp-5);
    border-left: 1px solid var(--line-faint);
}

.topbar-eyebrow {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.topbar-caption {
    font-family: var(--font-display);
    font-size: 19px;
    line-height: 1.25;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-shrink: 0;
}

/* -------------------------------------------------------------------- pills */
/* Status readouts. Shape plus a written word carries the meaning, so they
   still read correctly for anyone who cannot separate the colours. */
.pill {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    border: 1px solid var(--line-faint);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-faint);
    flex-shrink: 0;
}

.pill--live {
    background: rgba(242, 113, 127, 0.13);
    border-color: rgba(242, 113, 127, 0.42);
    color: #ffd9dd;
}

.pill--live .pill-dot {
    background: var(--state-live);
    box-shadow: 0 0 0 4px var(--state-live-glow);
    animation: msla-pulse 2s var(--ease) infinite;
}

.pill--standby {
    background: rgba(227, 179, 65, 0.12);
    border-color: rgba(227, 179, 65, 0.36);
    color: #f6e3b4;
}

.pill--standby .pill-dot {
    background: var(--state-standby);
}

.pill--ok {
    background: rgba(109, 196, 143, 0.12);
    border-color: rgba(109, 196, 143, 0.34);
    color: #cdeedb;
}

.pill--ok .pill-dot {
    background: var(--state-ok);
}

@keyframes msla-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* ------------------------------------------------------------------- panels */
/* A panel is a soft surface, not a hard box: faint fill, hairline edge,
   generous corner. Panels never nest inside other panels. */
.panel {
    background: var(--surface-1);
    border: 1px solid var(--line-faint);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    box-shadow: var(--shadow-soft);
}

.panel--flush {
    padding: 0;
    overflow: hidden;
}

.panel-title {
    margin: 0 0 var(--sp-3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-rose);
}

.panel-note {
    margin: var(--sp-2) 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-faint);
}

/* ------------------------------------------------------------------ toolbar */
/* One row above the feed: search on the left, reading size on the right. */
.toolbar {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex-wrap: wrap;
}

.toolbar-spacer {
    flex: 1;
    min-width: var(--sp-2);
}

.toolbar-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-faint);
    white-space: nowrap;
}

/* Search field. The live pages block text selection to discourage copying, so
   inputs have to opt themselves back in or they cannot be typed into. */
.field-search {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 520px;
}

.field-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    font-family: var(--font-ui);
    font-size: 15px;
    color: var(--text-main);
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-pill);
    outline: none;
    transition: border-color 0.18s var(--ease), background 0.18s var(--ease),
        box-shadow 0.18s var(--ease);
    -webkit-user-select: text;
    user-select: text;
}

.field-search input::placeholder {
    color: var(--text-faint);
}

.field-search input:focus {
    background: var(--surface-3);
    border-color: var(--accent-rose);
    box-shadow: 0 0 0 4px rgba(227, 170, 164, 0.14);
}

.field-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    opacity: 0.6;
}

/* Segmented control — used for reading size. Reads as one object. */
.segmented {
    display: inline-flex;
    align-items: stretch;
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.segmented button {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.16s var(--ease), color 0.16s var(--ease);
    white-space: nowrap;
}

.segmented button + button {
    border-left: 1px solid var(--line-faint);
}

.segmented button:hover {
    background: rgba(227, 170, 164, 0.14);
    color: var(--accent-rose-bright);
}

.segmented button:active {
    background: rgba(227, 170, 164, 0.22);
}

.segmented button:focus-visible {
    outline: 2px solid var(--accent-rose);
    outline-offset: -2px;
}

/* ------------------------------------------------------------------ buttons */
.btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 12px 22px;
    font-family: var(--font-ui);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-soft);
    background: var(--surface-2);
    color: var(--text-main);
    cursor: pointer;
    transition: transform 0.16s var(--ease), background 0.16s var(--ease),
        border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.btn:hover:not(:disabled) {
    background: var(--surface-3);
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn:focus-visible {
    outline: 2px solid var(--accent-rose);
    outline-offset: 2px;
}

.btn--primary {
    background: linear-gradient(135deg, var(--accent-rose) 0%, var(--accent-rose-deep) 100%);
    border-color: transparent;
    color: #2c1519;
}

.btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--accent-rose-bright) 0%, var(--accent-rose) 100%);
    box-shadow: 0 8px 24px rgba(227, 170, 164, 0.26);
}

.btn--danger {
    background: rgba(242, 113, 127, 0.14);
    border-color: rgba(242, 113, 127, 0.44);
    color: #ffd9dd;
}

.btn--danger:hover:not(:disabled) {
    background: rgba(242, 113, 127, 0.24);
}

.btn--quiet {
    background: transparent;
    border-color: var(--line-faint);
    color: var(--text-muted);
}

.btn--block {
    width: 100%;
}

/* ------------------------------------------------------------- input fields */
.field {
    width: 100%;
    padding: 11px 14px;
    font-family: var(--font-ui);
    font-size: 14.5px;
    color: var(--text-main);
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
    -webkit-user-select: text;
    user-select: text;
}

.field:focus {
    border-color: var(--accent-rose);
    box-shadow: 0 0 0 3px rgba(227, 170, 164, 0.14);
}

.field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* ========================================================================
   THE REFERENCE FEED
   ========================================================================
   The centre of both screens. Speaker turns flow down an open surface with a
   timestamp gutter on the left, the way a transcript-style document reads,
   rather than sitting in individual bordered rows.

   --feed-font-size is the one knob participants control. Everything else in
   the feed is sized in em, so a single change scales the whole thing in
   proportion instead of pushing the layout apart.
   ======================================================================== */
:root {
    --feed-font-size: 19px;
}

.feed-surface {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--sp-5) var(--sp-6);
    /* Held in its own scrolling area, but with the faintest possible edge so it
       reads as part of the page rather than a boxed-off panel. */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.034) 0%, rgba(255, 255, 255, 0.014) 100%);
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: var(--radius-lg);
    font-size: var(--feed-font-size);
    line-height: 1.75;
    scroll-behavior: smooth;
}

/* One spoken turn. The gutter holds the time; the text gets the rest. */
.feed-line {
    display: grid;
    grid-template-columns: 4.6em 1fr;
    gap: 0 1.1em;
    padding: 0.62em 0;
    border-bottom: 1px solid rgba(227, 170, 164, 0.075);
    animation: msla-line-in 0.32s var(--ease) both;
}

.feed-line:last-child {
    border-bottom: none;
}

.feed-time {
    grid-column: 1;
    font-size: 0.66em;
    font-weight: 500;
    line-height: 2.1;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums lining-nums;
    text-align: right;
    white-space: nowrap;
    -webkit-user-select: none;
    user-select: none;
}

.feed-body {
    grid-column: 2;
    min-width: 0;
}

/* Speaker names read as small labels, not shouted headings. */
.feed-speaker {
    display: block;
    font-size: 0.62em;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--accent-rose);
    margin-bottom: 0.14em;
}

.feed-text {
    display: block;
    color: var(--text-main);
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

/* Words still being recognised. Shown as provisional so nobody quotes them. */
.feed-line--interim .feed-text {
    color: var(--text-faint);
    font-style: italic;
}

.feed-line--interim {
    border-bottom: none;
    animation: none;
}

/* An exhibit tag in the flow of the feed. Marked with a rose rule so it can
   be found by eye while scrolling, without becoming another box. */
.feed-line--exhibit {
    border-left: 2px solid var(--accent-rose);
    background: rgba(227, 170, 164, 0.055);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding-left: 0.9em;
    margin: 0.5em 0;
}

.feed-line--exhibit .feed-speaker {
    color: var(--accent-rose-bright);
}

/* Flash used when counsel jumps to an exhibit, or a line is corrected. */
.feed-line--flash {
    animation: msla-flash 1.9s var(--ease);
}

@keyframes msla-line-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: none; }
}

@keyframes msla-flash {
    0% { background: rgba(227, 170, 164, 0.3); }
    100% { background: transparent; }
}

/* Empty and searching states, centred in the open space. */
.feed-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-3);
    min-height: 240px;
    text-align: center;
    padding: var(--sp-6);
    color: var(--text-faint);
    font-size: 0.85em;
}

.feed-empty strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5em;
    font-weight: 400;
    color: var(--text-muted);
}

.feed-hint {
    font-size: 12.5px;
    color: var(--text-faint);
    min-height: 1.2em;
    padding-left: var(--sp-2);
}

.feed-hint strong {
    color: var(--accent-rose);
}

/* --------------------------------------------------------------- exhibit rail */
.rail-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    min-height: 0;
    margin: 0 calc(var(--sp-3) * -1);
}

.rail-item {
    appearance: none;
    display: block;
    width: 100%;
    text-align: left;
    padding: var(--sp-3);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.16s var(--ease), transform 0.16s var(--ease);
}

.rail-item:hover {
    background: rgba(227, 170, 164, 0.12);
    transform: translateX(2px);
}

.rail-item:focus-visible {
    outline: 2px solid var(--accent-rose);
    outline-offset: -2px;
}

.rail-item-label {
    display: block;
    color: var(--text-main);
}

.rail-item-time {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

.rail-empty {
    padding: var(--sp-3);
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-faint);
}

/* ---------------------------------------------------------------- scrollbars */
.feed-surface::-webkit-scrollbar,
.rail-list::-webkit-scrollbar,
.scroll-slim::-webkit-scrollbar {
    width: 10px;
}

.feed-surface::-webkit-scrollbar-track,
.rail-list::-webkit-scrollbar-track,
.scroll-slim::-webkit-scrollbar-track {
    background: transparent;
}

.feed-surface::-webkit-scrollbar-thumb,
.rail-list::-webkit-scrollbar-thumb,
.scroll-slim::-webkit-scrollbar-thumb {
    background: rgba(227, 170, 164, 0.26);
    border-radius: var(--radius-pill);
    border: 3px solid transparent;
    background-clip: content-box;
}

.feed-surface::-webkit-scrollbar-thumb:hover,
.rail-list::-webkit-scrollbar-thumb:hover,
.scroll-slim::-webkit-scrollbar-thumb:hover {
    background: rgba(227, 170, 164, 0.46);
    background-clip: content-box;
}

.feed-surface,
.rail-list,
.scroll-slim {
    scrollbar-width: thin;
    scrollbar-color: rgba(227, 170, 164, 0.3) transparent;
}

/* ------------------------------------------------------- legal furniture fit */
/* legal.js injects its own stylesheet after this one, so these rules carry an
   extra selector to win the tie. The wording and prominence of the notice are
   left exactly as the legal layer sets them; only spacing and corners are
   adjusted so the notice sits inside the new layout instead of on top of it. */
body.msla-app .msla-banner {
    border-radius: var(--radius-md);
    margin: 0 0 var(--sp-1);
}

body.msla-app .msla-stamp {
    border-radius: var(--radius-pill);
    font-family: var(--font-ui);
    letter-spacing: 0.1em;
}

body.msla-app footer {
    /* The page no longer scrolls, so anything down here is space taken away
       from the reading area. Keep the legal text fully visible but compact. */
    padding: var(--sp-3) var(--sp-5) var(--sp-4);
    border-top: 1px solid var(--line-faint);
    background: rgba(7, 10, 18, 0.55);
}

/* ------------------------------------------------------------------ utility */
.u-hide { display: none !important; }
.u-nowrap { white-space: nowrap; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------- responsive */
/* Laptops in conference rooms are often 1280 wide or narrower, so the rail
   narrows before it is dropped below the feed. */
@media (max-width: 1180px) {
    .app-stage {
        padding: var(--sp-4) var(--sp-4) var(--sp-3);
        gap: var(--sp-4);
    }

    .stage-rail,
    .stage-rail--wide {
        width: 258px;
        flex-basis: 258px;
    }
}

@media (max-width: 900px) {
    .app-shell {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .feed-surface {
        height: 62vh;
        flex: none;
    }

    .app-stage {
        flex-direction: column;
    }

    .stage-rail,
    .stage-rail--wide {
        width: 100%;
        flex-basis: auto;
    }

    .rail-list {
        max-height: 220px;
    }

    .topbar {
        flex-wrap: wrap;
        gap: var(--sp-3);
        padding: var(--sp-3) var(--sp-4);
    }

    .topbar-case {
        padding-left: 0;
        border-left: none;
        order: 3;
        flex-basis: 100%;
    }

    .topbar-caption {
        white-space: normal;
    }

    .feed-surface {
        padding: var(--sp-4);
    }

    .feed-line {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* On a phone the timestamp moves inline rather than eating a column. */
    .feed-time {
        grid-column: 1;
        text-align: left;
        line-height: 1.4;
        margin-bottom: 0.1em;
    }

    .feed-body {
        grid-column: 1;
    }
}

/* Anyone who has asked their system to reduce motion gets a still interface.
   Nothing here is decorative enough to be worth overriding that. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Printing is not a supported way to use the feed, but if someone tries, the
   page must not come out looking like an official document. */
@media print {
    body::after {
        content: 'REAL-TIME REFERENCE FEED — NOT AN OFFICIAL RECORD';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 8px;
        text-align: center;
        font-weight: 700;
        border-bottom: 2px solid #000;
    }
}
