/* ============================================================================
   Client cabinet of Aist Compute — clickable mockups (design/cabinet).
   Visual language: workaist.ru (owner, 29.11: "bold, large, high-contrast like
   workaist.ru", not the dense operator admin). Tokens, type scale, radii and
   button/card shapes are copied from workaist.ru
   (app/assets/tailwind/application.css, docs/design-system.md) — the WorkAist
   brand on a white canvas: graphite ink, one orange accent, large tight Geist
   headings, thin lines instead of shadows.
   Fonts: Geist / Geist Mono, self-hosted (fonts/GEIST-LICENSE.txt). Nothing is
   loaded from other servers.
   ========================================================================== */

@font-face { font-family: "Geist"; src: url("/assets/geist-variable-e94b2e7a.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/geist-mono-variable-92c01233.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---- Tokens (workaist.ru, light theme) ------------------------------------ */
:root {
  --c-bg: #ffffff;
  --c-surface: #f6f6f7;
  --c-surface-2: #ececef;
  --c-ink: #181819;
  --c-ink-2: #5f5f66;
  --c-ink-3: #707078;          /* AA on bg and surface */
  --c-line: rgb(0 0 0 / 0.08);
  --c-line-strong: rgb(0 0 0 / 0.16);
  --c-accent: #e1602f;         /* large text, fills, rules */
  --c-accent-hover: #c14f21;
  --c-accent-ink: #b5481c;     /* small accent text, 5.37:1 */
  --c-accent-tint: #fbe9e0;
  --c-on-accent: #ffffff;
  --c-ok: #1f7a46;
  --c-ok-tint: #e3f3e9;
  --c-danger: #b3261e;
  --c-danger-tint: #fbe5e3;
  --c-focus: #e1602f;

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --t-h1: clamp(2.25rem, 1.5rem + 3.3vw, 4.5rem);
  --t-h2: clamp(1.875rem, 1.25rem + 2.6vw, 3.75rem);
  --t-h3: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  --t-h4: 1.1875rem;
  --t-lede: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --t-body: 1.0625rem;
  --t-sm: 0.9375rem;
  --t-xs: 0.8125rem;
  --t-metric: clamp(2.5rem, 1.9rem + 2.2vw, 4rem);

  --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-full: 9999px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --gutter: clamp(1rem, 4.45vw, 4rem);
  color-scheme: light;
}
/* A dark band inside the light page (as on workaist.ru). */
[data-theme="dark"] {
  --c-bg: #181819; --c-surface: #232326; --c-surface-2: #2e2e32;
  --c-ink: #f4f4f6; --c-ink-2: #c4c4ca; --c-ink-3: #9a9aa2;
  --c-line: rgb(255 255 255 / 0.12); --c-line-strong: rgb(255 255 255 / 0.22);
  --c-accent: #ec7444; --c-accent-hover: #f6885b; --c-accent-ink: #ec7444; --c-accent-tint: rgb(236 116 68 / 0.16);
  --c-on-accent: #1a1005; --c-ok: #5cc98a; --c-ok-tint: rgb(92 201 138 / 0.14);
  --c-danger: #ff8a80; --c-danger-tint: rgb(255 138 128 / 0.14); --c-focus: #ec7444;
  color-scheme: dark;
  background: var(--c-bg); color: var(--c-ink);
}

/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; background: var(--c-bg); color: var(--c-ink); font: 400 var(--t-body)/1.6 var(--font-sans);
  font-feature-settings: "ss01"; overflow-x: clip; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; overflow-wrap: break-word; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-color: var(--c-line-strong); text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--c-accent); }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; border-radius: var(--r-xs); }
