/* NILS: casino reviews read from the licence register.
   Cool paper, slate ink, felt green for live records, oxblood for surrendered ones.
   One loud element: the register extract with its status stamp. Everything else stays quiet. */

:root {
  --paper: #f3f5f4;
  --surface: #ffffff;
  --ink: #17202a;
  --ink-2: #47525d;
  --rule: #d3dbd8;
  --felt: #1e5845;
  --felt-tint: #e2eee8;
  --oxblood: #8c2a2a;
  --ox-tint: #f6e7e5;
  --brass: #9c7a33;
  --focus: #1f4fbf;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  font-kerning: normal;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--felt); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--ink); color: #ffffff; padding: 10px 16px; font-family: var(--sans);
}
.skip:focus { top: 8px; }

/* Header */
.site-head { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--rule); }
.agebar {
  margin: 0; padding: 8px var(--gutter);
  background: var(--ink); color: #f3f5f4;
  font: 0.8125rem/1.5 var(--sans);
}
.agebar a { color: #ffffff; font-weight: 600; }
.head-in {
  max-width: 1180px; margin: 0 auto; padding: 18px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
}
.wordmark { display: flex; align-items: baseline; gap: 12px; color: var(--ink); text-decoration: none; }
.wm-name { font: 700 1.75rem/1 var(--serif); letter-spacing: 0.06em; }
.wm-sub { font: 0.875rem/1.3 var(--sans); color: var(--ink-2); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; font-family: var(--sans); font-size: 0.9375rem; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--rule); color: var(--ink); }
.nav a[aria-current="page"] { border-bottom-color: var(--felt); color: var(--felt); font-weight: 600; }

/* Page frame */
.page { max-width: 1180px; margin: 0 auto; padding: 32px var(--gutter) 72px; }
.page-head { max-width: var(--measure); margin-bottom: 32px; }
.crumbs { font: 0.875rem/1.4 var(--sans); color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.crumbs a { color: var(--ink-2); }

h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 0 0 16px; letter-spacing: -0.01em; max-width: 22ch; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 56px 0 14px; }
h3 { font-size: 1.2rem; margin: 28px 0 8px; }

.lead { font-size: 1.3rem; line-height: 1.55; margin: 0 0 16px; color: var(--ink); }
.byline { font: 0.875rem/1.5 var(--sans); color: var(--ink-2); margin: 0; }

.prose { max-width: var(--measure); }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose li { margin-bottom: 6px; }
.prose ol.steps { padding-left: 1.4em; }
.prose ol.steps li { margin-bottom: 14px; padding-left: 4px; }

/* Home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px; align-items: end; margin-bottom: 8px; }
.hero .page-head { margin-bottom: 0; }
.hero figure { margin: 0; }
.hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 60% 50%; border-radius: 2px; }
.hero figcaption { font: 0.8125rem/1.4 var(--sans); color: var(--ink-2); margin-top: 8px; }
.hero figcaption a { color: var(--ink-2); }

/* The register extract: the one memorable element */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 40px 0 8px; }
.extract {
  position: relative;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-top: 4px solid var(--brass);
  padding: 22px 22px 20px;
  font-family: var(--sans);
}
.extract h2, .extract h3 { font-family: var(--serif); margin: 0 0 4px; font-size: 1.5rem; }
.extract h2 a, .extract h3 a { color: var(--ink); text-decoration: none; }
.extract h2 a:hover, .extract h3 a:hover { text-decoration: underline; }
.extract .entity { margin: 0 0 18px; font-size: 0.9375rem; color: var(--ink-2); line-height: 1.4; }
.extract dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 0.875rem; line-height: 1.4; }
.extract dt { color: var(--ink-2); }
.extract dd { margin: 0; font-variant-numeric: tabular-nums; }
.extract .licno {
  display: block; margin: 0 0 16px; padding: 10px 0; border-block: 1px dashed var(--rule);
  font: 600 1.15rem/1.2 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; color: var(--ink);
  overflow-wrap: anywhere;
}
.extract .licno small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--ink-2); letter-spacing: 0; margin-bottom: 2px; }
.extract .go { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font-weight: 600; color: var(--felt); }

