/* Checker House — site stylesheet. One file, no build step, no images.
   Palette: deep green and walnut, cream paper, gold accent.
   Urdu sections use Noto Nastaliq Urdu (Google Fonts, linked from each page). */

:root {
  --green-900: #0b261d;
  --green-800: #103427;
  --green-700: #1a4d3b;
  --green-600: #236349;
  --walnut-900: #22150c;
  --walnut-800: #33200f;
  --walnut-600: #5a3a1f;
  --cream: #f6efdc;
  --cream-2: #efe4c8;
  --paper: #fffaf0;
  --ink: #241a12;
  --ink-dim: #4a3d31;
  --line: #d9c9a0;
  --gold: #c9a24a;
  --gold-light: #e6c775;
  --gold-dark: #7a5a12;
  --link: #14573f;
  --warn-bg: #fbeede;
  --warn-line: #b4632a;
  --radius: 10px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--green-900); }

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

.skip {
  position: absolute; inset-inline-start: 0.5rem; top: -4rem;
  background: var(--gold); color: var(--walnut-900);
  padding: 0.5rem 0.9rem; border-radius: 0 0 6px 6px; font-weight: 700; z-index: 10;
}
.skip:focus { top: 0; }

.wrap { width: 100%; max-width: 48rem; margin-inline: auto; padding-inline: 16px; }
.wrap-wide { width: 100%; max-width: 64rem; margin-inline: auto; padding-inline: 16px; }

/* ── header ────────────────────────────────────────────────────────────── */
.site-header { background: var(--walnut-900); color: var(--cream); }
.site-header .bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.25rem; padding-block: 0.85rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--gold-light); text-decoration: none;
  font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 1.3rem;
  letter-spacing: 0.01em;
}
.brand:hover { color: #fff; }
.brand .piece {
  width: 1.55rem; height: 1.55rem; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff6dc 0 12%, #e8d7a8 45%, #b79b58 100%);
  box-shadow: 0 0 0 2px var(--gold), inset 0 0 0 4px rgba(34, 21, 12, 0.18);
}
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.site-header nav a {
  color: var(--cream); text-decoration: none; padding: 0.35rem 0.1rem;
  border-bottom: 2px solid transparent; font-size: 0.97rem;
}
.site-header nav a:hover, .site-header nav a[aria-current="page"] {
  color: var(--gold-light); border-bottom-color: var(--gold);
}
/* the checker strip under the header */
.strip {
  height: 10px;
  background: repeating-conic-gradient(var(--gold) 0 25%, var(--walnut-900) 0 50%) 0 0 / 20px 20px;
}

/* ── language bar ──────────────────────────────────────────────────────── */
.langbar { display: flex; gap: 0.6rem; margin-block: 1.4rem 0.2rem; }
.langbar a {
  display: inline-block; padding: 0.3rem 0.95rem; border: 1px solid var(--green-700);
  border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  background: var(--paper); color: var(--green-700);
}
.langbar a:hover { background: var(--green-700); color: var(--cream); }
.langbar a[lang="ur"] { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Naskh Arabic", serif; line-height: 1.9; }

/* ── document pages ────────────────────────────────────────────────────── */
main { display: block; padding-bottom: 3rem; }

.doc {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.1rem, 4vw, 2.2rem); margin-block: 1.2rem 0;
  box-shadow: 0 1px 0 #fff inset, 0 6px 18px rgba(34, 21, 12, 0.07);
}
.doc h1 {
  font-family: Georgia, "Times New Roman", serif; color: var(--green-800);
  font-size: clamp(1.7rem, 6vw, 2.3rem); line-height: 1.2; margin: 0 0 0.5rem;
}
.doc h2 {
  font-family: Georgia, "Times New Roman", serif; color: var(--green-800);
  font-size: 1.28rem; line-height: 1.3; margin: 2.2rem 0 0.6rem;
  padding-top: 1.2rem; border-top: 1px solid var(--line);
}
.doc h3 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; color: var(--walnut-800); }
.doc p { margin: 0 0 0.9rem; color: var(--ink-dim); }
.doc ul, .doc ol { margin: 0 0 1rem; padding-inline-start: 1.3rem; color: var(--ink-dim); }
.doc li { margin-bottom: 0.45rem; }
.doc li::marker { color: var(--gold-dark); }
.doc strong { color: var(--ink); }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em;
  background: var(--cream-2); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.35em;
  color: var(--ink); overflow-wrap: anywhere;
}
.meta { font-size: 0.93rem; color: #5b4c3d; margin: 0 0 1.2rem; }
.eyebrow {
  margin: 0 0 0.3rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold-dark);
}
.lede { font-size: 1.12rem; color: var(--ink); }

