/*
 * Wandiisi console (ADR 0031, redesign WHISPRC-54 on ADR 0050): the desktop app's look in a browser.
 * Grouped inset lists with hairlines, switches, segmented controls, a sidebar with pastel section icons,
 * the wordmark with "ascolta, scrive, fa". Tokens are the desktop's (apps/desktop/src/styles.css): tea green
 * for "on" and primary actions, lake blue for focus. Light and dark follow the system. WCAG 2.1 AA.
 */
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', 'Helvetica Neue', system-ui, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
  --text-size: 14px;
  --small-size: 12px;
  --title-size: 26px;

  --ground: #f2f3f0;
  --sidebar: #e7eae4;
  --surface: #ffffff;
  --surface-hover: #f6f7f4;
  --control: #ffffff;
  --well: rgba(28, 33, 30, 0.07);
  --hairline: rgba(28, 33, 30, 0.12);
  --edge: rgba(28, 33, 30, 0.22);
  --text: #1c211e;
  --secondary: #4b544f;
  --selected: rgba(28, 33, 30, 0.09);
  --accent: #2f6e48;
  --accent-on: #ffffff;
  --accent-soft: #e3efe6;
  --switch-on: #3e8e5b;
  --link: #2f5e45;
  --focus: #3a7ca5;
  --ok: #2b6b43;
  --warn: #855300;
  --bad: #b3261e;
  --ok-soft: #e3efe6;
  --warn-soft: #f6ecd7;
  --bad-soft: #f8e3e0;
  --staff-soft: #e6eef4;
  --staff: #2f5a78;

  --radius-group: 10px;
  --radius-control: 6px;
  --shadow-group: 0 0 0 0.5px rgba(28, 33, 30, 0.1), 0 1px 1px rgba(28, 33, 30, 0.04);
  --shadow-raised: 0 1px 2px rgba(28, 33, 30, 0.18), 0 0 0 0.5px rgba(28, 33, 30, 0.12);

  /* Section icon tints (pastel, calm), as in the desktop sidebar. */
  --tint-overview: #3e8e5b;
  --tint-members: #5a86a8;
  --tint-usage: #b08a3a;
  --tint-buy: #c9845e;
  --tint-downloads: #6f7b86;
  --tint-data: #8a7bb0;
  --tint-staff: #5b7f99;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1d211f;
    --sidebar: #252a27;
    --surface: #2a302c;
    --surface-hover: #313833;
    --control: #3a413c;
    --well: rgba(255, 255, 255, 0.08);
    --hairline: rgba(255, 255, 255, 0.1);
    --edge: rgba(255, 255, 255, 0.2);
    --text: #eceeea;
    --secondary: #aeb7b1;
    --selected: rgba(255, 255, 255, 0.1);
    --accent-soft: #24382b;
    --switch-on: #4fa36e;
    --link: #8fcca3;
    --focus: #7db3d6;
    --ok: #8fd3a8;
    --warn: #f0c06a;
    --bad: #ff9c8f;
    --ok-soft: #24382b;
    --warn-soft: #3b321f;
    --bad-soft: #42282a;
    --staff-soft: #243341;
    --staff: #a9cbe3;
    --shadow-group: 0 0 0 0.5px rgba(255, 255, 255, 0.08);
    --shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: var(--text-size)/1.45 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--link); text-underline-offset: 2px; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--well); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.muted { color: var(--secondary); }
::selection { background: color-mix(in srgb, var(--focus) 32%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 85%, transparent); outline-offset: 2px; border-radius: var(--radius-control); }
h1[tabindex='-1']:focus, h2[tabindex='-1']:focus { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; z-index: 30; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow-raised); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Wordmark ---------- */
.brand { display: grid; gap: 3px; color: var(--text); text-decoration: none; }
.brand svg { display: block; width: 116px; height: auto; }
.brand-line { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--secondary); padding-left: 1px; }
.brand-large svg { width: 188px; }
.brand-large .brand-line { font-size: 17px; }