.stamp {
  display: inline-block; margin: 0 0 14px; transform-origin: left center;
  font: 700 0.75rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  padding: 7px 9px; border: 2px solid currentColor; border-radius: 3px;
  transform: rotate(-4deg);
}
.stamp-active { color: var(--felt); background: var(--felt-tint); }
.stamp-surrendered { color: var(--oxblood); background: var(--ox-tint); }
.stamp-mixed { color: #6e5520; background: #faf3e3; }

/* Review extract (single, wider) */
.extract-wide { max-width: 860px; margin: 0 0 8px; }
.extract-wide dl { grid-template-columns: minmax(130px, auto) 1fr; }

/* Findings and notes */
.findings { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.findings li { padding: 16px 0; border-top: 1px solid var(--rule); }
.findings li:last-child { border-bottom: 1px solid var(--rule); }
.findings strong { display: block; font-size: 1.125rem; }

.note {
  max-width: var(--measure); margin: 24px 0;
  background: var(--felt-tint); color: var(--ink);
  border-left: 4px solid var(--felt); padding: 16px 20px;
}
.note p { margin: 0; color: var(--ink); }
.note p + p { margin-top: 10px; }
.note-warn { background: var(--ox-tint); color: var(--ink); border-left-color: var(--oxblood); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 900px; }
.split > div { background: var(--surface); color: var(--ink); border: 1px solid var(--rule); padding: 18px 22px; }
.split h3 { margin-top: 0; }
.split ul { margin: 0; padding-left: 1.1em; }
.split li { margin-bottom: 8px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 16px 0 24px; border: 1px solid var(--rule); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font: 0.9375rem/1.45 var(--sans); color: var(--ink); background: var(--surface); }
caption { text-align: left; padding: 12px 14px; font-weight: 600; color: var(--ink); }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-top: 1px solid var(--rule); }
thead th { background: var(--paper); color: var(--ink); }
tbody th { font-weight: 600; color: var(--ink-2); min-width: 150px; }
td { font-variant-numeric: tabular-nums; }
.st-active { color: var(--felt); font-weight: 700; }
.st-surrendered { color: var(--oxblood); font-weight: 700; }
.compare-table td, .compare-table thead th { min-width: 200px; }

/* Sources */
.sources { max-width: var(--measure); font: 0.9375rem/1.55 var(--sans); }
.sources ol { padding-left: 1.4em; }
.sources li { margin-bottom: 8px; overflow-wrap: anywhere; }

/* FAQ */
.faq { max-width: var(--measure); }
.faq-item { border-top: 1px solid var(--rule); }
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-item summary { cursor: pointer; list-style: none; padding: 14px 0; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font: 400 1.5rem/1 var(--sans); color: var(--felt); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item h3 { margin: 0; font-size: 1.125rem; }
.faq-item p { margin: 0 0 18px; }

/* Footer */
.site-foot { background: var(--ink); color: #e4e9e7; font: 0.9375rem/1.6 var(--sans); }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 40px var(--gutter) 48px; }
.foot-in p { max-width: 80ch; margin: 0 0 14px; color: #e4e9e7; }
.foot-in strong { color: #ffffff; }
.site-foot a { color: #ffffff; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 20px; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero img { aspect-ratio: 16 / 7; }
  .board { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .split { grid-template-columns: 1fr; }
  .wm-sub { display: none; }
  .head-in { padding-block: 12px; }
  .nav a { padding: 0 8px; }
  h2 { margin-top: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* Content + side rail */
.with-rail { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; }
.rail { position: sticky; top: 24px; font: 0.9375rem/1.45 var(--sans); color: var(--ink); }
.rail-h { font-weight: 700; font-size: 0.875rem; margin: 0 0 6px; color: var(--ink); }
.rail-toc { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--rule); }
.rail-toc ol { list-style: none; padding: 0; margin: 0; }
.rail-toc li { margin: 0; }
.rail-toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--rule); color: var(--ink-2); text-decoration: none; }
.rail-toc a:hover, .rail-toc a:focus-visible { color: var(--ink); border-left-color: var(--felt); }
.rail-help { background: var(--ox-tint); color: var(--ink); border-left: 4px solid var(--oxblood); padding: 16px 18px; }
.rail-help p { margin: 0 0 14px; }
.rail-help p:last-child { margin-bottom: 0; }
.rail-help a { color: var(--oxblood); font-weight: 600; }
@media (max-width: 960px) {
  .with-rail { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .rail { position: static; }
  .rail-toc { display: none; }
}

/* Malaysia-first cards: the foreign licence sits below the local position */
.extract dl + .licno-elsewhere { margin: 16px 0 6px; }
.extract .licno-elsewhere + .entity { margin-bottom: 14px; font-size: 0.875rem; }

/* Top-10 board: two wide cards per row */
.board-10 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.board-10 .extract dl { grid-template-columns: 150px 1fr; }
.extract .finding { margin: 14px 0 12px; font-size: 0.9375rem; line-height: 1.45; color: var(--ink); }
@media (max-width: 960px) { .board-10 { grid-template-columns: 1fr; } }

/* Football pages: felt-green side card instead of the scam-help card */
.rail-ball { background: var(--felt-tint, #e6efe9); border-left-color: var(--felt); }
.rail-ball a { color: var(--felt); }
.rail-ball ul { margin: 0 0 14px; padding-left: 18px; }
.rail-ball li { margin-bottom: 8px; }

/* Brand logo tile on the home-page cards */
.extract .brand-logo { display: block; width: 180px; height: 50px; margin: 0 0 14px; border: 1px solid var(--rule); border-radius: 3px; }
.extract .card-img { display: block; max-width: none; width: calc(100% + 44px); height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: -22px -22px 18px; }
