:root {
  color-scheme: dark;
  --page: #101923;
  --surface: #172532;
  --ink: #fff4dc;
  --soft: #bfccd4;
  --blue: #b4dbf2;
  --rose: #ff7c6e;
  --line: #344655;
  font-family: "Segoe UI", system-ui, sans-serif;
  text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 5px; }
p { line-height: 1.65; }
h1, h2, h3, p, figure { margin: 0; }
[id] { scroll-margin-top: 1rem; }
.shell { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.skip-link { position: absolute; z-index: 2; inset: .5rem auto auto .5rem; padding: .75rem; background: var(--blue); color: var(--page); transform: translateY(-200%); }
.skip-link:focus { transform: none; }

.header, .footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.header { min-height: 5.25rem; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 780; letter-spacing: .035em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--blue); border-radius: .48rem; color: var(--rose); font-size: 1.25rem; line-height: 1; }
nav { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; color: var(--soft); }
nav a { text-decoration: none; font-weight: 600; }
nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .3rem; }
nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: .3rem; }

.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.75rem, 5vw, 4.75rem); align-items: center; padding-block: clamp(3rem, 8vw, 7rem); }
.eyebrow { font-size: .875rem; font-weight: 700; letter-spacing: .095em; text-transform: uppercase; color: var(--blue); }
.landing-badge { width: min(100%, 24rem); height: auto; margin: 0 0 1.35rem -.3rem; }
h1 { font-weight: 820; font-size: clamp(2.25rem, 5vw, 5.05rem); line-height: .99; letter-spacing: -.07em; }
h1 span { color: var(--blue); }
.lead { margin-top: 1.55rem; max-width: 31rem; color: var(--soft); font-size: 1.15rem; }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.5rem; }
.button { display: inline-block; margin-top: 1.5rem; padding: .79rem 1.05rem; border: 1px solid transparent; border-radius: .42rem; background: var(--ink); color: var(--page); font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
.actions .button { margin-top: 0; }
.button:hover { background: var(--blue); }
.button-secondary { border-color: #6386a0; background: transparent; color: var(--blue); }
.button-secondary:hover { background: #243a4b; color: var(--ink); }
.text-link { color: var(--blue); font-weight: 650; text-underline-offset: .22em; }
.text-link:hover { color: var(--ink); }
.hero-preview { overflow: hidden; border: 1px solid var(--line); border-radius: .85rem; background: var(--surface); }
.featured-logo { display: grid; min-height: clamp(11rem, 21vw, 18rem); padding: 2rem; place-items: center; background: radial-gradient(ellipse at 58% 25%, #493f30, #252a2c 70%, #161f26); }
.featured-logo:focus-visible { outline-offset: -4px; }
.featured-logo img { width: 100%; height: auto; }
figcaption { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .7rem; padding: 1.05rem 1.25rem; }
figcaption a { display: block; margin-top: .2rem; }
.status { display: inline-flex; padding: .32rem .64rem; border: 1px solid currentColor; border-radius: .35rem; font-size: .875rem; font-weight: 660; }

.section { border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 4.5rem); }
h2 { margin-bottom: 1.55rem; font-weight: 780; font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.045em; line-height: 1.1; }
h3 { font-size: 1.28rem; line-height: 1.25; letter-spacing: -.025em; }
.follow p { margin-top: .6rem; color: var(--soft); }
.directory { min-height: 65vh; padding-block: clamp(2.25rem, 6vw, 5rem); }
.directory h1 { margin-bottom: 1.55rem; font-size: clamp(2.4rem, 5.5vw, 4.25rem); }
.register-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; width: fit-content; max-width: 100%; padding: .3rem; border: 1px solid var(--line); border-radius: .65rem; background: #0e1720; }
.segmented[hidden] { display: none; }
.segmented button { display: flex; align-items: center; justify-content: center; gap: .55rem; min-height: 2.5rem; padding: .4rem .7rem; border: 1px solid transparent; border-radius: .4rem; background: transparent; color: var(--soft); font: inherit; font-weight: 650; cursor: pointer; }
.segmented button:hover { background: var(--surface); color: var(--ink); }
.segmented button[aria-pressed="true"] { border-color: #6b92ac; background: #243a4b; color: var(--ink); }
.layout-options button { font-size: .875rem; }
.status-count { display: grid; min-width: 1.4rem; height: 1.4rem; padding-inline: .3rem; place-items: center; border-radius: 1rem; background: var(--page); color: var(--blue); font-size: .875rem; font-variant-numeric: tabular-nums; }
.register-panel { margin-top: 1.55rem; }
.register-panel h2 { margin-bottom: 0; font-size: clamp(1.45rem, 3.4vw, 2rem); }
.game-list { display: grid; gap: .8rem; margin: .9rem 0 0; padding: 0; list-style: none; }
.game-list:empty { display: none; }
.game-list:has(> li) + .register-empty { display: none; }
.register-empty { margin-top: .9rem; padding: 1rem 1.2rem; border: 1px dashed var(--line); border-radius: .65rem; color: var(--soft); }
.game-entry { display: grid; grid-template: "number logo info badge links" auto / auto minmax(7.25rem, 10rem) minmax(0, 1fr) auto auto; gap: .7rem 1rem; align-items: center; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: .58rem; background: var(--surface); }
.game-number { grid-area: number; display: inline-grid; width: fit-content; min-width: 2rem; min-height: 2rem; padding: .2rem .4rem; place-items: center; border: 1px solid #527084; border-radius: .42rem; background: var(--page); color: var(--blue); font-size: .875rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.game-logo { grid-area: logo; display: grid; min-width: 0; min-height: 3.6rem; padding: .7rem; place-items: center; border-radius: .35rem; background: #252a2c; }
.game-logo img { width: 100%; max-height: 5.75rem; object-fit: contain; }
.game-info { grid-area: info; overflow-wrap: anywhere; }
.game-info h3 a { text-decoration: none; }
.game-info h3 a:hover { text-decoration: underline; text-underline-offset: .2em; }
.game-info p { margin-top: .15rem; color: var(--soft); font-size: .925rem; line-height: 1.45; }
.game-entry .status { grid-area: badge; justify-self: start; }
.game-actions { grid-area: links; display: flex; flex-wrap: wrap; gap: .65rem .9rem; font-size: .925rem; }
.status-approved, .result-pass { align-items: center; gap: .4rem; border-color: #638e79; background: #20332b; color: #cbebd1; }
.status-submitted, .result-pending { border-color: #8e744f; background: #302821; color: #ffd1a5; }
.status-not-approved, .result-needs-changes { border-color: #875c57; background: #382825; color: #ffc4bc; }
.result-not-applicable { border-color: #5f7688; background: #22313e; color: var(--soft); }
[data-layout="tiles"] .game-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); align-items: stretch; }
[data-layout="tiles"] .game-entry { height: 100%; grid-template: "logo logo" auto "number badge" auto "info info" 1fr "links links" auto / auto 1fr; }
[data-layout="tiles"] .game-logo { min-height: 5.25rem; }
[data-layout="compact"] .game-list { gap: .35rem; }
[data-layout="compact"] .game-entry { grid-template: "number logo info badge links" auto / auto 5.75rem minmax(0, 1fr) auto auto; padding: .5rem .8rem; }
[data-layout="compact"] .game-logo { min-height: 1.6rem; padding: .3rem .45rem; }
[data-layout="compact"] .game-info p { display: none; }
.review-header { display: grid; grid-template-columns: 1fr minmax(12rem, .9fr); gap: 1.4rem; margin: 1.6rem 0 2.25rem; align-items: center; }
.review-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-bottom: .8rem; }
.review-header h1, .review-topics h2 { margin-bottom: .7rem; }
.review-header .lead { margin-top: 0; }
.review-logo { min-height: 9rem; padding: 1.5rem; }
.review-topics { max-width: 55rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.review-evidence { margin-bottom: .85rem; color: var(--blue); }
.review-scope-note { margin-block: .8rem; padding: .65rem .9rem; border-left: 2px solid #b89664; background: var(--surface); color: var(--soft); }
.checklist-link { display: inline-block; margin: .25rem 0 1.2rem; }
.checklist-intro { max-width: 52rem; margin-bottom: 1.25rem; color: var(--soft); }
.checklist, .findings { display: grid; gap: .75rem; max-width: 55rem; padding: 0; list-style: none; }
.checklist li, .findings article { padding: 1rem clamp(.9rem, 3.2vw, 1.45rem); border: 1px solid var(--line); border-radius: .6rem; background: var(--surface); }
.checklist li h2, .review-rule h2 { margin-bottom: .8rem; font-size: 1.35rem; letter-spacing: -.02em; }
.point-number { color: var(--blue); font-variant-numeric: tabular-nums; }
.check-fields { display: grid; grid-template-columns: minmax(7rem, max-content) 1fr; gap: .7rem 1.15rem; margin: .85rem 0 0; }
.check-fields dt { color: var(--ink); font-weight: 680; }
.check-fields dd { margin: 0; color: var(--soft); line-height: 1.55; }
.evidence-links { display: flex; flex-wrap: wrap; gap: .2rem .95rem; list-style: none; margin: .35rem 0 0; padding: 0; }
.evidence-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .65rem; margin: .65rem 0 0; padding: 0; list-style: none; }
.evidence-gallery a { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: .35rem; background: var(--page); color: var(--blue); text-decoration: none; }
.evidence-gallery a:hover { border-color: var(--blue); text-decoration: underline; }
.evidence-gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.evidence-gallery span { padding: .35rem .55rem; font-size: .875rem; overflow-wrap: anywhere; }
.review-rule { max-width: 55rem; margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.review-rule p { color: var(--soft); }
.review-rule .check-fields { margin-bottom: .85rem; }
.submission { display: grid; max-width: 40rem; padding: clamp(1rem, 4vw, 1.6rem); border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); }
.submission label { font-weight: 700; margin-top: 1.05rem; margin-bottom: .4rem; }
.submission label:first-of-type { margin-top: 0; }
.submission input, .submission textarea { width: 100%; padding: .65rem .8rem; border: 1px solid #57738a; border-radius: .35rem; background: var(--page); color: var(--ink); font: inherit; }
.submission textarea { resize: vertical; }
.submission button { justify-self: start; }
.field-note { margin-top: .35rem; color: var(--soft); font-size: .9rem; }
.form-message { max-width: 40rem; margin-bottom: 1rem; padding: .8rem 1rem; border-left: 2px solid var(--blue); background: var(--surface); }
.form-message[role="alert"] { border-color: var(--rose); }
.follow p { max-width: 51rem; }
.follow h2 { margin-bottom: .7rem; }
.footer { flex-wrap: wrap; border-top: 1px solid var(--line); min-height: 5.75rem; padding-block: 1rem; color: var(--soft); }

@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.2rem, 8vw, 4.4rem); }
  .game-entry, [data-layout="compact"] .game-entry { grid-template: "number logo info" auto ". badge links" auto / auto minmax(7rem, .46fr) 1fr; }
}

@media (max-width: 41rem) {
  .shell { width: calc(100% - 2rem); }
  .review-header { grid-template-columns: 1fr; }
  .header { flex-wrap: wrap; min-height: 0; padding-block: 1rem; }
  nav { gap: .5rem 1.1rem; }
}

@media (max-width: 30rem) {
  .check-fields { grid-template-columns: 1fr; gap: .35rem; }
  .check-fields dd + dt { margin-top: .5rem; }
  .register-filters { width: 100%; }
  .register-filters button { flex-direction: column; justify-content: center; gap: .25rem; line-height: 1.2; padding-inline: .25rem; font-size: .875rem; }
  .game-entry { grid-template: "number logo" auto "info info" auto "badge badge" auto "links links" auto / auto 1fr; }
  [data-layout="compact"] .game-entry { grid-template: "number info" auto ". badge" auto ". links" auto / auto 1fr; }
  [data-layout="compact"] .game-logo { display: none; }
}
