:root {
  --ink: #25235c;
  --ink-deep: #17163f;
  --violet: #7357ff;
  --coral: #ff5c6c;
  --lime: #ddf247;
  --cream: #fff9f2;
  --surface: #ffffff;
  --paper: #f4efe9;
  --text: #20202a;
  --muted: #686875;
  --line: rgba(37, 35, 92, .15);
  --shadow: 0 18px 50px rgba(37, 35, 92, .13);
  --measure: 75rem;
  --gutter: clamp(1.1rem, 3vw, 3.75rem);
  --font-display: 'Instrument Serif', serif;
  --font-body: 'Instrument Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  color: var(--text);
  background: var(--cream);
  font-family: var(--font-body);
  font-synthesis: none;
}

html[data-theme="dark"], html.dark {
  --ink: #9890ff;
  --ink-deep: #11102d;
  --violet: #9a86ff;
  --coral: #ff7784;
  --lime: #e7f76a;
  --cream: #171735;
  --surface: #24234b;
  --paper: #202044;
  --text: #fff9f2;
  --muted: #c6c4d5;
  --line: rgba(255, 249, 242, .18);
  --shadow: 0 18px 50px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--cream); color: var(--text); line-height: 1.5; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--lime); color: var(--ink-deep); }

.site-header {
  position: relative;
  z-index: 5;
  width: min(calc(100% - 2 * var(--gutter)), var(--measure));
  margin: 0 auto;
  padding: 1.15rem 0;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark { width: 2.7rem; height: 2.7rem; }
.brand-name { font-size: clamp(1.3rem, 2vw, 1.7rem); font-weight: 700; letter-spacing: -.06em; }
.primary-nav { margin-left: auto; display: flex; align-items: center; gap: clamp(.8rem, 1.8vw, 1.6rem); }
.primary-nav a { font-size: .86rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--ink); }
.header-tools { display: flex; align-items: center; gap: .55rem; }
[data-theme-toggle], .menu-toggle {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  width: 2.65rem; height: 2.65rem; display: grid; place-items: center;
  border-radius: 50%; font-weight: 700;
}
[data-theme-toggle] { font-size: 1.05rem; }
.menu-toggle { display: none; font-size: 0; }
.menu-toggle::before { content: '☰'; font-size: 1.15rem; }

main { position: relative; }
.page-wrap { width: min(calc(100% - 2 * var(--gutter)), var(--measure)); margin: 0 auto; }
.rail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 12rem; gap: clamp(1.3rem, 4vw, 3.5rem); align-items: start; }
.rail-layout:has([data-side-links][hidden]), .rail-layout:has([data-side-links]:empty) { grid-template-columns: minmax(0, 1fr); }
[data-side-links][hidden] { display: none; }
.rail-layout > div > .page-wrap { width: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.side-links { position: sticky; top: 1.5rem; border-top: 3px solid var(--coral); padding-top: .75rem; color: var(--muted); }
.side-links h2 { margin: 0 0 .8rem; color: var(--ink); font: 1.1rem var(--font-display); }
.side-links ol { padding: 0; margin: 0; list-style: none; display: grid; gap: .55rem; }
.side-links li { border-bottom: 1px solid var(--line); padding-bottom: .5rem; }
.side-links a { font-size: .79rem; text-decoration: none; }
.side-links a:hover { color: var(--coral); }

.eyebrow, .section-kicker, .story-meta, .category-label, .micro-label {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; font-size: .66rem; font-weight: 700;
}
.eyebrow { color: var(--lime); background: var(--ink); padding: .4rem .65rem; display: inline-block; }
.section-kicker { color: var(--violet); margin: 0 0 .8rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.section-heading h2 { margin: 0; max-width: 18ch; font: 500 clamp(2rem, 4vw, 3.5rem)/.95 var(--font-display); letter-spacing: -.035em; }
.section-heading a { color: var(--ink); font-weight: 700; font-size: .86rem; text-decoration-thickness: 2px; text-underline-offset: .25rem; }

.hero { padding: clamp(2rem, 5vw, 4.8rem) 0 5rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(19rem, 1.1fr); align-items: center; gap: clamp(2rem, 6vw, 6.5rem); }
.hero-copy { position: relative; z-index: 1; }
.hero h1 { margin: 1.2rem 0 1.35rem; max-width: 8ch; color: var(--ink); font: 500 clamp(4.2rem, 10vw, 8.7rem)/.82 var(--font-display); letter-spacing: -.065em; }
.hero h1 em { color: var(--coral); font-style: normal; }
.hero-intro { max-width: 31rem; margin: 0 0 1.8rem; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.17rem); line-height: 1.6; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .75rem 1.1rem; border: 2px solid transparent; border-radius: .35rem; text-decoration: none; font-size: .84rem; font-weight: 700; }
.button-primary { background: var(--coral); color: #fff; box-shadow: 5px 5px 0 var(--ink); }
.button-primary:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
.button-secondary { color: var(--ink); border-color: var(--ink); background: transparent; }
.button-secondary:hover { background: var(--ink); color: var(--cream); }
.hero-art { position: relative; min-height: 34rem; }
.hero-photo { position: absolute; inset: 1.5rem 0 0 4rem; overflow: hidden; clip-path: polygon(10% 0, 100% 7%, 91% 100%, 0 92%); background: var(--violet); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) contrast(1.05); }
.hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(37,35,92,.68), transparent 55%, rgba(255,92,108,.32)); }
.hero-stamp { position: absolute; top: 0; right: 0; width: 8rem; height: 8rem; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: var(--ink); transform: rotate(12deg); font: 700 .76rem/1.2 var(--font-mono); text-align: center; text-transform: uppercase; }
.hero-index { position: absolute; bottom: 1.8rem; left: 0; width: 7rem; height: 7rem; border: 1px solid var(--lime); background: var(--ink); color: var(--lime); display: grid; place-items: center; transform: rotate(-10deg); font: 500 3rem var(--font-display); }

