@font-face {
  font-family: Manrope;
  src: url("/assets/manrope.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/barlow-condensed.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6f3ea;
  --sheet: #fffdf7;
  --ink: #23231e;
  --muted: #57554c;
  --rule: #cbc5b5;
  --control: #827c6d;
  --rust: #9b371f;
  --rust-dark: #752813;
  --rust-wash: #f4e4d8;
  --night: #22241f;
  --night-muted: #d0ccbe;
  --night-rule: #626356;
  --apricot: #ffc393;
  --success: #28583f;
  --success-wash: #e6ede2;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: Manrope, system-ui, sans-serif;
  --shell: 72rem;
  --gutter: clamp(1rem, 3.5vw, 2.5rem);
  --gap: clamp(1.75rem, 5vw, 4.5rem);
  --section: clamp(2rem, 5vw, 4rem);
  --control-radius: 0.2rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.25rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.65 var(--body);
}

h1, h2, h3, p, ol, ul { margin-block: 0; }
h1, h2, h3 { line-height: 1.15; }
button, input, select { font: inherit; }
a { color: var(--rust); text-underline-offset: 0.2em; }
a:hover { color: var(--rust-dark); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 4px;
}

.shell {
  width: min(var(--shell), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 1rem;
  transform: translateY(-180%);
  background: var(--sheet);
  color: var(--ink);
  font-weight: 800;
}

.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--rule); }

.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-inner { min-height: 4rem; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding-block: 0.35rem;
  color: var(--ink);
  font: 700 clamp(1.4rem, 4.5vw, 1.72rem)/1 var(--display);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark:hover { color: var(--rust); }

.brand-mark {
  display: grid;
  place-items: end;
  width: 1.18rem;
  height: 0.88rem;
  border: 2px solid currentColor;
  border-radius: 0.12rem;
  padding: 0.1rem;
  color: var(--rust);
}

.brand-mark::after {
  content: "";
  width: 0.38rem;
  height: 0.13rem;
  background: currentColor;
}

.site-nav { display: flex; align-items: center; gap: clamp(0.8rem, 3vw, 1.75rem); }

.site-nav a {
  display: grid;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 750;
  text-decoration: none;
}

.site-nav a:hover, .site-nav a[aria-current] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rust);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

.split {
  display: grid;
  align-items: start;
  gap: var(--gap);
}

.hero-inner {
  align-items: end;
  padding-block: var(--section);
  border-bottom: 1px solid var(--ink);
}

.hero h1, .article-hero h1 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.94;
}

.hero h1 { font-size: clamp(3.35rem, 8.2vw, 7.5rem); }
.hero h1 span { display: block; }

.hero-dek, .article-dek {
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.75vw, 1.18rem);
}

.hero-dek { max-width: 42ch; }

.requirement {
  --inset: clamp(1rem, 3vw, 1.65rem);
  padding: var(--inset);
  background: var(--night);
  color: var(--sheet);
}

.requirement-label { font-size: 0.875rem; font-weight: 750; }

.requirement-number {
  margin-block: 0.12em 0.22em;
  color: var(--apricot);
  font: 700 clamp(5.25rem, 9.3vw, 8.5rem)/0.8 var(--display);
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.requirement-number span { font-size: 0.32em; letter-spacing: 0; }

.requirement-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  border-top: 1px solid var(--night-rule);
  padding-top: 0.75rem;
  color: var(--night-muted);
  font-size: 0.875rem;
}

.requirement a { color: var(--sheet); }
.requirement a:hover { color: var(--apricot); }
.requirement a:focus-visible { outline-color: var(--apricot); }

.workspace { padding-block: var(--section); }

.checker h2, .guide-rail h2, .facts h2, .prose h2 {
  font: 700 clamp(1.8rem, 3.35vw, 2.5rem)/1.04 var(--display);
  letter-spacing: -0.01em;
}

