/* Тренажер оцінювача — дизайн v2 (Claude Design, 05.10.2026) у стилі сайту ГІС Консалтинг:
   «геодезичний аркуш» (сітка), бірюза + бурштин, Onest + JetBrains Mono. Макет: claude.ai/artifact/4WxZWX4BRjvv4BA7Pk92GR */
:root {
  --paper: #eceff1;
  --card: #ffffff;
  --card-2: #f4f7f8;
  --line: #d3dde2;
  --line-strong: #bfccd3;
  --ink: #132029;
  --ink-2: #4a636f;
  --muted: #4a636f;
  --faint: #6d8592;
  --teal: #0d7d8a;
  --teal-deep: #0a5b64;
  --teal-soft: #e2f0f1;
  --amber: #e0904a;
  --over: #0a5b64;
  --under: #a5560f;
  --grid: rgba(13, 125, 138, .07);
  --panel: #132029; /* темна панель ставки — однакова в обох темах */
  --band: #e2f0f1;
  --panel-ink: #e8eef1;
  --panel-muted: #9fb6c0;
  --body: 'Onest', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1519; --card: #111e25; --card-2: #14232b; --line: #22343d; --line-strong: #2c414b;
    --ink: #e8eef1; --ink-2: #9fb6c0; --muted: #9fb6c0; --faint: #7a929d;
    --teal: #37b3c0; --teal-deep: #5cc7d2; --teal-soft: #122c31;
    --over: #5cc7d2; --under: #e0904a; --grid: rgba(55, 179, 192, .07); --panel: #050b0e; --band: rgba(55, 179, 192, .22);
  }
}
:root[data-theme="dark"] {
  --paper: #0c1519; --card: #111e25; --card-2: #14232b; --line: #22343d; --line-strong: #2c414b;
  --ink: #e8eef1; --ink-2: #9fb6c0; --muted: #9fb6c0; --faint: #7a929d;
  --teal: #37b3c0; --teal-deep: #5cc7d2; --teal-soft: #122c31;
  --over: #5cc7d2; --under: #e0904a; --grid: rgba(55, 179, 192, .07); --panel: #050b0e; --band: rgba(55, 179, 192, .22);
}

* { box-sizing: border-box; }
html, body { margin: 0; color: var(--ink); font-family: var(--body); }
body {
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal-deep); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.screen { min-height: 100vh; max-width: 1240px; margin: 0 auto; padding: 40px 24px 56px; display: flex; flex-direction: column; gap: 28px; }
.screen.center { align-items: center; justify-content: center; text-align: center; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep); }
h1 { margin: 10px 0 0; font-weight: 800; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.04; letter-spacing: -.02em; }
h2 { margin: 0; font-weight: 700; font-size: 20px; }
.muted { color: var(--muted); font-size: 14px; margin: 0; }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.lead { max-width: 380px; font-size: 16px; line-height: 1.5; }
.lead.wide { max-width: 720px; margin-top: 12px; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; }
.bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.bottom.end { justify-content: flex-end; }
.bottom.rule { padding-top: 16px; border-top: 1px solid var(--line-strong); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.error { color: var(--under); font-weight: 600; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.panel-head { display: flex; align-items: baseline; gap: 10px; }
.step { font-family: var(--mono); font-size: 13px; color: var(--teal-deep); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

.opt { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font-size: 15px; }
.opt.on, .opt:has(input:checked) { border: 1.5px solid var(--teal); background: var(--teal-soft); color: var(--teal-deep); font-weight: 700; }
.opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal-deep); }
.unit { margin-left: auto; font-family: var(--mono); font-size: 13px; color: var(--teal-deep); }
.region-pick { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.region-pick.narrow { max-width: 320px; }
.region-pick input { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card-2); color: var(--ink); }
.region-pick select { min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card-2); color: var(--ink); font-size: 16px; font-weight: 600; cursor: pointer; }