/* ---------- Shell: sidebar + pane ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 20px 12px 14px; background: var(--sidebar); border-right: 0.5px solid var(--hairline); overflow-y: auto; }
.sidebar .brand { padding: 0 10px 4px; }
.switcher { display: grid; gap: 4px; padding: 0 4px; }
.switcher select { width: 100%; }
.nav-heading { padding: 10px 10px 4px; font-size: var(--small-size); font-weight: 600; color: var(--secondary); display: flex; align-items: center; gap: 6px; }
.nav-heading .tag { font-weight: 600; }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 8px; border-radius: 6px; color: var(--text); text-decoration: none; }
.nav a:hover { background: var(--selected); }
.nav a[aria-current='page'] { background: var(--selected); font-weight: 600; }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 6px; color: #ffffff; background: var(--tint-staff); }
.tint-overview { background: var(--tint-overview); }
.tint-members { background: var(--tint-members); }
.tint-usage { background: var(--tint-usage); }
.tint-buy { background: var(--tint-buy); }
.tint-downloads { background: var(--tint-downloads); }
.tint-data { background: var(--tint-data); }
.nav-icon svg { width: 15px; height: 15px; }
.staff-nav { margin-top: 4px; padding: 6px 0 8px; border-radius: 10px; background: color-mix(in srgb, var(--staff-soft) 70%, transparent); }
.staff-nav .nav-heading { color: var(--staff); }
.staff-nav .nav { padding: 0 4px; }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; padding: 10px 8px 0; border-top: 0.5px solid var(--hairline); }
.who { font-size: var(--small-size); color: var(--secondary); overflow-wrap: anywhere; line-height: 1.5; }
.who strong { color: var(--text); font-weight: 600; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.pane { min-width: 0; }
.pane-body { display: grid; gap: 26px; max-width: 760px; margin: 0 auto; padding: 36px 32px 72px; }
.pane-wide .pane-body { max-width: 1040px; }
.page-head { display: grid; gap: 6px; }
.page-kicker { font-size: var(--small-size); font-weight: 600; color: var(--secondary); display: inline-flex; align-items: center; gap: 6px; }
.page-kicker.staff { color: var(--staff); }
.page-title { font-size: var(--title-size); font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; overflow-wrap: anywhere; }
.page-lead { color: var(--secondary); max-width: 62ch; }

/* Phones: a top bar with the wordmark and a menu button; the sidebar becomes a drawer. */
.topbar { display: none; }
.scrim { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 16px; background: color-mix(in srgb, var(--ground) 92%, transparent); border-bottom: 0.5px solid var(--hairline); backdrop-filter: blur(12px); }
  .topbar .brand svg { width: 96px; }
  .topbar .brand-line { font-size: 11px; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: min(300px, 86vw); transform: translateX(-102%); visibility: hidden; transition: transform 200ms ease-out, visibility 0s linear 200ms; box-shadow: 0 0 32px rgba(0, 0, 0, 0.25); }
  .shell.nav-open .sidebar { transform: none; visibility: visible; transition: transform 200ms ease-out; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0, 0, 0, 0.32); }
  .pane-body { padding: 22px 16px 56px; gap: 22px; }
  .page-title { font-size: 22px; }
}

/* ---------- Controls ---------- */
button, input, select, textarea { font: inherit; color: inherit; }
::placeholder { color: var(--secondary); opacity: 1; }
button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 14px; border: 0; border-radius: var(--radius-control); background: var(--control); color: var(--text); box-shadow: var(--shadow-raised); cursor: pointer; white-space: nowrap; font-weight: 500; }
button::before { content: ''; position: absolute; inset: -6px -2px; }
button:hover:not(:disabled) { background: var(--surface-hover); }
button:active:not(:disabled) { filter: brightness(0.96); }
button:disabled { opacity: 0.5; cursor: default; }
button[type='submit'], button.primary { background: var(--accent); color: var(--accent-on); box-shadow: none; font-weight: 600; }
button[type='submit']:hover:not(:disabled), button.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 86%, black); }
button.secondary { background: var(--control); color: var(--text); box-shadow: var(--shadow-raised); font-weight: 500; }
button.secondary:hover:not(:disabled) { background: var(--surface-hover); }
button.danger, button[type='submit'].danger { background: var(--control); color: var(--bad); box-shadow: var(--shadow-raised); font-weight: 600; }
button.danger:hover:not(:disabled) { background: var(--bad-soft); }
button.plain { background: transparent; box-shadow: none; color: var(--link); padding: 0 6px; }
button.plain:hover:not(:disabled) { background: var(--selected); }
button.icon-button { min-width: 40px; min-height: 40px; padding: 0; background: transparent; box-shadow: none; }
button.icon-button svg { width: 22px; height: 22px; }

input, select, textarea { min-height: 32px; padding: 5px 9px; border: 0; border-radius: var(--radius-control); background: var(--control); color: var(--text); box-shadow: var(--shadow-raised); min-width: 0; }
select { padding-right: 26px; }
textarea { width: 100%; resize: vertical; }
input[readonly] { background: var(--well); box-shadow: none; font-family: var(--mono); font-size: 13px; }
input[type='number'] { width: 9.5em; text-align: right; font-variant-numeric: tabular-nums; }