::selection { background: var(--c-accent-tint); color: var(--c-ink); }
code, .mono { font-family: var(--font-mono); font-size: 0.94em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--c-ink-3); }
.ink-2 { color: var(--c-ink-2); }
.sm { font-size: var(--t-sm); line-height: 1.5; }
.xs { font-size: var(--t-xs); line-height: 1.45; }
.strong { font-weight: 600; }
.ok-text { color: var(--c-ok); }
.danger-text { color: var(--c-danger); }
.accent-text { color: var(--c-accent-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---- Frame: top bar + page container ---------------------------------------- */
.wrap { width: 100%; max-width: 80rem; margin-inline: auto; padding-inline: var(--gutter); }
.top { position: sticky; top: 0; z-index: 20; background: var(--c-bg); border-bottom: 1px solid var(--c-line); }
.top .wrap { display: flex; align-items: center; gap: 40px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-ink); flex: none; }
.logo svg { width: 124px; height: auto; display: block; }
.logo span { font-weight: 600; font-size: var(--t-body); letter-spacing: -0.02em; color: var(--c-ink-3); line-height: 1; }
.nav { display: flex; gap: 28px; }
.nav a { position: relative; text-decoration: none; color: var(--c-ink-2); font-size: var(--t-body); font-weight: 500; padding: 6px 0; }
.nav a:hover { color: var(--c-ink); }
.nav a[aria-current="page"] { color: var(--c-ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--c-accent); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 16px; color: var(--c-ink-2); font-size: var(--t-sm); }
.menu { display: none; }
@media (max-width: 1023px) {
  .top .wrap { height: 60px; gap: 16px; }
  .top .wrap > .nav, .top-right { display: none; }
  .logo svg { width: 104px; }
  .menu { display: block; margin-left: auto; }
  .menu > summary { display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
    border: 1px solid var(--c-line-strong); border-radius: var(--r-sm); font-weight: 600; font-size: var(--t-sm); }
  .menu[open] > summary { border-color: var(--c-ink); }
  .menu-panel { position: fixed; inset: 60px 0 0 0; z-index: 30; overflow-y: auto; background: var(--c-bg); padding: 24px var(--gutter);
    display: flex; flex-direction: column; gap: 24px; }
  .menu-panel .nav { flex-direction: column; gap: 0; }
  .menu-panel .nav a { font-size: var(--t-h3); font-weight: 650; letter-spacing: -0.03em; color: var(--c-ink); padding: 14px 0; border-bottom: 1px solid var(--c-line); }
  .menu-panel .nav a[aria-current="page"] { color: var(--c-accent-ink); }
  .menu-panel .nav a[aria-current="page"]::after { display: none; }
}

/* ---- Bands (sections) ------------------------------------------------------ */
.band { padding-block: clamp(2.5rem, 2rem + 2.5vw, 4.5rem); }
.band.tight { padding-block: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem); }
.band.surface { background: var(--c-surface); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 32px; }
.stack-xl { display: flex; flex-direction: column; gap: 48px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.row.between { justify-content: space-between; }
.row.base { align-items: baseline; }
.cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 64px; align-items: start; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1023px) { .cols, .cols-2, .cols-3 { grid-template-columns: 1fr; } }

/* ---- Type ------------------------------------------------------------------------ */
.crumb { display: inline-flex; gap: 8px; color: var(--c-ink-2); font-size: var(--t-sm); font-weight: 500; text-decoration: none; }
.crumb:hover { color: var(--c-ink); }
.h1 { font-size: var(--t-h1); line-height: 1; letter-spacing: -0.05em; font-weight: 700; }
.h2 { font-size: var(--t-h2); line-height: 1.04; letter-spacing: -0.045em; font-weight: 680; }
.h3 { font-size: var(--t-h3); line-height: 1.15; letter-spacing: -0.03em; font-weight: 650; }
.h4 { font-size: var(--t-h4); line-height: 1.3; letter-spacing: -0.015em; font-weight: 620; }
.mute { color: var(--c-ink-3); }
.acc { color: var(--c-accent); }
.bad { color: var(--c-danger); }
.good { color: var(--c-ok); }
.lede { font-size: var(--t-lede); line-height: 1.5; color: var(--c-ink-2); max-width: 46rem; }
.measure { max-width: 46rem; }
.hero { padding-top: clamp(1.5rem, 1rem + 2.5vw, 3.5rem); padding-bottom: clamp(1.5rem, 1rem + 2vw, 3rem); display: flex; flex-direction: column; gap: 20px; }