.checker-dek { margin-block: 0.45rem 1.3rem; color: var(--muted); }
.checker-dek strong { color: var(--ink); }
.field + .field { margin-top: 1rem; }

.storage-mode {
  min-inline-size: 0;
  margin: 0 0 1rem;
  border: 0;
  padding: 0;
}

.storage-mode legend {
  margin-bottom: 0.4rem;
  padding: 0;
  font-size: 0.94rem;
  font-weight: 800;
}

.storage-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.storage-mode-options label {
  display: flex;
  min-height: 2.85rem;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--control);
  border-radius: var(--control-radius);
  padding: 0.5rem 0.65rem;
  background: var(--sheet);
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
}

.storage-mode-options label:has(input:checked) {
  border-color: var(--rust);
  background: var(--rust-wash);
}

.storage-mode-options input, .compare-option input {
  flex: none;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--rust);
}

.storage-inputs { margin-block: 1rem; }
.storage-amounts { display: grid; gap: 0.85rem; }
.storage-amounts .field { min-width: 0; margin: 0; }

.compare-option {
  display: flex;
  width: fit-content;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  color: var(--rust);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

@media (min-width: 40rem) {
  .storage-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.field label, .estimate label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.94rem;
  font-weight: 800;
}

.optional {
  margin-left: 0.3rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.field-help, .checker-note { color: var(--muted); font-size: 0.875rem; }
.field-help { margin-top: 0.4rem; }
.checker-note { margin-top: 0.95rem; }

.select-input { position: relative; }

.select-input::after {
  position: absolute;
  inset-block-start: calc(50% - 0.3rem);
  inset-inline-end: 1rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
  content: "";
}

.select-input select {
  width: 100%;
  min-height: 2.85rem;
  appearance: none;
  border: 1px solid var(--control);
  border-radius: var(--control-radius);
  padding: 0.55rem 2rem 0.55rem 0.75rem;
  background: var(--sheet);
  color: var(--ink);
}

.number-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--control);
  border-radius: var(--control-radius);
  background: var(--sheet);
}

.number-input:focus-within {
  outline: 2px solid var(--rust);
  outline-offset: 2px;
}

.number-input:has([aria-invalid="true"]) { border-color: var(--rust); }

.number-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0.75rem;
  background: transparent;
  color: var(--ink);
}

.number-input input:focus { outline: none; }
.number-input input::placeholder { color: var(--muted); opacity: 1; }

.number-input > span {
  border-left: 1px solid var(--rule);
  padding-inline: 0.7rem 0.85rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 800;
}

.compact { max-width: 14rem; }

.field-error {
  margin-bottom: 0.8rem;
  color: var(--rust);
  font-size: 0.9rem;
  font-weight: 800;
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; }

.button, .text-button {
  min-height: 2.85rem;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  padding: 0.55rem 1rem;
  font-size: 0.9375rem;
  font-weight: 800;
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rust);
  color: var(--sheet);
  text-decoration: none;
}

.button:hover, .button:active { background: var(--rust-dark); color: var(--sheet); }
.button:disabled { background: var(--rule); color: var(--muted); cursor: default; }

.text-button { background: transparent; color: var(--muted); }
.text-button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }

.result {
  margin-top: 1.4rem;
  border-left: 3px solid var(--rust);
  padding: clamp(1rem, 3vw, 1.4rem);
  background: var(--rust-wash);
}

.result[data-state="ready"] {
  border-color: var(--success);
  background: var(--success-wash);
}

.result-kicker {
  margin-bottom: 0.25rem;
  color: var(--rust);
  font-size: 0.875rem;
  font-weight: 800;
}

.result[data-state="ready"] .result-kicker { color: var(--success); }
.result h3 { margin-bottom: 0.45rem; font: 700 clamp(1.65rem, 3vw, 2rem)/1.05 var(--display); }
.result > p:not(.result-kicker) { color: var(--muted); }
.result-links { display: flex; flex-wrap: wrap; gap: 0.35rem 1.15rem; margin-top: 0.75rem; }
.result-link { font-weight: 800; }
.drive-list { margin-top: 0.65rem; padding: 0; list-style: none; }

