/*!
 * victolia 1.6.2 — the victolia.com look (night blue, glass cards, violet-to-blue gradient).
 * Same classes as bedrock. Docs: https://cdn.goldan.net/victolia/1/ (every component, its classes and markup)
 */

/* ------------------------------------------------------------------ fonts */

@font-face {
  font-family: "Inter";
  src: url("inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */

:root {
  --bg: #0f172a;
  --bg-light: #1e293b;
  --card: rgba(30, 41, 59, 0.5);
  --slot: rgba(15, 23, 42, 0.55);
  --slot-hover: rgba(30, 41, 59, 0.85);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.18);
  --field: #1e293b;
  --field-border: rgba(255, 255, 255, 0.08);
  --field-placeholder: #64748b;

  --text: #ffffff;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --sand: #ede9fe;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --off: #475569;

  --violet: #7c3aed;
  --blue: #3b82f6;
  /* --accent draws borders and icons, --accent-text is readable as text. */
  --accent: #8b5cf6;
  --accent-text: #a78bfa;
  --accent-soft: rgba(124, 58, 237, 0.14);
  --gradient: linear-gradient(135deg, var(--violet), var(--blue));
  --stop-gradient: linear-gradient(135deg, #dc2626, #f43f5e);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "DejaVu Sans Mono", monospace;

  color-scheme: dark;
}

/* The site's three section accents: put one on any container. */
.accent-violet { --accent: #a855f7; --accent-text: #c084fc; --accent-soft: rgba(124, 58, 237, 0.14); --gradient: linear-gradient(135deg, #7c3aed, #a855f7); }
.accent-blue { --accent: #60a5fa; --accent-text: #60a5fa; --accent-soft: rgba(59, 130, 246, 0.14); --gradient: linear-gradient(135deg, #2563eb, #60a5fa); }
.accent-indigo { --accent: #818cf8; --accent-text: #818cf8; --accent-soft: rgba(99, 102, 241, 0.14); --gradient: linear-gradient(135deg, #4f46e5, #818cf8); }

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

* { box-sizing: border-box; }

/* Default background: night blue with the hero's violet and blue glows. */
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  line-height: 1.6;
  color: var(--text);
  background-attachment: fixed;
}
body, .bg-glow {
  background-color: var(--bg);
  background-image:
    radial-gradient(700px circle at 50% 0%, rgba(124, 58, 237, 0.18), transparent 70%),
    radial-gradient(500px circle at 90% 85%, rgba(59, 130, 246, 0.12), transparent 70%);
}
.bg-plain { background-image: none; }
/* Faint grid under the glows. */
.bg-grid {
  background-image:
    radial-gradient(700px circle at 50% 0%, rgba(124, 58, 237, 0.18), transparent 70%),
    radial-gradient(500px circle at 90% 85%, rgba(59, 130, 246, 0.12), transparent 70%),
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
}
/* Stars: dots on the glow, like the site's particle hero. */
.bg-stars {
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(196, 181, 253, 0.55), transparent),
    radial-gradient(1px 1px at 90px 110px, rgba(147, 197, 253, 0.5), transparent),
    radial-gradient(1px 1px at 160px 60px, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(700px circle at 50% 0%, rgba(124, 58, 237, 0.18), transparent 70%),
    radial-gradient(500px circle at 90% 85%, rgba(59, 130, 246, 0.12), transparent 70%);
  background-size: 200px 160px, 200px 160px, 200px 160px, auto, auto;
}
/* Strong diagonal glow, for a login or a landing screen. */
.bg-aurora {
  background-image:
    radial-gradient(900px circle at 0% 0%, rgba(124, 58, 237, 0.32), transparent 60%),
    radial-gradient(900px circle at 100% 100%, rgba(59, 130, 246, 0.28), transparent 60%);
}
/* Darker red glow, for error pages. */
.bg-alert {
  background-image:
    radial-gradient(700px circle at 50% 0%, rgba(239, 68, 68, 0.16), transparent 70%),
    radial-gradient(500px circle at 90% 85%, rgba(124, 58, 237, 0.10), transparent 70%);
}

img { max-width: 100%; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { color: #ffffff; background: rgba(124, 58, 237, 0.55); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--violet); }
/* Firefox has no ::-webkit-scrollbar. Chrome 121+ drops those rules once
   scrollbar-color is set, so only browsers without them get it. */
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: var(--bg-light) var(--bg); scrollbar-width: thin; }
}

/* Page column. */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1rem, 5vw, 3rem) clamp(1rem, 3vw, 1.5rem) 4rem;
  display: grid;
  /* One column as wide as the screen: a wide table or field scrolls in
     its own box instead of widening the page. */
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}
.wrap.narrow { max-width: 1040px; }
/* The gap spaces the page's blocks: a heading right in .wrap (the page title)
   loses its own margins. */
:where(.wrap) > :where(h1, h2, h3, h4, h5, h6) { margin: 0; }
/* Grid children may shrink below their content: a wide table scrolls in its
   .table-scroll instead of widening the page. */
:is(.wrap, .stack, .grid) > * { min-width: 0; }
/* One panel centred on the screen (error pages, login, single message). */
.center { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: clamp(1rem, 4vw, 2rem); }

/* Responsive grid of equal cells. */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.row.centered { justify-content: center; }
.row.top { align-items: flex-start; }
/* Icon and text side by side: the text takes the rest of the line. */
.row.nowrap { flex-wrap: nowrap; }
.row.nowrap > :not(.item, .avatar) { flex: 1; min-width: 0; }
ul.row, ol.row, ul.plain, ol.plain { margin: 0; padding: 0; list-style: none; }
/* Vertical stack: children one under the other, evenly spaced. */
.stack { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 1rem; }
/* Wide spacing between the big blocks of a section. */
.stack.loose { gap: clamp(48px, 6vw, 72px); }
/* A .push child goes to the bottom of a stack taller than its content (the
   buttons of cards of equal height in a .grid). */
.stack:has(> .push) { display: flex; flex-direction: column; }
.stack > .push { margin-top: auto; }
/* The gap spaces a stack's children: their own margins go. */
:where(.stack) > :where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, figure) { margin: 0; }
.text-center { text-align: center; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* ------------------------------------------------------- panels and slots */

/* Glass card: translucent slate, hairline border, blur behind. */
.panel {
  /* --pad: .cover reads it to reach the card's edges. */
  --pad: clamp(1.25rem, 3vw, 2rem);
  position: relative;
  padding: var(--pad);
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.panel :is(h1, h2, h3, h4, h5, h6) { margin: 0; }
.panel h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 800; line-height: 1.15; }
.panel-title { margin: 0 0 1rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.4rem 0.75rem; font-size: 1.25rem; font-weight: 700; }
/* An h1 can be a panel title too (the page's main heading). */
.panel h1.panel-title { font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
/* Form-width panel, e.g. alone in a .center for a login. */
.panel.narrow { width: min(100%, 400px); }
/* Wider form panel with more air, the size of a native login card. */
.panel.roomy { --pad: clamp(1.25rem, 4vw, 2.75rem); width: min(100%, 500px); }
.panel.roomy .panel-title { font-size: 1.5rem; }
.count { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.panel > p:not(.slot), .brand p { color: var(--text-muted); }
/* A card that lights up on hover, like the site's offer cards. */
.panel.hoverable, a.panel { transition: border-color 0.3s, box-shadow 0.3s; }
@media (hover: hover) {
  .panel.hoverable:hover, a.panel:hover { border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }
}

/* Header panel: title + subtitle on the left, actions on the right. */
.brand { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand p { margin: 0.35rem 0 0; font-size: 0.95rem; }

/* Inset area inside a card: darker, rounded. */
.slot {
  color: var(--text);
  background: var(--slot);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.slot.pad { padding: clamp(1rem, 3vw, 1.25rem); }
.slot p { color: var(--text-soft); }
a.slot { color: var(--text); text-decoration: none; }
a.slot, .slot.hoverable { transition: background-color 0.2s, border-color 0.2s; }
@media (hover: hover) { a.slot:hover, .slot.hoverable:hover { background: var(--slot-hover); border-color: var(--accent); } }

/* Icon tile, like the site's offer icons; a letter is the fallback under an image. */
.item {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--accent-text);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  overflow: hidden;
}
.item svg { width: 22px; height: 22px; }
.item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg-light); }

/* ------------------------------------------------------------------- text */

/* Title in the brand gradient. */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Small capitals in a pill, above a section title. */
.eyebrow {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  border: 1px solid var(--accent);
  border-radius: 100px;
}
/* Gradient pill in a card corner ("Popular", "New"). */
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
  background: var(--gradient);
  border-radius: 100px;
}
/* bedrock's text shadow: here a plain title. */
.shadowed { text-shadow: none; }
.hint { margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.danger { color: var(--danger); }
.empty { margin: 0; padding: 1.5rem; text-align: center; color: var(--text-muted); }
.footer { padding: 48px 0; text-align: center; font-size: 0.9rem; color: var(--text-muted); border-top: 1px solid rgba(255, 255, 255, 0.05); }
.footer .stack { justify-items: center; }
.footer .row { justify-content: center; }
code, kbd, pre, samp { font-family: var(--mono); }
/* Inline code. */
:not(pre) > code { padding: 0.1em 0.4em; font-size: 0.88em; color: var(--sand); background: rgba(124, 58, 237, 0.16); border-radius: 6px; }
pre:not(.terminal) {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-soft);
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid var(--border);
  border-radius: 12px;
}
mark { padding: 0 0.2em; color: #ffffff; background: rgba(124, 58, 237, 0.45); border-radius: 4px; }
del { opacity: 0.6; }
ins { text-decoration: none; color: var(--ok); }
abbr[title] { text-decoration: underline dotted; cursor: help; }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 700; }
h1 { font-weight: 800; }
h4 { font-size: 1rem; }
h5 { font-size: 0.9rem; }
h6 { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
ul, ol { padding-left: 1.3rem; }
li::marker { color: var(--accent); }
figure { margin: 0; }
figcaption { margin-top: 0.5rem; font-size: 0.8rem; color: var(--text-muted); }

/* <dl class="pairs"><dt>Key</dt><dd>Value</dd>…</dl>: key/value sheet. */
.pairs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.4rem 1.5rem; margin: 0; font-size: 0.9rem; }
.pairs dt { color: var(--text-muted); }
.pairs dd { margin: 0; overflow-wrap: anywhere; }

hr { height: 1px; margin: 1.25rem 0; border: 0; background: rgba(255, 255, 255, 0.08); }
/* Vertical rule: <span class="vr"></span> between items of a .row. */
.vr {
  display: inline-block;
  flex: 0 0 auto;
  align-self: stretch;
  width: 1px;
  height: auto;
  min-height: 1.2em;
  margin: 0;
  vertical-align: middle;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
}
blockquote { margin: 0; padding: 0.25rem 0 0.25rem 1rem; color: var(--text-soft); border-left: 3px solid; border-image: var(--gradient) 1; }

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.4em;
  font-size: 0.8em;
  line-height: 1.6;
  text-align: center;
  color: var(--text-soft);
  background: var(--bg-light);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
}

/* Block for commands, credentials, secrets to copy. */
.terminal {
  margin: 0;
  width: 100%;
  padding: 1rem;
  font: 0.82rem/1.6 var(--mono);
  color: #c4b5fd;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 12px;
  white-space: pre;
  overflow-x: auto;
}
.terminal.wrap-text { white-space: pre-wrap; word-break: break-all; }

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

/* Outlined by default (the site's secondary button); .go is the gradient one. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.4rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s, background-color 0.2s, filter 0.2s;
}
a.btn:hover { text-decoration: none; }
@media (hover: hover) { .btn:hover { border-color: var(--accent); background-color: var(--accent-soft); } }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn.go { font-weight: 700; background: var(--gradient); border-color: transparent; }
@media (hover: hover) { .btn.go:hover:not(:disabled) { box-shadow: 0 8px 30px rgba(124, 58, 237, 0.35); } }
.btn.stop { font-weight: 700; background: var(--stop-gradient); border-color: transparent; }
@media (hover: hover) { .btn.stop:hover:not(:disabled) { box-shadow: 0 8px 30px rgba(239, 68, 68, 0.3); } }
/* Text-only button, like the site's "learn more" links. */
.btn.ghost { border-color: transparent; color: var(--text-muted); }
@media (hover: hover) { .btn.ghost:hover { color: var(--accent-text); background: transparent; border-color: transparent; } }
.btn.large { min-height: 3.4rem; padding: 0 2rem; font-size: 1.1rem; }
.btn.small { min-height: 2.1rem; padding: 0 0.85rem; font-size: 0.85rem; border-radius: 10px; }
.btn.icon { padding: 0; width: 2.75rem; }
.btn.small.icon { width: 2.1rem; }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* ----------------------------------------------------------------- status */

/* Round status light, with a soft halo when lit. */
.dot { display: inline-block; width: 9px; height: 9px; flex: 0 0 auto; margin-right: 0.5rem; vertical-align: middle; border-radius: 50%; background: var(--off); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18); }
.dot.err { background: var(--danger); box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18); }

