/* ==========================================================================
   components.css — facts, game cards, tools, chart, timeline, FAQ, pages
   ========================================================================== */

/* Quick facts (scrollable chips on phones) */
.facts {
  display: flex; gap: 8px;
  margin: 2px -16px 0; padding: 2px 16px 6px;
  overflow-x: auto; scrollbar-width: none;
}
.facts::-webkit-scrollbar { display: none; }
.facts div {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--rule); border-radius: var(--r-m);
  background: rgba(15, 37, 56, .7);
}
.facts dt { color: var(--soft); font-size: 12px; line-height: 1.4; }
.facts dd { color: var(--head); font-size: 15.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; }

/* Multiplier meter in hero */
.meter {
  padding: 14px;
  border: 1px solid var(--rule); border-radius: var(--r-l);
  background: linear-gradient(140deg, rgba(23, 53, 75, .55), rgba(4, 20, 36, .8));
}
.meter p { color: var(--soft); font-size: 13px; line-height: 1.5; }
.meter ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.meter li { padding: 8px 6px; border-radius: 12px; background: rgba(3, 9, 27, .6); text-align: center; }
.meter b { display: block; font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.meter span { display: block; margin-top: 2px; color: var(--soft); font-size: 12px; line-height: 1.35; }

/* Filter chips */
.chips { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 42px; padding: 6px 16px;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--slate); color: var(--head);
  font-size: 14px; font-weight: 700; line-height: 1.3;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.chip:hover { border-color: var(--rule-2); }
.chip[aria-pressed="true"] { border-color: #fff; background: #fff; color: var(--flame); }
.chip b { margin-left: 4px; color: inherit; opacity: .7; font-size: 12.5px; }

/* Game cards: horizontal on phones, grid on larger screens */
.games { display: grid; gap: 12px; }
.game {
  position: relative;
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px 14px;
  padding: 14px;
  border: 1px solid var(--rule); border-radius: var(--r-l);
  background: var(--deck);
  transition: border-color .2s ease, transform .2s var(--ease), box-shadow .2s ease;
}
.game:hover { transform: translateY(-3px); border-color: rgba(253, 106, 18, .6); box-shadow: 0 14px 30px rgba(253, 60, 18, .14); }
.game[hidden] { display: none; }
.game__art {
  align-self: start;
  padding: 6px;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 40%, rgba(253, 106, 18, .5), rgba(23, 53, 75, .6) 70%);
}
.game__art img { width: 100%; aspect-ratio: 1 / 1; border-radius: 18px; box-shadow: 0 0 0 1.5px rgba(246, 217, 10, .7); }
.game__body { min-width: 0; }
.game__type { display: inline-block; padding: 1px 9px; border-radius: 999px; background: rgba(253, 106, 18, .14); color: var(--flame-text); font-size: 12px; font-weight: 700; line-height: 1.7; }
.game h3 { margin-top: 4px; font-size: 18px; line-height: 1.3; text-wrap: initial; }
.game__note { margin-top: 4px; color: var(--copy); font-size: 14px; line-height: 1.7; }
.game__stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.game__stats div { padding: 7px 8px; border-radius: 12px; background: var(--slate); text-align: center; }
.game__stats dt { color: var(--soft); font-size: 11.5px; line-height: 1.4; }
.game__stats dd { color: var(--head); font-size: 15px; font-weight: 700; line-height: 1.35; font-variant-numeric: tabular-nums; }
.game__stats .is-high { color: var(--flame-text); }
.game .cta { grid-column: 1 / -1; min-height: 42px; font-size: 14.5px; }
.games-note { margin-top: 14px; color: var(--soft); font-size: 13.5px; line-height: 1.65; }

/* Calculator */
.calc {
  padding: 16px;
  border: 1px solid var(--rule-2); border-radius: var(--r-xl);
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(253, 60, 18, .16), transparent 70%),
    var(--deck);
  box-shadow: var(--lift-2);
}
.calc__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 999px; background: var(--slate); }
.calc__tabs button {
  min-height: 42px; padding: 6px 10px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--soft); font-size: 14px; font-weight: 700; line-height: 1.3;
}
.calc__tabs button[aria-selected="true"] { background: var(--fire); color: #fff; box-shadow: 0 6px 14px rgba(253, 60, 18, .3); }
.calc__pane { margin-top: 16px; }
.calc__pane[hidden] { display: none; }
.field { display: grid; gap: 6px; margin-top: 12px; }
.field label { color: var(--head); font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.field input {
  width: 100%; min-height: 50px; padding: 10px 16px;
  border: 1px solid var(--rule-2); border-radius: var(--r-m);
  background: var(--night); color: var(--head);
  font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(246, 217, 10, .16); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button {
  min-height: 38px; padding: 4px 14px;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--slate); color: var(--head);
  font-size: 14px; font-weight: 700;
}
.presets button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-text); }
.result {
  margin-top: 16px; padding: 14px 16px;
  border-radius: var(--r-l);
  background: linear-gradient(120deg, rgba(246, 217, 10, .12), rgba(253, 106, 18, .1));
  border: 1px solid rgba(246, 217, 10, .35);
}
.result span { display: block; color: var(--soft); font-size: 13.5px; line-height: 1.5; }
.result output { display: block; margin-top: 2px; color: var(--gold-text); font-size: clamp(26px, 8vw, 34px); font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }
.result small { display: block; margin-top: 4px; color: var(--copy); font-size: 13.5px; line-height: 1.6; }
.calc__note { margin-top: 12px; color: var(--soft); font-size: 13px; line-height: 1.65; }

