/* ==========================================================================
   DBBet sharh — dbbet-online-uz.com
   One stylesheet for every page. Dark brand system, left rail, editorial body.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #121212;
  --bg-deep: #160001;
  --surface: oklch(0.205 0.008 15);
  --surface-2: oklch(0.238 0.010 15);
  --surface-3: oklch(0.285 0.012 15);
  --fg: #f6f2f1;
  --fg-dim: #d9d1d1;
  --muted: #a89fa1;
  --muted-strong: #c2b8ba;
  --border: rgba(246, 242, 241, 0.10);
  --border-strong: rgba(246, 242, 241, 0.20);
  --accent: #d42149;
  --accent-hover: #b81a3e;
  --accent-text: #ff809b;
  --accent-soft: rgba(212, 33, 73, 0.12);
  --ok: #74d3a0;
  --warn: #f0b36b;

  --font-display: 'Unbounded', 'Trebuchet MS', sans-serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'Menlo', 'Consolas', monospace;

  --rail-w: 276px;
  --topbar-h: 62px;
  --main-max: 1180px;
  --prose: 72ch;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;

  --shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.95);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 88% -8%, oklch(0.32 0.10 14 / 0.30), transparent 68%),
    radial-gradient(900px 500px at 4% 100%, oklch(0.26 0.07 14 / 0.18), transparent 70%),
    var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg { display: block; max-width: 100%; }

img { height: auto; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #ffa7ba; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }

ul, ol { padding: 0; }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: #fff; }

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 300;
  padding: 0.65rem 1rem;
  background: var(--fg);
  color: #140002;
  border-radius: var(--r-sm);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip:focus { transform: none; color: #140002; }

/* ==========================================================================
   Shell — fixed left rail + scrolling stage
   ========================================================================== */
.shell { min-height: 100vh; }

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 120;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  padding: 20px 18px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(180deg, #1c0408 0%, var(--bg-deep) 38%, #100000 100%);
  border-right: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: #3a2c2f transparent;
}

.rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

.rail__close {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg);
  cursor: pointer;
}
.rail__close:hover { background: rgba(255, 255, 255, 0.12); }

/* Brand lockup */
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  text-decoration: none;
  color: var(--fg);
  min-height: 44px;
}
.logo__img {
  display: block;
  height: 34px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.94;
  transition: opacity 0.18s ease;
}
.logo:hover .logo__img { opacity: 1; }

.logo__sub {
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Rail navigation */
.rail__label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px 10px;
}

.railnav + .railnav { margin-top: var(--s-2); }

.railnav ul {
  list-style: none;
  display: grid;
  gap: 2px;
  margin: 0 0 var(--s-5);
}

.railnav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 40px;
  padding: 0.42rem 0.65rem;
  border-radius: 9px;
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.railnav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
}
.railnav a[aria-current="page"] {
  background: var(--accent-soft);
  border-color: rgba(212, 33, 73, 0.42);
  color: #fff;
}
.railnav a[aria-current="page"] .railnav__ico { color: var(--accent-text); }

.railnav__ico {
  width: 18px; height: 18px;
  flex: none;
  color: #9d8f92;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Rail promo */
.railpromo {
  margin-top: auto;
  padding: 16px;
  border-radius: var(--r);
  border: 1px solid rgba(212, 33, 73, 0.35);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(212, 33, 73, 0.22), transparent 60%),
    #1a1416;
}
.railpromo__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 8px;
}
.railpromo__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.railpromo__text {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted-strong);
  margin-bottom: 12px;
}
.railpromo__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
  transition: background 0.16s var(--ease);
}
.railpromo__link:hover { background: var(--accent-hover); color: #fff; }

.railtrust {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted);
}
.railtrust img { width: 34px; height: 34px; flex: none; }

/* Mobile backdrop */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(5, 0, 1, 0.66);
  backdrop-filter: blur(3px);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.scrim[hidden] { display: none; }