/* <span class="spinner" role="status" aria-label="Loading"></span>: a ring in
   the brand gradient (a colour class makes it one colour). */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  vertical-align: middle;
  border: 2px solid;
  border-color: var(--violet) transparent var(--blue) transparent;
  border-radius: 50%;
  animation: spinner 0.9s linear infinite;
}
.spinner:is(.white, .light-gray, .gray, .black, .red, .orange, .yellow, .lime, .green, .cyan, .light-blue, .blue, .purple, .magenta, .pink, .brown, .violet, .indigo, .sky, .gold, .copper, .emerald, .diamond, .lapis, .amethyst, .redstone, .netherite, .quartz, .prismarine, .crimson, .warped, .ok, .warn, .danger, .muted) { border-color: currentColor transparent currentColor transparent; }
.btn .spinner { border-color: #ffffff transparent rgba(255, 255, 255, 0.5) transparent; }
@keyframes spinner { to { rotate: 1turn; } }

/* Outlined pill; takes the colour of the text. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid color-mix(in srgb, currentColor 55%, transparent);
  background: color-mix(in srgb, currentColor 10%, transparent);
  border-radius: 100px;
}

/* A remove button inside a tag: <span class="tag">file.pdf <button class="btn ghost small icon">×</button></span> */
.tag .btn.small.icon { width: 1.3rem; min-height: 1.3rem; margin-right: -0.35rem; padding: 0; font-size: 1rem; line-height: 1; color: inherit; border: 0; border-radius: 50%; }
@media (hover: hover) { .tag .btn.small.icon:hover { color: var(--danger); background: color-mix(in srgb, currentColor 15%, transparent); } }

/* Tinted banner, like the site's form notices. */
.alert {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--warn);
  background: color-mix(in srgb, currentColor 10%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  border-radius: var(--radius-sm);
}
.alert:is(.err, .danger) { color: var(--danger); }
.alert.ok { color: var(--ok); }
.alert.slot { background: color-mix(in srgb, currentColor 10%, transparent); }

/* <progress class="bar"> and <meter class="bar">: a thin rounded track.
   progress fills with the gradient (a colour class changes it); meter goes
   green, yellow or red from its low/high/optimum. */
.bar {
  appearance: none;
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  background: var(--bg-light);
  border: 0;
  border-radius: 100px;
  --bar: var(--tone-fill, var(--gradient));
}
.bar::-webkit-progress-bar { background: var(--bg-light); border-radius: 100px; }
.bar::-webkit-progress-value { background: var(--bar); border-radius: 100px; }
.bar::-moz-progress-bar { background: var(--bar); border-radius: 100px; }
progress.bar:indeterminate {
  background: linear-gradient(90deg, transparent, var(--violet), var(--blue), transparent) no-repeat, var(--bg-light);
  background-size: 40% 100%, auto;
}
progress.bar:indeterminate::-webkit-progress-bar { background: transparent; }
progress.bar:indeterminate::-moz-progress-bar { background: transparent; }
@supports selector(::-webkit-meter-bar) {
  meter.bar { background: none; }
  meter.bar::-webkit-meter-bar { height: 8px; background: var(--bg-light); border: 0; border-radius: 100px; }
}
.bar::-webkit-meter-optimum-value { background: var(--ok); border-radius: 100px; }
.bar::-webkit-meter-suboptimum-value { background: var(--warn); border-radius: 100px; }
.bar::-webkit-meter-even-less-good-value { background: var(--danger); border-radius: 100px; }
.bar::-moz-meter-bar { background: var(--ok); border-radius: 100px; }
.bar:-moz-meter-sub-optimum::-moz-meter-bar { background: var(--warn); }
.bar:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--danger); }

