/* Globesmith web page. Generic by design: the organization's color, theme, tagline and example questions come from its
   config (/org), so another organization re-skins it without touching this file.

   Palette: neutral charcoal surfaces with one accent (the "smith" family look: karaokesmith.com, tagsmith.app).
   --brand is the accent for fills (buttons, the logo mark) and --brand-ink is the text color on top of it, chosen by
   contrast. --accent is the accent as text or an outline on the page background, adjusted per theme to stay readable. */

:root {
  --brand: #f97316;                                   /* replaced from /org */
  --brand-ink: #140900;                               /* replaced from /org */
  --cool: #8fb0ff;
  --serif: "Iowan Old Style", Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Shape and type scales. Every radius and font size below comes from these, so a skin can change the feel of the whole
     page by overriding a few values here. */
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 20px; --r-xl: 26px; --r-pill: 999px;
  --fs-xs: .74rem; --fs-sm: .82rem; --fs-md: .9rem; --fs-base: 1rem; --fs-lg: 1.05rem; --fs-xl: 1.2rem; --fs-stat: 1.6rem;
  --radius: var(--r-lg);
  color-scheme: dark;
}

/* Dark: the default and the signature look. */
:root, :root[data-theme="dark"] {
  --bg: #0e0e0e;
  --surface: #1a1a1a;
  --surface-2: #242424;
  --ink: #ececec;
  --muted: #a1a1aa;
  --line: #2b2b2b;          /* dividers inside a block */
  --edge: #3d3d3d;          /* outlines around a block */
  --accent: color-mix(in srgb, var(--brand) 90%, white);
  --accent-soft: color-mix(in srgb, var(--brand) 15%, #1a1a1a);
  --accent-line: color-mix(in srgb, var(--brand) 42%, #1a1a1a);
  --cool-soft: color-mix(in srgb, var(--cool) 14%, #1a1a1a);
  --glow-1: color-mix(in srgb, var(--brand) 30%, transparent);
  --glow-2: rgba(143, 176, 255, .13);
  --glow-3: color-mix(in srgb, var(--brand) 14%, transparent);
  --dot: rgba(255, 255, 255, .085);
  --shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 1px 2px rgba(0, 0, 0, .45), 0 10px 28px rgba(0, 0, 0, .4);
  --danger: #fca5a5;
  --logo-ink: var(--ink);
  --notice-ink: #b4b4bb;
  --sos: #ff6b5e;
  --warn-note: #f2b84b;
  --ok: #62d68f;
  --warn-fill: #f2b84b;
  color-scheme: dark;
}

/* Light: warm paper with the same accent, for bright sun. */
:root[data-theme="light"] {
  --bg: #f1eee9;
  --surface: #ffffff;
  --surface-2: #ebe7e0;
  --ink: #1b1816;
  --muted: #5e5851;
  --line: #e4ded5;
  --edge: #c6bdae;
  --accent: color-mix(in srgb, var(--brand) 68%, black);
  --accent-soft: color-mix(in srgb, var(--brand) 11%, white);
  --accent-line: color-mix(in srgb, var(--brand) 40%, white);
  --cool: #3b5fc0;
  --cool-soft: #e8eefc;
  --glow-1: color-mix(in srgb, var(--brand) 26%, transparent);
  --glow-2: rgba(80, 120, 220, .11);
  --glow-3: color-mix(in srgb, var(--brand) 12%, transparent);
  --dot: rgba(60, 40, 10, .08);
  --shadow: 0 1px 2px rgba(40, 25, 5, .08), 0 8px 22px rgba(40, 25, 5, .08);
  --danger: #b3261e;
  --logo-ink: #18212f;
  --notice-ink: #6a635a;
  --sos: #c62d20;
  --warn-note: #8a5a00;
  --ok: #17703b;
  --warn-fill: #d6950f;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }

/* Texture: a soft accent glow in the top corner and a faint dot grid that fades out downwards. Both sit behind the
   cards, so they only show in the empty areas. */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before {
  background:
    radial-gradient(1200px 640px at 6% -12%, var(--glow-1), transparent 64%),
    radial-gradient(980px 560px at 104% 2%, var(--glow-2), transparent 60%),
    radial-gradient(900px 560px at 100% 104%, var(--glow-3), transparent 62%);
}
body::after {
  /* Same shape as danehartman.com: soft 1px dots on a 28px grid, strongest near the top middle and fading out to the
     left, right and bottom. */
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.7px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 65% 85% at 50% 25%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 65% 85% at 50% 25%, #000 15%, transparent 72%);
}

.sprite { position: absolute; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs); }

/* ---------------------------------------------------------------- layout */
.app { min-height: 100dvh; display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; }
main { flex: 1; padding: 8px 18px 28px; outline: none; }

.notice { margin: 0; padding: 5px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--notice-ink); font-size: var(--fs-xs); line-height: 1.35; text-align: center; text-wrap: pretty; }
.notice::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--brand); vertical-align: 1px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 4px; padding-top: max(14px, env(safe-area-inset-top)); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); border-radius: var(--r-sm); min-width: 0; }
.mark { flex: none; display: grid; place-items: center; color: var(--logo-ink); }
.logo { display: block; width: 36px; height: 43px; }
.logo-pin { fill: currentColor; }                    /* the globe pin follows the text color of the theme */
.logo-spark { fill: var(--logo-spark, var(--brand)); }   /* the spark takes the skin's accent; a skin can set --logo-spark to use another color */
.brand-text { display: grid; line-height: 1.2; min-width: 0; }
.brand-name { font-weight: 700; letter-spacing: -.01em; }
.brand-org { color: var(--muted); font-size: var(--fs-sm); }