/* ==========================================================================
   Stage and top bar
   ========================================================================== */
.stage {
  min-width: 0;
  margin-left: var(--rail-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: var(--topbar-h);
  padding: 0 28px;
  background: rgba(18, 18, 18, 0.86);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--border);
}

.topbar__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.topbar__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(116, 211, 160, 0.14);
}

.topnav { margin-left: auto; }
.topnav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
}
.topnav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 8px;
  color: var(--fg-dim);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.topnav a:hover { background: rgba(255, 255, 255, 0.07); color: var(--fg); }
.topnav a[aria-current="page"] { color: var(--accent-text); }

.topbar__cta { flex: none; }

.burger {
  display: none;
  order: 2;
  margin-left: auto !important;
  width: 44px; height: 44px;
  margin-left: -8px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.burger:hover { background: rgba(255, 255, 255, 0.07); }
.burger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--fg);
  position: relative;
}
.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px; height: 2px;
  background: var(--fg);
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }

/* Mobile logo inside top bar */
.topbar__brand { display: none; }

/* ==========================================================================
   Main container
   ========================================================================== */
.main {
  width: 100%;
  max-width: var(--main-max);
  margin: 0 auto;
  padding: 28px 40px 84px;
  flex: 1 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease), transform 0.16s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  color: var(--fg);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.34); color: #fff; }

.btn--sm { min-height: 40px; padding: 0.45rem 0.9rem; font-size: 0.84rem; border-radius: 8px; }
.btn--block { width: 100%; }

.btn__ico {
  width: 17px; height: 17px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 128, 155, 0.35);
  padding-bottom: 2px;
}
.arrow-link:hover { border-bottom-color: currentColor; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    linear-gradient(135deg, rgba(212, 33, 73, 0.12) 0%, rgba(22, 0, 1, 0.2) 42%, rgba(18, 18, 18, 0) 70%),
    linear-gradient(180deg, #1d1719 0%, #161314 100%);
  padding: 34px 34px 30px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 34px;
  align-items: center;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 46%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 33, 73, 0.9));
}

.hero__body { min-width: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.95rem, 1.35rem + 2.15vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin-bottom: 16px;
}
.hero h1 .accent { color: var(--accent-text); }

.hero__lead {
  font-size: 1.02rem;
  line-height: 1.62;
  color: var(--fg-dim);
  max-width: 56ch;
  margin-bottom: 18px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin: 0;
}
.hero__fact {
  padding: 0 18px;
  border-left: 1px solid var(--border);
}
.hero__fact:first-child { padding-left: 0; border-left: 0; }
.hero__fact dt {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.hero__fact dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
}
.hero__fact dd span { font-weight: 500; color: var(--muted-strong); }

/* Hero media */
.hero__media {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}
.hero__shot {
  position: relative;
  display: block;
  max-width: 100%;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  background: #0b0b0c;
  box-shadow: 0 26px 50px -30px #000;
  line-height: 0;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.hero__shot img { display: block; width: 100%; height: auto; }
.hero__shot:hover {
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
}
.hero__media--portrait { justify-content: flex-end; }
.hero__media--portrait .hero__shot { width: fit-content; }
.hero__media--portrait .hero__shot img {
  width: auto;
  height: clamp(380px, 50vw, 550px);
  max-width: 100%;
}

.hero__legal {
  margin-top: 14px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Compact hero for inner pages */
.hero--page {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  padding: 30px;
}
.hero--page h1 { font-size: clamp(1.8rem, 1.3rem + 1.7vw, 2.6rem); }
.hero--page .hero__media { align-items: center; }
.hero--page .hero__lead { margin-bottom: 16px; }
.hero__thumb {
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  line-height: 0;
  background: #0b0b0c;
  width: 100%;
}
.hero__thumb img { width: 100%; height: auto; }

/* ---------- Breadcrumbs ---------- */
.crumbs {
  margin: 0 0 18px;
  font-size: 0.78rem;
  color: var(--muted);
}
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0;
}
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before {
  content: "-";
  margin: 0 0.55em;
  color: #6f6466;
}
.crumbs a { color: var(--muted-strong); text-decoration: none; }
.crumbs a:hover { color: var(--fg); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--fg); }

