/* Lottu Bet one-page site: dark theme, gold accent (palette from design.md) */
:root {
  --bg: #0C0C0C;
  --card: #141414;
  --card-2: #1C1C1C;
  --header-bg: #141414;
  --footer-bg: #141414;
  --text: #F2F2F2;
  --muted: #B5B5B5;
  --accent: #E8A323;
  --accent-hover: #F6C453;
  --btn-text: #0C0C0C;
  --border: #333333;
  --radius: 10px;
  --trow-bg: #2C2C2C;
  --trow-secondary-bg: #363636;
  --thead-bg: #4A3A14;
  --thead-border: #E8A323;
  --trow-border: #555555;
  --header-h: 64px;
  --side-w: 240px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; padding-top: var(--header-h); background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; overflow-x: hidden; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; overflow-wrap: anywhere; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.5rem; scroll-margin-top: 80px; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ol, ul { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent); color: var(--btn-text); font: inherit; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--accent-hover); color: var(--btn-text); }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: rgba(232,163,35,.15); color: var(--accent-hover); }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: .95rem; }

/* header */
.site-header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); z-index: 50; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--header-bg); border-bottom: 1px solid var(--border); }
.burger { width: 38px; height: 38px; flex: none; display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 8px; background: transparent; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
.logo { display: inline-flex; flex: none; }
.logo img { height: 40px; width: 40px; border-radius: 6px; }
.header-actions { margin-left: auto; display: flex; gap: 8px; }

/* layout */
.layout { display: block; }
.sidebar { position: fixed; top: var(--header-h); left: 0; bottom: 0; width: 272px; max-width: 86vw; z-index: 45; background: var(--card); border-right: 1px solid var(--border); padding: 14px; overflow-y: auto; transform: translateX(-100%); transition: transform .25s; }
.sidebar.open { transform: none; }
.overlay { position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0,0,0,.6); z-index: 40; }
.overlay[hidden] { display: none; }
.search { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card-2); color: var(--text); font: inherit; margin-bottom: 14px; }
.side-title { display: block; margin: 16px 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.side-list { list-style: none; }
.side-list a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .95rem; overflow-wrap: anywhere; }
.side-list a:hover { background: var(--card-2); }
.side-list a.active { background: rgba(232,163,35,.16); color: var(--accent-hover); }
.toc-list { list-style: none; counter-reset: toc; }
.toc-list a { font-size: .9rem; color: var(--muted); }
.page { min-width: 0; }
main { padding: 16px 16px 120px; max-width: 1150px; margin: 0 auto; }
.section { margin: 0 0 40px; }
.section > :is(p, ol, ul, .table-wrap) { max-width: 860px; }
.section > .tile-row-wrap, .section > .tile-row-wrap + * { max-width: none; }

/* hero */
.hero { display: grid; gap: 24px; padding: 22px 16px; margin-bottom: 24px; background: linear-gradient(135deg, var(--card-2), var(--card)); border: 1px solid var(--border); border-radius: var(--radius); }
.hero-label { display: inline-block; margin-bottom: 8px; padding: 2px 10px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: .85rem; }
.hero-tagline { display: block; margin: 1em 0; color: var(--accent-hover); font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.hero-note { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .85rem; color: var(--muted); margin: 0; }
.hero-note .age { color: var(--accent); font-weight: 700; }
.hero-devices { position: relative; padding-bottom: 28px; }
.hero-devices .device-desktop { width: 86%; }
.hero-devices .device-phone { position: absolute; right: 0; bottom: 0; width: 28%; }
.device-phone, .device-desktop { border: 4px solid #3a3a3a; background: #000; object-fit: cover; object-position: top; }
.device-phone { aspect-ratio: 9 / 19; border-radius: 18px; border-width: 5px; }
.device-desktop { aspect-ratio: 4 / 3; border-radius: 10px; }

/* category panel */
.cat-panel { margin: 0 0 28px; }
.cat-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; height: 100%; text-align: center; text-decoration: none; font-size: .85rem; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow-wrap: anywhere; }
.cat-grid a:hover { border-color: var(--accent); }
.cat-grid img { width: 36px; height: 36px; }

/* number strip */
.strip { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 40px; }
.strip li { padding: 14px 10px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; color: var(--muted); font-size: .9rem; }
.strip .num { display: block; font-size: 1.6rem; font-weight: 700; color: var(--accent); }

/* tile rows */
.section-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.view-all { margin-left: auto; font-size: .9rem; }
.tile-row-wrap { position: relative; margin-top: 16px; }
.tile-row { list-style: none; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; align-items: stretch; }
.tile-row::-webkit-scrollbar { display: none; }
.tile { flex: 0 0 150px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; padding: 8px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.tile img { width: 100%; }
.tile-name { margin: 0; font-size: 1rem; min-height: 2.6em; line-height: 1.3; }
.tile .btn { margin-top: auto; width: 100%; font-size: .85rem; padding: 6px 8px; }
.row-arrows { display: none; gap: 8px; margin-bottom: 8px; justify-content: flex-end; }
.arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--accent); background: var(--card); color: var(--accent); font-size: 1.1rem; cursor: pointer; }
.arrow:hover { background: var(--accent); color: var(--btn-text); }