/* Switch: a checkbox with role="switch". */
input.switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; margin: 0; padding: 0; min-height: 0; width: 40px; height: 24px; border-radius: 12px; background: var(--well); box-shadow: inset 0 0 0 1px var(--edge); cursor: pointer; transition: background 160ms ease-out; }
input.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 160ms ease-out; }
input.switch:checked { background: var(--switch-on); box-shadow: none; }
input.switch:checked::after { transform: translateX(16px); }

/* Segmented control: radio inputs (or pressed buttons) in a well. */
.seg { display: inline-flex; flex-wrap: wrap; padding: 2px; gap: 2px; border-radius: 8px; background: var(--well); border: 0; margin: 0; min-width: 0; }
.seg label { position: relative; display: inline-flex; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; min-height: 0; box-shadow: none; }
.seg span, .seg button { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 28px; padding: 0 12px; border-radius: 6px; font-size: 13px; background: transparent; box-shadow: none; font-weight: 500; color: var(--text); }
.seg button::before { inset: -4px 0; }
.seg input:checked + span, .seg button[aria-pressed='true'] { background: var(--control); box-shadow: var(--shadow-raised); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--focus) 85%, transparent); outline-offset: 0; }
.seg.small span, .seg.small button { min-width: 40px; min-height: 26px; padding: 0 8px; font-size: 12px; }

/* ---------- Grouped inset lists ---------- */
section { display: grid; gap: 8px; }
section > h2, .group-title, fieldset > legend { padding: 0 14px; font-size: var(--small-size); font-weight: 600; letter-spacing: 0.02em; color: var(--secondary); text-transform: uppercase; }
section > h3 { padding: 8px 14px 0; font-size: var(--small-size); font-weight: 600; letter-spacing: 0.02em; color: var(--secondary); text-transform: uppercase; }
section > p, .hint { padding: 0 14px; color: var(--secondary); font-size: 13px; max-width: 70ch; }
.group, section > form, section form.list, fieldset.group { display: grid; border-radius: var(--radius-group); background: var(--surface); box-shadow: var(--shadow-group); min-width: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.group > legend { float: left; width: 100%; padding: 0 14px 6px; margin-bottom: 0; background: var(--ground); }
fieldset.group > legend + * { clear: both; }
div.inline { display: contents; }
td form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 8px; }
td form .field { min-height: 0; padding: 0; }
.field, .row, .check { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; min-height: 48px; padding: 8px 14px; margin: 0; }
.field > label, .check > label { flex: 1 1 200px; font-weight: 400; min-width: 0; }
.field > input:not([type='checkbox']), .field > select { flex: 0 1 300px; width: 300px; max-width: 100%; }
.field > input[type='number'] { flex: 0 0 auto; width: 9.5em; }
.field.stack { display: grid; gap: 6px; }
.field.stack > textarea, .field.stack > input { width: 100%; flex: none; }
.check { flex-direction: row-reverse; justify-content: space-between; }
.check > label { cursor: pointer; }
.group > * + *, section > form > * + *, form.list > * + *, fieldset.group > :not(legend) + :not(legend) { border-top: 0.5px solid var(--hairline); }
fieldset.group > legend + * { border-top: 0; }
.row-text { display: grid; gap: 2px; min-width: 0; flex: 1 1 240px; }
.row-text .muted { font-size: var(--small-size); }
.row-control { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.form-actions, section > form > button, form.list > button { justify-self: end; margin: 10px 14px; }
section > form > button + button, form.list > button + button { border-top: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; padding: 2px 0; }
.actions.start { justify-content: flex-start; padding: 2px 14px; }
.savebar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 12px; padding: 12px 0; background: linear-gradient(transparent, var(--ground) 30%); }

/* Disclosure rows (bundles, iPhone packs, settings): the summary is the row, a chevron on the right. */
.group > details > summary, details.disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 14px; cursor: pointer; list-style: none; }
.group > details > summary::-webkit-details-marker { display: none; }
.group > details > summary::after { content: ''; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--secondary); border-bottom: 2px solid var(--secondary); transform: rotate(-45deg); transition: transform 160ms ease-out; margin-right: 4px; }
.group > details[open] > summary::after { transform: rotate(45deg); }
.group > details > summary:hover { background: var(--surface-hover); }
.group > details:first-child > summary { border-radius: var(--radius-group) var(--radius-group) 0 0; }
.group > details[open] > form { display: grid; margin: 0 12px 12px; border-radius: 8px; background: var(--ground); box-shadow: inset 0 0 0 0.5px var(--hairline); }
.group > details[open] > form > * + * { border-top: 0.5px solid var(--hairline); }
.group > details[open] > form > button { justify-self: end; margin: 10px 12px; border-top: 0; }
.summary-main { display: grid; gap: 2px; min-width: 0; }
.summary-main strong { font-weight: 600; }
.summary-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--small-size); color: var(--secondary); font-variant-numeric: tabular-nums; }

