:root {
  color-scheme: light;
  --paper: #ffffff;
  --lilac: #f4f1f5;
  --ink: #27242a;
  --muted: #615963;
  --plum: #683d59;
  --plum-dark: #503047;
  --rule: #dcd4de;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 Arial, Helvetica, sans-serif;
}

h1, h2, p, figure, dl, dd { margin: 0; }
a { color: var(--plum); text-underline-offset: .2em; }
a:hover { color: var(--plum-dark); }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 4px; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }

.wrap { width: min(1160px, calc(100% - 96px)); margin-left: auto; margin-right: auto; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: .75rem;
  left: .75rem;
  padding: .5rem 1rem;
  background: var(--paper);
}

.site-header { border-bottom: 1px solid var(--rule); }
.header-layout {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-block; flex: none; }
.nav-links { display: flex; align-items: center; }
.nav-links > * + * { margin-left: clamp(.45rem, 1.5vw, 1.25rem); }
.nav-links a {
  padding-top: .65rem; padding-bottom: .65rem;
  color: var(--ink);
  font-size: .91rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a[aria-current] {
  color: var(--plum);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .5em;
}
.nav-dot { color: var(--plum); }

.home-main, .inner-main { flex: 1; padding-top: clamp(2.5rem, 5vw, 4.25rem); padding-bottom: 4.5rem; }
.inner-main { max-width: 850px; }
.page-intro { margin-bottom: clamp(1.65rem, 3.2vw, 2.75rem); }
.eyebrow, .file-mode, .index-header, figcaption, .company h2 {
  font: 700 .72rem/1.35 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; color: var(--plum); }
.eyebrow::before { content: ""; width: .52rem; height: .52rem; margin-right: .65rem; background: var(--plum); }
h1 {
  margin-top: .65rem; margin-bottom: .55rem;
  font-size: clamp(2.35rem, 5.2vw, 4.6rem);
  line-height: 1;
  letter-spacing: -.055em;
}
.intro { color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.125rem); }

