/* ==========================================================================
   Scrollable Tooltips — scrollabletooltips.com
   Quiet, single-purpose micro-utility page.
   Warm sand base + deep teal accent + narrow measure + vertical scroll motif.
   ========================================================================== */

/* --- 1. Reset -------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body,
h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd, table {
  margin: 0;
  padding: 0;
}

ul[class], ol[class] { list-style: none; }

img, svg { max-width: 100%; }
img { height: auto; display: block; }

button, input, select, textarea { font: inherit; color: inherit; }

/* --- 2. Tokens ------------------------------------------------------- */

:root {
  color-scheme: light;

  /* Warm neutral base */
  --sand-50:  #fbf8f2;
  --sand-100: #f4eee3;
  --sand-200: #ebe2d2;
  --sand-300: #ddd0ba;
  --sand-400: #c7b699;

  /* Ink */
  --ink-900: #1d1a15;
  --ink-700: #3b352b;
  --ink-500: #635b4d;
  --ink-400: #7d7465;

  /* Deep teal accent */
  --teal-900: #073431;
  --teal-800: #0a4643;
  --teal-700: #0e5b57;
  --teal-600: #12726c;
  --teal-300: #8dc4bf;
  --teal-100: #dcece9;

  /* Tooltip mock palette (muted take on the in-game tooltip) */
  --tip-bg:     #171326;
  --tip-edge:   #3d2b7a;
  --tip-edge-2: #241a4a;
  --tip-white:  #e8e4f2;
  --tip-grey:   #a9a2c0;
  --tip-gold:   #f2c14e;
  --tip-purple: #c58cf5;
  --tip-blue:   #7fb7f0;
  --tip-green:  #7fd88f;
  --tip-red:    #f08a7f;
  --tip-cyan:   #6fd7d0;

  /* Type */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Measure & rhythm */
  --measure: 39rem;
  --wide: 68rem;
  --pad: clamp(1.15rem, 4vw, 2rem);
  --gap: clamp(2.75rem, 7vw, 5rem);

  --radius: 10px;
  --radius-lg: 16px;

  --line: 1px solid var(--sand-300);
  --shadow-sm: 0 1px 2px rgba(29, 26, 21, .05), 0 2px 8px rgba(29, 26, 21, .04);
  --shadow-md: 0 2px 4px rgba(29, 26, 21, .06), 0 12px 32px rgba(29, 26, 21, .07);
}

/* --- 3. Base --------------------------------------------------------- */

body {
  background: var(--sand-50);
  color: var(--ink-700);
  font-family: var(--font-sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink-900);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.012em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.15rem, 1.5rem + 3.1vw, 3.65rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.55rem, 1.25rem + 1.4vw, 2.15rem); }
h3 { font-size: clamp(1.13rem, 1.03rem + .45vw, 1.35rem); }
h4 { font-size: 1rem; font-family: var(--font-sans); font-weight: 650; }

p { text-wrap: pretty; }