.drive-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.85rem;
  border-bottom: 1px solid var(--rule);
  padding-block: 0.45rem;
  font-size: 0.9rem;
}

.drive-list li span::first-letter { text-transform: uppercase; }

.move-planner {
  margin-top: 1.05rem;
  border-top: 1px solid var(--rule);
}

.move-planner summary {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  padding-block: 0.3rem;
  color: var(--rust);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.move-planner summary:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.move-planner summary::-webkit-details-marker { display: none; }

.move-planner summary::before {
  width: 0.45rem;
  height: 0.45rem;
  margin-inline: 0.1rem 0.15rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  content: "";
}

.move-planner[open] summary::before { transform: translateY(-0.12rem) rotate(45deg); }
.move-planner > .field-help { margin-top: 0; }
.planner-games { display: grid; gap: 0.75rem; margin-block: 0.65rem 0.9rem; }

.planner-game {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--control-radius);
  padding: 0.4rem 0.7rem 0.2rem;
  background: var(--sheet);
}

.planner-game legend {
  padding-inline: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 800;
}

.planner-game-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(5.4rem, 1fr);
  align-items: end;
  gap: 0.65rem;
}

.planner-game-fields label { min-width: 0; font-size: 0.875rem; font-weight: 800; }
.planner-game-fields .number-input { margin-top: 0.25rem; }
.planner-game-fields input { padding: 0.5rem; }

.planner-game-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 0.5rem; }
.keep-option {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 800;
  cursor: pointer;
}

.keep-option input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--rust); }
.planner-game-actions .text-button { padding-inline: 0.4rem; }
.planner-result { margin-top: 0.85rem; border: 1px solid var(--rule); padding: 0.7rem; background: var(--sheet); }
.planner-result h4 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.planner-result .drive-list li span { min-width: 0; overflow-wrap: anywhere; }
.planner-upgrade { margin-top: 0.65rem; border-top: 1px solid var(--rule); padding-top: 0.55rem; }
.planner-upgrade a { font-weight: 800; }

.estimate { margin-top: 1rem; }
.estimate-output { font-size: 0.9rem; font-weight: 800; }
.estimate-output:not(:empty) { margin-top: 0.45rem; }

.guide-list {
  margin-top: 0.8rem;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.guide-list li { border-bottom: 1px solid var(--rule); }

.guide-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.12rem 1rem;
  padding-block: 0.85rem;
  color: var(--ink);
  text-decoration: none;
}

.guide-link::after {
  content: "→" / "";
  grid-area: 1 / 2 / span 2;
  align-self: center;
  color: var(--rust);
  font-size: 1.25rem;
}

.guide-link strong { line-height: 1.4; }
.guide-link > span { color: var(--muted); font-size: 0.875rem; }
.guide-link:hover strong { text-decoration: underline; text-underline-offset: 0.2em; }

.source-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.source-note p + p { margin-top: 0.2rem; }
.source-note a { color: inherit; }

.facts {
  display: grid;
  gap: 1rem var(--gap);
  padding-block: var(--section);
  border-top: 1px solid var(--ink);
}

.fact-list > div { padding-block: 1rem; border-bottom: 1px solid var(--rule); }
.fact-list > div:first-child { padding-top: 0; }
.fact-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.fact-list h3 { margin-bottom: 0.35rem; font-size: 1rem; }
.fact-list p { max-width: 61ch; color: var(--muted); }

.site-footer {
  padding-block: 1rem;
  border-top: 1px solid var(--rule);
}

