/* Project Horizon — «Рассвет, глубже» (brand kit 30.10.2026: palette.css / palette.json). Unbounded — logo and big headings,
   Onest — interface text. Both OFL. */
@font-face { font-family: 'Unbounded'; font-weight: 200 900; font-display: swap; src: url(/static/brand/fonts/Unbounded-var.ttf) format('truetype'); }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(/static/brand/fonts/onest-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(/static/brand/fonts/onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(/static/brand/fonts/onest-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(/static/brand/fonts/onest-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {                       /* roles used by app.js — all from horizon.css (one source of colour and motion) */
  --bg: var(--ph-bg); --panel: var(--ph-panel); --line: var(--ph-line); --ink: var(--ph-ink); --ink2: var(--ph-ink2); --soft: var(--ph-soft);
  --accent: var(--ph-accent); --accent-hover: var(--ph-accent-hover); --accent2: var(--ph-accent2); --plan: var(--ph-plan);
  --ok: var(--ph-ok); --warn: var(--ph-warn); --err: var(--ph-err);
  --tint: var(--ph-tint); --ok-bg: var(--ph-ok-bg); --ok-ink: var(--ph-ok-ink); --warn-bg: var(--ph-warn-bg); --warn-ink: var(--ph-warn-ink);
  --sunset: var(--ph-sunset); --r: var(--ph-radius);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* nav / #who use display:flex — keep the hidden attribute working */
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--ph-font);
  min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); } a:hover { color: var(--accent-hover); }
header { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 24px;
  background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.brand small { color: var(--ink2); font-size: 11px; }
.logo { height: 30px; width: auto; display: block; }
.logo.on-dark { display: none; }
@media (prefers-color-scheme: dark) { .logo.on-light { display: none; } .logo.on-dark { display: block; } }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { position: relative; padding: 9px 13px; border-radius: 10px; color: var(--ink); text-decoration: none;
  transition: background-color var(--m-normal) var(--m-ease), color var(--m-normal) var(--m-ease); }
nav a:hover { background: var(--soft); color: var(--ink); }
nav a.on { background: var(--tint); color: var(--accent); font-weight: 600; }
nav a.on::after { content: ''; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--accent);
  animation: ph-grow-x var(--m-moderate) var(--m-ease-enter) both; }   /* active indicator grows under the chosen item */
#who { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink2); }
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 28px 16px; }
footer { font-size: 12px; color: var(--ink2); text-align: center; padding: 16px; }
h1 { font: 300 26px/1.2 var(--ph-font-display); letter-spacing: -.01em; margin: 0 0 14px; }
h2 { font-size: 17px; font-weight: 600; margin: 18px 0 8px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 14px; box-shadow: var(--ph-shadow-sm); }
.narrow { max-width: 440px; margin: 24px auto; }
.stack { display: block; text-align: center; margin: 4px 0 18px; } .stack img { height: 120px; width: auto; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; margin-bottom: 12px; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink);
  transition: border-color var(--m-fast) var(--m-ease), box-shadow var(--m-normal) var(--m-ease); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ph-focus); }
input:user-invalid, select:user-invalid { border-color: var(--err); }
.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
button, .btn { font: 600 14px var(--ph-font); min-height: 42px; padding: 9px 16px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--panel); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  transition: transform var(--m-fast) var(--m-ease), background-color var(--m-normal) var(--m-ease), border-color var(--m-normal) var(--m-ease),
              color var(--m-normal) var(--m-ease), box-shadow var(--m-normal) var(--m-ease); }
