/* ==========================================================================
   Interactive Resume — pixel RPG
   ========================================================================== */

/* Pixelify Sans (SIL Open Font License, assets/fonts/OFL.txt), served from
   this site so no visitor data goes to a font provider. */
@font-face {
  font-family: "Pixelify Sans";
  src: url("../assets/fonts/pixelify-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Pixelify Sans";
  src: url("../assets/fonts/pixelify-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --hud-h: 64px;

  --ink: #2b1d16;
  --ink-soft: #5e5045;
  --paper: #fbf6ec;
  --accent: #e4572e;
  --accent-2: #2e86ab;

  /* classic JRPG text box */
  --box-bg: #1d2b53;
  --box-bg-2: #24366a;
  --box-edge: #fff1e8;
  --box-text: #fff1e8;
  --box-soft: #c2c3d9;

  --font-pixel: "Pixelify Sans", "Courier New", monospace;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: #2a6b31;
}

a { color: var(--accent-2); }

.noscript {
  max-width: 40rem;
  margin: 4rem auto;
  padding: 1rem;
  background: var(--paper);
  font-size: 1.2rem;
}

/* ---------------------------------------------------------------- stage */

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#game {
  cursor: pointer;   /* click anywhere to walk there */
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ---------------------------------------------------------------- dialog */

.dialog {
  position: absolute;
  left: 50%;
  bottom: 30px;   /* room for the footer below the sheet */
  width: min(640px, calc(100% - 32px));
  max-height: 46vh;
  max-height: 46svh;
  display: flex;
  flex-direction: column;
  padding: 16px 20px 18px;
  border: 4px solid var(--box-edge);
  border-radius: 6px;
  outline: 4px solid var(--ink);
  background: linear-gradient(var(--box-bg-2), var(--box-bg));
  box-shadow: inset 0 0 0 2px var(--box-bg), 0 8px 0 rgba(0, 0, 0, 0.35);
  color: var(--box-text);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s, transform 0.2s, visibility 0s 0.2s;
}

/* Wide screens: a speech bubble next to the hero (positioned from JS). */
.dialog.is-bubble {
  bottom: auto;
  width: min(440px, 42vw);
  max-height: calc(100vh - 96px);
  max-height: calc(100svh - 96px);
  transform: translateY(8px);
}

.dialog.is-bubble.is-open { transform: none; }

/* The tail: a pixel triangle pointing at the hero. */
.dialog.is-bubble::before,
.dialog.is-bubble::after {
  content: "";
  position: absolute;
  top: calc(var(--tail-y, 40px) - 10px);
  border: 10px solid transparent;
}

.dialog.is-bubble::before { left: -24px; border-right: 14px solid var(--ink); }
.dialog.is-bubble::after { left: -17px; border-right: 12px solid var(--box-edge); border-width: 8px 12px 8px 8px; top: calc(var(--tail-y, 40px) - 8px); }
.dialog.is-bubble.is-left::before { left: auto; right: -24px; border-right-color: transparent; border-left: 14px solid var(--ink); }
.dialog.is-bubble.is-left::after { left: auto; right: -17px; border-right-color: transparent; border-left: 12px solid var(--box-edge); border-width: 8px 8px 8px 12px; }

.dialog.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.2s, transform 0.25s steps(4), visibility 0s;
}

.dialog__body {
  min-height: 0;
  overflow: auto;
}

.dialog__title {
  margin: 0 0 8px;
  font-family: var(--font-pixel);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffd166;
}

.dialog a { color: #8fd3ff; }

.content__text {
  margin: 0 0 12px;
  line-height: 1.5;
}

.content > :last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- content blocks */

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 3px 10px;
  border: 2px solid currentColor;
  border-radius: 4px;
  font-size: 0.92rem;
}

.skill-groups {
  display: grid;
  gap: 10px;
}

.skill-group__name {
  margin: 0 0 4px;
  font-family: var(--font-pixel);
  font-size: 1rem;
  font-weight: 600;
  color: #ffd166;
}

.classic .skill-group__name { color: var(--accent-2); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 2px 8px;
  border: 2px solid currentColor;
  font-size: 0.9rem;
}

.dialog.is-open .tag {
  animation: pop 0.25s steps(3) both;
  animation-delay: calc(var(--i, 0) * 40ms + 100ms);
}

@keyframes pop {
  from { opacity: 0; transform: translateY(4px); }
}

.quote {
  margin: 12px 0 0;
  padding-left: 12px;
  border-left: 3px solid currentColor;
  font-style: italic;
  opacity: 0.9;
}

.quote p { margin: 0 0 4px; }
.quote cite { font-size: 0.85rem; font-style: normal; }

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__item {
  display: grid;
  gap: 2px;
  padding-bottom: 12px;
}

.timeline__item:last-child { padding-bottom: 0; }

/* Dates in the body font: Pixelify Sans draws 2 and 5 almost like an S. */
.timeline__period {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-2);
}