/* ---------- Badges, stats, empty states, notes ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--well); color: var(--secondary); white-space: nowrap; }
.badge.on { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.staff { background: var(--staff-soft); color: var(--staff); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0; border-radius: var(--radius-group); background: var(--surface); box-shadow: var(--shadow-group); overflow: hidden; }
.stats > div { padding: 16px 18px; display: grid; gap: 2px; }
.stats > div + div { border-left: 0.5px solid var(--hairline); }
.stats dt { color: var(--secondary); font-size: 13px; }
.stats dd { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.empty { display: grid; justify-items: center; gap: 6px; padding: 28px 20px; text-align: center; color: var(--secondary); border-radius: var(--radius-group); background: var(--surface); box-shadow: var(--shadow-group); }
.empty svg { width: 28px; height: 28px; color: var(--switch-on); }
.empty strong { color: var(--text); font-weight: 600; }
.note { padding: 10px 14px; border-radius: 8px; font-size: 13px; line-height: 1.5; background: var(--accent-soft); color: var(--text); }
.note.warn { background: var(--warn-soft); }
.note.staff { background: var(--staff-soft); }
.secret { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 13px; padding: 2px 8px; border-radius: 6px; background: var(--well); }
.secret svg { width: 13px; height: 13px; flex: none; }
.price-line { padding: 12px 14px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.momo-how { padding: 12px 14px; line-height: 1.55; background: var(--accent-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-group); color: var(--text); text-decoration: none; font-size: 13px; }
.chips a:hover { background: var(--surface-hover); }

/* ---------- Tables inside a group ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-group); background: var(--surface); box-shadow: var(--shadow-group); }
section > table, section > .table-wrap > table, .group table { width: 100%; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: 12px 14px 4px; font-size: var(--small-size); font-weight: 600; color: var(--secondary); text-transform: uppercase; letter-spacing: 0.02em; }
th, td { text-align: left; padding: 10px 14px; vertical-align: middle; }
thead th { font-size: var(--small-size); font-weight: 600; color: var(--secondary); border-bottom: 0.5px solid var(--hairline); white-space: nowrap; }
tbody tr + tr > * { border-top: 0.5px solid var(--hairline); }
tbody th { font-weight: 600; }
td.num { text-align: right; white-space: nowrap; }
td.late { color: var(--bad); font-weight: 600; }
td select { min-width: 8em; }
table td:last-child, table th:last-child { text-align: right; }

/* ---------- Lists ---------- */
ul.list { list-style: none; margin: 0; padding: 0; display: grid; border-radius: var(--radius-group); background: var(--surface); box-shadow: var(--shadow-group); }
ul.list > li { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; min-height: 48px; padding: 8px 14px; }
ul.list > li + li { border-top: 0.5px solid var(--hairline); }

/* ---------- Sign-in and join: one centred card ---------- */
.solo { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.solo-card { width: min(440px, 100%); display: grid; gap: 22px; }
.solo-card .brand { justify-self: center; justify-items: center; }
.solo-card h1 { font-size: 22px; font-weight: 700; text-align: center; }
.solo-card > p:not(.actions), .solo-card .lead { text-align: center; color: var(--secondary); }
.solo-stack { display: grid; gap: 18px; }
.solo-card .page-head { text-align: center; }
.solo-card .page-lead { margin: 0 auto; }
.solo-card form { display: grid; border-radius: var(--radius-group); background: var(--surface); box-shadow: var(--shadow-group); }
.solo-card form > * + * { border-top: 0.5px solid var(--hairline); }
.solo-card form > button { margin: 12px 14px; justify-self: stretch; min-height: 40px; border-top: 0; }
.solo-card .field > input { flex: 1 1 220px; width: auto; }
.solo-foot { display: flex; justify-content: center; }

/* ---------- Status toast ---------- */
.status { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 40; max-width: min(92vw, 560px); }
.status:not(:empty) { padding: 10px 16px; border-radius: 10px; background: var(--surface); color: var(--text); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18), 0 0 0 0.5px var(--hairline); border-left: 4px solid var(--switch-on); }
.status[data-kind='error']:not(:empty) { border-left-color: var(--bad); }
.loading { padding: 40px 0; color: var(--secondary); text-align: center; }