/* ---------------------------------------------------------------- home */
.home { padding-top: clamp(8px, 3vh, 32px); }
.display { font: 750 clamp(1.95rem, 6.6vw, 2.7rem)/1.1 var(--sans); letter-spacing: -.03em; margin: 0 0 12px; text-wrap: balance; }
.display .hl { color: var(--accent); }
.lede { color: var(--muted); font-size: var(--fs-lg); margin: 0 0 26px; max-width: 34em; }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 700 var(--fs-xs)/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--ink) 72%, var(--bg)); margin: 22px 0 10px; }
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--edge); }
.card .eyebrow { margin-top: 0; } .card .eyebrow::after { display: none; }
.eyebrow .dot-k { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.eyebrow .dot-k.red { background: var(--sos); } .eyebrow .dot-k.amber { background: var(--warn-note); } .eyebrow .dot-k.green { background: var(--ok); } .eyebrow .dot-k.blue { background: var(--cool); }
.eyebrow .n { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.eyebrow .count { font-weight: 500; letter-spacing: 0; text-transform: none; margin-left: 4px; }

.chips { display: grid; gap: 10px; margin-bottom: 22px; }
.chip { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; width: 100%; min-height: 56px;
        padding: 12px 16px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-md); cursor: pointer;
        box-shadow: var(--shadow); transition: border-color .15s, transform .15s, background .15s; }
.chip:hover { border-color: var(--accent-line); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.chip:active { transform: scale(.992); }
.chip .ic { color: var(--accent); width: 18px; height: 18px; }
@media (min-width: 640px) { .chips { grid-template-columns: 1fr 1fr; } }

.recent ul { list-style: none; margin: 0; padding: 0; }
.recent li { border-top: 1px solid var(--line); }
.recent li:first-child { border-top: 0; }
.recent button { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 46px; text-align: left; background: none; border: 0; cursor: pointer; color: var(--ink); padding: 8px 2px; }
.recent button:hover span { color: var(--accent); }
.recent .ic { color: var(--muted); width: 17px; height: 17px; }

/* ---------------------------------------------------------------- result */
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 4px 0 -4px -4px; padding: 0 8px 0 4px; background: none; border: 0; border-radius: var(--r-sm); color: var(--accent); font-size: var(--fs-md); font-weight: 650; cursor: pointer; }
.back-link .ic { width: 18px; height: 18px; transform: rotate(180deg); }
.back-link:hover { background: var(--accent-soft); }
.question { font: 700 clamp(1.35rem, 4.6vw, 1.75rem)/1.2 var(--sans); letter-spacing: -.02em; margin: 14px 0 16px; text-wrap: balance; }
.card { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow); }

.answer { padding: 18px 18px 6px; border-top: 2px solid var(--brand); }
.answer-body { font-size: var(--fs-lg); line-height: 1.62; }
.answer-body p { margin: 0 0 .75em; }
.answer-body ul, .answer-body ol { margin: 0 0 .75em; padding-left: 1.3em; }
.answer-body li { margin: .2em 0; padding-left: .2em; }
.answer-body li::marker { color: var(--brand); }
.answer-body strong { font-weight: 650; }
.cite { display: inline-grid; place-items: center; min-width: 1.35em; height: 1.35em; padding: 0 .3em; margin: 0 .12em; border: 0; border-radius: var(--r-pill);
        background: var(--accent-soft); color: var(--accent); font: 700 var(--fs-xs)/1 var(--sans); cursor: pointer; vertical-align: .12em; }
.cite:hover { background: var(--brand); color: var(--brand-ink); }