/* <details class="fold"><summary>Title</summary>…</details>: an FAQ row. */
.fold { color: var(--text); background: var(--slot); border: 1px solid var(--border); border-radius: 12px; transition: border-color 0.2s; }
.fold[open] { border-color: rgba(124, 58, 237, 0.4); }
.fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.9rem 1.1rem; font-weight: 600; list-style: none; cursor: pointer; user-select: none; }
.fold > summary::-webkit-details-marker { display: none; }
/* A long title never widens the page: it wraps, and a word longer than
   the line (an image name) breaks. A title followed by tags: the tags
   go to the next line, the title stays on the arrow's line. */
.fold > summary { overflow-wrap: anywhere; }
.fold > summary > * { min-width: 0; }
.fold > summary:has(> * + *) { flex-wrap: wrap; }
.fold > summary > :first-child { max-width: calc(100% - 10px - 0.75rem); }
.fold > summary::after {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: -4px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s, margin 0.2s;
}
.fold[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }
@media (hover: hover) { .fold > summary:hover { color: var(--accent-text); } }
.fold > :not(summary) { margin: 0; padding: 0 1.1rem 1rem; font-size: 0.92rem; color: var(--text-muted); }

/* ---------------------------------------------------------------- colours */

/* Sixteen colours, the brand's violet, indigo and sky, then bedrock's twelve. On its own a
   colour class tints the text (so .tag and .alert follow); on .dot it fills
   the light; on .btn it paints the button; on progress.bar it fills it. */
