/* Aimigo account pages. Self-contained: no external fonts, images or other stylesheets.
   Palette follows the live site (dark navy #090b1b / #131225, cyan #48e9db, blue #1a6aff). */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #eceff7;
  --text: #101323;
  --muted: #4d5470;
  --line: #d3d8e6;
  --accent: #1a6aff;
  --accent-text: #ffffff;
  --accent-hover: #1257d6;
  --link: #1257d6;
  --highlight: #12a89c;
  --ok: #0a7a4b;
  --ok-bg: #e3f6ec;
  --warn: #8a5a00;
  --warn-bg: #fff3d6;
  --danger: #b42318;
  --danger-bg: #fde8e6;
  --focus: #1a6aff;
  --radius: 12px;
  --font: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* chart series (statistics.html), fixed order, CVD-validated categorical palette; dark steps below and in theme-tokens.css */
  --chart-1: #2a78d6; --chart-2: #eb6834; --chart-3: #1baf7a; --chart-4: #eda100;
  --chart-5: #e87ba4; --chart-6: #008300; --chart-7: #6250d6; --chart-8: #e34948;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090b1b;
    --surface: #131225;
    --surface-2: #1d1c35;
    --text: #f0f0f0;
    --muted: #b4b8cc;
    --line: #2f2e4f;
    --accent: #48e9db;
    --accent-text: #090b1b;
    --accent-hover: #7af0e5;
    --link: #7fb0ff;
    --highlight: #48e9db;
    --ok: #62e0a5;
    --ok-bg: #0f2a21;
    --warn: #ffd37a;
    --warn-bg: #33270b;
    --danger: #ff8a80;
    --danger-bg: #3a1513;
    --focus: #48e9db;
    --chart-1: #3987e5; --chart-2: #d95926; --chart-3: #199e70; --chart-4: #c98500;
    --chart-5: #d55181; --chart-6: #0ca30c; --chart-7: #9085e9; --chart-8: #e66767;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--accent-text); padding: 0.6rem 1rem; border-radius: 8px; z-index: 10; }
.skip-link:focus { top: 0.5rem; }

/* header / footer */
.site-head, .site-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem;
  padding: 0.85rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line);
}
.site-foot { border-bottom: 0; border-top: 1px solid var(--line); margin-top: auto; color: var(--muted); font-size: 0.9rem; }
.site-foot a { color: var(--muted); }
.brand { font-weight: 700; font-size: 1.2rem; letter-spacing: 0.02em; color: var(--text); text-decoration: none; margin-right: auto; }
.brand::after { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-left: 0.35rem; border-radius: 50%; background: var(--highlight); }
.account-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
.account-nav a, .account-nav button {
  font: inherit; font-size: 0.95rem; color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: 0.5rem 0.6rem; border-radius: 8px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center;
}
.account-nav a:hover, .account-nav button:hover { color: var(--text); background: var(--surface-2); }
.account-nav a[aria-current="page"] { color: var(--text); font-weight: 700; box-shadow: inset 0 -3px 0 var(--highlight); border-radius: 8px 8px 0 0; }