.actions { display: flex; align-items: center; gap: 4px; margin: 6px -8px 0; padding: 8px 4px 10px; border-top: 1px solid var(--line); }
.actions .spacer { flex: 1; }
.rate-label { color: var(--muted); font-size: var(--fs-sm); margin-right: 2px; }
.act { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; background: none; border: 0; border-radius: var(--r-sm); color: var(--muted); cursor: pointer; font-size: var(--fs-md); }
.act:hover { background: var(--surface-2); color: var(--ink); }
.act.icon { width: 40px; padding: 0; justify-content: center; }
.act.down .ic { transform: rotate(180deg); }
.act[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.act[aria-pressed="true"] .ic { fill: currentColor; fill-opacity: .2; }

/* Loading */
.loading { padding: 18px; }
.loading-text { margin: 0 0 14px; color: var(--muted); font-size: var(--fs-base); }
.loading-text::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75%, 100% { content: "..."; } }
.skeleton { display: grid; gap: 10px; }
.skeleton span { height: 12px; border-radius: var(--r-xs); background: linear-gradient(90deg, var(--line) 0%, var(--surface-2) 50%, var(--line) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton span:nth-child(1) { width: 92%; } .skeleton span:nth-child(2) { width: 78%; } .skeleton span:nth-child(3) { width: 55%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Error */
.errorcard { padding: 18px; }
.error-title { margin: 0 0 4px; font-weight: 650; color: var(--danger); }
.error-text { margin: 0 0 14px; color: var(--muted); }
.btn { min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--r-sm); background: var(--brand); color: var(--brand-ink); font-weight: 650; cursor: pointer; }
.btn:hover { filter: brightness(1.06); }

/* Sources */
.sources { margin-top: 26px; }
.src { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 10px; scroll-margin-top: 16px; transition: border-color .2s, box-shadow .2s; }
.src.flash { border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-soft); }
.src-head { display: flex; gap: 12px; align-items: flex-start; }
.ftype { flex: none; width: 38px; height: 44px; border-radius: var(--r-xs); display: grid; place-items: center; font: 700 var(--fs-xs)/1 var(--sans); letter-spacing: .04em; color: #fff; background: #64748b; }
.ftype.doc { background: #2a67cc; } .ftype.xls { background: #17753f; } .ftype.pdf { background: #bf3329; } .ftype.text { background: #6b7280; }
.src-main { min-width: 0; flex: 1; }
/* The number stays beside the name; a long name wraps inside its own column instead of pushing the number onto its own line. */
.src-title { display: flex; align-items: baseline; gap: 8px; }
.src-num { flex: none; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.src-name { min-width: 0; font-weight: 600; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
a.src-name:hover { text-decoration: underline; color: var(--accent); }
.nw { white-space: nowrap; }
.src-name .ic { width: 14px; height: 14px; margin-left: 4px; vertical-align: -2px; color: var(--muted); }
.src-meta { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; overflow-wrap: anywhere; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag { font-size: var(--fs-xs); font-weight: 650; padding: 3px 9px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); }
.tag.old { background: var(--cool-soft); color: var(--cool); }
/* "Used in the answer": a quiet check mark, not another orange block. */
.src .tag:not(.old) { background: var(--surface-2); color: var(--ink); }
.src .tag:not(.old)::before { content: "\2713\00a0"; color: var(--ok); }
.toggle { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 6px 0; background: none; border: 0; color: var(--accent); font-size: var(--fs-md); font-weight: 650; cursor: pointer; min-height: 36px; }
.toggle .ic { width: 16px; height: 16px; transition: transform .2s; }
.toggle[aria-expanded="true"] .ic { transform: rotate(180deg); }
.passage-item { margin-top: 10px; border-radius: var(--r-xs); scroll-margin-top: 16px; transition: box-shadow .2s; }
.passage-item.flash { box-shadow: 0 0 0 3px var(--accent-soft); }
.passage-label { font-size: var(--fs-sm); font-weight: 650; color: var(--muted); }
.passage-item.cited .passage { border-left-color: var(--accent); }
.passage { margin: 6px 0 2px; padding: 10px 12px; border-left: 3px solid var(--accent-line); background: var(--bg); border-radius: 0 var(--r-xs) var(--r-xs) 0; font-size: var(--fs-md); line-height: 1.55; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- composer */
.dock { position: sticky; bottom: 0; z-index: 5; padding-bottom: env(safe-area-inset-bottom); background: linear-gradient(to top, color-mix(in srgb, var(--bg) 96%, transparent) 72%, transparent); }
.dock:has(.tabs:not([hidden])) { padding-bottom: 0; }
.composer { padding: 8px 14px 4px; }
.field { display: flex; align-items: flex-end; gap: 8px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-xl); padding: 6px 6px 6px 18px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
#q { flex: 1; border: 0; outline: none; resize: none; background: transparent; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.45; padding: 10px 0; max-height: 9.5em; min-width: 0; }
#q::placeholder { color: var(--muted); }
.send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; cursor: pointer; transition: opacity .15s, transform .15s, filter .15s; }
.send .ic { width: 22px; height: 22px; stroke-width: 2.3; }
.send:not(:disabled):hover { filter: brightness(1.07); }
.send:disabled { background: var(--surface-2); color: var(--muted); cursor: default; }      /* neutral, not a washed-out orange */
.send:not(:disabled):active { transform: scale(.94); }
.hint { margin: 6px 4px 0; text-align: center; color: var(--muted); font-size: var(--fs-xs); line-height: 1.3; text-wrap: pretty; }
.field:focus-within, .send:focus-visible { outline: none; }
.send:focus-visible { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--brand); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- shell: header actions, context bar, menus */
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.sos { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px 0 11px; border: 1px solid color-mix(in srgb, var(--sos) 55%, transparent); border-radius: var(--r-sm);
       background: color-mix(in srgb, var(--sos) 14%, var(--surface)); color: var(--sos); font-weight: 650; font-size: var(--fs-md); cursor: pointer; }
.sos:hover { background: color-mix(in srgb, var(--sos) 24%, var(--surface)); }
.sos .ic { width: 20px; height: 20px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--edge); background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: var(--fs-sm); letter-spacing: .02em; cursor: pointer; display: grid; place-items: center; }
.avatar:hover, .avatar[aria-expanded="true"] { border-color: var(--accent-line); background: var(--accent-soft); }
/* On a phone the Emergency button keeps its word (it is the most important control), so the organization's name steps
   aside; it and the role note are in the account menu. Only on very narrow screens does the button shrink to an icon. */
@media (max-width: 430px) { .brand-org { display: none; } .context-note { display: none; } }
@media (max-width: 340px) { .sos span { display: none; } .sos { padding: 0; width: 40px; justify-content: center; } }

.context { display: flex; align-items: center; gap: 10px; padding: 6px 18px 12px; flex-wrap: wrap; border-bottom: 1px solid var(--edge); margin-bottom: 4px; }
.program-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border: 1px solid var(--edge); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-weight: 600; font-size: var(--fs-md); cursor: pointer; }
.program-btn:hover, .program-btn[aria-expanded="true"] { border-color: var(--accent-line); }
.program-btn .ic { width: 17px; height: 17px; color: var(--accent); }
.program-btn .chev { width: 15px; height: 15px; color: var(--muted); }
.context-note { color: var(--muted); font-size: var(--fs-sm); }

.app { position: relative; }
.menu { position: absolute; z-index: 30; min-width: 230px; max-width: calc(100% - 28px); padding: 8px; border: 1px solid var(--edge); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow), 0 18px 50px rgba(0, 0, 0, .35); }
.menu[hidden] { display: none; }
.account-menu { right: 14px; top: 62px; }
.program-menu { left: 14px; top: 112px; min-width: 260px; }
.who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.who strong { display: block; }
.who-line { display: block; color: var(--muted); font-size: var(--fs-sm); line-height: 1.35; }
.role-badge { display: inline-block; margin-top: 4px; font-size: var(--fs-xs); font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); }
.menu-label { margin: 6px 10px 6px; font: 650 var(--fs-xs)/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 6px 8px; padding: 4px; border-radius: var(--r-sm); background: var(--bg); }
.skin-seg { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }      /* any number of skins side by side */
.seg-btn, .skin-btn { min-height: 36px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.seg-btn[aria-pressed="true"], .skin-btn[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); box-shadow: 0 0 0 1px var(--accent-line) inset; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--surface-2); }
.menu-item .ic { color: var(--muted); }
.menu-item .sun { display: none; } :root[data-theme="dark"] .menu-item .moon { display: none; } :root[data-theme="dark"] .menu-item .sun { display: block; }
.option { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); text-align: left; cursor: pointer; }
.option:hover { background: var(--surface-2); }
.option[aria-selected="true"] { background: var(--accent-soft); }
.option small { color: var(--muted); }