.dialog .timeline__period { color: #8fd3ff; }

.timeline__text { opacity: 0.85; }

.timeline__points {
  margin: 4px 0 0;
  padding-left: 18px;
}

.timeline__points li { margin-bottom: 2px; }

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project {
  display: grid;
  align-content: start;
  gap: 4px;
}

.classic .project {
  padding: 12px;
  border: 2px solid #ead8b8;
  border-radius: 8px;
  background: #fff;
}

.project__name { font-family: var(--font-pixel); font-size: 1.1rem; }
.project__text { opacity: 0.85; }
.project__link { font-weight: 600; text-decoration: none; }
.project__links { display: flex; flex-wrap: wrap; gap: 4px 14px; }

/* GitHub / Steam logo in front of a link (js/main.js, LINK_ICONS). */
.link-icon {
  width: 1em;
  height: 1em;
  margin-right: 0.35em;
  vertical-align: -0.125em;
  fill: currentColor;
}

/* Screenshot: fixed 16:10 frame, pixel border like the dialog. */
.project__image {
  display: block;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 3px solid currentColor;
  background: rgba(0, 0, 0, 0.25);
}

/* In the phone's bottom sheet a smaller screenshot leaves room for the text. */
@media (max-width: 759px) {
  .dialog .project__image { max-width: 240px; }
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact__link {
  padding: 8px 16px;
  border: 3px solid var(--ink);
  background: var(--accent);
  color: #fff !important;
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--ink);
}

.contact__note {
  margin: 12px 0 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.contact__link:hover,
.contact__link:focus-visible {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--ink);
}

/* ---------------------------------------------------------------- NPC speech */

/* Positioned from JS: its bottom tip sits on the NPC's head. */
.npc-say {
  position: absolute;
  z-index: 2;
  max-width: 230px;
  width: max-content;
  padding: 6px 10px;
  border: 3px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font: 1rem/1.25 var(--font-pixel);
  text-align: center;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -100%) translateY(6px);
  transition: opacity 0.2s, transform 0.2s steps(3), visibility 0s 0.2s;
  pointer-events: none;
}

.npc-say::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top: 8px solid var(--ink);
}

.npc-say.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -100%) translateY(-6px);
  transition: opacity 0.2s, transform 0.2s steps(3), visibility 0s;
}

/* ---------------------------------------------------------------- hint */

.controls-hint {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border: 3px solid var(--ink);
  background: var(--paper);
  font-family: var(--font-pixel);
  white-space: nowrap;
  transition: opacity 0.4s;
  animation: blink 1.2s steps(2) infinite;
}

.controls-hint.is-hidden { opacity: 0; animation: none; }

@keyframes blink {
  50% { border-color: var(--accent); }
}

/* ---------------------------------------------------------------- HUD */

.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 8px;
  padding: 14px 16px 0;
  z-index: 10;
  pointer-events: none;
}

.hud > * { pointer-events: auto; }

/* Fixed columns, so hiding the "Areas" button does not shift the others. */
.hud > .lang-switch { grid-column: 1; grid-row: 1; }
.hud > .hud__menu { grid-column: 2; grid-row: 1; }
.hud > .hud__right { grid-column: 3; grid-row: 1; }
.hud > .hud__progress { pointer-events: none; }

.hud__progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(0, 0, 0, 0.35);
}

.hud__progress-fill {
  height: 100%;
  background: #ffd166;
  transform: scaleX(0);
  transform-origin: left;
}

/* "Areas" button: opens the navigation drawer on narrow screens. */
.hud__menu {
  display: none;
  justify-self: center;
  padding: 5px 12px;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 1rem var(--font-pixel);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
}

.hud__right {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.hud__toggle {
  padding: 5px 12px;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 1rem var(--font-pixel);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
}

.hud__toggle:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

/* Legal links and version, bottom centre (under the dialog sheet on phones). */
.site-footer {
  position: fixed;
  left: 50%;
  bottom: 6px;
  z-index: 5;
  padding: 1px 8px;
  background: rgba(251, 246, 236, 0.85);
  font-size: 0.75rem;
  white-space: nowrap;
  transform: translateX(-50%);
}

.site-footer a { color: var(--ink); }
.mode-classic .site-footer { display: none; }

/* Flag buttons, same look as on ctrlaltpaw.com but in the pixel style. */
.lang-switch {
  justify-self: start;
  display: flex;
  gap: 4px;
}

.lang-switch button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 0.9rem var(--font-pixel);
  cursor: pointer;
  opacity: 0.6;
}

.lang-switch button[aria-pressed="true"] { opacity: 1; box-shadow: 0 3px 0 var(--ink); }
.lang-switch svg { width: 20px; height: 12px; display: block; }