.white      { --tone: #f8fafc; --tone-bg: #64748b; }
.light-gray { --tone: #cbd5e1; --tone-bg: #475569; }
.gray       { --tone: #94a3b8; --tone-bg: #334155; }
.black      { --tone: #64748b; --tone-bg: #0b1120; }
.red        { --tone: #f87171; --tone-bg: #dc2626; }
.orange     { --tone: #fb923c; --tone-bg: #ea580c; }
.yellow     { --tone: #fbbf24; --tone-bg: #b45309; }
.lime       { --tone: #a3e635; --tone-bg: #4d7c0f; }
.green      { --tone: #34d399; --tone-bg: #059669; }
.cyan       { --tone: #22d3ee; --tone-bg: #0891b2; }
.light-blue { --tone: #7dd3fc; --tone-bg: #0284c7; }
.blue       { --tone: #60a5fa; --tone-bg: #2563eb; }
.purple     { --tone: #c084fc; --tone-bg: #9333ea; }
.magenta    { --tone: #e879f9; --tone-bg: #c026d3; }
.pink       { --tone: #f472b6; --tone-bg: #db2777; }
.brown      { --tone: #d6a37a; --tone-bg: #92400e; }
.violet     { --tone: #a78bfa; --tone-bg: #7c3aed; }
.indigo     { --tone: #818cf8; --tone-bg: #4f46e5; }
.sky        { --tone: #93c5fd; --tone-bg: #3b82f6; }

/* bedrock's ores and blocks, so an app can switch theme without losing them. */
.gold       { --tone: #facc15; --tone-bg: #a16207; }
.copper     { --tone: #f0a07a; --tone-bg: #b4532a; }
.emerald    { --tone: #6ee7b7; --tone-bg: #047857; }
.diamond    { --tone: #a5f3fc; --tone-bg: #0e7490; }
.lapis      { --tone: #7ea2f7; --tone-bg: #1e40af; }
.amethyst   { --tone: #d8b4fe; --tone-bg: #7e22ce; }
.redstone   { --tone: #ff6b6b; --tone-bg: #b91c1c; }
.netherite  { --tone: #a8a29e; --tone-bg: #44403c; }
.quartz     { --tone: #e7e5e4; --tone-bg: #78716c; }
.prismarine { --tone: #5fd4b8; --tone-bg: #0f766e; }
.crimson    { --tone: #fb7185; --tone-bg: #be123c; }
.warped     { --tone: #2dd4bf; --tone-bg: #0d9488; }

:is(.white, .light-gray, .gray, .black, .red, .orange, .yellow, .lime, .green, .cyan, .light-blue, .blue, .purple, .magenta, .pink, .brown, .violet, .indigo, .sky, .gold, .copper, .emerald, .diamond, .lapis, .amethyst, .redstone, .netherite, .quartz, .prismarine, .crimson, .warped) { color: var(--tone); --tone-fill: var(--tone); }
.dot:is(.white, .light-gray, .gray, .black, .red, .orange, .yellow, .lime, .green, .cyan, .light-blue, .blue, .purple, .magenta, .pink, .brown, .violet, .indigo, .sky, .gold, .copper, .emerald, .diamond, .lapis, .amethyst, .redstone, .netherite, .quartz, .prismarine, .crimson, .warped) { background: var(--tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 18%, transparent); }
.btn:is(.white, .light-gray, .gray, .black, .red, .orange, .yellow, .lime, .green, .cyan, .light-blue, .blue, .purple, .magenta, .pink, .brown, .violet, .indigo, .sky, .gold, .copper, .emerald, .diamond, .lapis, .amethyst, .redstone, .netherite, .quartz, .prismarine, .crimson, .warped) {
  color: #ffffff;
  background: linear-gradient(135deg, var(--tone-bg), color-mix(in srgb, var(--tone-bg), var(--tone) 45%));
  border-color: transparent;
}
@media (hover: hover) {
  .btn:is(.white, .light-gray, .gray, .black, .red, .orange, .yellow, .lime, .green, .cyan, .light-blue, .blue, .purple, .magenta, .pink, .brown, .violet, .indigo, .sky, .gold, .copper, .emerald, .diamond, .lapis, .amethyst, .redstone, .netherite, .quartz, .prismarine, .crimson, .warped):hover:not(:disabled) {
    box-shadow: 0 8px 30px color-mix(in srgb, var(--tone-bg) 35%, transparent);
  }
}

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

/* <label class="field">Name <input class="input"></label> */
.field { display: grid; align-content: start; gap: 0.4rem; font-size: 0.88rem; font-weight: 600; color: var(--text-muted); }
/* In a .grid a label keeps its own height: stretched to a taller neighbour,
   its empty bottom would still open its file picker or focus its field. */
.grid > .field { align-self: start; }
/* <fieldset class="field"><legend>Subject</legend>…</fieldset>: a group of
   controls under one label, without a frame (.group has one). */
fieldset.field { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.field > legend { margin-bottom: 0.4rem; padding: 0; }
.input {
  min-width: 0;
  min-height: 2.9rem;
  padding: 0 1rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: #ffffff;
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.input { padding: 0.8rem 1rem; min-height: 7rem; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--field-placeholder); }
.input:disabled { opacity: 0.5; }
.input:user-invalid { border-color: var(--danger); }

/* <select class="input">: chevron, and an open list styled like the field
   where the browser supports appearance: base-select, else victolia.js draws
   it as a .picker (without victolia.js: the browser's own list, in dark). */
select.input { cursor: pointer; }
select.input:not([multiple]):not([size]) {
  appearance: none;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%228%22%20fill%3D%22none%22%20stroke%3D%22%2394a3b8%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M1%201.5l5%205%205-5%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
select.input option { color: #ffffff; background: var(--field); }
.picker {
  position: fixed;
  inset: auto;
  z-index: 20;
  margin: 0;
  padding: 0.35rem;
  overflow-y: auto;
  font-family: var(--font);
  font-size: 0.95rem;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 12px;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: var(--bg-light) transparent;
  outline: none;
}
.picker-option { padding: 0.55rem 0.75rem; white-space: nowrap; border-radius: 8px; cursor: pointer; }
.picker-option[aria-selected="true"] { color: var(--accent-text); background: var(--accent-soft); }
.picker-option.active { color: #ffffff; background: var(--bg-light); }
.picker-option[aria-disabled="true"] { color: var(--field-placeholder); background: none; cursor: default; }
.picker-group { padding: 0.5rem 0.75rem 0.2rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
@supports (appearance: base-select) {
  select.input:not([multiple]):not([size]), select.input::picker(select) { appearance: base-select; }
  select.input { display: inline-flex; align-items: center; }
  select.input::picker-icon { display: none; }
  select.input::picker(select) {
    margin: 6px 0;
    padding: 0.35rem;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 12px;
    box-shadow: var(--shadow);
  }
  select.input option { padding: 0.55rem 0.75rem; font-size: 0.95rem; border-radius: 8px; background: transparent; }
  select.input option::checkmark { display: none; }
  select.input option:checked { color: var(--accent-text); background: var(--accent-soft); }
  select.input option:hover, select.input option:focus-visible { outline: none; color: #ffffff; background: var(--bg-light); }
  select.input option:disabled { color: var(--field-placeholder); background: none; }
  select.input optgroup { padding: 0.5rem 0.75rem 0.2rem; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }
}
/* <select class="input" multiple> or size="…": a list box. */
select.input:is([multiple], [size]) { padding: 0.35rem; }
select.input:is([multiple], [size]) option { padding: 0.5rem 0.6rem; border-radius: 8px; }
/* Chrome paints the picked options of a focused list box in its own colours:
   a field-coloured layer covers its background, text-fill-color its text.
   The accent layer above stops 3px short of each edge, so picked options
   one after the other stay apart (margins do not work on options). */
select.input:is([multiple], [size]) option:checked {
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  background:
    linear-gradient(color-mix(in srgb, var(--accent) 35%, var(--field)), color-mix(in srgb, var(--accent) 35%, var(--field))) center / 100% calc(100% - 6px) no-repeat,
    linear-gradient(var(--field), var(--field));
}
select.input:is([multiple], [size]) option:focus { outline: none; }
.field-error { margin: 0; font-size: 0.88rem; color: var(--danger); }

/* Search bar: icon + borderless input + extras, one rounded box. */
.search { display: flex; align-items: center; gap: 0.75rem; padding: 0.35rem 1rem; background: var(--field); border: 1px solid var(--field-border); border-radius: 12px; transition: border-color 0.2s, box-shadow 0.2s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--text-muted); }
.search input { flex: 1; min-width: 0; height: 2.2rem; background: transparent; border: 0; outline: none; font: inherit; font-size: 1rem; color: #ffffff; }
.search input::placeholder { color: var(--field-placeholder); }
.search input::-webkit-search-cancel-button { display: none; }

/* <label class="switch"><input type="checkbox"><span class="track"></span> Label</label> */
.switch { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; width: 2.6rem; height: 1.45rem; flex: 0 0 auto; background: var(--bg-light); border: 1px solid var(--border-strong); border-radius: 100px; transition: background 0.2s, border-color 0.2s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.45rem - 6px); height: calc(1.45rem - 6px); background: var(--text-muted); border-radius: 50%; transition: left 0.2s, background 0.2s; }
.switch input:checked + .track { background: var(--gradient); border-color: transparent; }
.switch input:checked + .track::after { left: calc(2.6rem - 1.45rem + 2px); background: #ffffff; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 3px; }
.switch input:disabled + .track { opacity: 0.45; }
.switch:has(input:disabled) { cursor: default; }

/* <label class="check"><input type="checkbox"> Label</label>, same for type="radio". */
.check { display: inline-flex; align-items: center; gap: 0.55rem; cursor: pointer; user-select: none; }
.check input {
  appearance: none;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  background: var(--field) no-repeat center / 12px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  cursor: inherit;
  transition: border-color 0.2s, background-color 0.2s;
}
.check input:is(:checked, :indeterminate) { background-color: transparent; background-image: var(--gradient); border-color: transparent; }
.check input:checked { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2012%2012%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M2.5%206.5l2.5%202.5%204.5-6%22%2F%3E%3C%2Fsvg%3E"), var(--gradient); background-size: 12px 12px, cover; }
.check input:indeterminate { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2012%2012%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M3%206h6%22%2F%3E%3C%2Fsvg%3E"), var(--gradient); background-size: 12px 12px, cover; }
.check input[type="radio"] { border-radius: 50%; }
.check input[type="radio"]:checked { background: var(--field); border: 6px solid var(--violet); }
@media (hover: hover) { .check:hover input:not(:checked):not(:indeterminate) { border-color: var(--accent); } }
.check input:disabled { opacity: 0.45; }
.check:has(input:disabled) { cursor: default; }

/* <input class="range" type="range">: thin track, round white thumb. */
.range { appearance: none; width: 100%; min-width: 0; height: 20px; margin: 0; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 6px; background: var(--bg-light); border-radius: 100px; }
.range::-moz-range-track { height: 6px; background: var(--bg-light); border-radius: 100px; }
.range::-moz-range-progress { height: 6px; background: var(--gradient); border-radius: 100px; }
.range::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; margin-top: -6px; background: #ffffff; border: 3px solid var(--violet); border-radius: 50%; box-shadow: 0 2px 10px rgba(124, 58, 237, 0.5); }
.range::-moz-range-thumb { box-sizing: border-box; width: 18px; height: 18px; background: #ffffff; border: 3px solid var(--violet); border-radius: 50%; box-shadow: 0 2px 10px rgba(124, 58, 237, 0.5); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 3px; }
.range:focus-visible::-moz-range-thumb { outline: 2px solid var(--accent); outline-offset: 3px; }
.range:disabled { opacity: 0.5; cursor: default; }

/* <input class="input" type="file">: the picker button looks like a .btn. */
.input[type="file"] { padding: 0.35rem; cursor: pointer; }
.input::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
}

/* <fieldset class="group"><legend>Title</legend>…</fieldset> */
.group { min-width: 0; margin: 0; padding: 0.75rem 1rem 1rem; border: 1px solid var(--border-strong); border-radius: 12px; }
.group > legend { padding: 0 0.4rem; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }

/* ------------------------------------------------------------------ table */

/* Put it in a .slot; wrap in .table-scroll for wide tables on phones. */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { padding: 0.75rem 1rem; text-align: left; white-space: nowrap; }
.table th { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border-strong); }
.table tbody tr + tr td { border-top: 1px solid var(--border); }
@media (hover: hover) { .table tbody tr:hover td { background: rgba(124, 58, 237, 0.05); } }
.table caption { padding: 0.75rem 1rem 0.25rem; text-align: left; font-size: 0.82rem; color: var(--text-muted); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------- tabs, menu, tooltip */

/* <div class="tabs" role="tablist"><button class="tab" role="tab" aria-selected="true" aria-controls="p1">…
   victolia.js switches panels; page links work too: <a class="tab" aria-current="page">. */
.tabs { display: flex; gap: 0.25rem; width: max-content; max-width: 100%; margin-bottom: 0.75rem; padding: 0.3rem; overflow-x: auto; scrollbar-width: none; background: var(--slot); border: 1px solid var(--border); border-radius: 12px; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
@media (hover: hover) { .tab:hover { color: #ffffff; text-decoration: none; } }
.tab:is([aria-selected="true"], [aria-current="page"], [aria-pressed="true"]) { color: #ffffff; background: var(--gradient); }

/* <button class="btn" popovertarget="m1">…</button>
   <div class="menu" id="m1" popover><button class="menu-item">…</button><hr>…</div> */
.menu {
  min-width: 11rem;
  padding: 0.35rem;
  font-size: 0.92rem;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.menu hr { margin: 0.3rem 0.4rem; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  font: inherit;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
:where(.menu-item) { color: inherit; }
.menu-item:is(:hover, :focus-visible) { outline: none; text-decoration: none; background: var(--bg-light); }
.menu-item:disabled { color: var(--field-placeholder); background: none; cursor: default; }

/* <button data-tip="Copy the link">…</button>: tooltip on hover and keyboard
   focus, above (data-tip-side="bottom" for below). Not on <input> or <img>. */
[data-tip] { position: relative; }
[data-tip]:is(:hover, :focus-visible, .open)::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(16rem, calc(100vw - 16px));
  padding: 0.4rem 0.7rem;
  font: 500 0.8rem/1.4 var(--font);
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  white-space: normal;
  color: #ffffff;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.5);
}
[data-tip][data-tip-side="bottom"]:is(:hover, :focus-visible, .open)::after { top: calc(100% + 8px); bottom: auto; }

/* Help button next to a field label: its tip opens on hover, keyboard focus
   and a tap (theme .js toggles .open; a tap elsewhere or Escape closes it).
   aria-label carries the text for screen readers. In a label, wrap the text
   and the button in a <span> and point the label at its control with for=,
   or the button would become the control the label names:
   <label class="field" for="send-at"><span>Send time <button type="button"
   class="info" aria-label="Help: …" data-tip="…">i</button></span>
   <select class="input" id="send-at">…</select></label> */
.info {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  margin-left: 0.35rem;
  padding: 0;
  vertical-align: -0.15em;
  font: italic 700 0.72rem/1 Georgia, serif;
  color: var(--text-soft);
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  cursor: help;
  transition: color 0.2s, border-color 0.2s;
}
@media (hover: hover) { .info:hover { color: #ffffff; border-color: var(--accent); } }
.info.open { color: #ffffff; border-color: var(--accent); }
/* In a label line, centred on the text rather than sitting on its baseline. */
.field > span:has(> .info) { display: flex; align-items: center; }
.info[data-tip]::after { margin-left: var(--tip-shift, 0px); }
/* On a touch screen a tap leaves :hover behind: only .open shows the tip. */
@media (hover: none) { .info[data-tip]:not(.open)::after { display: none; } }

/* ---------------------------------------------------------- dialog, toast */

/* <dialog class="dialog"><form class="panel" method="dialog">
     <div class="slot dialog-body">…</div><div class="dialog-actions">…</div>
   </form></dialog> */
.dialog { padding: 0; border: 0; background: transparent; color: inherit; width: 440px; max-width: calc(100vw - 2rem); }
.dialog.wide { width: 46rem; }
.dialog::backdrop { background: rgba(2, 6, 23, 0.65); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dialog .panel { background: rgba(15, 23, 42, 0.96); border-color: rgba(124, 58, 237, 0.4); box-shadow: 0 18px 50px rgba(2, 6, 23, 0.55); }
/* In a dialog the body is plain: the card already frames it. */
.dialog-body { padding: 0; display: grid; gap: 0.9rem; background: none; border: 0; }
.dialog-body h2 { margin: 0; font-size: 1.25rem; }
.dialog-body h2:focus { outline: none; }
.dialog-body p { margin: 0; line-height: 1.6; color: var(--text-muted); }
.dialog-body .input { width: 100%; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* victolia.js shows .toasts as a popover, so toasts stay above a modal dialog. */
.toasts {
  position: fixed;
  z-index: 10;
  inset: auto auto 1.5rem 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 0.5rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: 0;
  overflow: visible;
  color: inherit;
  background: none;
  border: 0;
  box-shadow: none;
}
.toast { padding: 0.75rem 1.2rem; font-size: 0.92rem; font-weight: 600; background: rgba(15, 23, 42, 0.96); border: 1px solid color-mix(in srgb, currentColor 40%, transparent); border-radius: 12px; box-shadow: var(--shadow); }

/* Any [popover]: a dark rounded card. Classes override it, as .menu does. */
:where([popover]) {
  padding: 1rem 1.2rem;
  font-size: 0.92rem;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* ------------------------------------------------------------ page layout */

/* Full-width bands of a site page:
   <section class="section [alt]"><div class="container">…</div></section> */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 780px; }
.section { padding: 120px 0; }
.section.alt { background: var(--bg-light); }
/* Inside a section, text elements start without margins: space them with
   the layout classes. Zero specificity, so any class wins. */
:where(.section, .hero, .footer) :where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, figure) { margin: 0; }
/* Anchors land below a fixed top bar. */
html:has(.topbar.fixed) { scroll-padding-top: 72px; }

/* Centred section header: .eyebrow, .title, .lead. */
/* Centred section header: .eyebrow, .title, .lead, and a .btn or a 64px
   <svg> when it is a call to action or a success message. */
.section-head { display: grid; justify-items: center; gap: 16px; max-width: 760px; margin: 0 auto 64px; text-align: center; }
.section-head .eyebrow { margin-bottom: 4px; }
.section-head > svg { width: 64px; height: 64px; color: var(--accent-text); }
.section-head > .btn { margin-top: 16px; }
.title { margin: 0 0 16px; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.2; }
.section-head .title { margin: 0; }
/* <h3 class="subtitle">: title of a part of a section, 40px above what follows. */
.subtitle { margin: 0 0 40px; font-size: 1.5rem; font-weight: 700; line-height: 1.3; text-align: center; }
.stack > .subtitle { margin-bottom: 24px; }
/* Alone in its container (a CTA band) or in a .stack, the section padding or
   the gap does the spacing. */
.section-head:last-child, .stack > .section-head { margin-bottom: 0; }
:is(.stack, .section-head) > .lead { line-height: 1.75; }
.section-head > .title + .lead { margin-top: 8px; }
/* Short line length for an intro under a title. */
.measure { max-width: 600px; }
.section-head .measure { margin-inline: auto; }
.lead { margin: 0; font-size: 1.15rem; line-height: 1.75; color: var(--text-muted); }

/* Full-screen welcome: centred content, big title. */
/* <section class="hero">[<canvas>]<div class="container stack">h1, .lead, .row.centered</div></section>
   The padding leaves room for a fixed top bar; a direct canvas or .hero-bg
   fills the back. */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; padding: 96px 0 48px; overflow: hidden; text-align: center; }
.hero > :is(canvas, .hero-bg) { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero > .container { position: relative; z-index: 1; }
.hero .stack { justify-items: center; gap: 0; }
.hero .stack > h1 { margin-bottom: 32px; }
.hero .stack > .lead { margin-bottom: 48px; }
.hero h1 { margin: 0; font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 800; line-height: 1.15; padding-bottom: 0.08em; }
.hero .lead { max-width: 40rem; font-size: clamp(1.1rem, 2.5vw, 1.4rem); line-height: 1.8; }

/* Wider cells (two cards a row on desktop), or a fixed 3 / 2 column grid. */
.grid.wide { gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.grid.cols-2 { gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ------------------------------------------------------------- navigation */

/* <nav class="topbar fixed"><div class="container">
     <a class="logo">…</a>
     <div class="nav-links"><a class="nav-link">…</a>…</div>
     <div class="row"><div class="tabs small">…</div><button class="burger"><span></span></button></div>
   </div></nav>
   .fixed sticks it to the top; victolia.js adds .scrolled past 50px of scroll. */
.topbar, .topbar > .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar > .container { flex: 1; }
.topbar { padding: 16px 0; }
.topbar.fixed { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 16px 0; transition: background-color 0.3s, padding 0.3s, backdrop-filter 0.3s; }
.topbar.fixed.scrolled { padding: 10px 0; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
/* A .center after a fixed bar starts below it when its content is taller than the screen. */
.topbar.fixed ~ .center { padding-top: calc(72px + clamp(1rem, 4vw, 2rem)); }
/* Same for a .wrap: its own top padding, plus the bar. */
.topbar.fixed ~ .wrap { padding-top: calc(72px + clamp(1rem, 5vw, 3rem)); }
.logo { position: relative; z-index: 101; display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 700; color: #ffffff; }
.logo:hover { text-decoration: none; }
.logo :is(img, svg) { display: block; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-link { padding: 0; font: inherit; font-size: 0.95rem; font-weight: 500; color: var(--text-muted); background: none; border: 0; cursor: pointer; transition: color 0.2s; }
.nav-link:hover { color: #ffffff; text-decoration: none; }
.nav-link[aria-current] { color: #ffffff; }

/* <button class="burger" aria-label="Menu"><span></span></button>: three
   lines, a cross with .open or aria-expanded="true". Phones only. */
.burger { position: relative; z-index: 101; display: none; width: 28px; height: 28px; padding: 0; background: none; border: 0; cursor: pointer; }
.burger span, .burger span::before, .burger span::after { position: absolute; display: block; width: 24px; height: 2px; background: #ffffff; border-radius: 2px; transition: transform 0.3s, background-color 0.3s; }
.burger span { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.burger span::before, .burger span::after { content: ""; left: 0; }
.burger span::before { top: -7px; }
.burger span::after { top: 7px; }
.burger:is(.open, [aria-expanded="true"]) span { background: transparent; }
.burger:is(.open, [aria-expanded="true"]) span::before { top: 0; transform: rotate(45deg); }
.burger:is(.open, [aria-expanded="true"]) span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 768px) {
  .burger { display: block; }
  /* backdrop-filter would trap the fixed full-screen menu inside the bar. */
  .topbar.fixed.scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(15, 23, 42, 0.97); }
  /* Full-screen menu, shown with .open. */
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 100;
    padding: 96px 24px 32px;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    background: rgba(15, 23, 42, 0.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; }
  .nav-link { font-size: 1.15rem; font-weight: 600; color: #ffffff; }
}

/* Small phones (320px): tighter spacing keeps the logo, the flags and the
   burger on one line. */
@media (max-width: 359px) {
  .topbar > .container { padding-inline: 16px; gap: 10px; }
  .topbar > .container > .row { gap: 8px; }
}

/* Compact .tabs, e.g. a language switcher of flag buttons
   (<button class="tab" aria-pressed="true"><img src="fr.svg" alt="Français"></button>). */
.tabs.small { gap: 2px; margin: 0; padding: 2px; background: rgba(255, 255, 255, 0.05); border: 0; border-radius: 8px; }
.tabs.small .tab { padding: 5px 6px; font-size: 0.8rem; line-height: 1; border-radius: 6px; opacity: 0.55; transition: background-color 0.2s, opacity 0.2s; }
.tabs.small .tab :is(img, svg, .flag) { display: block; width: 22px; height: auto; border-radius: 2px; }
.tabs.small .tab:is(:hover, :focus-visible) { opacity: 1; }
.tabs.small .tab:is([aria-selected="true"], [aria-current="page"], [aria-pressed="true"]) { opacity: 1; background: rgba(124, 58, 237, 0.3); }

/* ---------------------------------------------------------------- suite bar */

/* Thin bar shared by every Victolia app, above the app's own .topbar: what is
   common to all apps (portal, organisation, language, account) stays in the
   same place whatever the app. Put it before the .topbar in the body; leave
   the Portail link out on the portal itself:
   <header class="suitebar"><div class="container">
     <div class="suite-start">
       <a class="suite-brand" href="<portal>"><img src="logo.svg" alt=""><span>Victolia</span></a>
       <a class="suite-item" href="<portal>"><svg width="16" height="16" …/>Portail</a>
       <span class="suite-sep" aria-hidden="true"></span>
       <button class="suite-item" popovertarget="org-menu">Organisation<span class="caret"></span></button>
     </div>
     <div class="suite-end">
       <button class="suite-item" popovertarget="language-menu">FR<span class="caret"></span></button>
       <button class="suite-item" popovertarget="account-menu"><span class="initials">DR</span><span class="suite-name">Dylan Riba</span><span class="caret"></span></button>
     </div>
   </div></header>
   A fixed .topbar after it starts below it, and so does the page. */
.suitebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 102;
  height: 40px;
  font-size: 0.85rem;
  /* Its width comes from the page, never from its content: long names
     shrink with an ellipsis instead of widening what holds the bar. */
  contain: inline-size;
  background: rgba(2, 6, 23, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.suitebar > .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 100%; }
.suite-start, .suite-end { display: flex; align-items: center; gap: 0.25rem; min-width: 0; }
.suite-brand { display: flex; align-items: center; gap: 8px; margin-right: 0.25rem; font-weight: 700; color: #ffffff; white-space: nowrap; }
.suite-brand:hover { text-decoration: none; }
.suite-brand img { width: 20px; height: 20px; }
.suite-sep { width: 1px; height: 18px; margin: 0 0.5rem; background: var(--border-strong); }
/* Text button of the bar: muted, white on hover, a soft pill when open. */
.suite-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  height: 30px;
  padding: 0 0.6rem;
  font: inherit;
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.suite-item:is(:hover, :focus-visible, [aria-expanded="true"]) { color: #ffffff; text-decoration: none; background: rgba(255, 255, 255, 0.07); outline: none; }
/* A .suite-item that is not a button (one organisation only): plain text. */
span.suite-item { cursor: default; }
span.suite-item:hover { color: var(--text-soft); background: none; }
.suite-item > :not(.initials, .caret) { overflow: hidden; text-overflow: ellipsis; }
/* Small chevron after the label of a button that opens a menu. */
.caret { flex: none; width: 8px; height: 8px; margin-top: -3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); opacity: 0.7; }

/* Round initials of a person, in the brand gradient: <span class="initials">DR</span>. */
.initials {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: var(--gradient);
  border-radius: 50%;
}
.initials.large { width: 36px; height: 36px; font-size: 0.85rem; }

/* Below the suite bar: the app's fixed top bar, then the page. */
.suitebar ~ .topbar.fixed { top: 40px; }
.suitebar ~ .topbar.fixed ~ .center { padding-top: calc(106px + 0.75rem); }
.suitebar ~ .topbar.fixed ~ .wrap { padding-top: calc(106px + 0.75rem); }

/* Menu parts: a header that is not an item (who is signed in), a group
   label, and the current choice ticked (aria-current or aria-checked). */
.menu-head { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.75rem; }
.menu-head strong { display: block; color: #ffffff; }
.menu-head small { display: block; font-size: 0.8rem; color: var(--text-muted); }
.menu-label { padding: 0.5rem 0.75rem 0.2rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.menu-item:is([aria-current], [aria-checked="true"])::after {
  content: "";
  width: 12px;
  height: 7px;
  margin-left: auto;
  border: solid var(--accent-text);
  border-width: 0 0 2px 2px;
  transform: translateY(-2px) rotate(-45deg);
}

@media (max-width: 768px) {
  /* Names give way to the initials and the chevrons on phones. */
  .suite-name, .suite-brand span { display: none; }
  .suitebar ~ .topbar .nav-links { padding-top: 136px; }
}

/* ------------------------------------------------------------ site blocks */

/* <ul class="checklist">: a tick in the accent colour before each item. */
.checklist { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.checklist li { display: flex; min-width: 0; overflow-wrap: anywhere; align-items: flex-start; gap: 10px; font-size: 0.95rem; line-height: 1.5; }
.checklist li::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  background: var(--accent-text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20%206%209%2017l-5-5%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20%206%209%2017l-5-5%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
}

/* <span class="badge corner">: pinned to the top right of its .panel. */
.badge.corner { position: absolute; top: 18px; right: 18px; }

/* Accent-tinted box for a note or a reassurance; an <svg> first child sits
   on the left. .centered for a short centred note. */
.callout { display: flex; align-items: flex-start; gap: 20px; padding: 32px; color: var(--text); background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius); }
.callout > svg { flex: 0 0 auto; width: 28px; height: 28px; color: var(--accent-text); }
.callout > :not(svg) { flex: 1; min-width: 0; }
.callout :is(h3, h4) { margin: 0 0 8px; font-size: 1.2rem; font-weight: 700; }
.callout p { margin: 0; line-height: 1.7; color: var(--text-muted); }
/* .callout.centered: title above text, centred, in the lighter tint of the
   site's offers note. */
.callout.centered { flex-direction: column; align-items: center; gap: 0; text-align: center; background: rgba(124, 58, 237, 0.07); border-color: rgba(124, 58, 237, 0.3); }
.callout.centered > :not(svg) { flex: none; }
.callout.centered :is(h3, h4) { font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: var(--sand); }

/* <ol class="steps"><li><h4>…</h4><p>…</p></li>…</ol>: numbered steps. */
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps > li { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-content: start; column-gap: 16px; row-gap: 6px; counter-increment: step; }
.steps > li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 50%;
}
.steps > li > * { grid-column: 2; margin: 0; }
.steps h4 { font-size: 1.02rem; font-weight: 700; }
.steps p { font-size: 0.93rem; line-height: 1.6; color: var(--text-muted); }
/* <ol class="steps list">: one column with small numbers, to fit in a panel.
   A step can be plain text or an h4 + p. */
.steps.list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.steps.list > li { grid-template-columns: 28px minmax(0, 1fr); align-items: start; column-gap: 12px; row-gap: 2px; }
.steps.list > li::before { grid-row: span 1; width: 28px; height: 28px; font-size: 0.85rem; }

/* <button class="choice" aria-pressed="false">: one option of a list to pick from. */
.choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 14px 18px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  color: var(--text-muted);
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.choice:hover { color: #ffffff; border-color: var(--accent); }
.choice[aria-pressed="true"] { color: #ffffff; background: var(--accent-soft); border-color: var(--accent); }
.choice:disabled { opacity: 0.5; cursor: not-allowed; }

/* <label class="dropzone"><input type="file">…text…</label>: the file input
   covers the whole zone, invisible. .dragover while a file is held over it. */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.dropzone:is(:hover, .dragover, :focus-within) { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone > :not(input) { pointer-events: none; }

/* <img class="cover"> (or a .cover wrapping one) as the first child of a
   .panel: edge to edge at the top of the card. */
.cover {
  display: block;
  width: calc(100% + 2 * var(--pad, 0px));
  max-width: none;
  height: auto;
  margin: calc(-1 * var(--pad, 0px)) calc(-1 * var(--pad, 0px)) var(--pad, 0px);
  aspect-ratio: 16 / 10;
  object-fit: contain;
  overflow: hidden;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}
.cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* In a .stack the gap already spaces the next child. */
.stack > .cover { margin-bottom: calc(var(--pad, 1rem) - 1rem); }

/* <img class="avatar" width="200">: round photo with a violet ring. */
.avatar {
  display: block;
  flex: none;
  max-width: none;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  border: 3px solid rgba(124, 58, 237, 0.35);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(124, 58, 237, 0.08), 0 24px 48px rgba(0, 0, 0, 0.4);
}

/* SMS preview: a phone screen with the sender on top and the message
   received in a bubble, counters under it.
   <div class="sms-preview">
     <div class="sms-sender">Victolia</div>
     <div class="sms-thread">
       <p class="sms-bubble" data-placeholder="Your message">…</p>
       <div class="sms-meta">142 characters · 1 SMS · 3 credits</div>
     </div>
   </div>
   An empty .sms-bubble shows its data-placeholder. */
.sms-preview {
  display: flex;
  flex-direction: column;
  width: min(100%, 360px);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.sms-sender {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 16px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.sms-sender::before {
  content: "";
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2015a2%202%200%200%201-2%202H7l-4%204V5a2%202%200%200%201%202-2h14a2%202%200%200%201%202%202z%22%2F%3E%3C%2Fsvg%3E") center / 20px no-repeat, var(--gradient);
}
.sms-thread { display: grid; justify-items: start; gap: 6px; min-height: 160px; align-content: start; padding: 20px 16px 24px; }
.sms-bubble {
  max-width: 85%;
  margin: 0;
  padding: 10px 14px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--bg-light);
  border-radius: 18px 18px 18px 4px;
}
.sms-bubble:empty::before { content: "…"; color: var(--text-muted); font-style: italic; }
.sms-bubble[data-placeholder]:empty::before { content: attr(data-placeholder); }
.sms-meta { padding-left: 4px; font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.btn.block { display: flex; width: 100%; }

/* .reveal fades in when it scrolls into view: victolia.js adds .visible,
   also on elements added later. */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (scripting: none) { .reveal { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 1024px) {
  .grid.cols-3, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .section { padding: 80px 0; }
  .grid.cols-2, .grid.cols-3, .steps { grid-template-columns: 1fr; }
  .callout { flex-direction: column; gap: 14px; padding: 24px; }
  .callout.centered { align-items: center; }
}

/* -------------------------------------------------------------- app blocks */

/* A page that fits the window, for an app: only the frames inside scroll.
   <main class="wrap fit"><header class="panel brand">…</header><div class="split">…</div></main> */
html:has(.wrap.fit), html:has(.wrap.fit) body { height: 100%; overflow: hidden; }
.wrap.fit { height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding-bottom: 1.5rem; }
.wrap.fit > * { flex: none; }
.wrap.fit > .split { flex: 1; }

/* List + detail, each scrolling in its own frame:
   <div class="split">
     <nav class="slot picklist">…</nav>
     <section class="slot pad split-detail">
       <button class="btn small back">Back</button> <div class="head">…</div>
       <div class="scroll">…</div>
     </section>
   </div>
   In .split-detail the children above the .scroll stay in view, the .scroll
   scrolls under them. Below 760px one side at a time: the list, or the detail
   once the split has .picked (its .back button shows there, to remove it). */
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.25rem; min-height: 0; }
.split > * { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--bg-light) transparent; }
.split-detail { display: flex; flex-direction: column; }
.split-detail > * { flex: none; }
.split-detail > .scroll { flex: 1; min-height: 0; }
.split .back { display: none; }
.scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--bg-light) transparent; }
/* <button class="btn small to-bottom" hidden> last in a .scroll: floats at its
   bottom right, e.g. back to the live end of a conversation scrolled up. */
.scroll > .to-bottom { position: sticky; bottom: 0.6rem; display: flex; width: max-content; margin: 0.5rem 0.6rem 0 auto; }
.scroll > .to-bottom[hidden] { display: none; }
@media (max-width: 760px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.picked > :not(.split-detail), .split:not(.picked) > .split-detail { display: none; }
  .split .back { display: inline-flex; align-self: flex-start; margin-bottom: 0.6rem; }
}

/* <nav class="slot picklist">: full-width rows to pick one, the picked one
   with aria-current="true" (or "page" for links).
   <button type="button" aria-current="true">
     <span class="line"><span>Title, cut with …</span><span class="tag ok">Done</span></span>
     <span class="date">8 Nov 10:42</span>
   </button> */
.picklist { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 2px; padding: 0.4rem; overflow-x: hidden; }
.picklist > :is(button, a) {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  font: inherit;
  text-align: left;
  text-decoration: none;
  color: var(--text-soft);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
@media (hover: hover) { .picklist > :is(button, a):hover { background: var(--slot-hover); } }
.picklist > :is([aria-current="true"], [aria-current="page"]) { color: #ffffff; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.picklist .line { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-width: 0; }
.picklist .line > :first-child { flex: 1; min-width: 0; font-size: 0.9rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picklist .line > :not(:first-child) { flex: none; margin-right: 0; }
.picklist .date { font-size: 0.72rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* Conversation: <div class="timeline"> of
   <div class="turn green"><span class="who">Agent</span>Text</div> (left;
   .turn.end on the right) and <div class="note blue"><span class="route">A → B</span>
   <span class="at">10:42</span><span class="body">Text</span></div> centred
   (.note.compact for a one-liner). A colour class tints the edge and the
   names; the text keeps the normal colour. */
.timeline { display: grid; align-content: start; gap: 0.6rem; }
.turn {
  justify-self: start;
  max-width: 85%;
  padding: 0.6rem 0.9rem;
  font-size: 0.92rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  color: var(--text);
  background: var(--field);
  border-left: 3px solid var(--tone, var(--accent));
  border-radius: 4px 14px 14px 4px;
}
.turn.end { justify-self: end; border-left: 0; border-right: 3px solid var(--tone, var(--accent)); border-radius: 14px 4px 4px 14px; }
.turn .who { display: block; margin-bottom: 0.15rem; font-size: 0.75rem; font-weight: 600; color: var(--tone, var(--accent-text)); }
.note {
  justify-self: center;
  width: min(92%, 680px);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.6rem;
  padding: 0.45rem 0.8rem 0.45rem 0.95rem;
  font-size: 0.85rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  color: var(--text-soft);
  background: var(--slot);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: inset 3px 0 0 var(--tone, var(--accent));
}
.note .route { flex: none; font-weight: 700; white-space: nowrap; color: var(--tone, var(--accent-text)); }
.note .at { flex: none; font-size: 0.72rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.note .body { flex: 1 1 260px; min-width: 0; }
.note.compact { width: auto; padding: 0.15rem 0.7rem; font-size: 0.75rem; }
@media (max-width: 760px) {
  .turn { max-width: 100%; }
  .note { width: 100%; }
  .note .body { flex-basis: 100%; }
}

/* <span class="dot live"></span>: a red light pulsing, for something
   happening now (a colour class changes the red). */
.dot.live { background: var(--tone, var(--danger)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone, var(--danger)) 25%, transparent); animation: live 1.2s ease-in-out infinite; }
@keyframes live { 50% { opacity: 0.35; } }

/* <h3 class="rule-title">: small capitals under a rule, between the parts
   of a slot. */
.rule-title { margin: 0 0 0.75rem; padding-top: 1rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); border-top: 1px solid var(--border); }

/* <div class="frame green"><span class="label">Report</span>…</div>: a dark
   box in a coloured border, its label in small capitals above the content.
   A colour class tints the border and the label; the text stays normal. */
.frame { padding: 0.8rem 1rem 0.9rem; overflow-wrap: anywhere; color: var(--text); background: color-mix(in srgb, var(--tone, var(--accent)) 6%, var(--slot)); border: 1px solid var(--tone, var(--accent)); border-radius: 12px; }
.frame > .label { display: block; margin-bottom: 0.35rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tone, var(--accent-text)); }

/* ------------------------------------------------------------- responsive */

@media (max-width: 640px) {
  .panel { border-radius: 14px; }
}
@media (pointer: coarse) {
  .btn.small { min-height: 2.6rem; }
  .btn.small.icon { width: 2.6rem; }
}
@media (prefers-reduced-motion: no-preference) {
  progress.bar:indeterminate { animation: bar-loading 1.2s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .spinner { animation-duration: 2s; }
}
@keyframes bar-loading { from { background-position: -40% 0, 0 0; } to { background-position: 140% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .dot.live { animation: none; }
}

/* Touch screens: a tap can leave a focus ring on what was tapped (a menu,
   a tab, an element focused by the script). The ring only helps a
   keyboard, so phones and tablets never draw it. Last in the file so it
   wins over every focus ring above. */
@media (hover: none) {
  :focus-visible { outline: none; }
  .switch input:focus-visible + .track { outline: none; }
  .range:focus-visible::-webkit-slider-thumb { outline: none; }
  .range:focus-visible::-moz-range-thumb { outline: none; }
}