/* ---------------------------------------------------------------- shell: tab bar */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--edge); background: color-mix(in srgb, var(--surface) 96%, transparent); padding-bottom: env(safe-area-inset-bottom); }
.tabs[hidden] { display: none; }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 2px; border: 0; background: none; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.tab .ic { width: 22px; height: 22px; }
.tab:hover { color: var(--ink); }
.tab.demo { opacity: .55; }                       /* demo placeholders read as not live; Ask stays full strength */
.tab.demo:hover, .tab.demo:focus-visible, .tab.demo[aria-current="page"] { opacity: 1; }      /* the tab you are on never looks disabled */
.tab[aria-current="page"] { color: var(--accent); }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 26%; right: 26%; height: 2px; border-radius: 2px; background: var(--brand); }
.tab .dot { position: absolute; top: 9px; left: calc(50% + 10px); width: 6px; height: 6px; border-radius: 50%; background: var(--brand); opacity: .75; }

/* ---------------------------------------------------------------- shell: preview screens */
.preview { padding-top: 14px; }
.preview-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.preview h1 { font: 750 clamp(1.5rem, 5.2vw, 1.9rem)/1.15 var(--sans); letter-spacing: -.025em; margin: 0; }
.pill { display: inline-block; font-size: var(--fs-xs); font-weight: 750; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, var(--cool) 50%, var(--surface)); color: var(--cool); background: var(--cool-soft); }
.step .pill { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.preview .blurb { color: var(--muted); font-size: var(--fs-lg); margin: 0 0 18px; max-width: 36em; }
.will-show { padding: 16px 18px; margin-bottom: 14px; }
.will-show h2 { margin: 0 0 8px; }
.will-show ul { margin: 0; padding-left: 1.2em; }
.will-show li { margin: .35em 0; }
.will-show li::marker { color: var(--brand); }
.planned { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.planned .label { width: 100%; }
.planned.tight { margin-top: 14px; }
.ghost-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border: 1px dashed var(--edge); border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: not-allowed; font-size: var(--fs-md); }
.ghost-btn .ic { width: 16px; height: 16px; }
.not-built { font-size: var(--fs-xs); color: var(--muted); }

.vote { padding: 16px 18px; margin: 8px 0 20px; border-top: 2px solid var(--brand); }
.vote h2 { margin: 0 0 4px; font: 700 var(--fs-lg)/1.2 var(--sans); }
.vote p { margin: 0 0 12px; color: var(--muted); font-size: var(--fs-md); }
.vote-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.vote-opt { min-height: 44px; border: 1px solid var(--edge); border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); font-weight: 650; cursor: pointer; }
.vote-opt:hover { border-color: var(--accent-line); }
.vote-opt[aria-pressed="true"] { border-color: var(--brand); background: var(--accent-soft); color: var(--accent); }
.vote textarea { width: 100%; min-height: 64px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--edge); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; resize: vertical; }
.vote textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-soft); }
.vote-row { display: flex; align-items: center; gap: 12px; }
.vote-status { margin: 0; font-size: var(--fs-sm); color: var(--muted); }