/* Scatter chart */
.chart {
  padding: 14px 10px 10px;
  border: 1px solid var(--rule); border-radius: var(--r-xl);
  background: var(--deck);
}
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.chart .axis text { fill: var(--soft); font-size: 11px; font-family: var(--thai); }
.chart .axis-title { fill: var(--copy); font-size: 11.5px; font-weight: 600; }
.chart .dot circle { fill: var(--flame-2); stroke: #fff; stroke-width: 1.5; }
.chart .dot.is-high circle { fill: var(--gold); }
.chart .dot text { fill: var(--head); font-size: 11px; font-weight: 600; font-family: var(--thai); }
.chart .dot { transition: opacity .5s var(--ease), transform .5s var(--ease); transform-box: fill-box; transform-origin: center; }
.chart.is-waiting .dot { opacity: 0; transform: scale(.4); }
.chart figcaption { margin-top: 8px; padding: 0 6px; color: var(--soft); font-size: 13px; line-height: 1.6; }
.chart__key { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; margin: 12px 0 0; padding: 0 6px; }
.chart__key li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; color: var(--head); font-size: 13px; line-height: 1.5; }
.chart__key b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--slate-2); color: var(--gold-text); font-size: 11.5px; }
.chart__key span { color: var(--soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.signal__plain { display: grid; gap: 8px; }
.signal__plain li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.75; }
.signal__plain li::before { content: ""; position: absolute; top: .72em; left: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--fire); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0 6px; color: var(--soft); font-size: 13px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--flame-2); vertical-align: -1px; }
.legend .is-high::before { background: var(--gold); }

/* Mechanics cards */
.kinds { display: grid; gap: 12px; }
.kind {
  padding: 18px;
  border: 1px solid var(--rule); border-radius: var(--r-l);
  background: var(--deck);
}
.kind__num { color: var(--flame-text); font-size: 30px; font-weight: 700; line-height: 1; }
.kind h3 { margin-top: 10px; font-size: 18.5px; }
.kind p { margin-top: 6px; font-size: 15px; line-height: 1.75; }
.kind ul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.kind li { padding: 2px 10px; border-radius: 999px; background: var(--slate); color: var(--head); font-size: 12.5px; font-weight: 600; line-height: 1.7; }

/* Good vs warning lists */
.signals { display: grid; gap: 12px; }
.signal { padding: 18px; border-radius: var(--r-l); background: var(--deck); border: 1px solid var(--rule); }
.signal h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.signal h3::before { content: "✓"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(78, 224, 196, .16); color: var(--mint); font-size: 15px; }
.signal--warn h3::before { content: "!"; background: rgba(255, 107, 129, .16); color: var(--rose); }
.signal--good { border-color: rgba(78, 224, 196, .3); }
.signal--warn { border-color: rgba(255, 107, 129, .3); }
.signal ul { display: grid; gap: 8px; margin-top: 12px; }
.signal li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.7; }
.signal li::before { content: ""; position: absolute; top: .7em; left: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.signal--warn li::before { background: var(--rose); }

/* Timeline */
.steps { position: relative; display: grid; gap: 14px; counter-reset: step; }
.steps::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 17px; width: 2px; background: linear-gradient(var(--flame), rgba(253, 106, 18, .1)); }
.steps li { position: relative; padding: 2px 0 0 52px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--fire); color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: 0 0 0 5px var(--night);
}
.steps h3 { font-size: 17.5px; line-height: 1.45; }
.steps p { margin-top: 3px; font-size: 15px; line-height: 1.75; }
.callout {
  margin-top: 18px; padding: 14px 16px;
  border-left: 4px solid var(--gold); border-radius: 12px;
  background: rgba(246, 217, 10, .08);
  color: var(--head); font-size: 15px; line-height: 1.75;
}

