/* Components from mockup A3 and new ones designed in its language (S3).
 * States covered for every control: hover · focus-visible · active · disabled · selected · error. */

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; }
.icon--missing { display: inline-block; width: 1em; height: 1em; outline: 1px dashed var(--error); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }

/* ── buttons ──────────────────────────────────────────────────────────── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r-btn); background: transparent; color: inherit;
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--t) var(--ease), border-color var(--t), color var(--t), transform var(--t) var(--ease), box-shadow var(--t);
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--accent:active { background: var(--accent-pressed); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--ink-hover); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--error); color: #fff; }
.btn--danger:hover { background: color-mix(in srgb, var(--error) 85%, black); }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); cursor: not-allowed; transform: none; }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(23, 48, 0, .25); border-top-color: var(--accent-ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { position: relative; display: inline-flex; align-items: center; gap: 2px; min-height: 32px; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; transition: color var(--t); }
.link:hover { color: var(--brand-ink); }
.link .icon { width: 16px; height: 16px; }
.tlink { color: var(--brand-ink); font-weight: 600; text-underline-offset: 3px; }

.icon-btn {
  position: relative; width: 44px; height: 44px; display: inline-grid; place-items: center; flex: none; border-radius: var(--r-pill);
  border: 0; background: transparent; color: var(--ink); cursor: pointer; transition: background var(--t);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .icon { width: 22px; height: 22px; }
.icon-btn .count { position: absolute; top: 2px; right: 0; }

.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; line-height: 1; }
.count[data-zero] { background: var(--surface-2); color: var(--ink-2); }

.demo-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); white-space: nowrap;
  font-size: 12px; font-weight: 700; color: var(--warn-ink); background: var(--warn-bg); border: 1px solid var(--warn-line);
}
.demo-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #E0A100; }

/* ── segmented control, chips, tabs ───────────────────────────────────── */
.seg { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); }
.seg a, .seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 16px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--ink-2); font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer;
  transition: background var(--t), color var(--t), box-shadow var(--t);
}
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg [aria-current="page"], .seg [aria-selected="true"], .seg [aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
@media (max-width: 389px) { .seg a, .seg button { padding-inline: 12px; } }
.seg--full { display: flex; }
.seg--full > * { flex: 1; }
.seg .icon { width: 16px; height: 16px; }

.chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer;
  text-decoration: none; transition: background var(--t), color var(--t), border-color var(--t);
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip[aria-pressed="true"], .chip[aria-selected="true"], .chip[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .el { width: 22px; height: 22px; font-size: 10px; border-radius: var(--r-pill); }
.chip .el::before { display: none; }
.chip small { font-weight: 700; }   /* no opacity: the count keeps 4.5:1 */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips > * { scroll-snap-align: start; }

/* ── element tile (signature) ─────────────────────────────────────────── */
.el {
  --c: var(--brand); position: relative; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--r-el);
  background: color-mix(in srgb, var(--c) 13%, var(--surface)); color: color-mix(in srgb, var(--c) 65%, var(--ink));  /* 65/35: ≥4.5:1 on the tint for greyhound teal and harness orange */
  font-weight: 800; font-size: 14px; line-height: 1; letter-spacing: -.01em; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent);
}
.el::before { content: attr(data-n); position: absolute; top: 3px; left: 4px; font-size: 8px; font-weight: 700; opacity: .7; }
.el--sm { width: 26px; height: 26px; font-size: 12px; }
.el--sm::before { font-size: 7px; top: 2px; left: 3px; }
.el--lg { width: 44px; height: 44px; font-size: 18px; border-radius: 12px; }
.el[data-k="thoroughbred"] { --c: var(--c-th); } .el[data-k="greyhound"] { --c: var(--c-gr); } .el[data-k="harness"] { --c: var(--c-ha); }