/* ---------------------------------------------------------------- shell: sheets (emergency, about) */
.sheet { width: min(580px, 100%); max-width: 100%; max-height: 90dvh; margin: auto auto 0; padding: 0; border: 1px solid var(--edge); border-bottom: 0; border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--surface); color: var(--ink); box-shadow: 0 -10px 50px rgba(0, 0, 0, .5); overflow: auto; }
.sheet::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
@media (min-width: 640px) { .sheet { margin: auto; border-bottom: 1px solid var(--line); border-radius: var(--r-xl); } }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font: 750 var(--fs-xl)/1.2 var(--sans); flex: 1; }
.sheet-body { padding: 14px 18px 22px; }
.close { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); cursor: pointer; }
.sheet-note { margin: 0 0 14px; color: var(--muted); font-size: var(--fs-md); }
.sos-title { color: var(--sos); }
.entry { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.entry:first-of-type { border-top: 0; }
.entry-label { color: var(--muted); font-size: var(--fs-sm); font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.entry-who { font-weight: 650; overflow-wrap: anywhere; }
.entry-meta { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: var(--fs-sm); }
/* Call is tonal everywhere except the Emergency sheet, so the only solid orange on most screens is the one main action
   (Send, the active section switch). In the sheet, calling is the whole point, so it stays solid. */
.call { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 14px; border: 1px solid var(--accent-line); border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent); text-decoration: none; font-weight: 700; white-space: nowrap; }
.call:hover { background: color-mix(in srgb, var(--brand) 18%, var(--surface)); }
.sheet .call { border-color: transparent; background: var(--brand); color: var(--brand-ink); }
.sheet .call:hover { background: var(--brand); filter: brightness(1.06); }
.call .ic { width: 18px; height: 18px; }
.mapbtn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border: 1px solid var(--edge); border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-weight: 650; }
.mapbtn .ic { width: 18px; height: 18px; color: var(--accent); }
.about-list { margin: 0 0 14px; padding-left: 1.2em; }
.about-list li { margin: .4em 0; }
.about-h { margin: 16px 0 6px; font: 700 var(--fs-base)/1.2 var(--sans); }