a {
  color: var(--teal-700);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
a:hover { color: var(--teal-600); }

strong { color: var(--ink-900); font-weight: 650; }

code, kbd, samp { font-family: var(--font-mono); font-size: .875em; }

code {
  background: var(--sand-100);
  border: 1px solid var(--sand-200);
  border-radius: 5px;
  padding: .08em .36em;
  color: var(--teal-800);
}

kbd {
  display: inline-block;
  background: linear-gradient(180deg, #fff, var(--sand-100));
  border: 1px solid var(--sand-300);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: .1em .45em;
  font-size: .8em;
  font-weight: 600;
  color: var(--ink-900);
  white-space: nowrap;
  line-height: 1.5;
}

hr {
  border: 0;
  border-top: var(--line);
  margin: var(--gap) 0;
}

::selection { background: var(--teal-100); color: var(--teal-900); }

:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --- 4. Skip link ---------------------------------------------------- */

.skip {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -110%);
  z-index: 100;
  background: var(--teal-800);
  color: #fff;
  padding: .6rem 1.1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { transform: translate(-50%, 0); color: #fff; }

/* --- 5. Layout ------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.prose { max-width: var(--measure); }

.section { padding-block: var(--gap); }
.section + .section { padding-top: 0; }

.section__head { max-width: var(--measure); margin-bottom: 1.75rem; }
.section__head p { color: var(--ink-500); margin-top: .6rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .715rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal-700);
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .85rem;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--sand-300), transparent);
}

/* --- 6. Scroll-motif rail -------------------------------------------- */

.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: max(1.25rem, calc(50% - 39rem));
  width: 2px;
  background: var(--sand-200);
  z-index: 1;
  pointer-events: none;
  display: none;
}
.rail__fill {
  position: absolute;
  inset: 0 0 auto 0;
  height: 0;
  background: linear-gradient(180deg, var(--teal-300), var(--teal-700));
  transform-origin: top;
}
.rail__cap {
  position: absolute;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--teal-700);
  box-shadow: 0 0 0 4px var(--sand-50);
}

@media (min-width: 1180px) {
  .rail { display: block; }
}

/* --- 7. Header ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 248, 242, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -.015em;
  flex-shrink: 0;
}
.brand:hover { color: var(--teal-800); }
.brand svg { width: 26px; height: 26px; flex-shrink: 0; }

.nav__list {
  display: flex;
  align-items: center;
  gap: .3rem;
  list-style: none;
}

.nav__link {
  display: block;
  padding: .42rem .72rem;
  border-radius: 7px;
  font-size: .92rem;
  font-weight: 550;
  color: var(--ink-500);
  text-decoration: none;
}
.nav__link:hover { color: var(--teal-800); background: var(--sand-100); }
.nav__link[aria-current="page"] {
  color: var(--teal-800);
  background: var(--teal-100);
}

.nav__cta {
  margin-left: .35rem;
  padding: .42rem .85rem;
  border-radius: 7px;
  background: var(--teal-800);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.nav__cta:hover { background: var(--teal-700); color: #fff; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: .45rem;
  background: transparent;
  border: 1px solid var(--sand-300);
  border-radius: 8px;
  padding: .38rem .6rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--sand-100); }
.nav-toggle svg { width: 16px; height: 16px; }

@media (max-width: 719px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--sand-50);
    border-bottom: var(--line);
    box-shadow: var(--shadow-md);
    padding: .6rem var(--pad) 1rem;
    display: none;
  }
  .nav[data-open="true"] { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: .1rem; }
  .nav__link { padding: .7rem .8rem; font-size: 1rem; }
  .nav__cta { margin: .5rem 0 0; text-align: center; padding: .7rem .8rem; }
}

/* --- 8. Buttons ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.25rem;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: .96rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.btn--primary {
  background: var(--teal-800);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--teal-700); color: #fff; transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--teal-800);
  border-color: var(--sand-300);
}
.btn--ghost:hover { background: var(--sand-100); border-color: var(--sand-400); color: var(--teal-800); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  align-items: center;
}

/* --- 9. Hero --------------------------------------------------------- */

.hero {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: var(--gap);
  position: relative;
}

.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

.hero__lede {
  font-size: clamp(1.06rem, 1rem + .4vw, 1.22rem);
  color: var(--ink-500);
  margin-top: 1.1rem;
  max-width: 34rem;
}

.hero h1 .accent {
  display: block;
  color: var(--teal-700);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .95rem;
  margin-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.hero__meta li { display: flex; align-items: center; gap: .4rem; }
.hero__meta li::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--teal-300);
}

.hero .btn-row { margin-top: 1.9rem; }

.hero__note {
  margin-top: .95rem;
  font-size: .84rem;
  color: var(--ink-400);
}

/* --- 10. Interactive tooltip demo ------------------------------------ */

.demo { position: relative; }

.demo__screen {
  position: relative;
  height: 320px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--sand-300);
  background:
    radial-gradient(120% 90% at 20% 0%, #47535e 0%, #2d363f 55%, #232a31 100%);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: ns-resize;
}
.demo__screen:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 3px; }

/* faux inventory grid behind the tooltip */
.demo__grid {
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 34px 34px;
  background-position: -8px -6px;
}

.demo__viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.demo__tip {
  position: absolute;
  left: 26px;
  top: 18px;
  width: 268px;
  background: var(--tip-bg);
  border: 1px solid var(--tip-edge);
  outline: 1px solid var(--tip-edge-2);
  border-radius: 3px;
  padding: 9px 11px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--tip-white);
  will-change: transform;
}
.demo__tip p { margin: 0; white-space: nowrap; }
.demo__tip .sp { height: 8px; }