.band { padding: 5rem 0; }
.band-ink { background: var(--ink); color: #fff; }
.band-ink .section-heading h2, .band-ink .section-kicker { color: var(--lime); }
.band-ink .section-heading a { color: #fff; }
.band-paper { background: var(--paper); }
.strategy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.strategy-card { min-height: 17rem; padding: 1.3rem; background: var(--surface); color: var(--text); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.strategy-card:nth-child(2) { background: var(--coral); color: #fff; transform: translateY(1.3rem); }
.strategy-card:nth-child(3) { background: var(--lime); color: var(--ink); }
.strategy-card .card-number { font: 500 3.4rem/.8 var(--font-display); opacity: .8; }
.strategy-card h3 { margin: 1.2rem 0 .5rem; max-width: 10ch; font-size: 1.4rem; line-height: 1.05; }
.strategy-card p { margin: 0; font-size: .9rem; opacity: .82; }
.card-arrow { align-self: end; font-size: 1.7rem; }

.news-grid, .archive-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.25rem; align-items: start; }
.story-card { min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); }
.story-image { display: block; position: relative; aspect-ratio: 1.45 / 1; overflow: hidden; background: var(--violet); }
.story-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.story-card:hover .story-image img { transform: scale(1.04); }
.story-body { padding: 1rem 1.1rem 1.2rem; }
.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; color: var(--muted); }
.category-label { color: var(--violet); }
.story-card h3 { margin: .7rem 0 .5rem; font-size: 1.28rem; line-height: 1.08; }
.story-card h3 a { text-decoration: none; }
.story-card h3 a:hover { color: var(--coral); }
.story-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.empty-state { margin: 0; padding: 1.2rem; background: var(--paper); color: var(--muted); font-size: .9rem; }

.week-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(16rem, .85fr); gap: 2.5rem; align-items: center; }
.week-visual { position: relative; min-height: 25rem; background: var(--violet); overflow: hidden; }
.week-visual img { width: 100%; height: 100%; min-height: 25rem; object-fit: cover; mix-blend-mode: multiply; opacity: .8; }
.week-visual::before { content: 'BRIDGE'; position: absolute; top: 1.2rem; left: 1.2rem; z-index: 1; color: var(--lime); font: 700 clamp(3rem, 8vw, 7rem)/.8 var(--font-display); letter-spacing: -.08em; }
.week-visual::after { content: '♠  ♥  ♦  ♣'; position: absolute; right: 1rem; bottom: 1rem; color: var(--lime); font: 2rem var(--font-display); transform: rotate(-8deg); }
.week-copy h2 { margin: 0 0 1rem; max-width: 9ch; color: var(--ink); font: 500 clamp(2.5rem, 5vw, 4.5rem)/.88 var(--font-display); }
.week-copy p { color: var(--muted); max-width: 31rem; }
.week-fact { display: inline-flex; gap: .75rem; align-items: baseline; margin: 1rem 0 1.2rem; padding: .6rem .8rem; background: var(--lime); color: var(--ink); }
.week-fact strong { font: 500 2rem var(--font-display); }