@media (max-width: 640px) {
  :root { --hud-h: 104px; }
  .controls-hint { top: calc(var(--hud-h) + 8px); }
  .hud { grid-template-columns: auto 1fr; }
  .hud__menu { display: block; }
  .hud > .hud__menu { grid-column: 1 / -1; grid-row: 2; }
  .hud > .hud__right { grid-column: 2; grid-row: 1; }
  .lang-switch span { display: none; }
}

/* ---------------------------------------------------------------- classic view */

.scroll-spacer { pointer-events: none; }

/* In game mode the classic content stays readable for screen readers. */
body:not(.mode-classic) .classic {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body.mode-classic { background: var(--paper); }
body.mode-classic .stage,
body.mode-classic .hud__progress { display: none; }
body.mode-classic .hud { background: rgba(251, 246, 236, 0.92); }

.classic {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--hud-h) + 24px) 16px 64px;
  line-height: 1.55;
}

.classic__header h1 {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(2rem, 6vw, 3rem);
}

.classic__role {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
}

.classic__intro { font-size: 1.1rem; }

.classic__section {
  margin-top: 2.5rem;
  scroll-margin-top: calc(var(--hud-h) + 16px);
}

.classic__section h2 {
  margin: 0 0 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 3px solid #ead8b8;
  font-family: var(--font-pixel);
}

.classic__legal {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.classic__credit {
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------------------------------------------------------------- legal pages */

.legal-page { background: var(--paper); }

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
  font-family: var(--font-pixel);
}

.legal-header a { color: var(--ink); }

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 64px;
  line-height: 1.55;
}

.legal h1 {
  margin: 0 0 4px;
  font-family: var(--font-pixel);
  font-size: clamp(2rem, 6vw, 2.6rem);
}

.legal h2 {
  margin: 28px 0 6px;
  font-family: var(--font-pixel);
  font-size: 1.25rem;
}

.legal p { margin: 0 0 12px; color: var(--ink-soft); }
.legal .legal__intro { color: var(--ink); }