/* ---------------------------------------------------------------- preview screens: sample content */
.muted { color: var(--muted); }
.privacy-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border: 1px dashed var(--accent-line); border-radius: var(--r-sm); background: var(--accent-soft); font-size: var(--fs-sm); line-height: 1.4; }
.privacy-note .ic { width: 17px; height: 17px; margin-top: 1px; color: var(--accent); }
.team { margin: 0 0 12px; font-size: var(--fs-md); }
.sub-seg { margin: 0 0 14px; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
.sub-panel[hidden] { display: none; }

.person { padding: 12px 14px; margin-bottom: 10px; }
.person-top { display: flex; align-items: center; gap: 12px; }
.avatar-sm { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--edge); font-weight: 700; font-size: var(--fs-sm); color: var(--muted); }
.avatar-sm .ic { width: 18px; height: 18px; }
.person-name { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.person-name .muted { font-size: var(--fs-sm); }
.person-note { margin: 8px 0 0; font-size: var(--fs-md); color: var(--ink); }
.call.small, .mapbtn.small { min-height: 38px; padding: 0 12px; font-size: var(--fs-sm); border-radius: var(--r-sm); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge { font-size: var(--fs-xs); font-weight: 650; padding: 3px 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink); border: 1px solid var(--edge); }
.badge.allergy { background: color-mix(in srgb, var(--warn-note) 16%, var(--surface)); border-color: color-mix(in srgb, var(--warn-note) 45%, var(--surface)); color: var(--warn-note); }
.badge.allergy.severe { background: color-mix(in srgb, var(--sos) 16%, var(--surface)); border-color: color-mix(in srgb, var(--sos) 50%, var(--surface)); color: var(--sos); }
.badge.med { background: var(--cool-soft); border-color: color-mix(in srgb, var(--cool) 40%, var(--surface)); color: var(--cool); }
.badge.quiet { color: var(--muted); background: transparent; }

.now { padding: 12px 14px 12px 20px; margin-bottom: 12px; }
.now .eyebrow { margin-bottom: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.step { position: relative; display: grid; grid-template-columns: 88px 1fr auto; gap: 4px 12px; padding: 12px 0 12px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.step::before { content: ""; position: absolute; left: -7px; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); }
.step.done::before { background: var(--ok); border-color: var(--ok); }
.step.current { border-left-color: var(--brand); }
.step.current::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--accent-soft); }
.step.done .step-body strong { color: var(--muted); }
.when { color: var(--muted); font-size: var(--fs-sm); font-weight: 650; padding-top: 2px; }
.step-body p { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-md); }
@media (max-width: 420px) { .step { grid-template-columns: 1fr auto; } .when { grid-column: 1 / -1; padding-top: 0; } }

.tasks { list-style: none; margin: 0 0 14px; padding: 0; }
.task { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task input { flex: none; width: 20px; height: 20px; accent-color: var(--brand); opacity: .85; cursor: not-allowed; }
.task-body { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.task-body .muted { font-size: var(--fs-sm); }
.task.done .task-title { color: var(--muted); text-decoration: line-through; }
.due { flex: none; font-size: var(--fs-sm); font-weight: 650; color: var(--muted); }
.due.overdue { color: var(--sos); }
.checklist { padding: 14px 16px 4px; margin-bottom: 12px; }
.check-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 8px; border: 0; border-radius: var(--r-pill); overflow: hidden; background: var(--surface-2); }
progress::-webkit-progress-bar { background: var(--surface-2); border-radius: var(--r-pill); }
progress::-webkit-progress-value { background: var(--brand); border-radius: var(--r-pill); }
progress::-moz-progress-bar { background: var(--brand); border-radius: var(--r-pill); }
.ovr { padding: 12px 16px 6px; margin-bottom: 12px; }
.ovr .about-h { margin-top: 0; }
.ovr-row { display: grid; grid-template-columns: minmax(110px, 1.1fr) 1.2fr auto; gap: 4px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ovr-row:first-of-type { border-top: 0; }
.ovr-who { display: grid; line-height: 1.25; } .ovr-who .muted { font-size: var(--fs-sm); }
.ovr-count { font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.tag.late { grid-column: 1 / -1; justify-self: start; background: color-mix(in srgb, var(--sos) 14%, var(--surface)); color: var(--sos); }
@media (min-width: 560px) { .tag.late { grid-column: auto; } .ovr-row { grid-template-columns: minmax(130px, 1fr) 1.2fr auto auto; } }

.near { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px 12px 20px; margin-bottom: 12px; }
.near .ic { width: 22px; height: 22px; margin-top: 2px; color: var(--accent); flex: none; }
.near > div { display: grid; line-height: 1.3; } .near .muted { font-size: var(--fs-sm); }
/* Cards with a colored stripe on the left. The stripe sits inside the card (clipped by its rounded corners) instead of being
   a thick border-left, which draws a crescent on a rounded box. Same method as the student cards. */
.now, .near, .note { position: relative; overflow: hidden; }
.now::before, .near::before, .note::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--edge); }
.now::before { background: var(--brand); }
.near.caution::before, .note.caution::before { background: var(--warn-note); }
.near.warning::before, .note.warning::before { background: var(--sos); }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: none; min-height: 36px; padding: 0 14px; border: 1px solid var(--edge); border-radius: var(--r-pill); background: var(--surface); color: var(--muted); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; }
.filter[aria-pressed="true"] { border-color: var(--brand); background: var(--accent-soft); color: var(--accent); }
.note { padding: 14px 16px 14px 22px; margin-bottom: 10px; }
.note[hidden] { display: none; }
.note-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.note-place { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.note-place .ic { width: 16px; height: 16px; color: var(--accent); }
.note p { margin: 0 0 10px; }
.note-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.badge.sev.warning { background: color-mix(in srgb, var(--sos) 16%, var(--surface)); border-color: color-mix(in srgb, var(--sos) 50%, var(--surface)); color: var(--sos); }
.badge.sev.caution { background: color-mix(in srgb, var(--warn-note) 16%, var(--surface)); border-color: color-mix(in srgb, var(--warn-note) 45%, var(--surface)); color: var(--warn-note); }
.notes-list { margin-bottom: 18px; }
.step .pill { align-self: start; justify-self: end; white-space: nowrap; margin-top: 2px; }
.timeline { margin-bottom: 20px; }

/* ---------------------------------------------------------------- clarity pass: grouped rows, status colors */
.card.rows { padding: 0 16px; margin-bottom: 12px; }
.rows .row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows .row:first-child { border-top: 0; }
.rows .row .person-name { flex: 1; min-width: 0; }
.rows .row .person-note { flex-basis: 100%; margin: 0 0 0 52px; font-size: var(--fs-md); color: var(--muted); }
.card.list { padding: 2px 14px; margin-bottom: 14px; }
.card.list .tasks { margin: 0; }
.eyebrow-link { margin-top: 18px; }

progress[data-level="ok"]::-webkit-progress-value { background: var(--ok); } progress[data-level="ok"]::-moz-progress-bar { background: var(--ok); }
progress[data-level="warn"]::-webkit-progress-value { background: var(--warn-fill); } progress[data-level="warn"]::-moz-progress-bar { background: var(--warn-fill); }
.task.done input { accent-color: var(--ok); }
.task.done .task-body::after { content: none; }
.due.done { color: var(--ok); }
.tag.ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.note-group { margin-bottom: 4px; }
.note-group[hidden] { display: none; }
.person .person-top .call.small { flex: none; }
.sheet .entry { border-top-color: var(--line); }
.badge { border-color: var(--edge); }
.vote { border-top-color: var(--brand); }

/* The switch that changes the content below it (Students / Itinerary / Contacts, Team overview / My tasks): a bordered
   track with a solid active segment and full-strength labels, so it reads as the main control on the screen. */
.sub-seg { padding: 5px; gap: 5px; border: 1px solid var(--edge); background: var(--surface-2); border-radius: var(--r-md); box-shadow: var(--shadow); }
.sub-seg .seg-btn { min-height: 48px; border-radius: var(--r-sm); color: var(--ink); font-weight: 650; font-size: var(--fs-base); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s; }
.sub-seg .seg-btn:hover { background: color-mix(in srgb, var(--ink) 9%, transparent); }
.sub-seg .seg-btn[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); font-weight: 750; box-shadow: 0 2px 12px color-mix(in srgb, var(--brand) 38%, transparent); }
.seg-n { min-width: 1.5em; padding: 1px 7px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--ink) 14%, transparent); font-size: var(--fs-sm); font-weight: 700; line-height: 1.5; text-align: center; }
.sub-seg .seg-btn[aria-pressed="true"] .seg-n { background: color-mix(in srgb, var(--brand-ink) 18%, transparent); }
@media (max-width: 380px) { .sub-seg .seg-btn { font-size: var(--fs-md); gap: 5px; } }