/* layout */
main { width: 100%; max-width: 46rem; margin: 0 auto; padding: 2rem 1rem 3rem; }
main.wide { max-width: 62rem; }
h1 { font-size: clamp(1.5rem, 4vw + 0.5rem, 2.1rem); line-height: 1.2; margin: 0 0 0.5rem; overflow-wrap: anywhere; }
h2 { font-size: 1.25rem; margin: 0 0 0.75rem; }
.lead { color: var(--muted); margin: 0 0 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin: 0 0 1.25rem; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.grid > .card { margin: 0; }
.muted { color: var(--muted); }
.big { font-size: 1.9rem; font-weight: 700; margin: 0.25rem 0 0.75rem; overflow-wrap: anywhere; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0 0 1rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }

/* forms */
.field { margin: 0 0 1rem; }
label { display: block; font-weight: 600; margin: 0 0 0.3rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"] {
  width: 100%; min-height: 46px; padding: 0.55rem 0.75rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
input:hover { border-color: var(--muted); }
input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.hint { font-size: 0.875rem; color: var(--muted); margin: 0.3rem 0 0; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0 0 0.75rem; }
.check input { width: 1.3rem; height: 1.3rem; margin-top: 0.2rem; flex: none; accent-color: var(--accent); }
.check label { font-weight: 400; margin: 0; }
.rules { list-style: none; margin: 0.5rem 0 0; padding: 0; font-size: 0.875rem; color: var(--muted); display: grid; gap: 0.15rem; }
.rules li::before { content: "\25CB"; display: inline-block; width: 1.3em; }
.rules li.met { color: var(--ok); }
.rules li.met::before { content: "\2713"; }
fieldset { border: 0; margin: 0 0 1rem; padding: 0; }
legend { font-weight: 600; padding: 0; margin: 0 0 0.4rem; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 46px; padding: 0.6rem 1.2rem;
  font: inherit; font-weight: 700; color: var(--accent-text); background: var(--accent); border: 2px solid var(--accent);
  border-radius: 10px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { color: var(--text); background: transparent; border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--muted); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.92); background: var(--danger); border-color: var(--danger); }
.btn-small { min-height: 38px; padding: 0.3rem 0.8rem; font-size: 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 0.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.chip {
  min-height: 44px; padding: 0.4rem 1rem; font: inherit; font-weight: 600; color: var(--text); background: var(--surface-2);
  border: 2px solid var(--line); border-radius: 999px; cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* notices (live regions stay in the DOM; empty ones collapse) */
.notice { margin: 0 0 1.25rem; padding: 0.85rem 1rem; border-radius: 10px; font-weight: 500; overflow-wrap: anywhere; }
.notice:empty { display: none; }
.notice-error { color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger); }
.notice-ok { color: var(--ok); background: var(--ok-bg); border: 1px solid var(--ok); }
.banner { padding: 0.85rem 1rem; border-radius: 10px; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn); margin: 0 0 1.25rem; }
.badge { display: inline-block; padding: 0.05rem 0.6rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.badge-ok { color: var(--ok); background: var(--ok-bg); }
.badge-warn { color: var(--warn); background: var(--warn-bg); }

/* secrets / code */
.secret {
  display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: 0.08em;
  padding: 0.7rem 0.9rem; background: var(--bg); border: 1px dashed var(--muted); border-radius: 10px; overflow-wrap: anywhere; margin: 0.4rem 0 0.75rem;
}
.link-row { margin: 0 0 1rem; }
.link-row a { overflow-wrap: anywhere; }

/* tables */
/* position: relative keeps absolutely positioned children (visually-hidden header text) inside the scroll box, so a wide
   table never widens the page on a phone (2026-11-19). */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 0.925rem; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pager { display: flex; align-items: center; gap: 0.75rem; justify-content: flex-end; margin-top: 0.75rem; }

.danger-zone { border-color: var(--danger); }
.steps { padding-left: 1.2rem; }
.steps li { margin: 0 0 0.75rem; }

@media (max-width: 480px) {
  main { padding: 1.25rem 1rem 2.5rem; }
  .card { padding: 1rem; }
  dl.kv { grid-template-columns: 1fr; gap: 0; }
  dl.kv dd { margin-bottom: 0.6rem; }
  .btn { width: 100%; }
  .btn-small { width: auto; }
  .btn-row .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (forced-colors: active) { .btn, .chip, input, select, textarea, .choice { border: 2px solid ButtonText; } }

/* ---------- customer pages (2026-11-18): account type, digital humans, statistics ---------- */
input[type="url"], input[type="file"], select, textarea {
  width: 100%; min-height: 46px; padding: 0.55rem 0.75rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
input[type="file"] { padding: 0.45rem 0.6rem; }
select:hover, textarea:hover { border-color: var(--muted); }
select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
select:disabled, textarea:disabled, input:disabled { opacity: 0.65; cursor: not-allowed; }
textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
textarea.mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9rem; }
fieldset.invalid { outline: 2px solid var(--danger); outline-offset: 6px; border-radius: 6px; }
.card h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
.form-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.req { color: var(--danger); font-weight: 700; }
.counter { font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); font-weight: 700; }
.section-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0 0 1.25rem; font-size: 0.95rem; }

/* radio cards (account type) */
.choices { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); margin: 0 0 0.75rem; }
.choice {
  display: flex; gap: 0.6rem; align-items: flex-start; margin: 0; padding: 0.8rem 0.9rem; font-weight: 400; cursor: pointer;
  background: var(--surface-2); border: 2px solid var(--line); border-radius: 10px;
}
.choice input { width: 1.2rem; height: 1.2rem; margin: 0.2rem 0 0; flex: none; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice:has(input:disabled) { cursor: not-allowed; opacity: 0.7; }
.choice-text { display: grid; gap: 0.1rem; }
.choice-name { font-weight: 700; }
.choice-price { color: var(--muted); font-size: 0.9rem; }

/* switches: a checkbox with role="switch" */
input.switch {
  -webkit-appearance: none; appearance: none; flex: none; width: 2.9rem; height: 1.65rem; margin: 0.1rem 0 0; cursor: pointer;
  border: 2px solid var(--muted); border-radius: 999px;
  background: radial-gradient(circle at 0.68rem 50%, var(--muted) 0.42rem, transparent 0.47rem) var(--surface-2);
}
input.switch:checked {
  border-color: var(--accent);
  background: radial-gradient(circle at calc(100% - 0.68rem) 50%, var(--accent-text) 0.42rem, transparent 0.47rem) var(--accent);
}
input.switch:disabled { opacity: 0.5; cursor: not-allowed; }
.switch-row { display: flex; gap: 0.75rem; align-items: flex-start; margin: 0 0 0.75rem; }
.switch-row label { margin: 0; }

/* slider with its value next to it (2026-11-19: visibility without focus) */
.range-row { display: flex; gap: 0.75rem; align-items: center; }
.range-row input[type="range"] { flex: 1 1 auto; min-width: 0; accent-color: var(--accent); }
.range-row input[type="range"]:disabled { opacity: 0.5; cursor: not-allowed; }
.range-row output { flex: none; min-width: 3.5rem; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.check-list { list-style: none; margin: 0.25rem 0 0.75rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.check-list .check { margin: 0; }
.check-list .check label { font-weight: 600; }

/* command switches */
.cmd-tools { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; margin: 0 0 0.75rem; }
.cmd-tools .field { flex: 1 1 16rem; margin: 0; }
details.cmd-cat { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 0.6rem; background: var(--bg); }
details.cmd-cat > summary {
  display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: center;
  min-height: 46px; padding: 0.55rem 0.9rem; cursor: pointer; font-weight: 700; list-style: none;
}
details.cmd-cat > summary::-webkit-details-marker { display: none; }
details.cmd-cat > summary::before { content: "\25B8"; color: var(--muted); }
details.cmd-cat[open] > summary::before { content: "\25BE"; }
details.cmd-cat > summary .cmd-cat-name { margin-right: auto; overflow-wrap: anywhere; }
.cmd-count { color: var(--muted); font-weight: 500; font-size: 0.9rem; }
.cmd-cat-body { padding: 0 0.9rem 0.75rem; }
.cmd-list { list-style: none; margin: 0; padding: 0; }
.cmd { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.cmd-text { min-width: 0; flex: 1; }
.cmd-text label { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.cmd-name { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9rem; }
.cmd-desc { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.875rem; overflow-wrap: anywhere; }
.cmd-rule { margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--warn); overflow-wrap: anywhere; }
.cmd-rule code, .rule-list code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.badge-info { color: var(--link); background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; margin-left: 0.35rem; }

/* code blocks (embed code, HTML source). Customer HTML is shown as text, never rendered. */
pre.code {
  margin: 0.5rem 0 0.75rem; padding: 0.75rem 0.9rem; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; max-height: 32rem; color: var(--text);
}
.variant { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.variant-head { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin: 0 0 0.5rem; }
.variant-head h3 { margin: 0; overflow-wrap: anywhere; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; margin: 0 0 0.75rem; }
.inline-form .field { flex: 1 1 14rem; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.save-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center;
  margin: 0 0 1.25rem; padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.12);
}
.save-bar .btn { min-width: 10rem; }
.save-bar p { margin: 0; }

/* statistics */
.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: flex-end; margin: 0 0 1.25rem; }
.toolbar .chips { margin: 0; }
.toolbar .field { margin: 0; min-width: 14rem; }
.tiles { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); margin: 0 0 1.25rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; }
.tile-value { display: block; font-size: 1.7rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile-label { display: block; color: var(--muted); font-size: 0.9rem; }
.chart-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); margin: 0 0 1.25rem; }
.chart-grid > .card { margin: 0; min-width: 0; }
.chart { min-height: 16rem; min-width: 0; }
details.table-view { margin-top: 0.75rem; }
details.table-view summary { cursor: pointer; color: var(--link); min-height: 44px; display: flex; align-items: center; }

.account-nav a[aria-current="true"] { color: var(--text); font-weight: 700; }

@media (max-width: 480px) {
  .save-bar .btn { width: 100%; }
  .toolbar .field { min-width: 0; width: 100%; }
}

/* signed-in label in the header. 2026-11-19: js/shell-init.js fills it before the first paint, and while it is empty it keeps
   its place (visibility instead of display:none) with a minimum width, so the navigation never changes width or wraps
   differently while a page loads. */
.whoami { display: inline-block; min-width: 8rem; color: var(--muted); font-size: 0.9rem; padding: 0 0.4rem; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whoami[hidden] { display: inline-block !important; visibility: hidden; }

/* legal pages (imprint, privacy, terms) */
.legal h2 { margin-top: 2rem; }
.legal h3 { font-size: 1.05rem; margin: 1.25rem 0 0.4rem; }
.legal p, .legal li { max-width: 68ch; }
.legal ul, .legal ol { padding-left: 1.3rem; }
.legal li { margin: 0 0 0.35rem; }
.legal address { font-style: normal; margin: 0 0 1rem; }
.legal .updated { color: var(--muted); font-size: 0.9rem; }
.draft-banner { padding: 0.85rem 1rem; border-radius: 10px; color: var(--warn); background: var(--warn-bg); border: 2px solid var(--warn); margin: 0 0 1.5rem; font-weight: 600; }
mark.todo { background: var(--warn-bg); color: var(--warn); border: 1px dashed var(--warn); border-radius: 6px; padding: 0.05rem 0.35rem; font-weight: 600; }
.toc { columns: 2 16rem; padding-left: 1.3rem; margin: 0 0 1.5rem; }

/* ---------- packages (2026-11-19): packages.html and the "Packages & guided process" card of digital-human.html ---------- */
.usage-text { font-weight: 600; margin: 0 0 0.5rem; }
progress.usage-bar {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 0.9rem; margin: 0 0 0.5rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); overflow: hidden; color: var(--accent);
}
progress.usage-bar::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
progress.usage-bar::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress.usage-bar::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
progress.usage-bar.warn { color: var(--warn); }
progress.usage-bar.warn::-webkit-progress-value { background: var(--warn); }
progress.usage-bar.warn::-moz-progress-bar { background: var(--warn); }
progress.usage-bar.full { color: var(--danger); }
progress.usage-bar.full::-webkit-progress-value { background: var(--danger); }
progress.usage-bar.full::-moz-progress-bar { background: var(--danger); }
/* format badges: the label says the format, the dot only helps to scan (series colours of the site style) */
.badge.fmt { color: var(--text); background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; }
.badge.fmt::before { content: ""; display: inline-block; width: 0.6em; height: 0.6em; margin-right: 0.4em; border-radius: 50%; background: var(--fmt-color, var(--muted)); }
.fmt-trig { --fmt-color: var(--chart-4); }
.fmt-seq { --fmt-color: var(--chart-3); }
.fmt-gp { --fmt-color: var(--chart-1); }
.fmt-bundle { --fmt-color: var(--chart-7); }
.pkg { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.pkg:focus { outline: none; }
.pkg-head { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; margin: 0 0 0.75rem; }
.card .pkg-head h3 { margin: 0; overflow-wrap: anywhere; }
.pkg-actions { margin: 0 0 0.75rem; }
.pkg-v { font-weight: 700; margin-right: 0.35rem; }
.cell-line { display: block; font-size: 0.85rem; overflow-wrap: anywhere; }
td.ids { min-width: 12rem; }
td.ids .mono, .ids-more .mono { font-size: 0.82rem; }
details.ids-more summary { cursor: pointer; list-style: none; }
details.ids-more summary::-webkit-details-marker { display: none; }
details.ids-more summary .cell-line::after { content: " (show all)"; color: var(--link); }
details.ids-more[open] summary .cell-line::after { content: " (hide)"; }
details.ids-more p { margin: 0.25rem 0 0; overflow-wrap: anywhere; }
table.pkg-versions td { vertical-align: top; }
dialog.dialog {
  width: min(34rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 1.25rem; overflow: auto;
  color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
dialog.dialog::backdrop { background: rgba(9, 11, 27, 0.6); }
dialog.dialog h2 { margin-top: 0; }
dialog.dialog .notice { margin: 0 0 1rem; }
/* digital-human.html (2026-11-19): card heading with a button next to it; the Google Sheet setup help */
.card-head { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; justify-content: space-between; margin: 0 0 0.75rem; }
.card .card-head h2 { margin: 0; }
dialog.dialog h2[tabindex="-1"]:focus:not(:focus-visible) { outline: none; } /* opens at its title, not at the last button */
.sheet-help code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; overflow-wrap: anywhere; }
.copy-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.4rem 0; }
.copy-row code { padding: 0.2rem 0.4rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
/* digital-human.html: chosen packages */
.pkg-choices { list-style: none; margin: 0 0 1rem; padding: 0; }
.pkg-choice { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.pkg-choice:first-child { border-top: 0; }
.pkg-choice .check { flex: 1 1 16rem; margin: 0; min-width: 0; }
.pkg-choice .check label { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; align-items: center; overflow-wrap: anywhere; }
.pkg-choice .pkg-version { flex: 0 1 15rem; margin: 0; }
.pkg-choice .pkg-version label { font-weight: 400; font-size: 0.875rem; color: var(--muted); margin: 0 0 0.15rem; }
@media (max-width: 480px) { .pkg-choice .pkg-version { flex: 1 1 100%; } }

/* ---------- registration + two-factor setup (2026-11-19) ---------- */
/* live result next to a field (username availability) */
.field-status { font-size: 0.875rem; font-weight: 600; color: var(--muted); margin: 0.3rem 0 0; overflow-wrap: anywhere; }
.field-status:empty { display: none; }
.field-status.is-ok { color: var(--ok); }
.field-status.is-ok::before { content: "\2713\00a0"; }
.field-status.is-bad { color: var(--danger); }
.field-status.is-bad::before { content: "\2715\00a0"; }
[role="timer"] { font-variant-numeric: tabular-nums; }
.card h2[tabindex="-1"]:focus:not(:focus-visible), .twofa-scan:focus:not(:focus-visible) { outline: none; }
.twofa-scan { font-weight: 600; margin: 0 0 0.75rem; }
/* QR code: always dark modules on white with a margin (scanners need that contrast, also in dark mode) */
.qr { width: 100%; max-width: calc(16rem + 1.5rem + 2px); padding: 0.75rem; margin: 0 0 0.75rem; background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius); }
.qr img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
#two-factor { scroll-margin-top: 1rem; }
#twofa-link-row { margin: 0 0 0.5rem; }
details.disclosure { margin: 0 0 1rem; }
details.disclosure > summary { cursor: pointer; color: var(--link); min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }
details.disclosure .secret { margin-top: 0.25rem; }
input.otp { max-width: 12rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.35rem; letter-spacing: 0.3em; }
@media (max-width: 480px) { input.otp { max-width: none; } }

/* ---------- account type cards (customer.html, 2026-11-19) ----------
   Three per row (two rows for six types), two on tablets, one on phones; with five types the last row is centred.
   The whole card is the <label> of its radio. */
.plans { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin: 0 0 0.75rem; }
.plan {
  position: relative; flex: 0 1 calc((100% - 2rem) / 3); min-width: 0; display: flex; flex-direction: column; align-items: center;
  gap: 0.35rem; margin: 0; padding: 1.4rem 1.1rem 1.1rem; font-weight: 400; text-align: center; cursor: pointer;
  background: var(--surface-2); border: 2px solid var(--line); border-radius: var(--radius);
}
.plan:hover { border-color: var(--muted); }
.plan:has(.plan-radio:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(0, 0, 0, 0.18); }
.plan:has(.plan-radio:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.plan:has(.plan-radio:disabled) { cursor: not-allowed; opacity: 0.75; }
.plan-radio { position: absolute; top: 0.85rem; right: 0.85rem; width: 1.3rem; height: 1.3rem; margin: 0; accent-color: var(--accent); }
.plan-badge { margin: -0.4rem 0 0.1rem; }
.plan-name { font-weight: 700; font-size: 1.2rem; line-height: 1.3; padding: 0 1.6rem; overflow-wrap: anywhere; }
.plan-price { display: flex; flex-direction: column; align-items: center; margin: 0.2rem 0 0.35rem; }
.plan-amount { font-size: 2rem; font-weight: 700; line-height: 1.15; color: var(--link); font-variant-numeric: tabular-nums; }
.plan-unit { color: var(--muted); font-size: 0.85rem; }
.plan-about { display: flex; flex-direction: column; gap: 0.6rem; width: 100%; }
.plan-audience { color: var(--muted); font-size: 0.9rem; }
.plan-criteria { display: grid; gap: 0.3rem; padding-top: 0.75rem; border-top: 1px solid var(--line); text-align: left; font-size: 0.9rem; }
.plan-criteria > span { display: block; padding-left: 1.4rem; text-indent: -1.4rem; overflow-wrap: anywhere; }
.plan-criteria > span::before { content: "\2713"; display: inline-block; width: 1.4rem; text-indent: 0; color: var(--ok); font-weight: 700; }
.plan-excluded { display: block; margin-top: 0.6rem; padding: 0.5rem 0.65rem; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 0.85rem; text-align: left; overflow-wrap: anywhere; }
#kind-field.invalid { outline-offset: 8px; }
#kind-problem { margin: 0.25rem 0 0; text-align: center; }
@media (max-width: 760px) { .plan { flex-basis: calc((100% - 1rem) / 2); } }
@media (max-width: 520px) { .plan { flex-basis: 100%; } }
@media (forced-colors: active) { .plan { border: 2px solid ButtonText; } }