/* ---------- Article / prose ---------- */
.article { margin-top: 34px; }

.section {
  position: relative;
  margin-top: 46px;
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}

.section h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.42rem, 1.15rem + 0.95vw, 1.95rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: pretty;
  margin-bottom: 16px;
}
.section h2 .idx {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  padding-top: 4px;
}

.section h3 {
  font-family: var(--font-body);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 24px 0 10px;
  color: var(--fg);
}

.section p {
  color: var(--fg-dim);
  max-width: var(--prose);
  margin-bottom: 14px;
}
.section p:last-child { margin-bottom: 0; }

.section strong { color: var(--fg); font-weight: 700; }

.section ul,
.section ol {
  margin: 4px 0 18px;
  padding-left: 0;
  max-width: var(--prose);
  display: grid;
  gap: 8px;
  list-style: none;
}

.section ul li,
.section ol li {
  position: relative;
  padding-left: 26px;
  color: var(--fg-dim);
}
.section ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.65em;
  width: 7px; height: 7px;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
}
.section ol { counter-reset: prose-ol; }
.section ol li { counter-increment: prose-ol; padding-left: 32px; }
.section ol li::before {
  content: counter(prose-ol, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.9;
  color: var(--accent-text);
}

.section .figure {
  margin: 20px 0 22px;
  max-width: 860px;
}
.figure__frame {
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: #0b0b0c;
  overflow: hidden;
  line-height: 0;
}
.figure__frame img { width: 100%; height: auto; }
.figure--link .figure__frame:hover { border-color: rgba(255, 255, 255, 0.3); }
.figure figcaption {
  margin-top: 9px;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted);
}
.figure--svg .figure__frame { background: #140f11; }

/* Pull quote / callout */
.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  max-width: var(--prose);
  margin: 20px 0;
  padding: 18px 20px;
  border-radius: var(--r);
  border: 1px solid rgba(212, 33, 73, 0.30);
  background: linear-gradient(120deg, rgba(212, 33, 73, 0.13), rgba(212, 33, 73, 0.03));
}
.callout__mark {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
}
.callout__title {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 3px;
}
.callout p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  color: var(--muted-strong);
}

/* Tables */
.table-wrap {
  margin: 18px 0 22px;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.018);
  -webkit-overflow-scrolling: touch;
}
.table-wrap:focus-visible { outline-offset: 2px; }

table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
caption {
  caption-side: top;
  text-align: left;
  padding: 14px 16px 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
th, td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
thead th {
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-strong);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
td strong { color: var(--fg); }
td.num, th.num { font-family: var(--font-mono); font-size: 0.82rem; }

.table-note {
  margin: -12px 0 22px;
  font-size: 0.73rem;
  color: var(--muted);
  max-width: var(--prose);
}

/* Steps */
.steps {
  display: grid;
  gap: 10px;
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
  max-width: var(--prose);
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: start;
  padding: 14px 16px 14px 44px !important;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.02);
  color: var(--fg-dim);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--accent-soft);
  border: 1px solid rgba(212, 33, 73, 0.35);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