/* ---- Buttons (workaist.ru: ink primary, one orange accent per screen) ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--r-sm); border: 1px solid transparent; font: 600 var(--t-sm)/1 var(--font-sans); white-space: nowrap;
  text-decoration: none; cursor: pointer; transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
  background: var(--c-ink); color: var(--c-bg); }
.btn:hover { background: var(--c-ink-2); }
.btn.lg { height: 52px; padding: 0 24px; font-size: var(--t-body); }
.btn.accent { background: var(--c-accent); color: var(--c-on-accent); }
.btn.accent:hover { background: var(--c-accent-hover); }
.btn.secondary { background: transparent; color: var(--c-ink); border-color: var(--c-line-strong); }
.btn.secondary:hover { border-color: var(--c-ink); background: var(--c-surface); }
.btn.danger { background: var(--c-danger); color: #fff; }
.btn.danger-outline { background: transparent; color: var(--c-danger); border-color: var(--c-line-strong); }
.btn.danger-outline:hover { border-color: var(--c-danger); }
.btn.ghost { background: none; border: 0; height: auto; padding: 0; color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--c-line-strong); text-underline-offset: 4px; }
.btn.ghost:hover { text-decoration-color: var(--c-accent); }
.btn.full { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.arr::after { content: " →"; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@media (max-width: 639px) { .btns.stretch > .btn { flex: 1 1 100%; } }

/* ---- Status: sentence case, a dot, normal size (no tiny caps) ------------------------ */
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--t-sm); line-height: 1.3; white-space: nowrap; color: var(--c-ink-2); }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c-ink-3); flex: none; }
.status.ok { color: var(--c-ok); } .status.ok::before { background: var(--c-ok); }
.status.acc { color: var(--c-accent-ink); } .status.acc::before { background: var(--c-accent); }
.status.bad { color: var(--c-danger); } .status.bad::before { background: var(--c-danger); }
.status.live::before { animation: pulse 1.4s ease-in-out infinite; background: var(--c-accent); }
.status.lg { font-size: var(--t-body); }
@keyframes pulse { 50% { opacity: .35; } }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-full); background: var(--c-surface-2); color: var(--c-ink-2); font-size: var(--t-xs); font-weight: 600; white-space: nowrap; }
.chip.acc { background: var(--c-accent-tint); color: var(--c-accent-ink); }
.chip.ok { background: var(--c-ok-tint); color: var(--c-ok); }

/* ---- Cards, callouts, banners -------------------------------------------------------- */
.card { display: block; background: var(--c-bg); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: clamp(20px, 1rem + 1vw, 36px); }
.card.emph { border-color: var(--c-ink); }
a.card { text-decoration: none; transition: border-color .2s var(--ease); }
a.card:hover { border-color: var(--c-ink-3); }
.callout { border-radius: var(--r-lg); border-left: 3px solid var(--c-accent); background: var(--c-surface); padding: clamp(20px, 1rem + 1vw, 32px); display: flex; flex-direction: column; gap: 12px; }
.band.surface .callout { background: var(--c-bg); }
.callout.bad { border-left-color: var(--c-danger); background: var(--c-danger-tint); }
.callout.good { border-left-color: var(--c-ok); background: var(--c-ok-tint); }
.callout.plain { border-left-color: var(--c-ink); }
.callout > p { color: var(--c-ink-2); }
.banner { background: var(--c-danger-tint); border-bottom: 1px solid var(--c-line); }
.banner .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: 16px; }
.banner p { flex: 1 1 28rem; }
.decision { border: 1px dashed var(--c-line-strong); border-radius: var(--r-md); padding: 14px 18px; color: var(--c-ink-2); font-size: var(--t-sm); }
.decision b { color: var(--c-accent-ink); margin-right: 6px; }
.ph { display: inline-block; padding: 0 10px; border: 1.5px dashed var(--c-line-strong); border-radius: var(--r-sm); color: var(--c-ink-3); font-weight: 500; white-space: nowrap; }