button:active:not(:disabled), .btn:active { transform: scale(var(--m-press-scale)); transition-duration: var(--m-instant); }
button.primary:hover:not(:disabled), .btn.primary:hover { box-shadow: var(--ph-shadow-md); }
button { --m-spin-color: var(--ink); } button.primary { --m-spin-color: #fff; }
button:hover, .btn:hover { border-color: var(--accent); color: var(--accent); }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, .btn:focus-within { outline: 3px solid var(--ph-focus); outline-offset: 2px; transition: outline-offset var(--m-fast) var(--m-ease); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; } .row > * { flex: 1 1 160px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); }
th { color: var(--ink2); font-size: 12px; font-weight: 600; background: var(--bg); border-top: 0; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--ink2); }
.pill.done { background: var(--ok-bg); color: var(--ok-ink); }
.pill.review, .pill.failed { background: var(--warn-bg); color: var(--warn-ink); }
.pill.processing, .pill.queued { background: var(--tint); color: var(--accent); }
.note { font-size: 13px; color: var(--ink2); }
.warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.ok { background: var(--ok-bg); color: var(--ok-ink); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.err { color: var(--err); font-size: 13px; min-height: 18px; }
.bar { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar > div { height: 10px; background: var(--sunset); width: 0; transition: width var(--m-moderate) var(--m-ease); }   /* real progress */
.codes { font-family: ui-monospace, Menlo, monospace; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px; margin: 8px 0;
  background: var(--soft); border-radius: 10px; padding: 10px 14px; }
.series { flex-direction: row; display: flex; gap: 10px; align-items: center; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px;
  margin-bottom: 6px; font-size: 14px; font-weight: 400; cursor: pointer;
  transition: border-color var(--m-normal) var(--m-ease), background-color var(--m-normal) var(--m-ease); }
.series:hover:not(.off):not(.sel) { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.series.sel { border-color: var(--accent); background: var(--tint); }
@media (max-width: 600px) { header { padding: 10px 16px; } .logo { height: 24px; } h1 { font-size: 22px; } }

/* заставка на телефоне (splash.js) */
#splash { position: fixed; inset: 0; z-index: 1000; background: #07050C; opacity: 1; transition: opacity .55s ease; cursor: pointer; }
#splash svg { display: block; width: 100%; height: 100%; }
#splash.out { opacity: 0; pointer-events: none; }
.splash-skip { position: absolute; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); min-height: 36px; padding: 6px 14px; font-size: 13px;
  background: rgba(255,255,255,.08); color: #C2A9C4; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; }
.splash-skip:hover { color: #fff; border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.12); }

/* file pickers as buttons (upload page) */
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.pick { margin-bottom: 8px; } .pick > .btn { flex: 0 1 auto; position: relative; flex-direction: row; margin: 0; font-weight: 600; }
.pick > .btn:focus-within { outline: 3px solid var(--tint); outline-offset: 2px; }

/* series recommendation (upload page) */
.series { align-items: flex-start; } .series > input { margin-top: 4px; }
.series > span { display: flex; flex-direction: column; gap: 2px; }
.s-why { font-size: 12.5px; color: var(--ink2); }
.series.off { opacity: .55; cursor: default; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; margin-right: 4px; vertical-align: 1px; }
.tag.rec { background: var(--accent); color: #fff; } .tag.ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag.so { background: var(--warn-bg); color: var(--warn-ink); } .tag.no { background: var(--soft); color: var(--ink2); }

/* viewing results on the case page */
.viewer .vhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.viewer .vhead h2 { margin: 0; }
.v3d { width: 100%; height: min(72vh, 720px); border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; background: var(--bg); display: block; }
.vpdf { width: 100%; height: 82vh; border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; display: block; background: #fff; }
@media (max-width: 700px) { .v3d { height: 70vh; } .vpdf { display: none; } }     /* phones: the PDF opens in its own viewer */

/* app: install hint, «report ready» notice */
.install { max-width: 1100px; margin: 0 auto 8px; padding: 0 16px; text-align: center; }
.toast { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 50; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); box-shadow: var(--ph-shadow-lg); padding: 12px 16px;
  font-weight: 600; text-decoration: none; max-width: min(420px, calc(100vw - 32px)); }
.toast:hover { color: var(--accent); }

/* plans on a phone: one card per request instead of a 4-column table */
@media (max-width: 600px) {
  #plans table, #plans tbody, #plans tr, #plans td { display: block; width: 100%; }
  #plans thead { display: none; }
  #plans tr { padding: 10px 12px; border-top: 1px solid var(--line); }
  #plans td { border: 0; padding: 2px 0; }
  #plans td:first-child::before { content: 'План № '; color: var(--ink2); }
}
