:root {
  --bg: #f6f4f9;
  --ink: #1d1730;
  --muted: #5d5672;
  --line: #e2dded;
  --accent: #e8573a;
  --plum: #2e2545;
  --forge: #f37021;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #15111f; --ink: #efebf7; --muted: #b3abc7; --line: #2c2540; --accent: #ff7a5c; --plum: #efebf7; }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem max(20px, env(safe-area-inset-right)) 4rem max(20px, env(safe-area-inset-left));
}
header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.brand { font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; color: var(--plum); text-decoration: none; }
.brand span { color: var(--accent); }
nav { display: flex; gap: 1.2rem; font-size: 0.95rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); }
h1 { font-size: 2.2rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.6rem; }
h2 { font-size: 1.2rem; margin: 2.2rem 0 0.5rem; }
p, li { color: var(--ink); }
.lead { font-size: 1.2rem; color: var(--muted); margin-top: 0; }
.meta { color: var(--muted); font-size: 0.9rem; }
a { color: var(--accent); }
ul { padding-left: 1.2rem; }
li { margin: 0.35rem 0; }
footer { margin-top: 3.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }

/* Home: one screen, no scrolling. Type scales with the screen height so everything fits. */
html:has(body.home) { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.home { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.home main {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}
body.home header { margin-bottom: 0; }
body.home .hero {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(10px, 2.4vh, 26px);
}
body.home h1 { margin: 0; font-size: clamp(1.45rem, min(8vw, 4.4vh), 2.6rem); line-height: 1.08; }
body.home .lead { margin: 0; font-size: clamp(0.95rem, min(4.4vw, 2.3vh), 1.2rem); line-height: 1.45; }
body.home .points { display: grid; gap: clamp(8px, 1.8vh, 20px); }
@media (min-width: 640px) { body.home .points { grid-template-columns: 1fr 1fr; gap: 28px; } }
body.home h2 { margin: 0 0 0.3em; font-size: clamp(0.95rem, 2.1vh, 1.15rem); }
body.home .points p { margin: 0; font-size: clamp(0.85rem, min(3.9vw, 1.95vh), 1rem); line-height: 1.45; color: var(--muted); }

/* Same credit as the Ta-nnin, Eighteen Diamonds and 58 Diamonds sites: copyright and "Forged by" + the 18 logo
   side by side, centred on one bottom line, no separator rule. */
.credits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 6px 20px;
  margin-top: 0;
  padding-top: 12px;
  border-top: 0;
  font-size: 0.75rem;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
}
.credits span { white-space: nowrap; }
.forged {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.forged svg { height: 1em; width: auto; }
.forged:hover, .forged:focus-visible { color: var(--forge); }