/* ---- Lists as large rows (not spreadsheets) -------------------------------------------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-ink); }
.rows > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 32px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--c-line-strong); }
.rows .title { font-size: var(--t-h4); font-weight: 620; letter-spacing: -0.015em; line-height: 1.3; }
.rows .title.big { font-size: var(--t-h3); font-weight: 650; letter-spacing: -0.03em; }
.rows .meta { color: var(--c-ink-3); font-size: var(--t-sm); margin-top: 4px; }
.rows .side { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: flex-end; }
.rows .full { grid-column: 1 / -1; }
@media (max-width: 767px) { .rows > li { grid-template-columns: 1fr; } .rows .side { justify-content: flex-start; } }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 28px; margin: 0; }
.kv dt { color: var(--c-ink-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 639px) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: 12px; } }

/* ---- Project tabs (wrap, never scroll) --------------------------------------------------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px 28px; border-bottom: 1px solid var(--c-line); }
.tabs a { position: relative; padding: 12px 0; text-decoration: none; color: var(--c-ink-2); font-weight: 500; white-space: nowrap; }
.tabs a:hover { color: var(--c-ink); }
.tabs a[aria-current="page"] { color: var(--c-ink); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--c-accent); }
@media (max-width: 639px) { .tabs { gap: 0 20px; } .tabs a { padding: 10px 0; } }

/* ---- Usage: big figures, thick bars ------------------------------------------------------ */
.usage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--c-ink); }
.usage > div { padding: 28px 0; border-bottom: 1px solid var(--c-line-strong); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.usage > div:nth-child(odd) { padding-right: clamp(16px, 3vw, 48px); }
.usage > div:nth-child(even) { padding-left: clamp(16px, 3vw, 48px); border-left: 1px solid var(--c-line-strong); }
@media (max-width: 767px) { .usage { grid-template-columns: 1fr; } .usage > div:nth-child(n) { padding-left: 0; padding-right: 0; border-left: 0; } }
.u-name { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; font-size: var(--t-h4); font-weight: 620; }
.u-fig { font-size: var(--t-metric); line-height: 1; letter-spacing: -0.04em; font-weight: 650; font-variant-numeric: tabular-nums; }
.u-fig small { font-size: var(--t-h4); letter-spacing: -0.015em; font-weight: 500; color: var(--c-ink-3); }
.u-note { color: var(--c-ink-2); }
.bar { position: relative; height: 16px; border-radius: var(--r-full); background: var(--c-surface-2); }
.band.surface .bar { background: #dcdce1; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--v); border-radius: inherit; background: var(--c-ok); }
.bar::after { content: ""; position: absolute; left: 80%; top: -6px; bottom: -6px; width: 2px; border-radius: 1px; background: var(--c-ink); opacity: .45; }
.is-tight .bar i, .is-up .bar i { background: var(--c-accent); }
.is-limit .bar i { background: var(--c-danger); }
.is-none .bar i { background: var(--c-ink-3); }
.u-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--c-ink-3); font-size: var(--t-sm); }

/* Daily memory peaks, 14 bars (heights via --h, percent of the size). */
.spark { position: relative; display: flex; align-items: flex-end; gap: 6px; height: 140px; border-bottom: 1px solid var(--c-ink); }
.spark i { flex: 1; height: var(--h); min-height: 3px; border-radius: 4px 4px 0 0; background: #d4d4da; }
.spark i.t { background: color-mix(in srgb, var(--c-accent) 45%, #d4d4da); }
.spark i.u { background: var(--c-accent); }
.spark i.l { background: var(--c-danger); }
.spark .line { position: absolute; left: 0; right: 0; bottom: 80%; border-top: 2px dashed var(--c-ink-3); }
.spark .line span { position: absolute; right: 0; bottom: 4px; font-size: var(--t-xs); font-weight: 600; color: var(--c-ink-2); }
.spark-axis { display: flex; justify-content: space-between; color: var(--c-ink-3); font-size: var(--t-sm); margin-top: 8px; }

/* ---- Projects grid -------------------------------------------------------------------------- */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1023px) { .projects { grid-template-columns: 1fr; } }
.proj { position: relative; display: flex; flex-direction: column; gap: 20px; }
.proj .h3 a { text-decoration: none; }
.proj .h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.proj:hover { border-color: var(--c-ink-3); }
.proj .btns { position: relative; z-index: 1; }
.proj-new { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; min-height: 260px;
  border: 1.5px dashed var(--c-line-strong); border-radius: var(--r-lg); padding: 36px; text-decoration: none; }
.proj-new:hover { border-color: var(--c-ink); }
.plus { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--c-ink); color: var(--c-bg); font-size: 28px; line-height: 1; }

/* ---- Forms ------------------------------------------------------------------------------------ */
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .field > .label { font-weight: 600; font-size: var(--t-sm); }
.hint { color: var(--c-ink-3); font-size: var(--t-sm); }
.input, .textarea { width: 100%; height: 52px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--c-line-strong);
  background: var(--c-bg); color: var(--c-ink); font: 400 var(--t-body)/1.4 var(--font-sans); }
