/* Casino Malaysia Guide — mobile-first, no webfonts */
:root {
  --bg: #f3efe6;
  --paper: #fffdf8;
  --ink: #16141a;
  --muted: #5b564e;
  --line: #ddd5c7;
  --navy: #1b2a4a;
  --navy-2: #243656;
  --copper: #b4532a;
  --copper-hover: #8c3c1c;
  --teal: #1f5c4d;
  --ok-bg: #e8f3ec;
  --warn-bg: #f8ead8;
  --danger-bg: #f6e4e0;
  --chip: #efe8db;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 20, 26, 0.06), 0 8px 24px rgba(22, 20, 26, 0.05);
  --max: 1120px;
  --prose: 42rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 0.15em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: #fff; padding: 0.5rem 0.8rem; }

.wrap {
  width: min(var(--max), calc(100% - 1.5rem));
  margin-inline: auto;
}
.prose { width: min(var(--prose), 100%); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(27, 42, 74, 0.96);
  color: #f7f3ea;
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.6rem;
  flex-wrap: wrap;
  padding: 0.55rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand small {
  display: block;
  font-weight: 500;
  font-size: 0.72rem;
  color: #c9c3b6;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 2rem;
  height: 2rem;
  flex: none;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.lang-switch {
  display: flex;
  gap: 0.15rem;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 0.15rem;
}
.lang-switch a {
  color: #e8e2d6;
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
}
.lang-switch a[aria-current="page"] {
  background: #fff;
  color: var(--navy);
  font-weight: 700;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--copper);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  border: 0;
  cursor: pointer;
  line-height: 1.2;
}
.btn:hover { background: var(--copper-hover); color: #fff; }
.btn-ghost {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: inherit; }
.btn-lg { padding: 0.9rem 1.4rem; font-size: 1.05rem; }
.header-cta { padding: 0.5rem 0.95rem; font-size: 0.9rem; }

/* Hero */
.hero {
  background: linear-gradient(145deg, #1b2a4a 0%, #243656 55%, #1f5c4d 140%);
  color: #f8f4ec;
  padding: 2.2rem 0 2.6rem;
}
.hero h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.55rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  max-width: 18ch;
  letter-spacing: -0.02em;
}
.hero .lede {
  font-size: 1.08rem;
  color: #e4ddd0;
  max-width: 40rem;
  margin: 0 0 1.35rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 1.2rem 0 0;
  color: #c9c3b6;
  font-size: 0.88rem;
}

.legal-line {
  margin: 0.85rem 0 0;
  color: #c9c3b6;
  font-size: 0.86rem;
  max-width: 40rem;
  line-height: 1.45;
}
.legal-line a {
  color: #f0e6d6;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.legal-line a:hover { color: #fffdf8; }

/* Content */
main { padding: 0 0 3rem; }
.section { padding: 2.2rem 0 0; }
.section h2 {
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 0 0 0.8rem;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.section h3 {
  font-size: 1.15rem;
  margin: 1.4rem 0 0.45rem;
  color: var(--navy);
}
.section p, .section li { color: var(--ink); }
.section p { margin: 0 0 1rem; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--copper);
  margin: 0 0 0.35rem;
}

.grid {
  display: grid;
  gap: 0.9rem;
  margin: 1.1rem 0 1.3rem;
}
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0.35rem; }
.card p:last-child { margin-bottom: 0; }
.icon-row {
  width: 2.4rem;
  height: 2.4rem;
  color: var(--teal);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0 0.7rem; }
.chip {
  background: var(--chip);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}

.toc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0 0;
}
.toc h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.callout {
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1rem 0 1.3rem;
  border: 1px solid var(--line);
}
.callout.warn { background: var(--warn-bg); }
.callout.legal { background: var(--danger-bg); }
.callout.ok { background: var(--ok-bg); }
.callout strong { display: block; margin-bottom: 0.25rem; }

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.steps li {
  position: relative;
  padding: 0.2rem 0 1rem 2.8rem;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
}

.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  margin: 0 0 0.55rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
}
.faq details p { margin: 0.55rem 0 0.2rem; }

.cta-banner {
  background: var(--navy);
  color: #f7f3ea;
  border-radius: calc(var(--radius) + 4px);
  padding: 1.4rem 1.3rem;
  margin: 1.6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.cta-banner p { margin: 0.3rem 0 0; color: #d9d3c6; }
.cta-banner h2 { margin: 0; color: #fff; font-size: 1.3rem; }

/* Footer */
.site-footer {
  background: #121722;
  color: #d5d0c6;
  padding: 2rem 0 2.4rem;
  font-size: 0.92rem;
}
.site-footer a { color: #f0ebe1; }
.footer-grid {
  display: grid;
  gap: 1.2rem;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.site-footer h2 { color: #fff; font-size: 0.95rem; margin: 0 0 0.4rem; }
.site-footer ul { margin: 0; padding-left: 1.1rem; }
.fineprint { margin-top: 1.4rem; color: #9d978c; font-size: 0.82rem; }
.age-badge {
  display: inline-block;
  border: 2px solid #f0ebe1;
  color: #f0ebe1;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

table.facts {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
}
table.facts th, table.facts td {
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.facts th { background: var(--navy); color: #fff; font-weight: 650; width: 34%; }

/* 404 */
.err {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}
.err h1 { font-size: 2rem; color: var(--navy); }

@media (max-width: 640px) {
  .header-cta { width: 100%; }
  .header-inner { justify-content: flex-start; }
}

.hero .prose, .section .lead-wrap { width: min(46rem, 100%); }
.brand-text { line-height: 1.15; }
nav.toc-nav { margin: 0; }
.updated { font-variant-numeric: tabular-nums; }