/* ---------- Grouped sets inside one form or section (payment settings, service settings) ---------- */
.set { display: grid; gap: 8px; min-width: 0; }
.set > legend { float: left; width: 100%; padding: 0 14px 8px; }
.set > legend + * { clear: both; }
section > form.stacked { background: none; box-shadow: none; gap: 24px; }
section > form.stacked > * + * { border-top: 0; }
section > form.stacked .savebar { margin: 0; justify-self: stretch; }
section > .set { margin-top: 14px; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 4px; }
.jump button { min-height: 30px; border-radius: 999px; font-size: 13px; }

form.setting { display: grid; }
.setting-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 14px; }
.setting-head .row-text strong code { background: none; padding: 0; font-size: 13px; font-weight: 600; }
.setting-head .row-control { padding-top: 2px; }
.setting-editor { display: grid; margin: 0 12px 12px; border-radius: 8px; background: var(--ground); box-shadow: inset 0 0 0 0.5px var(--hairline); }
.setting-editor[hidden] { display: none; }
.setting-editor .actions { padding: 8px 12px 12px; }
.setting-editor .field > input { flex: 1 1 320px; width: auto; }
code.value { background: none; padding: 0; }

section > ul.list, section > .empty, section > .stats, section > .table-wrap { margin: 0; }
.download-link { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: var(--radius-control); background: var(--accent); color: var(--accent-on); font-weight: 600; text-decoration: none; }
.download-link:hover { background: color-mix(in srgb, var(--accent) 86%, black); }
.two-up { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.two-up > form { display: grid; border-radius: var(--radius-group); background: var(--surface); box-shadow: var(--shadow-group); }
.two-up > form > * + * { border-top: 0.5px solid var(--hairline); }
.two-up > form > button { justify-self: end; margin: 10px 14px; border-top: 0; }
.link-result { display: grid; gap: 8px; padding: 12px 14px; background: var(--accent-soft); border-radius: 0 0 var(--radius-group) var(--radius-group); }
.link-result[hidden] { display: none; }
.link-result .link-out { width: 100%; }
.danger-zone { display: grid; gap: 8px; }

/* ---------- Fixes after the first visual review ---------- */
.field.stack { justify-content: stretch; align-items: stretch; }
.field.stack > label { flex: none; }
section > p + * { margin-top: 6px; }
.savebar { position: static; background: none; padding: 4px 0 0; }
.two-up .field { display: grid; gap: 6px; justify-content: stretch; }
.two-up .field > input, .two-up .field > select { width: 100%; flex: none; }
td code, td .badge { white-space: nowrap; }
@media (max-width: 860px) {
  .shell { grid-template-rows: auto 1fr; align-content: start; }
}
/* Full-page pictures (tests and reviews): the sticky sidebar drawn as a full-height column. */
@media (min-width: 861px) { html.full-page .sidebar { position: static; height: auto; min-height: 100vh; } }
[hidden] { display: none !important; }
.group > details > summary .summary-main { flex: 1 1 auto; }
@media (max-width: 520px) { .stats > div + div { border-left: 0; border-top: 0.5px solid var(--hairline); } }

/* ---------- Pages rendered by the server (WHISPRC-54): one-message results and the "Your data" page ---------- */
.message { display: grid; justify-items: center; gap: 10px; padding: 28px 24px; text-align: center; border-radius: var(--radius-group); background: var(--surface); box-shadow: var(--shadow-group); }
.message h1 { font-size: 20px; }
.message p { color: var(--secondary); max-width: 40ch; }
.message-mark { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; }
.message-mark svg { width: 24px; height: 24px; }
.message.ok .message-mark { background: var(--ok-soft); color: var(--ok); }
.message.bad .message-mark { background: var(--bad-soft); color: var(--bad); }
.solo-card .brand svg { width: 188px; height: auto; }
.solo-card .brand { color: var(--text); }
.solo-wide { width: min(640px, 100%); }
.solo-card section { gap: 8px; }
.solo-card .signed-as { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: var(--radius-group); background: var(--surface); box-shadow: var(--shadow-group); }
.solo-card ul.list:empty { display: none; }
.solo-card .status:empty { display: none; }
.setting-live { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; }
.setting-editor .hint { padding: 0 12px 4px; }
.solo-wide form > button { justify-self: end; min-height: 32px; }
.solo-wide form + form { margin-top: 10px; }
.solo-wide .field > input, .solo-wide .field > select { flex: 0 1 300px; width: 300px; }
.pane-body > *, section > * { min-width: 0; }
.table-wrap { position: relative; }