.t-gold   { color: var(--tip-gold); }
.t-purple { color: var(--tip-purple); }
.t-blue   { color: var(--tip-blue); }
.t-green  { color: var(--tip-green); }
.t-red    { color: var(--tip-red); }
.t-grey   { color: var(--tip-grey); }
.t-cyan   { color: var(--tip-cyan); }
.t-b      { font-weight: 700; }

.demo__track {
  position: absolute;
  top: 10px;
  bottom: 10px;
  right: 8px;
  width: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .12);
}
.demo__thumb {
  position: absolute;
  left: 0;
  width: 4px;
  border-radius: 4px;
  background: var(--teal-300);
}

.demo__hint {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(7, 52, 49, .85);
  color: #e6f2f0;
  border: 1px solid rgba(141, 196, 191, .35);
  border-radius: 999px;
  padding: .2rem .6rem;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.demo__hint svg { width: 11px; height: 15px; }

.demo__cap {
  margin-top: .75rem;
  font-size: .82rem;
  color: var(--ink-400);
  text-align: center;
}

/* --- 11. Cards ------------------------------------------------------- */

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  list-style: none;
}

.card {
  background: #fff;
  border: var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.35rem;
  position: relative;
}
.card__ico {
  width: 30px;
  height: 30px;
  color: var(--teal-700);
  margin-bottom: .85rem;
}
.card h3 { margin-bottom: .4rem; }
.card p { font-size: .93rem; color: var(--ink-500); }
.card p + p { margin-top: .55rem; }

/* --- 12. Cheat sheet ------------------------------------------------- */

.keys {
  display: grid;
  gap: .5rem;
  list-style: none;
  counter-reset: none;
}
@media (min-width: 640px) { .keys { grid-template-columns: 1fr 1fr; } }

.keys li {
  display: flex;
  align-items: baseline;
  gap: .85rem;
  background: #fff;
  border: var(--line);
  border-radius: var(--radius);
  padding: .85rem 1.05rem;
}
.keys .keys__combo { flex-shrink: 0; }
.keys .keys__what { font-size: .92rem; color: var(--ink-500); }
.keys .keys__what b { color: var(--ink-900); font-weight: 650; display: block; font-size: .97rem; }

/* --- 13. Strip / spec list ------------------------------------------- */

.strip {
  background: var(--teal-900);
  color: var(--sand-100);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 4vw, 2.1rem);
}
.strip h2 { color: #fff; font-size: 1.3rem; margin-bottom: 1.2rem; }
.strip dl {
  display: grid;
  gap: 1.1rem 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
.strip dt {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-300);
  margin-bottom: .3rem;
}
.strip dd { font-size: .95rem; color: #f0ece2; }
.strip a { color: #fff; }

/* --- 14. Tables ------------------------------------------------------ */

.table-scroll {
  overflow-x: auto;
  border: var(--line);
  border-radius: var(--radius);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.table-scroll:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 2px; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: .9rem;
}
caption {
  caption-side: top;
  text-align: left;
  padding: .85rem 1rem .1rem;
  font-size: .82rem;
  color: var(--ink-400);
}
th, td {
  text-align: left;
  padding: .68rem 1rem;
  border-bottom: 1px solid var(--sand-200);
  vertical-align: top;
}
thead th {
  background: var(--sand-100);
  color: var(--ink-900);
  font-weight: 650;
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom-color: var(--sand-300);
}
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 650; color: var(--ink-900); white-space: nowrap; }
td .mono, th .mono { font-family: var(--font-mono); font-size: .84em; }

.tbl-note {
  margin-top: .7rem;
  font-size: .82rem;
  color: var(--ink-400);
}

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: .1rem .55rem;
  font-size: .74rem;
  font-weight: 650;
  white-space: nowrap;
}
.pill--yes { background: var(--teal-100); color: var(--teal-800); }
.pill--no  { background: var(--sand-200); color: var(--ink-500); }

/* --- 15. Steps (HowTo) ----------------------------------------------- */

.steps {
  counter-reset: step;
  list-style: none;
  display: grid;
  gap: 1rem;
  max-width: var(--measure);
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3.1rem;
  min-height: 2.1rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-800);
  border: 1px solid var(--teal-300);
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 700;
}
.steps > li::after {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 2.4rem;
  bottom: -1rem;
  width: 1px;
  background: var(--sand-300);
}
.steps > li:last-child::after { display: none; }
.steps h3 { font-family: var(--font-sans); font-size: 1.02rem; font-weight: 650; margin-bottom: .2rem; }
.steps p { font-size: .93rem; color: var(--ink-500); }