.callout {
  background: var(--cream-2); border: 1px solid var(--line); border-inline-start: 5px solid var(--gold);
  border-radius: 6px; padding: 0.9rem 1.1rem; margin: 1.1rem 0;
}
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout.warn { background: var(--warn-bg); border-color: #e3c3a0; border-inline-start-color: var(--warn-line); }

.steps { counter-reset: step; list-style: none; padding-inline-start: 0 !important; }
.steps li {
  counter-increment: step; position: relative; padding-inline-start: 2.6rem; margin-bottom: 0.8rem; min-height: 2rem;
}
.steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: 0.05rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-700); color: var(--cream); font-weight: 700; font-size: 0.95rem;
  font-family: system-ui, sans-serif;
}

/* ── data tables (cards on phones) ─────────────────────────────────────── */
table.data { width: 100%; border-collapse: collapse; margin: 0.6rem 0 1.2rem; font-size: 0.97rem; }
table.data th {
  background: var(--walnut-800); color: var(--cream); text-align: start; font-weight: 600;
  padding: 0.6rem 0.75rem; border: 1px solid var(--walnut-800);
}
table.data td { padding: 0.65rem 0.75rem; border: 1px solid var(--line); vertical-align: top; color: var(--ink-dim); }
table.data tbody tr:nth-child(even) td { background: #fbf4e2; }
table.data td:first-child { color: var(--ink); font-weight: 600; }

@media (max-width: 40rem) {
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.data tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 0.8rem; overflow: hidden; background: #fff; }
  table.data td { border: 0; border-bottom: 1px solid #eadfc0; padding: 0.5rem 0.8rem; }
  table.data td:last-child { border-bottom: 0; }
  table.data tbody tr:nth-child(even) td { background: transparent; }
  table.data td:first-child { background: var(--cream-2) !important; }
  table.data td::before {
    content: attr(data-label); display: block; font-size: 0.74rem; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 0.1rem;
  }
  table.data td:first-child::before { display: none; }
}

/* ── buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3rem; padding: 0.7rem 1.4rem; border-radius: 8px; text-decoration: none;
  font-weight: 700; font-size: 1.02rem; border: 2px solid var(--gold);
  background: var(--gold); color: var(--walnut-900);
}
.btn:hover { background: var(--gold-light); color: var(--walnut-900); }
.btn.secondary { background: transparent; color: var(--cream); border-color: var(--gold); }
.btn.secondary:hover { background: rgba(201, 162, 74, 0.18); color: #fff; }
.btn.on-paper { background: var(--green-700); border-color: var(--green-700); color: var(--cream); }
.btn.on-paper:hover { background: var(--green-900); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-block: 1.2rem 0.4rem; }

/* ── landing hero ──────────────────────────────────────────────────────── */
.hero { background: var(--green-800); color: var(--cream); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: 0.07; pointer-events: none;
  background: repeating-conic-gradient(#fff 0 25%, transparent 0 50%) 0 0 / 56px 56px;
}
.hero-grid {
  position: relative; display: grid; gap: 2rem; align-items: center;
  padding-block: clamp(2rem, 7vw, 4.5rem);
}
@media (min-width: 52rem) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; } }
.hero h1 {
  font-family: Georgia, "Times New Roman", serif; color: #fff; margin: 0.2rem 0 0.2rem;
  font-size: clamp(2.2rem, 9vw, 3.6rem); line-height: 1.1;
}
.hero .ur-title {
  font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Naskh Arabic", serif;
  color: var(--gold-light); font-size: clamp(1.5rem, 6vw, 2.2rem); line-height: 1.9; margin: 0 0 0.5rem;
  letter-spacing: normal; text-align: left;
}
.hero .eyebrow { color: var(--gold-light); }
.hero .tag { font-size: clamp(1.1rem, 3.4vw, 1.35rem); color: #efe6cc; margin: 0 0 0.7rem; max-width: 34rem; }
.hero .sub { color: #d6ccb0; max-width: 34rem; margin: 0 0 0.4rem; }
.hero .note { font-size: 0.9rem; color: #bfb593; margin: 0.7rem 0 0; }

/* the board graphic: pure CSS, decorative */
.board-wrap { width: min(100%, 22rem); margin-inline: auto; }
.board {
  position: relative; aspect-ratio: 1; width: 100%;
  border: 10px solid var(--walnut-800); border-radius: 8px;
  outline: 2px solid var(--gold); outline-offset: -2px;
  background:
    repeating-conic-gradient(#1c5a44 0 25%, #f0e2bd 0 50%) 0 0 / 25% 25%;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.board i {
  position: absolute; width: 12.5%; height: 12.5%;
  left: calc(var(--c) * 12.5%); top: calc(var(--r) * 12.5%);
}
.board i::after {
  content: ""; position: absolute; inset: 11%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff9e6 0 14%, #eadbb0 50%, #b99d5b 100%);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5), inset 0 0 0 3px rgba(60, 40, 15, 0.18);
}
.board i.d::after {
  background: radial-gradient(circle at 35% 30%, #8a5d36 0 12%, #4a2b14 48%, #24130a 100%);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.6), inset 0 0 0 3px rgba(230, 199, 117, 0.35);
}
.board i.k::before {
  content: ""; position: absolute; inset: 27%; border-radius: 50%; z-index: 1;
  border: 2px solid var(--gold-light);
}

/* ── feature list on the landing page ──────────────────────────────────── */
.features { display: grid; gap: 1rem; margin-block: 1.6rem; padding: 0; list-style: none; }
@media (min-width: 40rem) { .features { grid-template-columns: repeat(2, 1fr); } }
.features li {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; margin: 0; color: var(--ink-dim);
}
.features strong { display: block; color: var(--green-800); font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; margin-bottom: 0.15rem; }

.section-title {
  font-family: Georgia, "Times New Roman", serif; color: var(--green-800);
  font-size: clamp(1.4rem, 4.5vw, 1.8rem); margin: 2.4rem 0 0.4rem;
}

/* ── Urdu ──────────────────────────────────────────────────────────────── */
[lang="ur"] {
  font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Naskh Arabic", "Segoe UI", serif;
  letter-spacing: normal; text-transform: none; font-style: normal;
}
.doc[lang="ur"] { font-size: 1.1rem; line-height: 2.25; }
.doc[lang="ur"] h1 { line-height: 1.9; font-weight: 700; }
.doc[lang="ur"] h2 { line-height: 1.9; font-weight: 700; font-family: inherit; }
.doc[lang="ur"] h3 { line-height: 1.9; font-family: inherit; }
.doc[lang="ur"] p, .doc[lang="ur"] li { line-height: 2.25; }
.doc[lang="ur"] .eyebrow { letter-spacing: normal; text-transform: none; font-size: 0.95rem; }
.doc[lang="ur"] table.data { font-size: 1rem; }
.doc[lang="ur"] table.data td, .doc[lang="ur"] table.data th { line-height: 2.1; }
.doc[lang="ur"] .steps li::before { font-family: system-ui, sans-serif; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.doc[lang="ur"] code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; direction: ltr; unicode-bidi: isolate; }

/* ── footer ────────────────────────────────────────────────────────────── */
.site-footer { background: var(--walnut-900); color: #d9cdb0; padding-block: 1.6rem 2rem; font-size: 0.95rem; }
.site-footer a { color: var(--gold-light); }
.site-footer a:hover { color: #fff; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin: 0 0 0.9rem; padding: 0; list-style: none; }
.site-footer p { margin: 0 0 0.35rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .site-header, .site-footer, .strip, .langbar, .skip { display: none; }
  body { background: #fff; }
  .doc { border: 0; box-shadow: none; padding: 0; }
}