/* ---------- TOC ---------- */
.toc {
  margin: 24px 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  max-width: 760px;
  overflow: hidden;
}
.toc summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary:hover { background: rgba(255, 255, 255, 0.035); }
.toc__ico { width: 18px; height: 18px; color: var(--accent-text); stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; }
.toc__title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.toc__count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.toc__chev {
  width: 9px; height: 9px;
  margin-left: 4px;
  border-right: 1.5px solid var(--muted-strong);
  border-bottom: 1.5px solid var(--muted-strong);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s var(--ease);
}
.toc[open] .toc__chev { transform: rotate(225deg) translateY(-2px); }
.toc__list {
  list-style: none;
  margin: 0;
  padding: 4px 10px 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 10px;
  border-top: 1px solid var(--border);
}
.toc__list a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--fg-dim);
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.toc__list a:hover { background: rgba(255, 255, 255, 0.06); color: var(--fg); }
.toc__emoji { font-size: 0.95rem; line-height: 1; }

/* ---------- CTA band ---------- */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 34px 0 0;
  padding: 24px 26px;
  border-radius: var(--r);
  border: 1px solid rgba(212, 33, 73, 0.32);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(212, 33, 73, 0.20), transparent 62%),
    #191315;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 5px;
}
.cta-band p { font-size: 0.86rem; color: var(--muted-strong); margin: 0; max-width: 52ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 9px; }

/* ---------- FAQ ---------- */
.faq { margin-top: 34px; }
.faq__list {
  border-top: 1px solid var(--border);
  max-width: 820px;
}
.faq__item {
  border-bottom: 1px solid var(--border);
}
.faq__item summary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 12px 2px;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
  color: var(--fg);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: #fff; }
.faq__plus {
  position: relative;
  flex: none;
  width: 24px; height: 24px;
  margin-left: auto;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.faq__plus::before,
.faq__plus::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 1.5px;
  background: var(--fg-dim);
  transform: translate(-50%, -50%);
  transition: transform 0.2s var(--ease), background 0.16s var(--ease);
}
.faq__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item[open] .faq__plus { background: var(--accent-soft); border-color: rgba(212, 33, 73, 0.5); }
.faq__item[open] .faq__plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq__item[open] .faq__plus::before,
.faq__item[open] .faq__plus::after { background: var(--accent-text); }
.faq__a {
  padding: 0 40px 18px 0;
  color: var(--fg-dim);
  font-size: 0.93rem;
  line-height: 1.65;
  max-width: 74ch;
}
.faq__a p + p { margin-top: 10px; }

/* ---------- Author ---------- */
.author {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 44px 0 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.022);
  max-width: 880px;
}
.author__avatar {
  width: 58px; height: 58px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #d42149, #7d0f28);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.author__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.author__name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.author__role { font-size: 0.8rem; color: var(--accent-text); font-weight: 600; margin-bottom: 8px; }
.author p { font-size: 0.85rem; line-height: 1.6; color: var(--muted-strong); max-width: 70ch; margin: 0 0 8px; }
.author__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  margin-left: var(--rail-w);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, #141112 0%, #0e0c0d 100%);
}
.footer__inner {
  max-width: var(--main-max);
  margin: 0 auto;
  padding: 44px 40px 26px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 32px 36px;
}
.footer__brand { min-width: 0; }
.footer__desc {
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--muted-strong);
  margin: 14px 0 16px;
  max-width: 48ch;
}
.footer-icons {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  align-items: center;
  gap: 10px;
}
.footer-icons .pay-icon {
  display: flex;
  align-items: center;
}
.footer-icons .pay-icon span {
  width: 30px;
  height: 30px;
  margin-left: 5px;
  font-size: 12px;
  border-radius: 100%;
  border: 1px solid #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-icons .pay-icon img {
  display: block;
  max-width: 100%;
  height: auto;
  filter: brightness(100);
}
.footer-icons a.pay-icon:hover { opacity: 0.82; }

.footer__age {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.age {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

.footer__title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 4px 0 12px;
}
.footer__links { list-style: none; display: grid; gap: 1px; margin: 0; }
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--fg-dim);
  font-size: 0.85rem;
  text-decoration: none;
}
.footer__links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.payments-wrap {
  margin: 30px 0 30px;
}
.payments-wrap h4 {
  color: #fff;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.payments-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: 20px 0;
  justify-content: space-between;
}
.payment-item {
  display: flex;
  align-items: center;
  min-width: 44px;
  min-height: 30px;
}
.payment-item img {
  display: block;
  box-shadow: none;
  margin: 0 !important;
  border-radius: 0;
  border: none;
  max-width: 70px;
  max-height: 30px;
  height: auto;
}