/* --- 16. Download cards ---------------------------------------------- */

.dl-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  list-style: none;
}
.dl-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  background: #fff;
  border: var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.dl-card__tag {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.dl-card h3 { font-size: 1.1rem; }
.dl-card p { font-size: .89rem; color: var(--ink-500); flex: 1; }
.dl-card .btn { margin-top: .5rem; }

/* --- 17. Details / accordion ----------------------------------------- */

.faq-list { display: grid; gap: .55rem; max-width: var(--measure); }

details.qa {
  background: #fff;
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
details.qa + details.qa { margin-top: 0; }
details.qa[open] { border-color: var(--teal-300); }

details.qa > summary {
  list-style: none;
  cursor: pointer;
  padding: .95rem 3rem .95rem 1.1rem;
  position: relative;
  font-weight: 600;
  color: var(--ink-900);
  font-size: 1rem;
}
details.qa > summary::-webkit-details-marker { display: none; }
details.qa > summary:hover { background: var(--sand-100); }
details.qa > summary::after {
  content: "";
  position: absolute;
  right: 1.15rem;
  top: 1.35rem;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--teal-700);
  border-bottom: 2px solid var(--teal-700);
  transform: rotate(45deg);
  transition: transform .18s ease;
}
details.qa[open] > summary::after { transform: rotate(-135deg); top: 1.5rem; }

.qa__body { padding: 0 1.1rem 1.15rem; }
.qa__body p { font-size: .95rem; color: var(--ink-500); }
.qa__body p + p, .qa__body ul + p, .qa__body p + ul { margin-top: .7rem; }
.qa__body ul { padding-left: 1.1rem; font-size: .95rem; color: var(--ink-500); }
.qa__body li + li { margin-top: .3rem; }

/* --- 18. Prose lists ------------------------------------------------- */

.bullets { padding-left: 1.15rem; color: var(--ink-500); }
.bullets li + li { margin-top: .45rem; }
.bullets::marker { color: var(--teal-300); }

.note {
  border-left: 3px solid var(--teal-300);
  background: var(--teal-100);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .95rem 1.15rem;
  font-size: .92rem;
  color: var(--teal-900);
  max-width: var(--measure);
}
.note strong { color: var(--teal-900); }
.note a { color: var(--teal-800); }

/* --- 19. Teaser / CTA band ------------------------------------------- */

.band {
  border-top: var(--line);
  border-bottom: var(--line);
  background: var(--sand-100);
  padding-block: var(--gap);
  margin-top: var(--gap);
}
.band h2 { margin-bottom: .6rem; }
.band p { color: var(--ink-500); max-width: var(--measure); }

/* --- 20. Footer ------------------------------------------------------ */

.site-footer {
  border-top: var(--line);
  margin-top: var(--gap);
  padding-block: 2.5rem 3rem;
  font-size: .87rem;
  color: var(--ink-400);
  background: var(--sand-100);
}
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2.5rem;
  justify-content: space-between;
  padding-bottom: 1.6rem;
  border-bottom: var(--line);
  margin-bottom: 1.5rem;
}
.site-footer h2 {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-400);
  font-weight: 500;
  margin-bottom: .6rem;
}
.site-footer ul { list-style: none; }
.site-footer li + li { margin-top: .3rem; }
.site-footer a { color: var(--ink-700); text-decoration: none; }
.site-footer a:hover { color: var(--teal-700); text-decoration: underline; }
.site-footer__disclaimer { max-width: 52rem; line-height: 1.6; }
.site-footer__disclaimer p + p { margin-top: .6rem; }

/* --- 21. 404 --------------------------------------------------------- */

.err {
  min-height: 58vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--gap);
}
.err__code {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: 1rem;
}
.err p { color: var(--ink-500); margin: 1rem auto 0; max-width: 30rem; }
.err .btn-row { justify-content: center; margin-top: 1.9rem; }
.err svg { width: min(320px, 70vw); height: auto; margin: 0 auto 1.5rem; }