/* info boxes and cards */
.box-row { display: grid; gap: 12px; margin: 0 0 40px; }
.box { padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.box h3 { margin-bottom: .4em; }
.badge { display: inline-block; margin-bottom: 8px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--btn-text); font-weight: 700; font-size: .85rem; }
.card-grid { list-style: none; display: grid; gap: 12px; margin: 16px 0; max-width: none; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.card img { width: 44px; height: 44px; }
.card h3, .card h4 { margin: 0; }
.card p { margin: 0; color: var(--muted); }
.card .btn { margin-top: auto; }

/* tables */
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--trow-border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--trow-border); }
thead th { background: var(--thead-bg); color: var(--accent-hover); border-bottom: 2px solid var(--thead-border); }
tbody tr { background: var(--trow-bg); }
tbody tr:nth-child(even) { background: var(--trow-secondary-bg); }
tbody th { color: var(--accent-hover); font-weight: 600; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }

/* steps */
.steps { list-style: none; counter-reset: step; display: grid; gap: 12px; margin: 16px 0; }
.steps > li { counter-increment: step; position: relative; display: grid; grid-template-columns: 1fr; gap: 8px; padding: 14px 14px 14px 58px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); align-content: start; }
.steps > li::before { content: counter(step); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--btn-text); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.steps p { margin: 0; }
.step-title { color: var(--accent-hover); font-weight: 600; }
.steps .btn { justify-self: start; }
.steps .device-phone { width: 140px; margin-top: 6px; }
.section.steps-sec > .steps { max-width: none; }
.steps-sec h3 { margin-top: 8px; }
.panel-grid { display: grid; gap: 16px; margin: 16px 0; }
.panel { padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.panel .steps { margin: 12px 0 0; }
.panel .steps > li { background: var(--card-2); }
.phone-pair { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.phone-pair .device-phone { width: 150px; }
.side-pic { margin: 16px 0; }
.side-pic .device-phone { width: 160px; }

/* faq */
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; }
.faq summary { padding: 14px 16px; cursor: pointer; font-weight: 600; min-height: 44px; }
.faq details p { padding: 0 16px; margin: 0 0 14px; color: var(--muted); }

/* footer */
.site-footer { background: var(--footer-bg); border-top: 1px solid var(--border); padding: 28px 16px 120px; color: var(--muted); font-size: .9rem; }
.site-footer .logo img { height: 48px; width: 48px; }
.footer-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0; }
.footer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.footer-badges .badge { margin: 0; }
.site-footer p { margin: 0 0 .6em; }

/* offer bar */
.offer-bar { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 48; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 40px 12px 14px; background: var(--card-2); border: 1px solid var(--accent); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.6); }
.offer-bar[hidden] { display: none; }
.offer-label { color: var(--accent); font-weight: 700; }
.offer-text { flex: 1 1 180px; font-size: .9rem; }
.offer-close { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; cursor: pointer; }

@media (min-width: 480px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .tile { flex-basis: 170px; }
}
@media (min-width: 640px) {
  h1 { font-size: 2.1rem; }
  .strip { grid-template-columns: repeat(4, 1fr); }
  .box-row, .card-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { grid-template-columns: repeat(2, 1fr); }
  .tile { flex-basis: 210px; }
  .steps > li:has(.device-phone) { grid-template-columns: 1fr 150px; }
  .steps > li:has(.device-phone) > .device-phone { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .panel .steps > li:has(.device-phone) { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.1fr 1fr; padding: 28px; align-items: center; min-height: 340px; }
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(6, 1fr); }
  .row-arrows { display: flex; }
}
@media (min-width: 1024px) {
  .burger, .overlay { display: none !important; }
  .layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .sidebar { position: sticky; top: var(--header-h); left: auto; bottom: auto; width: var(--side-w); max-width: none; height: calc(100vh - var(--header-h)); transform: none; z-index: 1; }
  main { padding: 24px 24px 120px; }
  .site-footer { padding: 36px 24px 120px; }
  .offer-bar { left: calc(var(--side-w) + (100vw - var(--side-w)) / 2); right: auto; transform: translateX(-50%); width: min(560px, calc(100vw - var(--side-w) - 32px)); }
  .logo img { height: 44px; width: 44px; }
}
@media (max-width: 359px) {
  .btn-sm { padding: 6px 10px; font-size: .85rem; }
  .header-actions { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .sidebar { transition: none; } }