.textarea { height: auto; min-height: 110px; padding: 14px 16px; resize: vertical; }
.input.mono { font-family: var(--font-mono); }
.input::placeholder, .textarea::placeholder { color: var(--c-ink-3); }
.input:focus, .textarea:focus { outline: none; border-color: var(--c-ink); box-shadow: 0 0 0 3px var(--c-accent-tint); }
.input[aria-invalid="true"] { border-color: var(--c-danger); }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-row .field { flex: 1 1 260px; }
.check { display: flex; gap: 12px; align-items: flex-start; color: var(--c-ink-2); font-size: var(--t-sm); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--c-ink); flex: none; }
.flash { padding: 14px 18px; border-radius: var(--r-md); background: var(--c-ok-tint); color: var(--c-ok); font-weight: 600; }
.flash.bad { background: var(--c-danger-tint); color: var(--c-danger); }
label.link { cursor: pointer; text-decoration: underline; text-decoration-color: var(--c-line-strong); text-underline-offset: 4px; font-weight: 600; }
label.link:hover { text-decoration-color: var(--c-accent); }

/* Choice cards (project type, size): a checked card gets the ink border. */
fieldset.choices { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
fieldset.choices.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1023px) { fieldset.choices, fieldset.choices.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { fieldset.choices, fieldset.choices.four { grid-template-columns: 1fr; } }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices label { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-radius: var(--r-lg);
  border: 1px solid var(--c-line-strong); background: var(--c-bg); cursor: pointer; min-width: 0; }
.choices label:hover { border-color: var(--c-ink-3); }
.choices label b { font-size: var(--t-h4); font-weight: 620; letter-spacing: -0.015em; }
.choices label span { color: var(--c-ink-2); font-size: var(--t-sm); }
.choices input:checked + label { border-color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-ink); }
.choices input:focus-visible + label { outline: 2px solid var(--c-focus); outline-offset: 3px; }
.choices input:disabled + label { cursor: not-allowed; background: var(--c-surface); }
.choices input:disabled + label > * { color: var(--c-ink-3) !important; }
.size-l { font-size: 3rem; font-weight: 700; letter-spacing: -0.05em; line-height: 1; }
.choices label .size-spec { color: var(--c-ink); font-weight: 600; }
.choices .price { margin-top: auto; padding-top: 12px; }
.choices label .chip { position: absolute; top: 18px; right: 18px; }
.if-import { display: none; }
.form:has(#type-import:checked) .if-import { display: flex; }

/* ---- Segmented choice (agent picker, mockup switcher): active = solid ink pill ------------------------- */
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: var(--r-full); border: 1px solid var(--c-line-strong);
  cursor: pointer; font-weight: 600; font-size: var(--t-sm); color: var(--c-ink-2); background: var(--c-bg); white-space: nowrap; }
.seg label:hover { border-color: var(--c-ink); color: var(--c-ink); }
.seg input:checked + label { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-bg); }
.seg input:focus-visible + label { outline: 2px solid var(--c-focus); outline-offset: 3px; }
.seg.big label { height: 48px; padding: 0 22px; font-size: var(--t-body); }

/* ---- Mockup-only: state switcher (not part of the product) ----------------------------------------
   A radio group in .mock (or .seg-pick for a real in-page choice) shows one of the .when-N blocks of
   its .switch. Pure CSS (:has), no JavaScript. Do not nest one .switch inside another. */
.mock { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px;
  border: 2px dashed var(--c-accent); border-radius: var(--r-md); background: var(--c-bg); }
.mock legend { float: left; padding: 0; font-size: var(--t-sm); font-weight: 600; color: var(--c-accent-ink); }
.seg-pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.when { display: none; }
.switch:has(> .mock [data-s="1"]:checked, > .seg-pick [data-s="1"]:checked) .when-1,
.switch:has(> .mock [data-s="2"]:checked, > .seg-pick [data-s="2"]:checked) .when-2,
.switch:has(> .mock [data-s="3"]:checked, > .seg-pick [data-s="3"]:checked) .when-3,
.switch:has(> .mock [data-s="4"]:checked, > .seg-pick [data-s="4"]:checked) .when-4,
.switch:has(> .mock [data-s="5"]:checked, > .seg-pick [data-s="5"]:checked) .when-5 { display: block; }