/* Student cards: each one reads as its own item. A lifted surface, a firmer outline, more space between cards and a
   left stripe that carries the allergy level (red severe, amber other, plain edge colour for none). */
.person { position: relative; margin-bottom: 14px; padding-left: 18px; background: var(--surface-card); border-color: var(--edge-card); overflow: hidden; }
.person::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--edge-card); }
.person.caution::before { background: var(--warn-note); }
.person.severe::before { background: var(--sos); }
:root, :root[data-theme="dark"] { --surface-card: #212121; --edge-card: #4a4a4a; }
:root[data-theme="light"] { --surface-card: var(--surface); --edge-card: var(--edge); }

/* ---------------------------------------------------------------- step 3: scope chips, pinned essentials, differing documents, insights */
.scope { display: flex; align-items: center; gap: 10px; padding: 0 2px 8px; }
.scope-label { flex: none; color: var(--muted); font-size: var(--fs-sm); font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.scope .filters { padding: 0; flex: 1; min-width: 0; }
.scope .filter { min-height: 34px; }
/* On a phone the label gets its own line and the chips shrink a little, so all three places (an admin has three) show without sideways scrolling. */
@media (max-width: 480px) {
  .scope { gap: 2px 8px; padding-bottom: 6px; }
  .scope .filters { gap: 6px; }
  .scope .filter { padding: 0 11px; font-size: var(--fs-sm); }
  /* With two chips the label fits on the same line; with three (an admin) it gets its own line so none runs off the screen. */
  .scope:has(.filter:nth-child(3)) { flex-wrap: wrap; }
  .scope:has(.filter:nth-child(3)) .scope-label { flex-basis: 100%; }
  .scope:has(.filter:nth-child(3)) .filters { flex-basis: 100%; }
}
.scope-note { margin: -6px 0 14px; color: var(--muted); font-size: var(--fs-sm); }

/* The few numbers needed first: one container, one row each. The Emergency button is always in the header, so these sit
   below the suggestions instead of ahead of them. */
.pinned { margin: 6px 0 6px; }
.pin-list { padding: 0 6px 0 16px; margin-bottom: 8px; background: var(--surface-card); border-color: var(--edge-card); }
.pin-card { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.pin-card:first-child { border-top: 0; }
.pin-text { flex: 1; min-width: 0; display: grid; gap: 1px; justify-items: start; }
.pin-label { color: var(--muted); font-size: var(--fs-sm); font-weight: 650; }

.conflict { margin: 0 0 14px; padding: 14px 16px; border-color: color-mix(in srgb, var(--warn-note) 55%, var(--edge)); background: color-mix(in srgb, var(--warn-note) 9%, var(--surface)); }
.conflict[hidden] { display: none; }
.differ-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: var(--fs-base); color: var(--warn-note); }
.differ-text { margin: 0 0 10px; font-size: var(--fs-md); }
.differ-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.differ-row { padding: 10px 12px; border: 1px solid var(--edge); border-radius: var(--r-sm); background: var(--surface); }
.differ-row.newest { border-color: color-mix(in srgb, var(--ok) 55%, var(--edge)); }
.differ-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 6px; }
.stat { padding: 12px 14px; background: var(--surface-card); border: 1px solid var(--edge-card); border-radius: var(--r-md); display: grid; gap: 2px; box-shadow: var(--shadow); }
.stat strong { font-size: var(--fs-stat); line-height: 1.1; }
.stat span { color: var(--muted); font-size: var(--fs-sm); }
.stat.ok strong { color: var(--ok); } .stat.bad strong { color: var(--sos); } .stat.warn strong { color: var(--warn-note); }
.stat-note { margin: 4px 2px 14px; font-size: var(--fs-sm); }
.empty { margin: 6px 2px 16px; color: var(--muted); font-size: var(--fs-md); }
.plain { margin: 0; padding-left: 18px; font-size: var(--fs-md); }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.tag.quiet { background: var(--surface-2); color: var(--muted); }
.row .tag.late { grid-column: auto; }
.try-heading { margin-top: 20px; }
/* The dock is solid (with a soft fade above it) so the scope chips never sit on top of page content. */
.dock { background: var(--bg); }                       /* fully solid: even a few percent of see-through shows page text next to the field */
.dock::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 48px; pointer-events: none; background: linear-gradient(to top, var(--bg), transparent); }

