/* Design tokens from DESIGN-SYSTEM.md */
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #172c43;
  --ink-hover: #25445f;
  --ink-active: #102133;
  --paper: #f7f4ef;
  --surface: #ffffff;
  --muted: #5d6973;
  --border: #d8d8d1;
  --green: #27614f;
  --green-tint: #e9efec;
  --copper: #b16e4b;
  --board-navy: #344e65;
  --felt: #eae0cf;
  --ivory: #fffdf8;
  --checker-border: #b4a695;
  --disabled-bg: #e3e5e4;
  --disabled-fg: #657079;
  --error: #9b2d28;
  --error-bg: #fbedeb;
  --footer-text: #d6e0e6;

  --font: 'Inter', Arial, sans-serif;
  --w-regular: 400;
  --w-semibold: 650;

  --radius-card: 12px;
  --radius-control: 8px;
  --shadow-float: 0 16px 48px rgba(23, 44, 67, 0.18);
  --gutter: 20px;
  --header-h: 80px;
  --t-fast: 120ms ease-out;
  --t-menu: 180ms ease-out;

  --z-header: 30;
  --z-menu: 50;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 120px; }
}
@media (max-width: 340px) {
  :root { --gutter: 16px; }
}
@media (max-width: 899px) {
  :root { --header-h: 72px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: var(--w-regular);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.is-locked { overflow: hidden; }

img, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; }

a {
  color: var(--green);
  text-decoration: none;
  transition: color var(--t-fast), background-color var(--t-fast);
}
a:hover, a:focus, a:active, a:visited:hover { text-decoration: none; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-control);
  font-weight: var(--w-semibold);
}
.skip-link:focus, .skip-link:focus-visible { top: 12px; color: #fff; }

.container {
  width: 100%;
  max-width: calc(1200px + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-main { flex: 1 0 auto; padding-top: 32px; padding-bottom: 48px; }
.site-main:focus { outline: none; }

[hidden] { display: none !important; }

/* Motion preferences: device setting, overridable from Settings. */
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion='allow']) *, html:not([data-motion='allow']) *::before, html:not([data-motion='allow']) *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
html[data-motion='reduce'] *, html[data-motion='reduce'] *::before, html[data-motion='reduce'] *::after {
  transition-duration: 0.01ms !important;
  animation-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* Icons: supplied SVGs used as masks so they follow the text colour. */
.icon {
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon--play { --icon: url('/assets/icons/play.svg'); }
.icon--users { --icon: url('/assets/icons/users.svg'); }
.icon--link { --icon: url('/assets/icons/link.svg'); }
.icon--help { --icon: url('/assets/icons/help.svg'); }
.icon--download { --icon: url('/assets/icons/download.svg'); }
.icon--history { --icon: url('/assets/icons/history.svg'); }
.icon--menu { --icon: url('/assets/icons/menu.svg'); }
.icon--close { --icon: url('/assets/icons/close.svg'); }
.icon--chevron-right { --icon: url('/assets/icons/chevron-right.svg'); }
.icon--settings { --icon: url('/assets/icons/settings.svg'); }
.icon--copy { --icon: url('/assets/icons/copy.svg'); }
.icon--undo { --icon: url('/assets/icons/undo.svg'); }
.icon--check { --icon: url('/assets/icons/check.svg'); }
.icon--arrow-left { --icon: url('/assets/icons/arrow-left.svg'); }
.icon--shield { --icon: url('/assets/icons/shield.svg'); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 20px;
  line-height: 30px;
  font-weight: var(--w-semibold);
  margin-right: auto;
  border-radius: 10px;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 32px; height: 32px; }

/* Desktop navigation: a segmented rail with icon + label; the current page is a filled pill. */
.nav { display: none; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  font-weight: var(--w-semibold);
  transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.nav__link .icon { width: 18px; height: 18px; color: var(--green); transition: color var(--t-fast); }
.nav__link:hover { background: var(--green-tint); color: var(--ink); }
.nav__link[aria-current='page'] {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 2px 8px rgba(23, 44, 67, 0.18);
}
.nav__link[aria-current='page'] .icon { color: #e4b89f; }
.nav__link:focus-visible { border-radius: 999px; }

.btn.site-header__cta { display: none; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.menu-toggle:hover { background: var(--green-tint); border-color: var(--border); }
.menu-toggle .icon { width: 24px; height: 24px; }

@media (min-width: 900px) {
  .nav { display: block; }
  .btn.site-header__cta { display: inline-flex; }
  .menu-toggle { display: none; }
  .site-header__inner { gap: 20px; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .nav__link { padding: 0 12px; }
  .nav__link .icon { display: none; }
  .site-header__cta .icon { display: none; }
}

/* Mobile menu: a full-viewport dialog with its own top bar. */
.mmenu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--paper);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--t-menu), transform var(--t-menu);
}
.mmenu.is-open { opacity: 1; transform: none; }
.mmenu__bar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  min-height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mmenu__body { padding-top: 16px; padding-bottom: 32px; }
.mmenu__list { list-style: none; }
.mmenu__link {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  border-radius: 0;
  transition: background-color var(--t-fast);
}
.mmenu__link:hover { background: var(--green-tint); color: var(--ink); }
.mmenu__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--green);
}
.mmenu__text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mmenu__label { font-size: 20px; line-height: 28px; font-weight: var(--w-semibold); }
.mmenu__note { font-size: 14px; line-height: 21px; color: var(--muted); }
.mmenu__chev { color: var(--muted); width: 20px; height: 20px; }
.mmenu__link[aria-current='page'] .mmenu__icon { background: var(--ink); border-color: var(--ink); color: #fff; }
.mmenu__link[aria-current='page'] .mmenu__label::after {
  content: 'Current';
  display: inline-block;
  margin-left: 10px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--green-tint);
  color: var(--green);
  font-size: 12px;
  line-height: 22px;
  vertical-align: 3px;
}
.mmenu__minor {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 20px 0 24px;
}
.mmenu__minor a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: var(--w-semibold);
}
.mmenu__minor a:hover { background: var(--green-tint); }
.mmenu__minor a[aria-current='page'] { background: var(--ink); color: #fff; border-color: var(--ink); }
.mmenu__hint { margin-top: 20px; font-size: 14px; color: var(--muted); }

@media (min-width: 900px) {
  .mmenu { display: none !important; }
}

/* Footer */
.site-footer {
  flex: none;
  margin-top: 48px;
  padding: 36px 0 40px;
  background: var(--ink);
  color: var(--footer-text);
}
.brand--footer { color: #fff; }
.brand--footer:hover { color: #fff; }
.site-footer__tag { margin-top: 20px; font-size: 16px; line-height: 24px; }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin-top: 16px;
  font-size: 15px;
  line-height: 22px;
}
.site-footer__links li { display: inline-flex; align-items: center; }
.site-footer__links li:not(:last-child)::after { content: '·'; margin: 0 6px; color: var(--footer-text); }
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--footer-text);
  font-weight: var(--w-regular);
}
.site-footer__links a:hover, .site-footer__contact a:hover { color: #fff; }
.site-footer__contact { margin-top: 8px; font-size: 15px; }
.site-footer__contact a { color: #fff; font-weight: var(--w-semibold); display: inline-flex; min-height: 44px; align-items: center; }
.site-footer__note { margin-top: 12px; font-size: 13px; line-height: 20px; }
.site-footer :focus-visible { outline-color: #fff; box-shadow: 0 0 0 3px var(--ink); }

/* Typography */
.eyebrow {
  color: var(--green);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: var(--w-semibold);
  margin-bottom: 12px;
}
.page-title {
  font-size: 38px;
  line-height: 1.5;
  font-weight: var(--w-semibold);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.lead {
  margin-top: 14px;
  max-width: 880px;
  color: var(--muted);
  font-size: 17px;
  line-height: 25.5px;
}
.section-title {
  font-size: 25px;
  line-height: 37.5px;
  font-weight: var(--w-semibold);
}
@media (min-width: 768px) {
  .page-title { font-size: 56px; line-height: 84px; }
  .lead { font-size: 20px; line-height: 30px; }
  .section-title { font-size: 30px; line-height: 45px; }
}

/* Breadcrumbs */
.breadcrumbs { margin-bottom: 20px; font-size: 13px; line-height: 20px; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; }
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before { content: '/'; margin: 0 6px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); display: inline-flex; min-height: 24px; align-items: center; }
.breadcrumbs a:hover { color: var(--green); }
.breadcrumbs [aria-current='page'] { color: var(--muted); }

/* Text links: distinguished by weight and colour, never underlined. */
.text-link { color: var(--green); font-weight: var(--w-semibold); border-radius: 3px; }
.text-link:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  font-size: 15px;
  line-height: 22.5px;
  font-weight: var(--w-semibold);
  text-align: left;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn .icon { width: 20px; height: 20px; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--ink-hover); color: #fff; }
.btn--primary:active { background: var(--ink-active); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn--secondary:hover { background: var(--green-tint); color: var(--ink); }
.btn--danger { background: var(--error); color: #fff; }
.btn--danger:hover { background: #7f2420; color: #fff; }
.btn:disabled, .btn[aria-disabled='true'] {
  background: var(--disabled-bg);
  color: var(--disabled-fg);
  border-color: var(--disabled-bg);
}
.btn--block { width: 100%; }
.btn--wide { width: 100%; max-width: 300px; margin-top: 32px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.btn-row--stack { flex-direction: column; align-items: stretch; max-width: 300px; }

.linkbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--green);
  font-size: 15px;
  font-weight: var(--w-semibold);
}
.linkbtn:hover { color: var(--ink); }
.linkbtn .icon { width: 18px; height: 18px; }

/* Cards and panels */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
}
.card--roomy { padding: 24px; }
.card--tint { background: var(--green-tint); }
.card__title { font-size: 21px; line-height: 31.5px; font-weight: var(--w-semibold); }
.card__title--lg { font-size: 24px; line-height: 36px; }
.card__title--icon { display: flex; align-items: center; gap: 12px; }
.card__title--icon .icon { color: var(--green); }
.card__text { margin-top: 12px; color: var(--muted); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
}
.panel + .panel { margin-top: 18px; }
.panel--tint { background: var(--green-tint); }
.panel--error { background: var(--error-bg); border-color: #e7c3bf; }
.panel--error .panel__title { color: var(--error); }
.panel__title { font-size: 21px; line-height: 31.5px; font-weight: var(--w-semibold); }
.panel__title--sm { display: block; font-size: 18px; line-height: 27px; }
.panel__subtitle { margin-top: 24px; font-size: 18px; line-height: 27px; font-weight: var(--w-semibold); }
.panel__text { margin-top: 10px; color: var(--muted); overflow-wrap: anywhere; }
.panel__status { margin-top: 12px; color: var(--green); font-weight: var(--w-semibold); min-height: 0; }
.panel__status:empty { display: none; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field__label { font-size: 13px; line-height: 19.5px; font-weight: var(--w-semibold); color: var(--ink); padding: 0; }
.field__static {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--paper);
}
.field__hint { font-size: 14px; line-height: 21px; color: var(--muted); }
.field__error, .form__error { font-size: 14px; line-height: 21px; color: var(--error); font-weight: var(--w-semibold); }
.form__note { font-size: 14px; line-height: 21px; color: var(--muted); }
.form__note--green { color: var(--green); }

.input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
}
.input:hover { border-color: #b9bbb3; }
.input[aria-invalid='true'] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.input--readonly { background: var(--paper); margin-top: 10px; font-size: 15px; }
.input::placeholder { color: #6b7680; opacity: 1; }
.select { position: relative; display: block; }
.input--select { appearance: none; padding-right: 44px; cursor: pointer; }
.select::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  background-color: var(--ink);
  -webkit-mask: url('/assets/icons/chevron-down.svg') center / contain no-repeat;
  mask: url('/assets/icons/chevron-down.svg') center / contain no-repeat;
  pointer-events: none;
}

/* Segmented radio choices */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg__item { position: relative; display: flex; }
.seg__input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg__label {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.seg__input:hover + .seg__label { background: var(--green-tint); color: var(--ink); }
.seg__input:checked + .seg__label { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: var(--w-semibold); }
.seg__input:checked + .seg__label::before {
  content: '';
  flex: none;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  background-color: currentColor;
  -webkit-mask: url('/assets/icons/check.svg') center / contain no-repeat;
  mask: url('/assets/icons/check.svg') center / contain no-repeat;
}
.seg__input:focus-visible + .seg__label { outline: 3px solid var(--green); outline-offset: 3px; box-shadow: 0 0 0 3px #fff; }
fieldset .seg:has(> .seg__item:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 76px)); }

/* Accordion (FAQ) */
.accordion { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.accordion__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.accordion__heading { font-size: 16px; line-height: 24px; font-weight: var(--w-semibold); }
.accordion__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 62px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--radius-card);
  background: none;
  color: var(--ink);
  text-align: left;
  font-weight: var(--w-semibold);
}
.accordion__btn:hover { color: var(--green); }
.accordion__sign { position: relative; flex: none; width: 14px; height: 14px; }
.accordion__sign::before, .accordion__sign::after {
  content: '';
  position: absolute;
  left: 0; top: 6px;
  width: 14px; height: 2px;
  background: var(--green);
  transition: transform var(--t-fast);
}
.accordion__sign::after { transform: rotate(90deg); }
.accordion__btn[aria-expanded='true'] .accordion__sign::after { transform: rotate(0deg); }
.accordion__panel { padding: 0 20px 20px; color: var(--muted); }

/* Tabs (History filters) */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.tabs__tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 96px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
}
.tabs__tab:hover { background: var(--green-tint); color: var(--ink); }
.tabs__tab[aria-selected='true'] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: var(--w-semibold); }

/* Prose sections */
.prose { max-width: 880px; margin: 48px auto 0; }
.prose--wide { max-width: none; }
.prose__section + .prose__section { margin-top: 36px; }
.prose__section > p, .prose__section > ul.checklist { margin-top: 14px; color: var(--muted); font-size: 16px; line-height: 24px; }
.prose__section > p + p { margin-top: 12px; }
@media (min-width: 768px) {
  .prose__section > p, .prose__section > ul.checklist { font-size: 18px; line-height: 27px; }
}
.checklist { list-style: none; display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before {
  content: '';
  position: absolute;
  left: 0; top: 4px;
  width: 18px; height: 18px;
  background-color: var(--green);
  -webkit-mask: url('/assets/icons/check.svg') center / contain no-repeat;
  mask: url('/assets/icons/check.svg') center / contain no-repeat;
}

.figure { margin-top: 24px; }
.figure img { width: 100%; height: auto; aspect-ratio: 832 / 528; }
.figure__caption { margin-top: 12px; font-size: 14px; line-height: 21px; color: var(--muted); }
.figure--board { max-width: 832px; margin-top: 36px; }

.example {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 20px;
  background: var(--green-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.example__dice { display: flex; gap: 8px; flex: none; }
.example__dice img { width: 36px; height: 36px; }
.example__title { font-size: 18px; line-height: 27px; font-weight: var(--w-semibold); }
.example__text { margin-top: 6px; color: var(--muted); }

.ways { list-style: none; display: grid; gap: 16px; margin-top: 20px; }
.ways__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: var(--muted);
}
.ways__icon { width: 28px; height: 28px; color: var(--copper); }
.ways__title { color: var(--ink); font-size: 21px; line-height: 31.5px; font-weight: var(--w-semibold); }
.ways__item .text-link { margin-top: auto; display: inline-flex; min-height: 44px; align-items: center; }
@media (min-width: 900px) {
  .ways { grid-template-columns: repeat(3, 1fr); }
}

/* Lower call-to-action banner: whole 3:1 image; text over the left on desktop, below on mobile. */
.cta-banner { position: relative; margin-top: 48px; }
.cta-banner__media img { width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: contain; }
.cta-banner__body { padding-top: 24px; }
.cta-banner__title { font-size: 25px; line-height: 37.5px; font-weight: var(--w-semibold); }
.cta-banner__text { margin-top: 14px; color: var(--muted); font-size: 16px; line-height: 24px; }
.cta-banner__btn { margin-top: 24px; width: 100%; }
@media (min-width: 900px) {
  .cta-banner__body {
    position: absolute;
    inset: 0 auto 0 0;
    width: 48%;
    padding: 6% 0 0 36px;
  }
  .cta-banner__title { font-size: 30px; line-height: 45px; }
  .cta-banner__text { font-size: 18px; line-height: 27px; margin-top: 4%; }
  .cta-banner__btn { width: auto; min-width: 243px; margin-top: 6%; }
}
@media (min-width: 1200px) {
  .cta-banner__body { padding-top: 48px; }
  .cta-banner__text { margin-top: 56px; }
  .cta-banner__btn { margin-top: 56px; }
}

.notice--error { margin-top: 16px; padding: 16px 20px; border-radius: var(--radius-card); background: var(--error-bg); color: var(--error); }

/* Generated by scripts/gen-board-css.mjs. Do not edit by hand. */
.board {
  position: relative;
  width: 100%;
  max-width: 832px;
  aspect-ratio: 832 / 528;
  container-type: inline-size;
  border-radius: 2.2%/3.4%;
}
.board__base { position: absolute; inset: 0; width: 100%; height: 100%; }
.board__layer { position: absolute; inset: 0; }

.pt, .bar-zone, .off-zone {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 6px;
  cursor: default;
}
.pt { width: 6.25%; height: 43.9394%; }
.pt--top, .bar-zone--navy, .off-zone--navy { top: 5.6818%; }
.pt--bottom, .bar-zone--ivory, .off-zone--ivory { top: 50.3788%; }
.bar-zone { left: 46.875%; width: 4.5673%; height: 43.9394%; }
.off-zone { left: 93.9904%; width: 3.3654%; height: 43.9394%; }

.ck {
  position: absolute;
  left: 5.7692%;
  width: 88.4615%;
  aspect-ratio: 1;
  background: center / 100% 100% no-repeat;
  pointer-events: none;
}
.ck--ivory { background-image: url('/assets/images/checker-ivory.svg'); }
.ck--navy { background-image: url('/assets/images/checker-navy.svg'); }
.bar-zone .ck { left: 5.2632%; width: 89.4737%; }
.ck-count {
  position: absolute;
  left: 5.7692%;
  width: 88.4615%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(10px, 1.9cqw, 16px);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.bar-zone .ck-count { left: 5.2632%; width: 89.4737%; }
.ck-count--ivory { color: var(--ink); }
.ck-count--navy { color: #fff; }
.slab {
  position: absolute;
  left: 7.1429%;
  width: 85.7143%;
  height: 4.7414%;
  border-radius: 3px;
  pointer-events: none;
}
.slab--ivory { background: var(--ivory); border: 1px solid var(--checker-border); }
.slab--navy { background: var(--ink); border: 1px solid #5d7286; }

/* Interaction states (live board only) */
.board--live .pt, .board--live .bar-zone, .board--live .off-zone { cursor: pointer; }
.board--live .is-source::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 22%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px #fff;
}
.board--live .pt--top.is-source::after, .board--live .bar-zone--navy.is-source::after { bottom: 2%; }
.board--live .pt--bottom.is-source::after, .board--live .bar-zone--ivory.is-source::after { top: 2%; }
.board--live .off-zone.is-source::after { display: none; }
.board--live .is-selected { outline: 3px solid var(--green); outline-offset: -3px; background: rgba(39, 97, 79, 0.14); }
.board--live .is-dest { outline: 3px dashed var(--green); outline-offset: -3px; background: rgba(233, 239, 236, 0.55); }
.board--live .off-zone.is-dest { outline-color: #8fd1b5; background: rgba(143, 209, 181, 0.25); }
.board--live .pt:focus-visible, .board--live .bar-zone:focus-visible, .board--live .off-zone:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -3px;
  box-shadow: inset 0 0 0 6px var(--green);
}
.board.is-hide-hints .is-source::after { display: none; }
.board.is-hide-hints .is-dest:not(:focus-visible) { outline-color: transparent; background: transparent; }

.pt-1 { left: 85.9976%; }
.pt-2 { left: 79.1466%; }
.pt-3 { left: 72.2957%; }
.pt-4 { left: 65.4447%; }
.pt-5 { left: 58.5938%; }
.pt-6 { left: 51.7428%; }
.pt-7 { left: 40.3245%; }
.pt-8 { left: 33.4736%; }
.pt-9 { left: 26.6226%; }
.pt-10 { left: 19.7716%; }
.pt-11 { left: 12.9207%; }
.pt-12 { left: 6.0697%; }
.pt-13 { left: 6.0697%; }
.pt-14 { left: 12.9207%; }
.pt-15 { left: 19.7716%; }
.pt-16 { left: 26.6226%; }
.pt-17 { left: 33.4736%; }
.pt-18 { left: 40.3245%; }
.pt-19 { left: 51.7428%; }
.pt-20 { left: 58.5938%; }
.pt-21 { left: 65.4447%; }
.pt-22 { left: 72.2957%; }
.pt-23 { left: 79.1466%; }
.pt-24 { left: 85.9976%; }
.pt--top .ck-0 { top: 5.1724%; }
.pt--bottom .ck-0 { top: 75%; }
.pt--top.pt--dense .ck-0 { top: 5.1724%; }
.pt--bottom.pt--dense .ck-0 { top: 75%; }
.pt--top .ck-1 { top: 21.1207%; }
.pt--bottom .ck-1 { top: 59.0517%; }
.pt--top.pt--dense .ck-1 { top: 18.9655%; }
.pt--bottom.pt--dense .ck-1 { top: 61.2069%; }
.pt--top .ck-2 { top: 37.069%; }
.pt--bottom .ck-2 { top: 43.1034%; }
.pt--top.pt--dense .ck-2 { top: 32.7586%; }
.pt--bottom.pt--dense .ck-2 { top: 47.4138%; }
.pt--top .ck-3 { top: 53.0172%; }
.pt--bottom .ck-3 { top: 27.1552%; }
.pt--top.pt--dense .ck-3 { top: 46.5517%; }
.pt--bottom.pt--dense .ck-3 { top: 33.6207%; }
.pt--top .ck-4 { top: 68.9655%; }
.pt--bottom .ck-4 { top: 11.2069%; }
.pt--top.pt--dense .ck-4 { top: 60.3448%; }
.pt--bottom.pt--dense .ck-4 { top: 19.8276%; }
.pt--top.pt--dense .ck-5 { top: 74.1379%; }
.pt--bottom.pt--dense .ck-5 { top: 6.0345%; }
.pt--top.pt--dense .ck-count { top: 74.1379%; }
.pt--bottom.pt--dense .ck-count { top: 6.0345%; }
.bar-zone--navy .ck-0 { top: 81.8966%; }
.bar-zone--ivory .ck-0 { top: 3.4483%; }
.bar-zone--navy .ck-1 { top: 66.3793%; }
.bar-zone--ivory .ck-1 { top: 18.9655%; }
.bar-zone--navy .ck-2 { top: 50.8621%; }
.bar-zone--ivory .ck-2 { top: 34.4828%; }
.bar-zone--navy .ck-count { top: 50.8621%; }
.bar-zone--ivory .ck-count { top: 34.4828%; }
.off-zone--navy .slab-0 { top: 2.5862%; }
.off-zone--ivory .slab-0 { top: 92.6724%; }
.off-zone--navy .slab-1 { top: 8.6207%; }
.off-zone--ivory .slab-1 { top: 86.6379%; }
.off-zone--navy .slab-2 { top: 14.6552%; }
.off-zone--ivory .slab-2 { top: 80.6034%; }
.off-zone--navy .slab-3 { top: 20.6897%; }
.off-zone--ivory .slab-3 { top: 74.569%; }
.off-zone--navy .slab-4 { top: 26.7241%; }
.off-zone--ivory .slab-4 { top: 68.5345%; }
.off-zone--navy .slab-5 { top: 32.7586%; }
.off-zone--ivory .slab-5 { top: 62.5%; }
.off-zone--navy .slab-6 { top: 38.7931%; }
.off-zone--ivory .slab-6 { top: 56.4655%; }
.off-zone--navy .slab-7 { top: 44.8276%; }
.off-zone--ivory .slab-7 { top: 50.431%; }
.off-zone--navy .slab-8 { top: 50.8621%; }
.off-zone--ivory .slab-8 { top: 44.3966%; }
.off-zone--navy .slab-9 { top: 56.8966%; }
.off-zone--ivory .slab-9 { top: 38.3621%; }
.off-zone--navy .slab-10 { top: 62.931%; }
.off-zone--ivory .slab-10 { top: 32.3276%; }
.off-zone--navy .slab-11 { top: 68.9655%; }
.off-zone--ivory .slab-11 { top: 26.2931%; }
.off-zone--navy .slab-12 { top: 75%; }
.off-zone--ivory .slab-12 { top: 20.2586%; }
.off-zone--navy .slab-13 { top: 81.0345%; }
.off-zone--ivory .slab-13 { top: 14.2241%; }
.off-zone--navy .slab-14 { top: 87.069%; }
.off-zone--ivory .slab-14 { top: 8.1897%; }

/* Mode links: route chips, not tabs. */
.modes { margin-top: 32px; }
.modes__list { display: grid; grid-template-columns: repeat(3, minmax(110px, max-content)); gap: 8px; list-style: none; }
.modes__link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
}
.modes__link:hover { background: var(--green-tint); color: var(--ink); }
.modes__link[aria-current='page'] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: var(--w-semibold); }
@media (max-width: 399px) {
  .modes__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modes__link { padding: 0 10px; font-size: 14px; }
}
@media (max-width: 359px) {
  .modes__link { white-space: normal; min-height: 48px; }
}

/* Game layout: 832px board column + 336px side column on wide screens, stacked below 1200px. */
.game { display: grid; gap: 24px; margin-top: 24px; }
.game__main { min-width: 0; max-width: 832px; display: flex; flex-direction: column; gap: 16px; }
.game__side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
@media (min-width: 768px) and (max-width: 1199px) {
  .game__side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (min-width: 1200px) {
  .game { grid-template-columns: minmax(0, 832px) 336px; gap: 32px; align-items: start; }
  .game__side { position: sticky; top: calc(var(--header-h) + 16px); }
}

/* Player strips */
.strip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 20px 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.strip.is-active { border-color: var(--green); box-shadow: inset 4px 0 0 var(--green); }
.strip__checker { flex: none; width: 28px; height: 28px; background: center / contain no-repeat; }
.strip__checker--ivory { background-image: url('/assets/images/checker-ivory.svg'); }
.strip__checker--navy { background-image: url('/assets/images/checker-navy.svg'); }
.strip__who { flex: 1; min-width: 0; }
.strip__name { font-size: 16px; line-height: 22px; font-weight: var(--w-semibold); overflow-wrap: anywhere; }
.strip__meta { font-size: 12px; line-height: 18px; color: var(--muted); }
.strip__score { flex: none; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.strip__score [data-score] { color: var(--ink); font-weight: var(--w-semibold); }

/* Turn notice, decisions and actions */
.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 16px 16px;
  background: var(--green-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.notice__body { flex: 1 1 260px; min-width: 0; }
.notice__title { width: 100%; font-size: 16px; line-height: 24px; font-weight: var(--w-semibold); }
.notice__body .notice__title { width: auto; }
.notice__text { width: 100%; font-size: 14px; line-height: 21px; color: var(--muted); }
.notice--warn { background: #fff6e6; border-color: #ecd3a6; }
.notice--error-state { background: var(--error-bg); border-color: #e7c3bf; }
.dice { display: flex; gap: 8px; align-items: center; }
.die { width: 36px; height: 36px; transition: opacity var(--t-fast); }
.die.is-used { opacity: 0.35; }
.cube {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.cube__face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: url('/assets/images/cube-shell.svg') center / contain no-repeat;
  color: var(--ink);
  font-weight: var(--w-semibold);
  font-variant-numeric: tabular-nums;
}

.decision {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.decision--tint { background: var(--green-tint); }
.decision--error { background: var(--error-bg); border-color: #e7c3bf; }
.decision__title { font-size: 18px; line-height: 27px; font-weight: var(--w-semibold); }
.decision__text { margin-top: 8px; color: var(--muted); }
.decision__text + .decision__text { margin-top: 4px; }
.decision .field { margin-top: 16px; max-width: 360px; }
.decision .btn-row { margin-top: 16px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions:empty { display: none; }
.actions .btn { min-width: 100px; }
.actions .btn--grow { flex: 1 1 300px; }
.actions .btn--fixed { flex: 0 1 300px; }
@media (max-width: 599px) {
  .actions .btn--fixed { flex: 1 1 100%; }
}

.game__links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-right: 26px; }
@media (max-width: 599px) { .game__links { padding-right: 0; } }

.amc__grid { display: grid; gap: 16px; margin: 20px 0; }
@media (min-width: 700px) { .amc__grid { grid-template-columns: repeat(3, 1fr); } }
.board-text { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 16px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.settings__grid { display: grid; gap: 16px; margin-top: 20px; max-width: 600px; }
.settings .btn-row--stack { margin-top: 28px; }
.settings > .btn { margin-top: 12px; }
.confirm { margin-top: 12px; padding: 16px; border-radius: var(--radius-card); background: var(--error-bg); border: 1px solid #e7c3bf; }
.confirm__title { font-weight: var(--w-semibold); color: var(--error); }

/* Match settings card */
.match-settings .btn--block { margin-top: 4px; }
.guidance .card__text a { display: inline-flex; min-height: 44px; align-items: center; }

/* Room card */
.room-card__line { color: var(--muted); }
.room-card__line:first-of-type { margin-top: 16px; }
.room-card__line--gap { margin-top: 16px; }
.room-card .btn { margin-top: 20px; }
.room-card [data-room-conn].is-ok::before, .room-card [data-room-conn].is-bad::before {
  content: '';
  display: inline-block;
  width: 9px; height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--green);
  vertical-align: 1px;
}
.room-card [data-room-conn].is-bad::before { background: var(--error); }

/* Move record (replay) */
.move-record__list { list-style: none; margin: 16px 0 20px; display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; }
.move-record__item { padding: 6px 8px; border-radius: 6px; color: var(--muted); }
.move-record__item.is-current { background: var(--green-tint); color: var(--ink); font-weight: var(--w-semibold); }
.move-record .field { margin-top: 16px; }

/* Room setup */
.room-setup { display: grid; gap: 24px; margin-top: 32px; align-items: start; }
@media (min-width: 900px) { .room-setup { grid-template-columns: 1fr 1fr; gap: 48px; } }
.room-ready { margin-top: 32px; }
.room-ready .section-title { margin-bottom: 20px; }
.room-ready .btn-row--stack { margin-top: 18px; }
.room-join { margin-top: 32px; max-width: 576px; }
[data-room-error] { margin-top: 32px; }

/* Download card (printable rules) */
.download-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
  padding: 24px;
  background: var(--green-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.download-card__meta { margin-top: 10px; color: var(--muted); }
.download-card__btn { align-self: stretch; }
@media (min-width: 600px) {
  .download-card__btn { align-self: flex-start; min-width: 300px; }
}

/* History list: semantic list cards at every width. */
.history { margin-top: 24px; }
.history__list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.history__item {
  display: grid;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.history__when { font-size: 16px; line-height: 24px; font-weight: var(--w-semibold); }
.history__meta { color: var(--muted); }
.history__result { color: var(--green); font-weight: var(--w-semibold); }
.history__result--loss { color: var(--muted); }
.history__item .text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.history__item .text-link .icon { width: 16px; height: 16px; }
@media (min-width: 768px) {
  .history__item { grid-template-columns: 1.5fr 1fr auto; align-items: center; }
}

/* Utility pages */
.page--error .site-main, .page--article .site-main { padding-bottom: 32px; }
[data-review-missing] { margin-top: 32px; }
