@font-face {
  font-family: Pixel;
  font-display: swap;
  src: url("/us/fonts/8bitOperatorPlus-Regular.woff2");
}
@font-face {
  font-family: Pixel;
  font-display: swap;
  src: url("/us/fonts/8bitOperatorPlus-Bold.woff2");
  font-weight: 700;
}
:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #ececec;
  --dim: #b0b0b8;
  --blue: #342db5;
  --line: #42424b;
  --accent: #ffd52a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    17px/1.65 Arial,
    Helvetica,
    sans-serif;
}
button,
input,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #15151d;
  color: var(--fg);
  padding: 12px 18px;
  min-height: 48px;
}
button:hover {
  border-color: #aaa;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
a {
  color: #b6caff;
  text-underline-offset: 4px;
}
h1,
h2,
h3 {
  line-height: 1.25;
}
h1,
h2,
.brand {
  font-family: Pixel, "Courier New", monospace;
}
h1 {
  font-size: clamp(32px, 4.4vw, 56px);
  margin: 16px 0 22px;
}
h2 {
  font-size: clamp(24px, 3vw, 36px);
  margin: 12px 0 24px;
}
h3 {
  font-size: 19px;
  margin: 12px 0;
}
p {
  margin: 12px 0;
  max-width: 65ch;
}
.dim {
  color: var(--dim);
}
.small {
  font-size: 14px;
}
.primary {
  background: var(--accent);
  color: #000;
  border: 2px solid var(--accent);
  font-weight: 700;
}
.secondary {
  border: 2px solid #ddd;
  background: #000;
}
.quiet {
  background: none;
  border: 0;
  color: var(--dim);
  text-decoration: underline;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 22px 0;
}
.actions > * {
  flex: 0 1 auto;
}
.hidden,
[hidden] {
  display: none !important;
}
.topbar {
  background: var(--blue);
  padding: 12px max(20px, calc((100vw - 1100px) / 2));
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 58px;
}
.brand {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: clamp(12px, 2vw, 20px);
}
.topbar span {
  font-size: 14px;
  color: #e0defb;
}
.topbar a:last-child {
  margin-left: auto;
  color: white;
  font-size: 14px;
}
main {
  max-width: 1140px;
  padding: 45px 20px 60px;
  margin: auto;
  min-height: 68vh;
}
footer {
  border-top: 1px solid var(--line);
  padding: 22px 20px;
  color: var(--dim);
  font-size: 13px;
  text-align: center;
}
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 24px 0 50px;
}
.lede {
  font-size: 21px;
  line-height: 1.5;
}
.hero .primary {
  min-width: 230px;
}
.rule {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
}
.pill {
  display: inline-block;
  border: 1px solid var(--line);
  font-size: 14px;
  padding: 4px 10px;
}
.support {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.support details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
summary {
  cursor: pointer;
}
.support p {
  font-size: 16px;
}
.map {
  position: relative;
  max-width: 440px;
  width: 100%;
  margin: 26px auto 0;
}
.map .axis-top {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 13px;
  margin: 0 0 8px;
}
.cells {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  aspect-ratio: 1.18;
}
.cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 3px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
}
.cell b {
  font:
    22px Pixel,
    "Courier New",
    monospace;
  color: var(--fg);
}
.cell.on {
  background: #292719;
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.cell.on b {
  color: var(--accent);
}
.point {
  position: absolute;
  width: 13px;
  height: 13px;
  background: #fff;
  border: 3px solid #000;
  outline: 2px solid var(--accent);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.map figcaption {
  font-size: 13px;
  color: var(--dim);
  margin: 10px 0;
}
.axes-label {
  font-size: 13px;
  color: var(--dim);
  text-align: center;
  margin: 8px 0;
}
.quiz {
  max-width: 720px;
  margin: auto;
}
.quiz h2 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(22px, 3.2vw, 29px);
  line-height: 1.45;
  min-height: 2.9em;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 14px;
}
progress {
  width: 100%;
  height: 6px;
  accent-color: var(--accent);
  display: block;
  margin: 12px 0 30px;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
legend {
  font-size: 14px;
  color: var(--dim);
  margin-bottom: 14px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  padding: 12px 16px;
  min-height: 51px;
  margin-bottom: 9px;
  cursor: pointer;
  background: #08080d;
}
.choice:has(input:checked) {
  border-color: var(--accent);
  background: #232113;
}
.choice input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
}
.choice.unsure {
  border-style: dashed;
  color: var(--dim);
  margin-top: 16px;
}
.quiz-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0;
}
.quiz-actions .primary {
  min-width: 170px;
}
.notice {
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  background: #19180f;
  font-size: 15px;
}
.result-head {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 50px;
  align-items: center;
}
.result-head h1 {
  font-size: clamp(34px, 5vw, 60px);
}
.scoregrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 35px;
}
.score {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.score h3 {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.track {
  height: 8px;
  background: linear-gradient(
    to right,
    #626277 0 33.33%,
    #34343d 33.33% 66.66%,
    #626277 66.66%
  );
  position: relative;
  margin: 20px 6px;
}
.track i {
  position: absolute;
  top: -5px;
  width: 6px;
  height: 18px;
  background: var(--accent);
}
.ends {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--dim);
}
.score ul {
  font-size: 15px;
  padding-left: 20px;
}
.result-actions {
  padding: 25px 0 0;
  margin: 25px 0;
  border-top: 1px solid var(--line);
}
.answer-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.answer-row p {
  margin: 0;
}
.answer-row small {
  color: var(--dim);
}
.review {
  max-width: 800px;
  margin: auto;
}
.review h2 {
  margin-bottom: 10px;
}
.status {
  font-size: 14px;
  color: var(--accent);
  min-height: 24px;
}
.linkbox {
  width: 100%;
  min-height: 86px;
  background: #12121a;
  color: white;
  border: 1px solid var(--line);
  padding: 12px;
  font-size: 13px;
}
dialog {
  background: #0e0e16;
  border: 1px solid #777;
  color: var(--fg);
  max-width: 600px;
  width: calc(100% - 32px);
  padding: 25px;
}
dialog::backdrop {
  background: #000c;
}
dialog h2 {
  font-size: 26px;
}
#cardPreview {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
.close {
  float: right;
  padding: 6px 12px;
  min-height: 36px;
}
.help {
  max-width: 760px;
  margin-top: 35px;
}
noscript {
  display: block;
  color: var(--accent);
}
@media (max-width: 760px) {
  main {
    padding: 26px 18px 40px;
  }
  .hero,
  .result-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hero {
    padding: 0 0 25px;
  }
  .hero h1 {
    margin-top: 10px;
  }
  .hero .lede {
    font-size: 19px;
  }
  .hero .map {
    max-width: 360px;
  }
  .topbar {
    gap: 15px;
    padding: 12px 18px;
  }
  .topbar span {
    display: none;
  }
  .scoregrid,
  .support {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .scoregrid {
    margin-top: 20px;
  }
  .result-head .map {
    max-width: 350px;
  }
  .actions button {
    flex: 1 1 140px;
  }
  .quiz h2 {
    min-height: 0;
    margin-bottom: 20px;
  }
  .quiz-actions .primary {
    min-width: 150px;
  }
  .cell {
    font-size: 12px;
  }
  .cell b {
    font-size: 20px;
  }
  .answer-row {
    gap: 10px;
  }
  .answer-row button {
    padding: 8px 10px;
  }
  .score h3 {
    font-size: 17px;
  }
  .hero .actions {
    margin-bottom: 12px;
  }
  h1 {
    font-size: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* Nine alignment illustrations · 2026-11-06 */
.map {
  max-width: 480px;
}
.hero {
  gap: 40px;
}
.cells {
  aspect-ratio: 1;
  isolation: isolate;
}
.cell {
  position: relative;
  background: #000;
  border-top: 0;
  border-left: 0;
  min-width: 0;
  min-height: 0;
  gap: 0;
  padding: 3px 4px 8px;
  line-height: 1.2;
}
.cell img {
  width: 100%;
  height: calc(100% - 28px);
  max-height: 128px;
  object-fit: contain;
  pointer-events: none;
}
.cell b {
  position: absolute;
  top: 7px;
  left: 8px;
  font:
    12px Pixel,
    monospace;
  color: #c3c3c8;
}
.cell span {
  font-size: 12px;
  line-height: 1.2;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}
.cell:hover {
  background: #10101a;
  border-color: #aaa;
}
.cell:focus-visible {
  outline-offset: -4px;
  z-index: 2;
}
.cell.on {
  background: #121108;
}
.point {
  z-index: 3;
}
.alignment-gallery {
  margin-top: 54px;
}
.alignment-gallery > p {
  color: var(--dim);
}
.alignment-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 24px;
}
.alignment-card {
  background: #000;
  border-top: 1px solid var(--line);
  padding-bottom: 16px;
  min-width: 0;
}
.alignment-card img {
  width: 100%;
  height: 230px;
  object-fit: contain;
  display: block;
}
.alignment-card h3 {
  font-family: Pixel, monospace;
  font-size: 22px;
  margin: 8px 0;
}
.alignment-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--dim);
}
.alignment-card .art-line {
  font-size: 17px;
  color: var(--fg);
}
.alignment-card button {
  font-size: 14px;
  background: none;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid #777;
  min-height: 36px;
}
.result-portrait {
  display: block;
  width: 230px;
  height: 230px;
  object-fit: contain;
  margin: -12px 0 8px;
}
.result-head h1 {
  font-size: clamp(32px, 4.6vw, 54px);
}
#artDialog {
  max-width: 840px;
  padding: 24px;
  background: #000;
}
.art-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}
.art-detail figure {
  margin: 0;
}
.art-detail img {
  width: 100%;
  height: auto;
}
#artDialog .close {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 2;
  background: #111;
}
.art-detail h2 {
  font-size: 30px;
}
.art-detail .art-line {
  font-size: 20px;
  color: var(--accent);
}
.art-detail p {
  font-size: 16px;
}
.art-caption {
  font-size: 13px;
  color: var(--dim);
}
@media (max-width: 760px) {
  .map {
    max-width: 390px;
  }
  .cells {
    aspect-ratio: 1;
  }
  .cell img {
    max-height: 95px;
  }
  .cell span {
    font-size: 11.5px;
    min-height: 25px;
  }
  .cell b {
    font-size: 10px;
    left: 5px;
    top: 4px;
  }
  .alignment-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .alignment-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    column-gap: 16px;
    align-items: start;
    padding-top: 16px;
  }
  .alignment-card img {
    width: 110px;
    height: 130px;
    grid-row: 1 / span 4;
  }
  .alignment-card h3 {
    font-size: 20px;
    margin: 8px 0;
  }
  .alignment-card p {
    margin: 4px 0;
    font-size: 14px;
  }
  .alignment-card button {
    justify-self: start;
  }
  .result-portrait {
    width: 175px;
    height: 175px;
    margin: -12px 0 4px;
  }
  .art-detail {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .art-detail img {
    max-width: 260px;
    margin: auto;
  }
  .art-detail h2 {
    font-size: 26px;
  }
  #artDialog {
    padding: 18px;
  }
  .alignment-gallery h2 {
    font-size: 25px;
  }
}