.footer__contact { list-style: none; display: grid; gap: 6px; margin: 0 0 14px; font-size: 0.85rem; }
.footer__contact span { color: var(--muted); display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; }
.footer__contact a { color: var(--fg); text-decoration: none; }
.footer__contact a:hover { color: var(--accent-text); }

.footer__note {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 100ch;
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  color: #8d8385;
}
.footer__bottom a { color: #b8adaf; text-decoration: none; }
.footer__bottom a:hover { color: var(--fg); }

/* ==========================================================================
   Mobile dock
   ========================================================================== */
.dock {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  background: rgba(16, 12, 13, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  box-shadow: 0 -14px 34px -20px #000;
}
.dock__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: center;
}
.dock .btn { min-height: 44px; font-size: 0.88rem; }

/* ==========================================================================
   Page-specific small bits
   ========================================================================== */
/* Bonus code copy */
.codebox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 16px 0 18px;
  padding: 14px 16px;
  border: 1px dashed rgba(212, 33, 73, 0.5);
  border-radius: var(--r-sm);
  background: rgba(212, 33, 73, 0.07);
  max-width: 560px;
}
.codebox__label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.codebox__code {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--fg);
}
.codebox button {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.codebox button:hover { background: rgba(255, 255, 255, 0.12); }
.codebox__note { font-size: 0.72rem; color: var(--muted); width: 100%; }

/* Highlight facts grid */
.factgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
  max-width: 820px;
}
.factgrid__item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.025);
}
.factgrid__k {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.factgrid__v { font-weight: 800; font-size: 0.95rem; line-height: 1.35; }

/* Legal page typography */
.legal .section h2 { font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.65rem); }
.legal .section { margin-top: 38px; }
.legal .section p, .legal .section li { font-size: 0.97rem; }

/* Contact cards */
.contactgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
  max-width: 760px;
}
.contactcard {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.025);
}
.contactcard__k {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.contactcard a, .contactcard strong { color: var(--fg); font-size: 1rem; text-decoration: none; word-break: break-word; }
.contactcard a:hover { color: var(--accent-text); }
.contactcard p { font-size: 0.8rem; color: var(--muted); margin: 4px 0 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1240px) {
  :root { --rail-w: 252px; }
  .main { padding-inline: 30px; }
  .footer__inner { padding-inline: 30px; }
  .hero { gap: 26px; padding: 28px; }
}

@media (max-width: 1080px) {
  .rail {
    transform: translateX(-100%);
    transition: transform 0.26s var(--ease);
    width: min(320px, 86vw);
    box-shadow: var(--shadow);
  }
  .rail.is-open { transform: none; }
  .rail__close { display: inline-flex; }
  .stage { margin-left: 0; }
  .footer { margin-left: 0; }
  .burger { display: inline-flex; }
  .topnav { display: none; }
  .topbar { padding-inline: 20px; gap: 12px; }
  .topbar__brand { display: inline-flex; margin-left: 2px; }
  .topbar__meta { display: none; }
  .topbar__cta { margin-left: auto; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); }
  .dock { display: block; }
  .main { padding-bottom: 104px; }
}