.footer-inner { flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.footer-inner p { color: var(--muted); font-size: 0.85rem; }

.article-hero-inner {
  padding-block: clamp(1.75rem, 5vw, 3.5rem) var(--section);
  border-bottom: 1px solid var(--ink);
}

.breadcrumb {
  display: inline-block;
  margin-bottom: 0.9rem;
  font-size: 0.875rem;
  font-weight: 800;
}

.article-hero h1 {
  max-width: 19ch;
  font-size: clamp(3.1rem, 7vw, 6.1rem);
  text-wrap: balance;
}

.article-dek { max-width: 60ch; }

.article-layout {
  display: grid;
  align-items: start;
  gap: 1.6rem var(--gap);
  padding-block: clamp(1.65rem, 4vw, 3rem) var(--section);
}

.prose {
  min-width: 0;
  max-width: 72ch;
  color: var(--muted);
  line-height: 1.75;
}

.prose h2 {
  margin-block: 2.1rem 0.65rem;
  color: var(--ink);
  font-size: clamp(1.85rem, 3.4vw, 2.25rem);
}

.prose h2:first-child { margin-top: 0; }
.prose strong { color: var(--ink); }
.prose p + p, .prose ol + p, .prose ul + p, .table-wrap + p { margin-top: 0.8rem; }
.prose ol, .prose ul { padding-inline-start: 1.35rem; }
.prose li + li { margin-top: 0.45rem; }

.callout {
  border-left: 3px solid var(--rust);
  padding: 0.85rem 1rem;
  background: var(--rust-wash);
}

.menu-path { color: var(--ink); font-weight: 800; }

.table-wrap { border-block: 1px solid var(--control); }
.table-wrap table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; }

.table-wrap th, .table-wrap td {
  padding: 0.6rem clamp(0.35rem, 1.4vw, 0.85rem);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.table-wrap th { color: var(--ink); font-weight: 800; }
.table-wrap thead { background: var(--rust-wash); line-height: 1.4; }
.table-wrap tbody tr { border-top: 1px solid var(--rule); }
.table-wrap th:first-child { width: 29%; }
.table-wrap th:nth-child(2) { width: 18%; }
.prose h3 { margin-block: 1.2rem 0.5rem; font-size: 1.15rem; }
.ssd-comparison th:first-child { width: 36%; }
.ssd-comparison th:nth-child(2) { width: auto; }
.prose .ssd-variants { margin-top: 0.55rem; padding-left: 0; list-style: none; }
.ssd-variants code { overflow-wrap: anywhere; }

.article-toc, .article-related {
  border-top: 1px solid var(--rule);
  padding-top: 0.9rem;
}

.article-toc h2, .article-related h2 {
  margin-bottom: 0.45rem;
  font: 700 1.45rem/1.05 var(--display);
}

.article-toc ul {
  display: grid;
  gap: 0.1rem;
  padding: 0;
  list-style: none;
}

.article-toc a, .article-related a { font-size: 0.9rem; }
.article-toc a { display: block; width: fit-content; padding-block: 0.2rem; }
.article-related p + p { margin-top: 0.5rem; }

@media (max-width: 31rem) {
  .hero-inner { gap: 1.25rem; }

  .requirement {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 0.85rem;
  }

  .requirement-number {
    grid-area: 1 / 1 / span 2;
    margin: 0;
    align-self: center;
    font-size: clamp(3.6rem, 13vw, 4.75rem);
  }

  .requirement-label { grid-column: 2; align-self: end; line-height: 1.35; }

  .requirement-foot {
    grid-column: 2;
    align-self: start;
    border-top: 0;
    padding-top: 0.2rem;
  }
}

@media (min-width: 44rem) {
  .split { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 0.65fr) minmax(0, 1fr); }

  .article-layout {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.34fr);
    grid-template-rows: auto 1fr;
  }

  .prose { grid-area: 1 / 1 / span 2; }
  .article-toc, .article-related { grid-column: 2; }
}

@media (prefers-reduced-motion: no-preference) {
  .guide-link::after { transition: transform 150ms ease-out; }
  .guide-link:hover::after { transform: translateX(0.18rem); }
}