/* ---- Copyable values, records ------------------------------------------------------------------------ */
.copy { display: flex; gap: 10px; align-items: stretch; min-width: 0; }
.copy code { flex: 1; min-width: 0; display: flex; align-items: center; padding: 12px 16px; border-radius: var(--r-sm); background: var(--c-surface);
  border: 1px solid var(--c-line); word-break: break-all; font-size: var(--t-sm); user-select: all; }
.copy .btn { flex: none; height: auto; min-height: 48px; }
@media (max-width: 479px) { .copy { flex-direction: column; } }
pre.code { margin: 0; padding: 16px 18px; border-radius: var(--r-sm); background: var(--c-surface); border: 1px solid var(--c-line);
  font: 400 var(--t-sm)/1.6 var(--font-mono); white-space: pre-wrap; word-break: break-all; user-select: all; }
.record { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; border: 1px solid var(--c-ink); border-radius: var(--r-md); overflow: hidden; background: var(--c-bg); }
.record > div { padding: 14px 20px; border-right: 1px solid var(--c-line-strong); min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.record > div:last-child { border-right: 0; }
.record .k { color: var(--c-ink-3); font-size: var(--t-sm); }
.record code { font-size: var(--t-h4); font-weight: 600; user-select: all; overflow-wrap: anywhere; }
@media (max-width: 767px) { .record { grid-template-columns: 1fr; } .record > div { border-right: 0; border-bottom: 1px solid var(--c-line-strong); } .record > div:last-child { border-bottom: 0; } }

/* Reveal and confirm without JS (<details>) */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.reveal { display: inline; }
.reveal > summary { display: inline; text-decoration: underline; text-decoration-color: var(--c-line-strong); text-underline-offset: 4px; font-weight: 600; }
.reveal[open] > summary { display: none; }
.confirm[open] > summary { opacity: .55; }
.confirm-panel { margin-top: 16px; padding: 24px; border-radius: var(--r-lg); border: 1px solid var(--c-ink); background: var(--c-bg);
  display: flex; flex-direction: column; gap: 16px; max-width: 40rem; }
.opens { margin-top: 20px; }

/* ---- Progress of creation -------------------------------------------------------------------------- */
.progress { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-ink); }
.progress li { display: flex; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--c-line-strong); font-size: var(--t-h4); font-weight: 500; }
.progress .dot { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 650; font-size: var(--t-sm);
  background: var(--c-surface-2); color: var(--c-ink-3); }
.progress li.done .dot { background: var(--c-ok-tint); color: var(--c-ok); }
.progress li.now { font-weight: 650; }
.progress li.now .dot { background: var(--c-accent); color: var(--c-on-accent); animation: pulse 1.4s ease-in-out infinite; }
.progress li.todo { color: var(--c-ink-3); }

/* Numbered steps (as on workaist.ru) */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: flex; flex-direction: column; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 12px; padding: 18px 0; border-top: 1px solid var(--c-line-strong); }
.steps > li::before { content: "0" counter(s); font: 600 var(--t-sm)/1.9 var(--font-mono); color: var(--c-accent-ink); }
.steps > li:last-child { border-bottom: 1px solid var(--c-line-strong); }

/* Bullets */
.list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.list li::marker { color: var(--c-ink-3); }

/* Skeleton (loading) */
.skel { display: block; height: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--c-surface-2), var(--c-surface), var(--c-surface-2)); background-size: 200% 100%; animation: skel 1.4s linear infinite; }
.skel.t { height: 26px; width: 45%; } .skel.w60 { width: 60%; } .skel.w30 { width: 30%; }
@keyframes skel { to { background-position: -200% 0; } }