/* ── price button (ТЗ §7.2: green, dark text; selected inverted) ───────── */
.odds {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; min-height: 44px; padding: 2px 8px;
  border-radius: var(--r-odds); border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); cursor: pointer;
  font-weight: 700; font-size: var(--fs-odds); line-height: 22px; font-variant-numeric: tabular-nums;
  transition: background var(--t) var(--ease), color var(--t), box-shadow var(--t), transform var(--t) var(--ease);
}
.odds small { font-size: 11px; line-height: 13px; font-weight: 600; opacity: .85; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odds:hover { background: var(--accent-hover); }
.odds:active { transform: translateY(1px); background: var(--accent-pressed); }
.odds[aria-pressed="true"] { background: var(--ink); color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.odds[aria-pressed="true"] small { color: #fff; }
.odds.is-off, .odds:disabled { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); cursor: not-allowed; font-size: 12px; line-height: 16px; font-weight: 600; transform: none; }
.odds__off { display: inline-flex; align-items: center; gap: 4px; }
.odds__off .icon { width: 14px; height: 14px; }
.odds.is-up::after, .odds.is-down::after { position: absolute; top: -7px; right: -5px; font-size: 10px; line-height: 14px; padding: 0 3px; border-radius: 3px; font-weight: 800; }
.odds.is-up::after { content: "▲"; background: var(--accent-ink); color: var(--accent); }
.odds.is-down::after { content: "▼"; background: var(--error); color: #fff; }
.odds.flash { animation: flash 1s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--warn); } 100% { box-shadow: 0 0 0 0 transparent; } }
.odds.is-leg { background: var(--brand); color: #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 35%, transparent); }

.marker { width: 32px; height: 32px; flex: none; display: block; }

/* ── statuses ─────────────────────────────────────────────────────────── */
.st { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.st .icon { width: 13px; height: 13px; }
.st--ok { background: var(--success-bg); color: var(--success); }
.st--ok::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-pressed); }
.st--soon { background: var(--warn-bg); color: var(--warn-ink); }
.st--warn { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.st--off { background: var(--surface-2); color: var(--ink-2); }
.st--bad { background: var(--error-bg); color: var(--error); }
.st--muted { background: transparent; color: var(--ink-2); border: 1px dashed var(--line-strong); }
.st--brand { background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand-ink); }
.tminus { flex: none; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink); font-variant-numeric: tabular-nums; }
.tminus.is-soon { background: var(--warn-bg); color: var(--warn-ink); }
.tminus.is-off { color: var(--ink-2); }

/* signature: fill level to the jump */
.fillbar { height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.fillbar i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--fill, 0)); background: linear-gradient(90deg, #C9F28F, var(--accent)); transition: transform 1s linear; }

/* ── tiles, panels, section heads ─────────────────────────────────────── */
.tile { position: relative; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.tile__pad { padding: 18px; }
@media (max-width: 767px) { .tile__pad { padding: 14px; } }
.tile__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tile__head h2, .tile__head h3 { font-size: var(--fs-h3); line-height: 24px; font-weight: 800; }
.tile__head .link { margin-left: auto; }
.kick { font-size: var(--fs-kicker); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.sec-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-head h2 { font-size: var(--fs-h2); line-height: 28px; font-weight: 800; }
.sec-head .link { margin-left: auto; }
.ptitle { display: grid; gap: 4px; }
.ptitle h1 { font-size: var(--fs-h1); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.ptitle p { color: var(--ink-2); max-width: 70ch; }
@media (max-width: 767px) { .ptitle h1 { font-size: 22px; } }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); }
.crumbs a { position: relative; text-decoration: none; font-weight: 600; color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); }
.crumbs .icon { width: 14px; height: 14px; }

/* ── fields and forms ─────────────────────────────────────────────────── */
.field { display: grid; gap: 6px; }
.field__label { font-size: 13px; font-weight: 700; color: var(--ink); }
.field__hint { font-size: 12px; color: var(--ink-2); }
.field input:not(.visually-hidden):not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); color: var(--ink);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.field textarea { min-height: 110px; padding-block: 10px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); box-shadow: var(--focus-ring); outline: none; }
.field input[readonly], .field input:disabled { background: var(--surface-2); color: var(--ink-2); }
.field__error { color: var(--error); font-size: 13px; font-weight: 600; }
.field.has-error input, .field.has-error select, .field.has-error textarea, .field [aria-invalid="true"] { border-color: var(--error) !important; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.field--check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--ink); }
.field--check .field__label { font-weight: 500; }
.field--check .field__error { grid-column: 2; }
.pw { position: relative; }
.pw input { padding-right: 52px !important; }
.pw button { position: absolute; right: 2px; top: 1px; }
.form { display: grid; gap: 16px; }
.form__row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form__error { display: flex; gap: 8px; padding: 12px 14px; border-radius: var(--r-s); background: var(--error-bg); color: var(--error); font-weight: 600; font-size: 14px; }
.form__ok { display: flex; gap: 8px; padding: 12px 14px; border-radius: var(--r-s); background: var(--success-bg); color: var(--success); font-weight: 600; font-size: 14px; }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radio { position: relative; }
.radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); font-weight: 600; font-size: 14px; background: var(--surface); transition: background var(--t), color var(--t), border-color var(--t); }
.radio input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.radio input:focus-visible + span { box-shadow: var(--focus-ring); }