.archive { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(0, 3.85fr); gap: 16px; align-items: start; }
.file-index { border: 1px solid var(--rule); background: var(--lilac); }
.index-header {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--rule);
  color: var(--plum);
}
.index-link {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) .48rem;
  align-items: center;
  gap: .55rem;
  min-height: 69px;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
}
.index-link:last-child { border-bottom: 0; }
.index-link:hover { background: #ebe4ed; }
.index-link:focus-visible { z-index: 1; outline-offset: -4px; }
.index-link[aria-selected="true"] { color: var(--paper); background: var(--plum); }
.index-link[aria-selected="true"]:focus-visible { outline-color: var(--paper); }
.index-number { font: 400 1.8rem/1 var(--mono); letter-spacing: -.07em; }
.keep-together { white-space: nowrap; }
.index-name { font-size: .93rem; font-weight: 700; line-height: 1.25; }
.index-indicator { width: .48rem; height: .48rem; border: 1px solid currentColor; }
.index-link[aria-selected="true"] .index-indicator { background: currentColor; }
.index-hint {
  border-top: 1px solid var(--rule);
  padding: .82rem 1rem;
  color: var(--muted);
  font-size: .77rem;
}

.file-stack { display: grid; gap: 16px; min-width: 0; }
.game-file { border: 1px solid var(--rule); scroll-margin-top: 1rem; }
.game-file:target { border-color: var(--plum); }
.file-header, .file-body, .file-actions { padding-left: clamp(1rem, 2.6vw, 2rem); padding-right: clamp(1rem, 2.6vw, 2rem); }
.file-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.35rem; padding-bottom: 1.05rem;
}
.file-mode { margin-bottom: .42rem; color: var(--plum); }
.file-header h2 { font-size: clamp(1.65rem, 3.15vw, 2.8rem); line-height: 1.04; letter-spacing: -.043em; }
.developer { margin-top: .42rem; color: var(--muted); font-size: .93rem; }
.file-stamp {
  display: grid;
  flex: none;
  place-items: center;
  min-width: 1.55em;
  min-height: 1.3em;
  border: 1px solid var(--rule);
  background: var(--lilac);
  color: var(--plum);
  font: 400 clamp(1.8rem, 4vw, 3.1rem)/1 var(--mono);
  letter-spacing: -.08em;
}
.file-body {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.15rem, 2.4vw, 2rem);
  padding-top: .3rem; padding-bottom: 1.4rem;
}
figure img { width: 100%; height: auto; background: var(--lilac); }
figcaption {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .6rem;
  color: var(--muted);
  font-size: .65rem;
}
.file-copy { font-size: .96rem; line-height: 1.55; }
.pick {
  margin-top: 1rem;
  padding: .7rem .85rem;
  border-left: 2px solid var(--plum);
  background: var(--lilac);
}
.pick strong { color: var(--plum); }
.file-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem 1rem;
  padding-top: .95rem; padding-bottom: .95rem;
  border-top: 1px solid var(--rule);
  background: #fbf9fb;
}
.file-actions p { color: var(--muted); font-size: .82rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: .62rem 1rem;
  border: 1px solid transparent;
  background: var(--plum);
  color: var(--paper);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button svg { flex: none; margin-left: .75rem; }
.button:hover { background: var(--plum-dark); color: var(--paper); }
.button:disabled { background: var(--lilac); border-color: var(--rule); color: var(--muted); cursor: default; }

.reading-panel { border: 1px solid var(--rule); }
.faq-panel details + details, .listing-note { border-top: 1px solid var(--rule); }
.faq-panel summary { padding: 1rem clamp(1rem, 3vw, 1.65rem); font-weight: 700; cursor: pointer; }
.faq-panel summary:hover, .faq-panel details[open] summary { background: var(--lilac); }
.faq-panel summary:focus-visible { outline-offset: -4px; }
.faq-panel summary::marker { color: var(--plum); }
.faq-panel details p, .listing-note { padding: .9rem clamp(1rem, 3vw, 1.65rem) 1.05rem; }
.listing-note { color: var(--muted); font-size: .9rem; }
.policy-panel, .contact-panel { padding: clamp(1rem, 3vw, 1.75rem); }
.policy-panel section + section { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.policy-panel h2 { margin-bottom: .3rem; font-size: 1.15rem; }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; margin-bottom: .25rem; font-weight: 700; }
.form-field input, .form-field textarea {
  display: block;
  width: 100%;
  padding: .55rem .65rem;
  border: 1px solid #9c8e9e;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}
.form-field textarea { resize: vertical; }
.form-field :disabled { border-color: var(--rule); background: var(--lilac); }
.form-status:empty { margin: 0; padding: 0; }
.form-status {
  margin-bottom: 1.15rem;
  padding: .65rem .85rem;
  background: var(--lilac);
  color: var(--plum-dark);
}
.form-status[data-state="success"] { background: #eaf3ed; color: #245737; }
.form-status[data-state="error"] { background: #f8e9ee; color: #74203f; }
.contact-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .65rem 1rem; justify-content: start; }
.contact-actions p { font-size: .9rem; }

.site-footer { border-top: 1px solid var(--rule); background: #faf8fa; }
.footer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: 1.35rem 2.5rem;
  padding-top: 1.65rem; padding-bottom: 1rem;
  font-size: .83rem;
}
.footer-intro p { margin-top: .12rem; color: var(--muted); }
.footer-links { display: flex; margin-top: .5rem; }
.footer-links a + a { margin-left: 1.15rem; }
.company h2 { margin-top: .35rem; margin-bottom: .55rem; color: var(--plum); }
.company dl > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 0 .75rem; }
.company dt { font-weight: 700; }
.company dd { overflow-wrap: anywhere; }
.copyright {
  grid-column: 1 / -1;
  padding-top: .8rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .75rem;
}

@media (max-width: 1050px) {
  .wrap { width: min(1160px, calc(100% - 64px)); }
}
@media (max-width: 850px) {
  .file-body { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 36px); }
  .archive, .footer-layout { grid-template-columns: 1fr; }
  .file-body { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
  .index-link { min-height: 54px; }
  .index-hint { display: none; }
  .home-main, .inner-main { padding-bottom: 3rem; }
}
@media (max-width: 530px) {
  .file-body, .form-row, .file-actions { grid-template-columns: 1fr; }
  .file-actions .button { justify-self: start; }
}
@media (max-width: 460px) {
  .site-header .brand img { width: 140px; height: auto; }
  .nav-links > * + * { margin-left: .48rem; }
  .nav-links a { font-size: .82rem; }
}
@media (max-width: 375px) {
  .header-layout { flex-wrap: wrap; gap: 0 .6rem; padding-top: .45rem; padding-bottom: .45rem; }
  .company dl > div { grid-template-columns: 1fr; margin-bottom: .35rem; }
}