/* Student information: a gap is drawn as loudly as a value, never as an empty space (see studentCard in screens.js). */
.facts { margin: 10px 0 0; display: grid; gap: 6px; }
.fact { display: grid; grid-template-columns: minmax(96px, 34%) 1fr; gap: 4px 12px; padding: 7px 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--edge); font-size: var(--fs-md); line-height: 1.35; }
.fact dt { color: var(--muted); font-weight: 600; }
.fact dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.fact.blank, .fact.unread { border-style: dashed; border-color: color-mix(in srgb, var(--warn-note) 70%, var(--surface)); background: color-mix(in srgb, var(--warn-note) 10%, var(--surface)); }
.fact.blank dd, .fact.unread dd { font-weight: 650; }
.fact-note { color: var(--muted); font-weight: 400; }
.tag.gap { background: color-mix(in srgb, var(--warn-note) 16%, var(--surface)); color: var(--warn-note); border: 1px dashed color-mix(in srgb, var(--warn-note) 60%, var(--surface)); }
.person.has-gap { border-style: dashed; border-color: color-mix(in srgb, var(--warn-note) 60%, var(--edge-card)); }
.contacts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.contact { display: flex; align-items: center; gap: 10px; }
.gap-line { margin: 10px 0 0; padding: 8px 10px; border-radius: var(--r-sm); border: 1px dashed color-mix(in srgb, var(--warn-note) 60%, var(--surface)); background: color-mix(in srgb, var(--warn-note) 10%, var(--surface)); font-size: var(--fs-md); line-height: 1.4; }
.gap-panel { padding: 12px 14px; margin: 0 0 14px; border-color: color-mix(in srgb, var(--warn-note) 55%, var(--edge)); background: color-mix(in srgb, var(--warn-note) 9%, var(--surface)); font-size: var(--fs-md); line-height: 1.45; }
.gap-panel p { margin: 0 0 8px; } .gap-panel p:last-child { margin-bottom: 0; }
/* Compact: the one sentence that must always show, then the facts about what is left out as a short run of text. The rest
   (the whole caution, tabs and columns not read) is behind "What to check". */
.gap-panel { padding: 10px 14px; }
.gap-panel .gap-caution { margin-bottom: 6px; }
.gap-meta { font-size: var(--fs-sm); line-height: 1.4; }
.gap-meta p { display: inline; margin: 0; } .gap-meta p::after { content: " "; }
.gap-meta p.stale { display: block; margin-top: 4px; font-weight: 650; }
.gap-more { margin-top: 8px; font-size: var(--fs-sm); }
.gap-more summary { padding: 6px 0; }
.gap-panel .stale, .gap-panel.stale .gap-caution { color: var(--warn-note); }
.gap-more { margin-top: 6px; } .gap-more summary { cursor: pointer; font-weight: 650; }