.player-row { display: flex; align-items: center; gap: 10px; }
.player-row input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card-2); font-size: 16px; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-block; }
.icon { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--muted); font-size: 20px; }
.dashed { min-height: 44px; border: 1px dashed var(--teal); border-radius: 10px; background: var(--teal-soft); font-weight: 600; color: var(--teal-deep); }

.primary { min-height: 48px; padding: 0 28px; border: none; border-radius: 12px; background: var(--teal-deep); color: #fff; font-weight: 700; }
.primary.big { min-height: 52px; font-size: 17px; }
.ghost { min-height: 52px; padding: 0 22px; border: 1px solid var(--teal); border-radius: 12px; background: var(--card); color: var(--teal-deep); font-weight: 600; }
.accent { min-height: 56px; padding: 0 22px; border: none; border-radius: 12px; background: var(--amber); color: #132029; font-weight: 800; }
.link { border: none; background: none; color: var(--teal-deep); text-decoration: underline; font-size: 14px; padding: 8px 0; min-height: 44px; }
.pill { padding: 6px 12px; border-radius: 999px; background: var(--teal-deep); color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; }
:root[data-theme="dark"] .primary, :root[data-theme="dark"] .pill { color: #0c1519; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .primary, :root:not([data-theme="light"]) .pill { color: #0c1519; } }

/* раунд */
.screen.round { padding: 24px 24px 40px; gap: 20px; }
.round-head { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.round-no { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--teal-deep); }
.board { margin-left: auto; display: flex; gap: 20px; font-size: 15px; flex-wrap: wrap; }
.board span { display: inline-flex; align-items: center; gap: 8px; }
.board b { font-family: var(--mono); }
.round-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
.photos { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 16px; }
.photo-main { position: relative; border-radius: 14px; overflow: hidden; background: #0c1519; aspect-ratio: 4 / 3; }
.photo-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-count { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 8px; background: rgba(19, 32, 41, .78); color: #fff; font-family: var(--mono); font-size: 13px; }
.photo-tag { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 8px; background: rgba(19, 32, 41, .78); color: #fff; font-size: 13px; }
.photo-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #132029; font-size: 22px; line-height: 1; }
.photo-nav.prev { left: 12px; }
.photo-nav.next { right: 12px; }
.thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.thumb { padding: 0; border: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--line); }
.thumb.on { outline: 3px solid var(--teal); outline-offset: -3px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.info { display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.title { font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 12px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.chip .k { color: var(--muted); margin-right: 4px; }
.chip.area { background: var(--teal-soft); border-color: transparent; color: var(--teal-deep); font-family: var(--mono); font-size: 15px; font-weight: 700; }
.desc { white-space: pre-line; font-size: 15px; line-height: 1.6; max-height: 34vh; overflow: auto; padding-right: 6px; overflow-wrap: anywhere; }
.guess { display: flex; flex-direction: column; gap: 12px; padding: 22px; background: var(--panel); border-radius: 14px; color: var(--panel-ink); }
.guess-top { display: flex; justify-content: space-between; font-size: 15px; gap: 8px; flex-wrap: wrap; }
.guess label { font-size: 15px; }
.guess-row { display: flex; gap: 10px; flex-wrap: wrap; }
.guess-row input { flex: 1 1 200px; min-width: 0; min-height: 56px; padding: 0 16px; border: 2px solid #37b3c0; border-radius: 12px; font-family: var(--mono); font-size: 24px; font-weight: 700; background: #0c1519; color: #fff; }
.guess-row input::placeholder { color: #6d8592; }
.muted-inv { color: var(--panel-muted); font-size: 14px; }
#guess-total { font-family: var(--mono); }
.skip-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* розкриття */
.price { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; }
.big-num { font-family: var(--mono); font-weight: 700; font-size: clamp(48px, 7vw, 72px); line-height: 1; letter-spacing: -.03em; color: var(--teal-deep); }
.per { font-size: 17px; color: var(--ink-2); }
.orig { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--teal); border-radius: 10px; background: var(--card); font-weight: 600; text-decoration: none; }
.scale-panel { gap: 10px; }
.scale { position: relative; height: 64px; }
.scale .axis { position: absolute; left: 0; right: 0; top: 31px; height: 2px; background: var(--line-strong); }
.scale .band { position: absolute; top: 22px; height: 20px; border-radius: 6px; background: var(--band); }
.scale .zero { position: absolute; left: 50%; top: 6px; width: 2px; height: 52px; margin-left: -1px; background: var(--teal-deep); }
.scale .marker { position: absolute; top: 18px; width: 28px; height: 28px; margin-left: -14px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 1px 4px rgba(19, 32, 41, .3); }
.scale-lbl { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.res { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.res.win { border: 2px solid var(--teal-deep); }
.res-top, .res-mid { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.who { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.res-mid .mono { font-size: 18px; }
.over { color: var(--over); font-weight: 700; font-size: 16px; font-family: var(--mono); }
.under { color: var(--under); font-weight: 700; font-size: 16px; font-family: var(--mono); }
.pts { font-family: var(--mono); font-size: 40px; font-weight: 700; }
.res.win .pts { color: var(--teal-deep); }

/* підсумок */
.table { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tr { display: grid; grid-template-columns: 40px minmax(0, 1fr) 100px 150px 170px 150px; gap: 16px; padding: 16px 18px; align-items: center; border-top: 1px solid var(--line); font-size: 15px; }
.tr.th { font-size: 13px; color: var(--muted); padding: 14px 18px; border-top: none; font-weight: 600; }
.tr.lead-row { background: var(--teal-soft); }
.tr .num { text-align: right; }
.tr .mono { font-size: 22px; font-weight: 700; }
.tr.lead-row .mono, .tr.lead-row .place { color: var(--teal-deep); }
.place { font-family: var(--mono); font-weight: 700; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.opt.tab { width: auto; }
.ghost.danger { border-color: var(--under); color: var(--under); font-weight: 700; }
.tr.unranked { color: var(--muted); }
.tr.unranked .mono { color: var(--muted); }
.small-card { padding: 16px; gap: 8px; font-size: 15px; border-radius: 12px; }
.small-card b { font-family: var(--mono); }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; background: var(--panel); color: var(--panel-ink); border-radius: 14px; }
.cta b { font-size: 18px; }
.cta .muted-inv { display: block; margin-top: 4px; }
.cta a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 12px; background: var(--amber); color: #132029; font-weight: 800; text-decoration: none; }

@media (max-width: 900px) {
  .screen, .screen.round { padding: 20px 16px 32px; }
  .grid3, .round-grid { grid-template-columns: minmax(0, 1fr); }
  .photos { position: static; }
  .board { margin-left: 0; }
  .tr { grid-template-columns: 28px minmax(0, 1fr) 64px 84px; gap: 10px; }
  .tr > :nth-child(5), .tr > :nth-child(6) { display: none; }
}

/* бренд ГІС Консалтинг */
.brand { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; }
.brand:hover { border-color: var(--teal); }
.brand-logo { height: 34px; width: auto; display: block; }
:root[data-theme="dark"] .brand-logo { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { filter: invert(1); } }
.brand-name { font-weight: 800; letter-spacing: .01em; }
.brand-tag { font-size: 13px; color: var(--muted); }
.sell { margin: 6px 0 2px; max-width: 760px; }
.challenge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 14px 18px; border: 1.5px dashed var(--amber); border-radius: 14px; background: var(--card); }
.challenge .big { font-size: 28px; font-weight: 700; color: var(--teal-deep); }
@media (max-width: 900px) { .brand-tag { display: none; } }
.site-foot { max-width: 1240px; margin: 0 auto; padding: 14px 24px 28px; font-size: 13px; color: var(--muted); text-align: center; }
.site-foot a { color: var(--teal-deep); }