/* Patch notes page (versions/): newest version first. */
.patch-notes { margin: 24px 0 0; padding: 0; list-style: none; }
.patch { margin: 0 0 28px; }
.patch__head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 4px; }
.patch__tag { font: 700 1.4rem var(--font-body); }   /* Pixelify draws 2 and 5 like an S */
.patch--current .patch__tag::after { content: " ★"; color: #e3a82b; }
.patch__date { font-size: 0.85rem; color: var(--ink-soft); font-family: var(--font-body); font-weight: 400; }
.patch__text { margin: 0 0 8px; }
.patch__image {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid var(--ink);
  image-rendering: pixelated;
}

/* Placeholders that must be filled in before going live. */
mark.todo {
  padding: 0 4px;
  background: #ffe066;
  color: var(--ink);
}

/* ---------------------------------------------------------------- navigation sidebar */

:root {
  --nav-w: 214px;
  --nav-w-collapsed: 52px;
}

.sidenav {
  position: fixed;
  left: 16px;
  top: 72px;
  z-index: 9;
  display: flex;
  flex-direction: column;
  width: var(--nav-w);
  max-height: calc(100vh - 88px);
  max-height: calc(100svh - 88px);
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
  transition: width 0.15s steps(3);
}

.sidenav__list {
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  list-style: none;
}

.sidenav__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 6px;
  border: 2px solid transparent;
  background: none;
  color: var(--ink);
  font: 1rem var(--font-pixel);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.sidenav__item:hover,
.sidenav__item:focus-visible { border-color: var(--ink); background: #f1e3c8; outline: none; }
.sidenav__item.is-visited .sidenav__label { opacity: 0.7; }
.sidenav__item.is-current { border-color: var(--ink); background: #ffd166; }
.sidenav__item.is-current .sidenav__label { opacity: 1; }

.sidenav__icon {
  flex: none;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.sidenav__label { overflow: hidden; text-overflow: ellipsis; }

.sidenav__collapse {
  margin: 0 4px 4px;
  padding: 2px 0;
  border: 2px solid var(--ink);
  background: #f1e3c8;
  color: var(--ink);
  font: 1rem var(--font-pixel);
  cursor: pointer;
}

/* Collapsed: icons only, names as tooltips. */
body.nav-collapsed .sidenav { width: var(--nav-w-collapsed); }
body.nav-collapsed .sidenav__label { display: none; }
body.nav-collapsed .sidenav__item { justify-content: center; padding: 4px 0; }

/* The classic page makes room for the sidebar. */
body.mode-classic .classic {
  max-width: calc(760px + var(--nav-w) + 32px);
  padding-left: calc(var(--nav-w) + 32px);
}

body.mode-classic.nav-collapsed .classic {
  max-width: calc(760px + var(--nav-w-collapsed) + 32px);
  padding-left: calc(var(--nav-w-collapsed) + 32px);
}

.sidenav__backdrop { display: none; }

/* Narrow screens: the sidebar becomes a drawer. */
@media (max-width: 640px) {
  .sidenav,
  body.nav-collapsed .sidenav {
    top: 0;
    left: 0;
    bottom: 0;
    width: min(260px, 80vw);
    max-height: none;
    border-width: 0 3px 0 0;
    transform: translateX(-105%);
    transition: transform 0.2s steps(4);
    z-index: 20;
  }

  body.nav-collapsed .sidenav__label { display: inline; }
  body.nav-collapsed .sidenav__item { justify-content: flex-start; padding: 4px 6px; }
  .sidenav__list { padding-top: 16px; }
  .sidenav__collapse { display: none; }
  body.nav-open .sidenav { transform: none; }

  body.nav-open .sidenav__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(29, 43, 83, 0.45);
  }

  body.mode-classic .classic,
  body.mode-classic.nav-collapsed .classic {
    max-width: 760px;
    padding-left: 16px;
  }
}

/* ---------------------------------------------------------------- character sheet */

/* Parchment with red headings, like a pen & paper RPG character sheet. */
.sheet {
  --parchment: #f4e7c5;
  --parchment-dark: #e2cf9f;
  --sheet-ink: #3b2a1a;
  --sheet-red: #8b1e1e;
  display: grid;
  grid-template-areas: "head" "stats" "profs";
  gap: 10px;
  padding: 12px;
  border: 3px double var(--sheet-ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.35), transparent 40%),
    var(--parchment);
  color: var(--sheet-ink);
}

.sheet__head {
  grid-area: head;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--sheet-ink);
}

.sheet__field { display: flex; flex-direction: column; min-width: 0; }
.sheet__field--name { grid-column: 1 / -1; }

.sheet__value {
  padding: 0 2px 1px;
  border-bottom: 1px solid var(--sheet-ink);
  font: 600 1rem var(--font-pixel);
}

.sheet__field--name .sheet__value { font-size: 1.5rem; color: var(--sheet-red); }
.sheet__field--num .sheet__value { font-family: var(--font-body); font-weight: 700; }

.sheet__label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* The six attributes in a row under the header, like on a printed sheet. */
.sheet__stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.stat {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 4px 4px 8px;
  border: 2px solid var(--sheet-ink);
  border-radius: 10px 10px 4px 4px;
  background: #fffaf0;
  text-align: center;
}

.stat__abbr { font: 600 0.8rem var(--font-pixel); color: var(--sheet-red); letter-spacing: 0.1em; }
/* Numbers in the body font: Pixelify Sans draws 2 and 5 almost like an S. */
.stat__score { font: 700 1.5rem/1 var(--font-body); font-variant-numeric: tabular-nums; }
.stat__name { font-size: 0.65rem; line-height: 1.2; opacity: 0.8; }

.stat__mod {
  min-width: 32px;
  margin: 2px 0;
  padding: 0 6px;
  border: 2px solid var(--sheet-ink);
  border-radius: 999px;
  background: var(--parchment);
  font: 700 0.85rem var(--font-body);
  font-variant-numeric: tabular-nums;
}

.sheet__profs {
  grid-area: profs;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  align-content: start;
}

.prof {
  padding: 6px 8px 8px;
  border: 2px solid var(--sheet-ink);
  background: rgba(255, 250, 240, 0.6);
}

.prof__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  margin: 0 0 6px;
  font: 600 0.95rem var(--font-pixel);
  color: var(--sheet-red);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prof__sub {
  font: 0.75rem var(--font-body);
  color: var(--sheet-ink);
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.75;
}

.sheet .tag {
  border-color: var(--parchment-dark);
  background: #fffaf0;
  color: var(--sheet-ink);
  font-size: 0.82rem;
}

.dialog.is-open .stat {
  animation: pop 0.25s steps(3) both;
  animation-delay: calc(var(--i, 0) * 60ms + 100ms);
}

/* The sheet is much bigger than the other boxes: dozens of blocks and tags
   popping in one after another felt restless, so it simply fades in. */
.dialog.is-sheet.is-open .stat,
.dialog.is-sheet.is-open .tag { animation: none; }

/* Inside the dark dialog box the sheet is the content, so less padding. */
.dialog.is-sheet { padding: 12px 14px 14px; }

.dialog__body,
.classic__section { container: sheet / inline-size; }

/* Narrow sheets (small bubble, phones): three attributes per row. */
@container sheet (max-width: 520px) {
  .sheet__stats { grid-template-columns: repeat(3, 1fr); }
  .sheet__head { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .sheet__stats { grid-template-columns: repeat(3, 1fr); }
  .sheet__head { grid-template-columns: repeat(2, 1fr); }
}