/* Sign-in pages: dark band with a big statement + white form (workaist.ru contact block) */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { padding: clamp(32px, 5vw, 80px); display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.auth-main { padding: clamp(24px, 5vw, 80px); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 24px; background: var(--c-bg); }
.auth-main > * { width: 100%; max-width: 30rem; }
.auth .logo svg { width: 140px; }
@media (max-width: 1023px) { .auth { grid-template-columns: 1fr; min-height: 0; } .auth-side { gap: 24px; padding-bottom: 32px; } .auth-side .lede, .auth-side .auth-foot { display: none; } }

/* Map (index) */
.map { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-ink); }
.map li { border-bottom: 1px solid var(--c-line-strong); }
.map a { display: grid; grid-template-columns: 56px minmax(0, 20rem) minmax(0, 1fr); gap: 4px 24px; align-items: baseline; padding: 20px 0; text-decoration: none; }
.map a:hover .h4 { text-decoration: underline; text-decoration-color: var(--c-accent); }
.map .n { font: 600 var(--t-sm) var(--font-mono); color: var(--c-accent-ink); }
.map p { color: var(--c-ink-2); }
@media (max-width: 767px) { .map a { grid-template-columns: 40px minmax(0, 1fr); } .map p { grid-column: 2; } }
.foot { border-top: 1px solid var(--c-line); color: var(--c-ink-3); font-size: var(--t-sm); padding-block: 28px; margin-top: 24px; }
.bar.is-tight i, .bar.is-up i { background: var(--c-accent); }
.bar.is-limit i { background: var(--c-danger); }
.cols-2.wide { gap: 48px 64px; }
.spark .line span { display: none; }
.proj-fig { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
.proj-fig b { font-size: var(--t-metric); letter-spacing: -0.04em; font-weight: 650; line-height: 1; }
.choices label .size-l { font-size: 3rem; font-weight: 700; letter-spacing: -0.05em; line-height: 1; color: var(--c-ink); }
.rows .side.stack-sm { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: flex-start; gap: 10px; }
.rows > li:has(details.confirm[open]) { grid-template-columns: 1fr; align-items: start; } .rows > li:has(details.confirm[open]) .side { justify-content: flex-start; }
pre.code { word-break: normal; overflow-wrap: anywhere; }

/* ============================================================================
   Product additions (cabinet/, not in the mockups' file): bars and charts are SVG with attributes instead of
   style="--v:…" (strict CSP without 'unsafe-inline', docs/architecture-cabinet.md §1.1), the test-mode strip,
   the "data as of" band, the office's tables.
   ========================================================================== */
.logo-acc { fill: #e1602f; }
.bar-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.bar-svg .fill { fill: var(--c-ok); }
.bar.is-tight .bar-svg .fill, .bar.is-up .bar-svg .fill, .is-tight .bar-svg .fill, .is-up .bar-svg .fill { fill: var(--c-accent); }
.bar.is-limit .bar-svg .fill, .is-limit .bar-svg .fill { fill: var(--c-danger); }
.is-none .bar-svg .fill { fill: var(--c-ink-3); }
.spark .sb { flex: 1; height: 100%; display: block; overflow: visible; min-width: 0; }
.spark .sb rect { fill: #d4d4da; }
.spark .sb.t rect { fill: color-mix(in srgb, var(--c-accent) 45%, #d4d4da); }
.spark .sb.u rect { fill: var(--c-accent); }
.spark .sb.l rect { fill: var(--c-danger); }
.testband { background: var(--c-accent-tint); color: var(--c-accent-ink); font-size: var(--t-xs); font-weight: 600; line-height: 1.4;
  text-align: center; padding: 6px var(--gutter); }
.banner.stale { background: var(--c-surface); }
.banner.ok { background: var(--c-ok-tint); }
.flash-wrap { padding-top: 16px; }
.inline-form { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline;
  text-decoration-color: var(--c-line-strong); text-underline-offset: 4px; font-weight: 600; }
.errors { color: var(--c-danger); font-size: var(--t-sm); font-weight: 600; }
.field .error { color: var(--c-danger); font-size: var(--t-sm); }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th, .table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--c-line-strong); vertical-align: top; }
.table th { color: var(--c-ink-3); font-weight: 600; border-bottom-color: var(--c-ink); }
.table-wrap { overflow-x: auto; }
.office-tag { font: 600 var(--t-xs) var(--font-mono); color: var(--c-accent-ink); }
pre.letter { white-space: pre-wrap; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
/* The agent picker as links (one page per agent: the values are issued for the chosen one). */
.seg .seg-link { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: var(--r-full); border: 1px solid var(--c-line-strong);
  font-weight: 600; font-size: var(--t-sm); color: var(--c-ink-2); background: var(--c-bg); white-space: nowrap; text-decoration: none; }
.seg .seg-link:hover { border-color: var(--c-ink); color: var(--c-ink); }
.seg .seg-link.on { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-bg); }
.seg.big .seg-link { height: 48px; padding: 0 22px; font-size: var(--t-body); }