.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-m); font-size: 14px; line-height: 19px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--ink); }
.note .icon { color: #9A6B00; width: 18px; height: 18px; margin-top: 1px; }
.note--info { background: var(--surface-2); border-color: var(--line); }
.note--info .icon { color: var(--brand-ink); }
.note--bad { background: var(--error-bg); border-color: color-mix(in srgb, var(--error) 30%, transparent); }
.note--bad .icon { color: var(--error); }
.note--ok { background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.note--ok .icon { color: var(--success); }

/* ── tables (desktop) that become cards (mobile) ──────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-table); }
.table th { text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }

/* ── empty states (signature: the flask) ──────────────────────────────── */
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 28px 12px; }
.empty h3 { font-size: 17px; font-weight: 800; }
.empty p { color: var(--ink-2); font-size: 14px; line-height: 19px; max-width: 34ch; }
.flask { position: relative; width: 76px; height: 88px; margin-bottom: 4px; }
.flask__neck { position: absolute; left: 28px; top: 2px; width: 20px; height: 30px; background: #DCE6EE; border-radius: 2px 2px 0 0; }
.flask__neck::before { content: ""; position: absolute; left: -6px; right: -6px; top: -4px; height: 6px; border-radius: 3px; background: #9BB0BF; }
.flask__body { position: absolute; left: 4px; right: 4px; bottom: 0; height: 58px; clip-path: polygon(36% 0, 64% 0, 100% 80%, 96% 100%, 4% 100%, 0 80%); background: linear-gradient(to top, var(--accent) 0 34%, #DCE6EE 34%); }
.flask__bubble { position: absolute; border-radius: 50%; background: var(--accent); animation: bubble 3s var(--ease) infinite; }
.flask__bubble:nth-child(3) { left: 32px; bottom: 10px; width: 6px; height: 6px; }
.flask__bubble:nth-child(4) { left: 42px; bottom: 6px; width: 4px; height: 4px; animation-delay: 1.2s; }
@keyframes bubble { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }

.skel { border-radius: var(--r-s); background: linear-gradient(90deg, var(--surface-2), #f7f9fb, var(--surface-2)); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }
.stale { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--warn-ink); }

/* ── overlays (one mechanism in app.js; kinds of panel here) ──────────── */
.overlay { position: fixed; inset: 0; z-index: var(--z-overlay); display: grid; place-items: center; padding: 16px; background: var(--scrim); opacity: 0; transition: opacity var(--t2) var(--ease); }
.overlay.is-open { opacity: 1; }
.overlay__panel { width: min(100%, 520px); max-height: 90vh; overflow: auto; background: var(--surface); border-radius: 20px; padding: 24px; box-shadow: var(--shadow-3); transform: translateY(8px); transition: transform var(--t2) var(--ease); }
.overlay.is-open .overlay__panel { transform: none; }
.overlay--left { place-items: stretch start; padding: 0; }
.overlay--left .overlay__panel { width: min(340px, 88vw); height: 100%; max-height: none; border-radius: 0 24px 24px 0; transform: translateX(-104%); padding: 16px; }
.overlay--left.is-open .overlay__panel { transform: none; }
.overlay--top { place-items: start center; padding: 12px; }
.overlay--top .overlay__panel { width: min(760px, 100%); padding: 10px; transform: translateY(-12px); }
@media (max-width: 767px) { .overlay--top { padding: 0; } .overlay--top .overlay__panel { width: 100%; height: 100%; max-height: none; border-radius: 0; } }
.overlay--sheet { place-items: end end; padding: 20px; }
.overlay--sheet .overlay__panel { width: min(380px, 100%); padding: 0; }
@media (max-width: 767px) { .overlay--sheet { padding: 0; place-items: end stretch; } .overlay--sheet .overlay__panel { width: 100%; border-radius: 24px 24px 0 0; max-height: 86vh; } }

.drawer { display: flex; flex-direction: column; gap: 14px; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; }
.drawer__nav { display: grid; gap: 2px; padding: 8px; border-radius: 18px; background: var(--surface-2); }
.dl { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 15px; transition: background var(--t); }
.dl:hover { background: var(--surface); }
.dl[aria-current="page"] { background: var(--surface); box-shadow: var(--shadow-1); font-weight: 800; }
.dl[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: var(--accent-pressed); }
.dl .ico { width: 28px; display: grid; place-items: center; }
.dl .ico .icon { width: 18px; height: 18px; }
.dl .el { width: 26px; height: 26px; font-size: 11px; }
.dl .el::before { display: none; }
.dl + .rib-sep, .drawer__nav .rib-sep { display: block; width: auto; height: 1px; margin: 6px 10px; }
.drawer__demo { align-self: flex-start; margin-top: auto; }

/* header search, suggestions, full panel (§19.1) */
.search { position: relative; flex: 1; max-width: 420px; margin-inline: auto; }
.search input { width: 100%; height: 44px; padding: 0 14px 0 42px; border-radius: var(--r-pill); border: 1px solid transparent; background: var(--surface-2); transition: border-color var(--t), background var(--t), box-shadow var(--t); }
.search input::placeholder { color: var(--ink-2); }
.search input:focus { outline: none; background: #fff; border-color: var(--line-strong); box-shadow: var(--focus-ring); }
.search > .icon { position: absolute; left: 14px; top: 12px; color: var(--ink-2); pointer-events: none; }
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 6px; border-radius: var(--r-m); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-3); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity var(--t), transform var(--t) var(--ease); max-height: 70vh; overflow: auto; }
.suggest.is-open { opacity: 1; transform: none; pointer-events: auto; }
.sg-group { padding: 10px 10px 2px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.sg-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 10px; border-radius: var(--r-s); text-decoration: none; font-size: 14px; }
.sg-item span { min-width: 0; }
.sg-item small { display: block; color: var(--ink-2); font-size: 12px; }
.sg-item:hover, .sg-item[aria-selected="true"] { background: var(--surface-2); }
.sg-item[aria-selected="true"] { box-shadow: inset 0 0 0 2px var(--focus); }   /* the arrow-key choice, like a focus ring */
.sg-item mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 2px; }
.sg-msg { padding: 14px 10px; font-size: 14px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sg-all { display: flex; justify-content: center; padding: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.spanel { display: flex; flex-direction: column; gap: 6px; }
.spanel__bar { position: relative; display: flex; align-items: center; gap: 6px; }
.spanel__bar > .icon { position: absolute; left: 16px; color: var(--ink-2); }
.spanel__bar input { flex: 1; height: 54px; padding: 0 14px 0 46px; border: 0; border-radius: var(--r-m); background: var(--surface-2); font-size: 17px; }
.spanel__bar input:focus { outline: 2px solid var(--focus); }
.spanel__body { overflow: auto; max-height: 70vh; padding: 0 4px 8px; }
@media (max-width: 767px) { .spanel__body { max-height: none; flex: 1; } }
.spanel__hint { padding: 14px 10px; color: var(--ink-2); font-size: 14px; }

/* account chip and menu (§8.1) */
.bal { display: grid; text-align: right; line-height: 1.1; text-decoration: none; padding: 4px 10px; border-radius: var(--r-s); min-width: 0; max-width: 140px; transition: background var(--t); }
.bal:hover { background: var(--surface-2); }
.bal small { font-size: 10px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
.bal b { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.acc { position: relative; }
.acc__btn { background: var(--surface-2); }
.acc__menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 5; width: 240px; padding: 6px; border-radius: var(--r-m); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-3); display: grid; }
.acc__menu a, .acc__menu button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border: 0; border-radius: var(--r-s); background: transparent; text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer; text-align: left; }
.acc__menu a:hover, .acc__menu button:hover { background: var(--surface-2); }
.acc__menu .icon { width: 18px; height: 18px; color: var(--ink-2); }
.acc__who { padding: 8px 10px 10px; font-weight: 800; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acc__who small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-2); }

/* support sheet + demo chat */
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 20px; border-bottom: 1px solid var(--line); }
.sheet__head h2 { font-size: 18px; font-weight: 800; }
.sheet__body { padding: 14px 20px 20px; display: grid; gap: 10px; font-size: 14px; line-height: 19px; }
.sheet__status { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: 13px; }
.sheet__status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-pressed); }
.sheet details { border-radius: var(--r-s); background: var(--surface-2); padding: 0 12px; }
.sheet summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.sheet details p { padding: 0 0 12px; color: var(--ink-2); }
.sheet__alt { font-size: 13px; color: var(--ink-2); }
.chat { display: grid; gap: 8px; }
.chat__log { display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.chat__log li { padding: 8px 12px; border-radius: 14px; max-width: 86%; font-size: 14px; }
.chat__log .me { justify-self: end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.chat__log .bot { background: var(--surface-2); border-bottom-left-radius: 4px; }
.chat__form { display: flex; gap: 6px; }
.chat__form input { flex: 1; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); }

/* ── betslip (ТЗ §14) — one markup: column ≥1280, drawer below ────────── */
.slip {
  position: fixed; z-index: var(--z-slip); inset: auto 8px 8px 8px; max-height: calc(100dvh - 16px); display: flex; flex-direction: column;
  border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-3); border: 1px solid var(--line);
  transform: translateY(110%); visibility: hidden; transition: transform var(--t2) var(--ease), visibility 0s linear var(--t2);
}
.slip.is-open { transform: none; visibility: visible; transition: transform var(--t2) var(--ease); }
@media (max-width: 767px) { .slip { inset: 0; max-height: none; border-radius: 0; } }                     /* §6.4: full screen */
@media (min-width: 768px) and (max-width: 1279px) { .slip { inset: 12px 12px 12px auto; width: 360px; max-height: none; transform: translateX(110%); } }   /* §6.2: 360 drawer */
@media (min-width: 1280px) {
  /* a column, not a drawer: it sits under the header so the account menu and search suggestions cover it */
  .slip { position: sticky; z-index: 1; inset: auto; top: var(--sticky-top); width: auto; transform: none; visibility: visible; align-self: start; max-height: calc(100dvh - 112px - 136px); box-shadow: var(--shadow-2); transition: none; }
  .slip__close { display: none !important; }
}
.scrim { position: fixed; inset: 0; z-index: calc(var(--z-slip) - 1); background: var(--scrim); opacity: 0; transition: opacity var(--t2); }
.scrim.is-on { opacity: 1; }
.slip__head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; }
.slip__head h2 { font-size: 18px; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.slip__clear { position: relative; margin-left: auto; border: 0; background: transparent; font-size: 13px; font-weight: 700; color: var(--ink-2); min-height: 32px; cursor: pointer; }
.slip__clear:hover:not(:disabled) { color: var(--ink); }
.slip__clear:disabled { opacity: .45; cursor: default; }
.slip__tabs { padding: 0 16px 10px; }
.slip__body { flex: 1; overflow: auto; padding: 0 16px 12px; display: grid; gap: 10px; align-content: start; overscroll-behavior: contain; }
.slip__foot { padding: 14px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); background: var(--surface); border-radius: 0 0 var(--r-l) var(--r-l); }
@media (max-width: 767px) { .slip__foot { position: sticky; bottom: 0; } }
.leg { position: relative; padding: 12px; border-radius: var(--r-m); background: var(--surface-2); display: grid; gap: 10px; }
.leg.is-new { animation: legIn var(--t2) var(--ease); }
@keyframes legIn { from { opacity: 0; transform: translateY(-4px); } }
.leg.is-bad { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--error) 40%, transparent); background: var(--error-bg); }
.leg.is-changed { box-shadow: inset 0 0 0 1px var(--warn-line); background: var(--warn-bg); }
.leg__top { display: flex; gap: 8px; align-items: flex-start; }
.leg__name { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; line-height: 19px; }
.leg__name a { text-decoration: none; }
.leg__name a:hover { text-decoration: underline; }
.leg__name small { display: block; font-weight: 500; font-size: 12px; line-height: 16px; color: var(--ink-2); }
.leg__odds { font-weight: 800; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.leg__odds s { display: block; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.leg__rm { position: relative; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink-2); cursor: pointer; }
.leg__rm::after { content: ""; position: absolute; inset: -8px; }
.leg__rm:hover { background: var(--surface); color: var(--ink); }
.leg__rm .icon { width: 18px; height: 18px; }
.leg__why { font-size: 12px; font-weight: 700; color: var(--error); display: flex; gap: 6px; align-items: center; }
.leg__why .icon { width: 14px; height: 14px; }
.leg__sgm { margin-top: 6px; font-size: 12px; font-weight: 500; }
.leg__sgm summary { cursor: pointer; color: var(--brand-ink); font-weight: 700; min-height: 24px; display: inline-flex; align-items: center; }
.leg__sgm ul { margin: 4px 0 0; padding-left: 16px; list-style: disc; color: var(--ink); }
.stake { display: flex; align-items: center; gap: 8px; }
.stake__field { position: relative; flex: 1; }
.stake__field span { position: absolute; left: 11px; top: 12px; color: var(--ink-2); font-weight: 600; pointer-events: none; }
.stake input { width: 100%; height: 44px; padding: 0 10px 0 34px; border-radius: var(--r-s); border: 1px solid var(--line-strong); background: var(--surface); font-weight: 700; font-variant-numeric: tabular-nums; }
.stake input:focus { outline: none; border-color: var(--ink); box-shadow: var(--focus-ring); }
.stake input[aria-invalid="true"] { border-color: var(--error); }
.stake__ret { min-width: 96px; text-align: right; font-size: 12px; line-height: 16px; color: var(--ink-2); }
.stake__ret b { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quick button { position: relative; min-height: 32px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 700; cursor: pointer; transition: background var(--t), border-color var(--t); }
.quick button::after { content: ""; position: absolute; inset: -4px 0; }
.quick button:hover { border-color: var(--ink); }
.err { font-size: 12px; line-height: 16px; color: var(--error); font-weight: 600; }
.sum { display: grid; gap: 4px; font-size: 14px; }
.sum div { display: flex; justify-content: space-between; gap: 8px; }
.sum span { color: var(--ink-2); }
.sum b { font-weight: 700; font-variant-numeric: tabular-nums; }
.sum .big b { font-size: 22px; color: var(--ink); }
.policy { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); }
.policy select { height: 38px; padding: 0 8px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink); }
.demo-sc { font-size: 12px; color: var(--ink-2); }
.demo-sc summary { cursor: pointer; font-weight: 700; min-height: 28px; display: inline-flex; align-items: center; gap: 6px; list-style: none; border-bottom: 1px dashed currentColor; transition: color var(--t); }
.demo-sc summary::-webkit-details-marker { display: none; }
.demo-sc summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform var(--t); }
.demo-sc[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.demo-sc summary:hover { color: var(--ink); }
.demo-sc .radios { margin-top: 6px; }
.demo-sc .radio span { min-height: 32px; font-size: 12px; padding: 0 10px; }
.receipt { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-m); background: var(--success-bg); border: 1px solid color-mix(in srgb, var(--success) 25%, transparent); }
.receipt h3 { display: flex; gap: 8px; align-items: center; font-size: 16px; font-weight: 800; color: var(--success); }
.receipt dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.receipt dt { color: var(--ink-2); }
.receipt dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.receipt ul { font-size: 13px; display: grid; gap: 4px; }