@media (max-width: 900px) {
  .hero, .hero--page { grid-template-columns: minmax(0, 1fr); padding: 26px; gap: 22px; }
  .hero__media { order: 2; max-width: 560px; }
  .hero__media--portrait { justify-content: center; }
  .hero__facts { row-gap: 12px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .toc__list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 1rem; }
  .main { padding: 20px 18px 110px; }
  .topbar { padding-inline: 14px; min-height: 58px; }
  .footer__inner { padding: 34px 18px 22px; }
  .hero { padding: 22px 20px; border-radius: 16px; }
  .hero h1 { font-size: clamp(1.72rem, 1.3rem + 2.6vw, 2.3rem); }
  .hero__lead { font-size: 0.95rem; }
  .hero__actions .btn { flex: 1 1 150px; }
  .hero__fact { padding: 0 12px; }
  .hero__fact dd { font-size: 0.82rem; }
  .hero__media--portrait .hero__shot img { height: clamp(380px, 54vw, 470px); }
  .section { margin-top: 38px; }
  .section h2 { gap: 9px; }
  .section h2 .idx { font-size: 0.66rem; }
  .figure { margin: 16px 0 18px; }
  .faq__a { padding-right: 8px; }
  .author { grid-template-columns: 1fr; gap: 12px; padding: 18px; }
  .author__avatar { width: 48px; height: 48px; }
  .factgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contactgrid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .cta-band { padding: 20px; }
  .cta-band__actions { width: 100%; }
  .cta-band__actions .btn { flex: 1 1 140px; }
  .toc { margin-top: 20px; }
  .topbar__cta .btn span { display: none; }
}

@media (max-width: 420px) {
  .logo__img { height: 30px; }
  .hero__facts { gap: 10px 0; }
  .hero__fact { border: none; padding: 0 10px 0 0 !important; }
  .hero__fact:first-child { padding-left: 0; }
  .factgrid { grid-template-columns: 1fr; }

  .hero, .main {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Print */
@media print {
  .rail, .topbar, .dock, .scrim { display: none !important; }
  .stage, .footer { margin-left: 0; }
  body { background: #fff; color: #111; }
  .hero, .callout, .cta-band, .author, .toc { border-color: #ccc; background: #fff; }
  .section p, .section li, .faq__a { color: #222; }
}

/* ---------- Build-time additions ---------- */
.is-locked { overflow: hidden; }

.hero--solo { grid-template-columns: minmax(0, 1fr); }
.hero--solo .hero__lead { max-width: 68ch; }
.hero--solo .hero__actions { margin-top: 6px; }

.article > .intro { margin: 22px 0 6px; }
.article > .intro p {
  color: var(--fg-dim);
  max-width: var(--prose);
  margin-bottom: 12px;
}
.article > .intro p:last-child { margin-bottom: 0; }

.footer__title--spaced { margin-top: 18px; }
.figure__frame { display: block; }
.faq.section { margin-top: 40px; }

.topbar__brand { align-items: center; }
.topbar__brand .logo { min-height: 40px; gap: 3px; display: flex; align-items: center;justify-content: center; }
.topbar__brand .logo__img { height: 26px; }
.topbar__brand .logo__sub { font-size: 0.48rem; letter-spacing: 0.1em; }
.figure--portrait { max-width: 300px; }

/* Mobile dock clearance + narrow-bar refinements */
@media (max-width: 1080px) {
  .footer__inner { padding-bottom: 104px; }
}
@media (max-width: 560px) {
  .topbar__cta { display: none; }
  .topbar__brand .logo__sub { display: none; }
}
@media (max-width: 400px) {
  .toc__count { display: none; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* Long-token safety */
.footer__contact a,
.author__meta li,
.contactcard a,
.section p,
.section li { overflow-wrap: anywhere; }
/* Payments + trust rows in the footer */
@media (max-width: 800px) {
  .payments-grid { gap: 16px; }
  .payment-item img { max-width: 65px; max-height: 30px; }
  .payments-wrap { margin: 24px 0; }
}
@media (max-width: 560px) {
  .payments-grid { justify-content: flex-start; }
  .footer-icons .pay-icon img { max-width: 120px; }
}

/* Burger open state */
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
.burger span::before,
.burger span::after { transition: transform 0.2s var(--ease); }