/* Page-specific safeguards; no global site scripts are loaded. */
html {
  overflow-wrap: break-word;
}
dialog {
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
textarea {
  max-width: 100%;
}
.topbar {
  flex-wrap: wrap;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 10;
  background: #fff;
  color: #000;
  padding: 12px;
}
.skip-link:focus {
  top: 10px;
}
h1:focus,
h2:focus {
  outline: none;
}
.cell img {
  object-fit: contain;
}
.point {
  left: 50%;
  top: 50%;
}
.static-rules {
  max-width: 760px;
}
.quiz .progress-meta {
  gap: 10px;
}
.brand {
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.result-example {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding-bottom: 32px;
}
.result-example figure {
  margin: 0;
  min-width: 0;
}
.result-example figcaption {
  color: var(--accent);
  margin: 0 0 14px;
  font-weight: bold;
}
.result-example img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
.example-values {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 20px;
  border-block: 1px solid var(--line);
  padding: 16px 0;
}
.example-values dt,
.example-values dd {
  margin: 0;
}
.example-values dd {
  font-weight: bold;
  color: var(--accent);
  text-align: right;
}
.example-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
}
@media (max-width: 760px) {
  .result-example {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .result-example h2 {
    font-size: 26px;
  }
}
@media (max-width: 350px) {
  .quiz-actions .primary {
    min-width: 0;
  }
  .alignment-card {
    grid-template-columns: 85px 1fr;
  }
  .alignment-card img {
    width: 85px;
    height: 110px;
  }
  .topbar {
    gap: 10px;
  }
  .topbar a:last-child {
    font-size: 13px;
  }
  .cell span {
    font-size: 10px;
  }
}

/* Approved static copy keeps prose and card headings readable at narrow widths. */
.alignment-card > div { min-width: 0; }
.static-rules h3 { margin-top: 32px; }
@media(max-width:760px) { .alignment-card > div { grid-column: 2; } }