/* ── toast (§19.3: only simple confirmations live here) ───────────────── */
.toast {
  position: fixed; z-index: var(--z-toast); left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); opacity: 0;
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-m); background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-2); transition: opacity var(--t2), transform var(--t2) var(--ease); pointer-events: none; max-width: calc(100vw - 24px);
}
.toast .icon { color: var(--accent); width: 18px; height: 18px; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 768px) { .toast { bottom: 28px; } }

/* ── pagination ───────────────────────────────────────────────────────── */
.pager { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; padding-top: 6px; }
.pager button, .pager a { position: relative; min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; display: inline-grid; place-items: center; text-decoration: none; }
.pager [aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager [disabled] { opacity: .45; cursor: default; }

/* ── generic panel / dialog parts ─────────────────────────────────────── */
.dlg h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.dlg p { color: var(--ink-2); }
.dlg__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

.muted { color: var(--ink-2); font-size: 14px; }

/* closed <details> keep no layout of their content (it would overlap what follows) */
details:not([open]) > :not(summary) { display: none !important; }

/* labels over photos get their own dark plate: readable whatever the picture */
.ph > span, .fcol__head > span { background: rgba(14, 28, 39, .78); padding: 3px 8px; border-radius: 6px; }

/* a fieldset used as a form step or group (register, wallet, Responsible Gambling): no browser frame */
.step { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; min-width: 0; }
.step__h { font-size: 14px; font-weight: 800; margin-top: 4px; }

/* tick list and call-out panel (log in, register, Responsible Gambling) */
.ticks { display: grid; gap: 10px; font-size: 14px; }
.ticks li { display: flex; gap: 8px; }
.ticks .icon { color: var(--success); width: 18px; height: 18px; flex: none; margin-top: 1px; }

.demo-cta { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-m); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.demo-cta h2 { font-size: 17px; font-weight: 800; }
.demo-cta p { font-size: 14px; color: var(--ink-2); }
.demo-cta--row { grid-template-columns: 1fr auto; align-items: center; }
@media (max-width: 559px) { .demo-cta--row { grid-template-columns: 1fr; } }

/* every text field shows a real focus outline, not only a shadow */
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus) !important; outline-offset: 1px; }
@media (max-width: 767px) { .crumbs { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; } .crumbs::-webkit-scrollbar { display: none; } }