/* --- 22. Utilities --------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.stack > * + * { margin-top: 1rem; }

.mt-1 { margin-top: 1.3rem; }
.mt-2 { margin-top: 1.55rem; }
.mt-3 { margin-top: 1.8rem; }

/* First section on a subpage: a little breathing room under the header. */
.section--lead { padding-top: clamp(2.2rem, 5vw, 3.5rem); }

/* Breadcrumb trail */
.crumb {
  font-size: .84rem;
  color: var(--ink-400);
  margin-bottom: 1.4rem;
}
.crumb a { color: var(--ink-500); }
.crumb span { padding-inline: .3em; }

/* Secondary line inside a table row header */
.th-sub {
  display: block;
  font-weight: 400;
  color: var(--ink-400);
}

.err__more { margin-top: 1.9rem; font-size: .9rem; }

/* --- 23. Motion ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .btn--primary:hover { transform: none; }
}

/* --- 24. Print ------------------------------------------------------- */

@media print {
  .site-header, .rail, .demo__hint, .band { display: none; }
  body { background: #fff; }
}

/* --- 25. Real imagery ------------------------------------------------ */

.brand img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  flex-shrink: 0;
  display: block;
}

/* Framed screenshot from the mod author */
.shot {
  margin: 0;
  background: var(--sand-100);
  border: var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(.7rem, 2vw, 1.1rem);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--ink-900);
}
.shot figcaption {
  margin-top: .9rem;
  font-size: .84rem;
  color: var(--ink-500);
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}
.shot figcaption a { color: var(--teal-700); }

.credit {
  display: block;
  margin-top: .35rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-400);
}

/* Icon + wordmark lockup */
.lockup {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1.1rem;
}
.lockup img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--sand-300);
  flex-shrink: 0;
}
.lockup__meta { font-size: .84rem; color: var(--ink-400); line-height: 1.45; }
.lockup__meta b { display: block; color: var(--ink-900); font-size: .95rem; font-weight: 650; }

/* --- 26. Direct downloads ------------------------------------------- */

.dl-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--teal-800);
  color: #fff;
  border-radius: 7px;
  padding: .34rem .8rem;
  font-size: .84rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.dl-link:hover { background: var(--teal-700); color: #fff; }
.dl-link::before {
  content: "";
  width: 9px; height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(-45deg);
}

details.sums {
  margin-top: 1rem;
  background: #fff;
  border: var(--line);
  border-radius: var(--radius);
  max-width: 100%;
}
details.sums > summary {
  list-style: none;
  cursor: pointer;
  padding: .85rem 1.1rem;
  font-weight: 600;
  font-size: .93rem;
  color: var(--ink-900);
}
details.sums > summary::-webkit-details-marker { display: none; }
details.sums > summary::before { content: "+ "; color: var(--teal-700); font-weight: 700; }
details.sums[open] > summary::before { content: "\2212 "; }
details.sums > summary:hover { background: var(--sand-100); }
.sums__body { padding: 0 1.1rem 1.1rem; }
.sums__body p { font-size: .88rem; color: var(--ink-500); margin-bottom: .8rem; }
.sums__body pre {
  margin: 0;
  overflow-x: auto;
  background: var(--sand-100);
  border: 1px solid var(--sand-200);
  border-radius: 8px;
  padding: .9rem 1rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.7;
  color: var(--ink-700);
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}
.sums__body pre:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 2px; }

/* Licence / source obligation panel */
.gpl {
  margin-top: 1.5rem;
  border: 1px solid var(--teal-300);
  background: var(--teal-100);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
}
.gpl h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 650; color: var(--teal-900); margin-bottom: .5rem; }
.gpl p { font-size: .9rem; color: var(--teal-900); }
.gpl p + p { margin-top: .55rem; }
.gpl a { color: var(--teal-800); font-weight: 600; }
.gpl ul { margin-top: .6rem; padding-left: 1.15rem; font-size: .9rem; color: var(--teal-900); }
.gpl li + li { margin-top: .25rem; }

.err__mark {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  border: 1px solid var(--sand-300);
  margin: 0 auto 1.6rem;
  display: block;
}