/* Paytable checklist */
.peek { display: grid; gap: 10px; }
.peek li {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 14px;
  border: 1px solid var(--rule); border-radius: var(--r-l);
  background: var(--deck);
}
.peek li > span { display: grid; place-items: center; height: 46px; border-radius: 14px; background: var(--slate-2); color: var(--gold-text); font-size: 15px; font-weight: 700; }
.peek h3 { font-size: 17px; line-height: 1.45; }
.peek p { margin-top: 3px; font-size: 15px; line-height: 1.7; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--rule); border-radius: var(--r-l);
  background: var(--deck);
  transition: border-color .2s ease;
}
.faq details[open] { border-color: rgba(253, 106, 18, .55); }
.faq summary {
  position: relative; padding: 15px 50px 15px 18px;
  color: var(--head); font-weight: 700; line-height: 1.55;
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; top: 50%; right: 16px;
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--slate-2); color: var(--flame-text);
  font-size: 18px; line-height: 1;
  transform: translateY(-50%);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 18px 16px; font-size: 15.5px; line-height: 1.8; }
details::details-content { height: 0; overflow: clip; transition: height .28s var(--ease), content-visibility .28s allow-discrete; }
details[open]::details-content { height: auto; }

/* Responsible gaming */
.care {
  display: grid; gap: 14px;
  padding: 22px 18px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, rgba(23, 53, 75, .9), rgba(11, 29, 48, .9));
  border: 1px solid var(--rule-2);
}
.care h2 { font-size: clamp(22px, 5.4vw, 30px); }
.care ul { display: grid; gap: 8px; }
.care li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.7; }
.care li::before { content: ""; position: absolute; top: .7em; left: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.care__hotline { margin-top: 14px; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: rgba(3, 9, 27, .6); color: var(--head); font-weight: 700; }
.care__hotline b { color: var(--gold-text); font-size: 20px; }

/* Breadcrumb */
.crumbs { padding-top: 34px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--soft); font-size: 14px; line-height: 1.6; }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--soft); }
.crumbs a { color: var(--head); }

/* Information pages */
.doc { width: min(100% - 32px, 800px); margin: 28px auto 0; }
.doc .crumbs { padding-top: 0; margin-bottom: 14px; }
.doc__card { padding: 26px 18px; border: 1px solid var(--rule); border-radius: var(--r-xl); background: var(--deck); box-shadow: var(--lift); }
.doc h1 { font-size: clamp(27px, 6vw, 38px); }
.doc__date { margin-top: 6px; color: var(--soft); font-size: 13.5px; }
.doc__lead { margin-top: 14px; color: var(--head); font-size: 17px; }
.doc h2 { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--rule); font-size: clamp(20px, 4.6vw, 24px); }
.doc p { margin-top: 10px; }
.doc ul { display: grid; gap: 8px; margin-top: 12px; }
.doc li { position: relative; padding-left: 20px; }
.doc li::before { content: ""; position: absolute; top: .72em; left: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--flame-2); }
.doc__action { margin-top: 18px; }

/* Scroll reveal (classes are added by JS only) */
.rise { opacity: 0; transform: translateY(18px); }
.rise.is-up { opacity: 1; transform: none; transition: opacity .6s var(--ease) var(--wait, 0ms), transform .6s var(--ease) var(--wait, 0ms); }

/* Responsive */
@media (min-width: 560px) {
  .facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; }
  .facts div { text-align: center; }
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .peek { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc__card { padding: 36px 40px; }
}

@media (min-width: 820px) {
  .kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calc { padding: 24px; }
  .chart { padding: 20px 18px 14px; }
  .care { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 28px; padding: 34px; }
  .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
}

@media (min-width: 1024px) {
  .games { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .game { grid-template-columns: 92px minmax(0, 1fr); }
}