.beginner-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; align-items: start; }
.beginner-grid h2 { margin: 0; max-width: 8ch; color: var(--ink); font: 500 clamp(2.5rem, 5vw, 4.7rem)/.88 var(--font-display); }
.steps { display: grid; gap: .8rem; counter-reset: steps; }
.step { counter-increment: steps; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: start; padding: .8rem 0 1rem; border-bottom: 1px solid var(--line); }
.step::before { content: counter(steps, decimal-leading-zero); color: var(--coral); font: 500 1.7rem var(--font-display); }
.step h3 { margin: 0 0 .25rem; font-size: 1rem; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; }

.topic-row { display: flex; flex-wrap: wrap; gap: .7rem; }
.topic { display: inline-flex; padding: .75rem 1rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .85rem; }
.topic:hover { border-color: var(--coral); transform: rotate(-2deg); }

.newsletter { margin: 5rem 0; padding: clamp(1.6rem, 4vw, 3.5rem); background: var(--coral); color: #fff; position: relative; overflow: hidden; }
.newsletter::after { content: 'TACTIEK'; position: absolute; top: -.35em; right: -.05em; color: rgba(255,255,255,.13); font: 700 clamp(4rem, 12vw, 10rem)/1 var(--font-display); letter-spacing: -.08em; pointer-events: none; }
.newsletter-inner { position: relative; z-index: 1; max-width: 40rem; }
.newsletter h2 { margin: 0 0 .5rem; max-width: 10ch; font: 500 clamp(2.3rem, 5vw, 4rem)/.9 var(--font-display); }
.newsletter p { max-width: 31rem; }
.newsletter form { display: flex; max-width: 34rem; gap: .5rem; margin-top: 1.4rem; }
.newsletter input { min-width: 0; flex: 1; border: 0; padding: .9rem 1rem; color: var(--text); background: var(--surface); }
.newsletter button { border: 0; padding: .9rem 1rem; background: var(--lime); color: var(--ink); font-weight: 700; }

.page-intro { padding: 3.5rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.page-intro h1 { margin: .75rem 0 1rem; max-width: 12ch; color: var(--ink); font: 500 clamp(3.7rem, 8vw, 7rem)/.83 var(--font-display); letter-spacing: -.06em; }
.page-intro p { max-width: 39rem; color: var(--muted); font-size: 1.05rem; }
.page-section { padding: 3.5rem 0; }
.page-section + .page-section { border-top: 1px solid var(--line); }

.searchbar { display: flex; gap: .75rem; margin: 1.5rem 0 1rem; }
.searchbar input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: .9rem 1rem; }
.searchbar button { border: 0; padding: .9rem 1.15rem; background: var(--ink); color: var(--cream); font-weight: 700; }
.filter-list { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 2rem; }
.filter-list a { border: 1px solid var(--line); color: var(--muted); padding: .45rem .7rem; font-size: .78rem; text-decoration: none; }
.filter-list a:hover { border-color: var(--violet); color: var(--violet); }

.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.game-card { display: grid; grid-template-columns: 7rem 1fr; min-height: 10.5rem; background: var(--surface); border: 1px solid var(--line); }
.game-card:nth-child(3) { background: var(--lime); }
.game-card:nth-child(4) { background: var(--ink); color: #fff; }
.game-card .game-symbol { display: grid; place-items: center; font: 500 4.7rem var(--font-display); color: var(--coral); }
.game-card:nth-child(3) .game-symbol { color: var(--ink); }
.game-card:nth-child(4) .game-symbol { color: var(--lime); }
.game-card div:last-child { padding: 1.1rem 1rem; }
.game-card h2 { margin: 0 0 .35rem; font-size: 1.4rem; }
.game-card p { margin: 0 0 .7rem; color: var(--muted); font-size: .87rem; }
.game-card:nth-child(4) p { color: #d8d7e9; }
.text-link { color: var(--ink); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: .25rem; }

.strategy-list { display: grid; gap: 1rem; }
.principle { display: grid; grid-template-columns: 5rem minmax(0, 1fr) 10rem; gap: 1.2rem; align-items: center; padding: 1.2rem; background: var(--surface); border-left: 5px solid var(--violet); }
.principle:nth-child(2) { border-color: var(--coral); }
.principle:nth-child(3) { border-color: var(--lime); }
.principle-number { color: var(--violet); font: 500 3.2rem/.8 var(--font-display); }
.principle h2 { margin: 0 0 .25rem; font-size: 1.2rem; }
.principle p { margin: 0; color: var(--muted); font-size: .9rem; }
.principle-tag { justify-self: end; background: var(--paper); color: var(--ink); padding: .55rem; font: 700 .65rem var(--font-mono); text-transform: uppercase; }
.callout { margin-top: 2rem; padding: 1.3rem 1.5rem; background: var(--lime); color: var(--ink); }
.callout strong { display: block; margin-bottom: .25rem; font-size: 1.1rem; }
.callout p { margin: 0; max-width: 45rem; }

.article-shell { padding: 3.5rem 0 5rem; }
.article-main { min-width: 0; }
#article-content { min-width: 0; }
.article-header { padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.article-header h1 { margin: .8rem 0; max-width: 18ch; color: var(--ink); font: 500 clamp(3rem, 6vw, 6rem)/.88 var(--font-display); letter-spacing: -.05em; }
.article-deck { max-width: 45rem; color: var(--muted); font-size: 1.1rem; }
.article-cover { width: 100%; max-height: 32rem; object-fit: cover; margin: 2rem 0; }
.prose { max-width: 47rem; }
.prose p, .prose li { font-size: 1.06rem; line-height: 1.78; }
.prose p { margin: 0 0 1.35rem; }
.prose h2, .prose h3 { color: var(--ink); line-height: 1; margin: 2.3rem 0 .75rem; font-family: var(--font-display); font-weight: 500; }
.prose h2 { font-size: 2.5rem; }
.prose h3 { font-size: 1.8rem; }
.prose a { color: var(--violet); text-decoration-thickness: 2px; text-underline-offset: .2rem; }
.prose blockquote { margin: 2rem 0; padding: 1rem 1.2rem; border-left: 5px solid var(--coral); background: var(--paper); font: 500 1.5rem/1.2 var(--font-display); color: var(--ink); }
.byline { display: flex; align-items: center; gap: .8rem; margin: 1.3rem 0 2rem; padding: .8rem; border: 1px solid var(--line); background: var(--surface); }
.byline[hidden] { display: none; }
.byline img { width: 2.8rem; height: 2.8rem; border-radius: 50%; object-fit: cover; }
.byline strong { display: block; color: var(--ink); }
.byline p { margin: 0; color: var(--muted); font-size: .8rem; }

.bookmark { border: 1px solid currentColor; background: transparent; color: var(--ink); padding: .55rem .7rem; font-size: .75rem; font-weight: 700; }
.bookmark.is-saved { background: var(--lime); }
.not-found { padding: 5rem 0 7rem; }
.not-found h1 { margin: .8rem 0; color: var(--ink); font: 500 clamp(4rem, 10vw, 8rem)/.8 var(--font-display); }
.not-found p { max-width: 32rem; color: var(--muted); font-size: 1.05rem; }

.site-footer { margin-top: 4rem; padding: 3rem 0 1.3rem; background: var(--ink-deep); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer .brand { color: var(--lime); }
.site-footer p { max-width: 20rem; color: #cbc9dc; font-size: .88rem; }
.site-footer h2 { margin: 0 0 .7rem; color: var(--lime); font: 1.25rem var(--font-display); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer li, .site-footer a { color: #cbc9dc; font-size: .84rem; text-decoration: none; }
.site-footer a:hover { color: var(--coral); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.2); color: #aaa8bf; font: .64rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }

@media (max-width: 820px) {
  .rail-layout { grid-template-columns: minmax(0, 1fr); }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; padding: 1rem var(--gutter) 1.2rem; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); flex-direction: column; align-items: flex-start; }
  .primary-nav.is-open { display: flex; }
  .menu-toggle { display: grid; }
  .hero-grid, .week-grid, .beginner-grid { grid-template-columns: 1fr; }
  .hero { padding-bottom: 2rem; }
  .hero-art { min-height: 25rem; max-width: 35rem; width: 100%; margin-left: auto; }
  .strategy-grid { grid-template-columns: 1fr; }
  .strategy-card:nth-child(2) { transform: none; }
  .game-grid { grid-template-columns: 1fr; }
  .principle { grid-template-columns: 4rem minmax(0, 1fr); }
  .principle-tag { grid-column: 2; justify-self: start; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .site-header { gap: .75rem; }
  .brand-name { font-size: 1.25rem; }
  .brand-mark { width: 2.35rem; height: 2.35rem; }
  .header-tools { margin-left: auto; }
  .hero h1 { font-size: clamp(4rem, 19vw, 6.7rem); }
  .hero-art { min-height: 21rem; }
  .hero-photo { inset: 1rem 0 0 1.8rem; }
  .hero-stamp { width: 6.5rem; height: 6.5rem; font-size: .62rem; }
  .hero-index { width: 5.3rem; height: 5.3rem; font-size: 2.3rem; }
  .newsletter form { flex-direction: column; }
  .searchbar { flex-direction: column; }
  .game-card { grid-template-columns: 5.2rem 1fr; }
  .game-card .game-symbol { font-size: 3.4rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
