/* Lethium — lethium.net
   Red lacquer, ink black, warm paper. No third-party requests. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --red-300: #ff8a84;
  --red-400: #ff5c5c;
  --red-500: #e5383b;
  --red-600: #c8262a;
  --red-700: #a8171b;
  --red-800: #8a0a0d;
  --red-900: #5a0406;

  --ink: #0d0a0a;
  --ink-2: #171213;
  --ink-3: #231c1d;
  --paper: #f5f0ec;
  --paper-2: #ebe3dc;
  --white: #fffdfb;

  --on-paper: #171212;
  --on-paper-soft: #63585a;
  --rule-paper: rgba(23, 18, 18, 0.16);
  --on-ink: #f5f0ec;
  --on-ink-soft: #a89c99;
  --rule-ink: rgba(245, 240, 236, 0.14);

  /* things that flip in dark mode */
  --accent: var(--red-600);
  --panel: var(--ink);
  --hover-bg: var(--ink);
  --hover-fg: var(--on-ink);
  --hover-soft: var(--on-ink-soft);
  --hover-accent: var(--red-400);

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --cut: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151112;
    --paper-2: #221b1c;
    --on-paper: #f5f0ec;
    --on-paper-soft: #a89c99;
    --rule-paper: rgba(245, 240, 236, 0.16);

    --accent: var(--red-400);
    --panel: #251d1e;
    --hover-bg: #f5f0ec;
    --hover-fg: #171212;
    --hover-soft: #63585a;
    --hover-accent: var(--red-600);
  }
}

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

html {
  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--on-paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.05; }
ul, ol { margin: 0; padding: 0; }

::selection { background: var(--red-500); color: #fff; }

:focus-visible {
  outline: 3px solid var(--red-400);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.mono {
  font-family: var(--mono);
  font-size: 0.86em;
  letter-spacing: -0.01em;
}

/* Small uppercase label used above headings */
.label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.label::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}

/* ───────────────────────── Lacquer (the red surface) ───────────────────────── */

.lacquer {
  position: relative;
  isolation: isolate;
  color: #fff;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255, 122, 116, 0.5) 0%, rgba(255, 122, 116, 0) 58%),
    linear-gradient(102deg, var(--red-600) 0%, #b51d21 42%, var(--red-800) 100%);
  overflow: hidden;
}
/* Hard-edged reflections, like light on a polished panel */
.lacquer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(116deg,
      rgba(255, 255, 255, 0) 0 56%,
      rgba(255, 255, 255, 0.075) 56% 68.5%,
      rgba(255, 255, 255, 0) 68.5% 72%,
      rgba(255, 255, 255, 0.04) 72% 75.5%,
      rgba(255, 255, 255, 0) 75.5%);
  pointer-events: none;
}
/* Fine grain so the gradient never bands */
.lacquer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ───────────────────────── Header ───────────────────────── */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand svg { width: 38px; height: auto; fill: currentColor; }
.brand span {
  font-size: 1.22rem;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.015em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
}
.nav a {
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  padding-block: 6px;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 2px no-repeat;
  transition: background-size 0.22s ease;
}
.nav a:hover,
.nav a[aria-current="page"] { background-size: 100% 2px; }
.nav .nav-store {
  padding: 9px 18px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.nav .nav-store:hover { background: var(--ink); color: #fff; }

@media (max-width: 760px) {
  .nav .nav-link { display: none; }
}

/* ───────────────────────── Buttons ───────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 26px 16px 24px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.2;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.18s ease; }
.btn:hover svg { transform: translate(3px, -3px); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--red-400); }

.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { background: var(--paper-2); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-red { background: var(--red-500); color: #fff; }
.btn-red:hover { background: var(--red-600); }
.btn-white:focus-visible { box-shadow: inset 0 0 0 3px var(--ink); }
.btn-ink:focus-visible { box-shadow: inset 0 0 0 3px #fff; }

/* ───────────────────────── Hero ───────────────────────── */

.hero-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(0, 0.66fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding-block: clamp(48px, 9vw, 112px) clamp(64px, 10vw, 128px);
}

.hero h1 {
  margin-top: 26px;
  font-size: clamp(2.4rem, 5.3vw, 4.25rem);
  font-weight: 800;
  font-stretch: 122%;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}
.hero h1 span { display: block; }
.hero-lead {
  max-width: 33em;
  margin: 28px 0 0;
  font-size: clamp(1.06rem, 1.5vw, 1.24rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.hero-mark {
  justify-self: end;
  width: min(100%, 400px);
  filter: drop-shadow(0 26px 40px rgba(60, 0, 2, 0.45));
}
.hero-mark svg { width: 100%; height: auto; overflow: visible; }

@media (max-width: 900px) {
  .hero-body { grid-template-columns: 1fr; }
  .hero-mark {
    position: absolute;
    right: -84px;
    bottom: -54px;
    width: 300px;
    opacity: 0.13;
    filter: none;
    z-index: -1;
  }
}

/* Black strip under the hero */
.strip {
  background: var(--ink);
  color: var(--on-ink);
}
.strip ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  list-style: none;
  padding-block: 18px;
  font-size: 0.74rem;
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.strip li { display: inline-flex; align-items: center; }
.strip li:not(:last-child)::after {
  content: "";
  width: 2px;
  height: 0.95em;
  margin-inline: 15px;
  background: var(--red-500);
  transform: skewX(-24deg);
}

/* ───────────────────────── Sections ───────────────────────── */

.section { padding-block: clamp(72px, 10vw, 132px); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: end;
  gap: 24px clamp(32px, 6vw, 96px);
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section-head h2 {
  margin-top: 20px;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  font-weight: 800;
  font-stretch: 120%;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.section-head p {
  margin: 0;
  max-width: 30em;
  color: var(--on-paper-soft);
}
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; }
}

.on-paper .label { color: var(--accent); }

/* Setups: a typographic index */
.index { list-style: none; border-top: 2px solid var(--on-paper); }
.index li { border-bottom: 1px solid var(--rule-paper); }
.index a {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr) minmax(0, 1.25fr) 2.4rem;
  align-items: center;
  gap: 8px 28px;
  padding: 26px clamp(8px, 1.4vw, 20px);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.index-no {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
}
.index-name {
  font-size: clamp(1.3rem, 2.3vw, 1.85rem);
  font-weight: 750;
  font-stretch: 118%;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.index-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-paper-soft);
}
.index-desc { color: var(--on-paper-soft); line-height: 1.5; }
.index-go { justify-self: end; width: 26px; height: 26px; color: var(--accent); transition: transform 0.2s ease; }
.index a:hover,
.index a:focus-visible {
  background: var(--hover-bg);
  color: var(--hover-fg);
}
.index a:hover .index-desc,
.index a:hover .index-tags,
.index a:focus-visible .index-desc,
.index a:focus-visible .index-tags { color: var(--hover-soft); }
.index a:hover .index-no,
.index a:hover .index-go,
.index a:focus-visible .index-no,
.index a:focus-visible .index-go { color: var(--hover-accent); }
.index a:hover .index-go { transform: translate(4px, -4px); }
.index a:focus-visible { outline-offset: -3px; }

@media (max-width: 760px) {
  .index a {
    grid-template-columns: 2.4rem minmax(0, 1fr) 1.6rem;
    align-items: start;
    padding-block: 22px;
  }
  .index-desc { grid-column: 2 / 3; grid-row: 2; }
  .index-go { grid-row: 1; grid-column: 3; width: 22px; height: 22px; margin-top: 4px; }
}

/* Plugins: ruled grid */
.sub-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin: clamp(64px, 8vw, 104px) 0 26px;
}
.sub-head h3 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 800;
  font-stretch: 120%;
  letter-spacing: -0.025em;
}
.sub-head p { margin: 0; color: var(--on-paper-soft); }
.text-link {
  font-weight: 650;
  text-decoration: none;
  background: linear-gradient(var(--red-500), var(--red-500)) left bottom / 100% 2px no-repeat;
  padding-bottom: 3px;
  transition: color 0.18s ease;
}
.text-link:hover { color: var(--accent); }

.plugins {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  border-top: 2px solid var(--on-paper);
  border-left: 1px solid var(--rule-paper);
}
.plugins li {
  border-right: 1px solid var(--rule-paper);
  border-bottom: 1px solid var(--rule-paper);
}
.plugins li a {
  display: block;
  height: 100%;
  padding: 22px 20px 24px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.plugins li:not(.plugins-more) a:hover,
.plugins li:not(.plugins-more) a:focus-visible { background: var(--hover-bg); color: var(--hover-fg); }
.plugins li:not(.plugins-more) a:hover span,
.plugins li:not(.plugins-more) a:focus-visible span { color: var(--hover-soft); }
.plugins li a:focus-visible { outline-offset: -4px; }
.plugins strong {
  display: block;
  font-size: 1.08rem;
  font-weight: 750;
  font-stretch: 114%;
  letter-spacing: -0.015em;
}
.plugins span {
  display: block;
  margin-top: 6px;
  font-size: 0.93rem;
  line-height: 1.45;
  color: var(--on-paper-soft);
}
.plugins-more a {
  position: relative;
  padding: 22px 56px 24px 20px;
  background: var(--red-600);
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.plugins-more a span { color: rgba(255, 255, 255, 0.9); }
.plugins-more a svg { position: absolute; right: 18px; top: 22px; width: 24px; height: 24px; transition: transform 0.2s ease; }
.plugins-more a:hover { background: var(--ink); }
.plugins-more a:hover svg { transform: translate(4px, -4px); }
.plugins-more a:focus-visible { outline-color: var(--ink); outline-offset: -4px; }
@media (max-width: 900px) { .plugins { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .plugins { grid-template-columns: 1fr; } }

/* ───────────────────────── Licensing (ink) ───────────────────────── */

.on-ink {
  background: var(--ink);
  color: var(--on-ink);
}
.on-ink .label { color: var(--red-400); }
.on-ink .section-head p { color: var(--on-ink-soft); }

.license-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 900px) { .license-grid { grid-template-columns: 1fr; } }

.steps { list-style: none; counter-reset: step; border-top: 1px solid var(--rule-ink); }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0 12px;
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--rule-ink);
}
.steps li::before {
  content: "0" counter(step);
  font-size: 2.1rem;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--red-500);
}
.steps h3 {
  font-size: 1.26rem;
  font-weight: 750;
  font-stretch: 114%;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.steps p { margin: 10px 0 0; color: var(--on-ink-soft); }
.steps a { color: var(--on-ink); text-decoration-color: var(--red-500); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.steps a:hover { color: var(--red-300); }

.panel {
  background: var(--ink-2);
  border: 1px solid var(--rule-ink);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}
.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--rule-ink);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--on-ink-soft);
}
.panel-bar i {
  width: 9px;
  height: 9px;
  background: var(--red-500);
  transform: skewX(-18deg);
}
.panel pre {
  margin: 0;
  padding: 22px 18px 26px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.75;
  color: #d9cfcb;
}
.panel .c { color: #7d7170; }
.panel .k { color: var(--red-300); }
.panel .s { color: #fff; }

.sends {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 26px;
  border: 1px solid var(--rule-ink);
}
.sends div { padding: 20px 20px 22px; }
.sends div + div { border-left: 1px solid var(--rule-ink); }
.sends h4 {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-ink-soft);
}
.sends ul { list-style: none; font-size: 0.95rem; line-height: 1.5; }
.sends li { padding-left: 18px; position: relative; }
.sends li + li { margin-top: 5px; }
.sends li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 2px;
  background: var(--red-500);
}
.sends .never li { color: var(--on-ink-soft); }
.sends .never li::before { background: var(--on-ink-soft); }
.sends-note { margin: 16px 0 0; font-size: 0.93rem; color: var(--on-ink-soft); }
.sends-note a { color: var(--on-ink); text-decoration-color: var(--red-500); text-underline-offset: 3px; text-decoration-thickness: 2px; }
@media (max-width: 460px) {
  .sends { grid-template-columns: 1fr; }
  .sends div + div { border-left: 0; border-top: 1px solid var(--rule-ink); }
}

/* ───────────────────────── Support ───────────────────────── */

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 2px solid var(--on-paper);
}
.contact a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: 34px clamp(8px, 2vw, 28px) 36px;
  border-bottom: 1px solid var(--rule-paper);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.contact a + a { border-left: 1px solid var(--rule-paper); }
.contact small {
  display: block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.contact strong {
  display: block;
  font-size: clamp(1.25rem, 2.5vw, 1.9rem);
  font-weight: 800;
  font-stretch: 116%;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.contact em {
  display: block;
  margin-top: 10px;
  font-style: normal;
  color: var(--on-paper-soft);
}
.contact svg { width: 28px; height: 28px; color: var(--accent); transition: transform 0.2s ease; }
.contact a:hover,
.contact a:focus-visible { background: var(--red-600); color: #fff; }
.contact a:hover small,
.contact a:hover em,
.contact a:hover svg,
.contact a:focus-visible small,
.contact a:focus-visible em,
.contact a:focus-visible svg { color: #fff; }
.contact a:hover svg { transform: translate(4px, -4px); }
.contact a:focus-visible { outline-color: var(--ink); outline-offset: -3px; }
@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; }
  .contact a + a { border-left: 0; }
}

/* ───────────────────────── Footer ───────────────────────── */

.foot {
  background: var(--ink);
  color: var(--on-ink);
  padding-block: clamp(56px, 7vw, 88px) 34px;
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 40px clamp(24px, 4vw, 64px);
}
.foot-about p { max-width: 24em; margin: 18px 0 0; color: var(--on-ink-soft); font-size: 0.97rem; }
.foot h2 {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-ink-soft);
}
.foot ul { list-style: none; }
.foot li + li { margin-top: 9px; }
.foot li a {
  text-decoration: none;
  font-weight: 500;
  background: linear-gradient(var(--red-500), var(--red-500)) left bottom / 0 2px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.22s ease;
}
.foot li a:hover { background-size: 100% 2px; }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 22px;
  border-top: 1px solid var(--rule-ink);
  font-size: 0.84rem;
  color: var(--on-ink-soft);
}
.foot-base p { margin: 0; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } }
@media (max-width: 460px) { .foot-grid { grid-template-columns: 1fr; } }

/* ───────────────────────── Legal pages ───────────────────────── */

.masthead-body { padding-block: clamp(32px, 6vw, 72px) clamp(40px, 7vw, 84px); }
.masthead h1 {
  margin-top: 22px;
  font-size: clamp(2.3rem, 5.4vw, 4.2rem);
  font-weight: 800;
  font-stretch: 122%;
  letter-spacing: -0.035em;
  line-height: 1;
}
.masthead-meta {
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.86);
}

.legal {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(48px, 7vw, 96px) clamp(72px, 9vw, 120px);
}
.toc {
  position: sticky;
  top: 28px;
  align-self: start;
  font-size: 0.93rem;
}
.toc h2 {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.toc ol { list-style: none; counter-reset: toc; border-top: 2px solid var(--on-paper); }
.toc li { counter-increment: toc; border-bottom: 1px solid var(--rule-paper); }
.toc ol a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  padding: 9px 4px;
  text-decoration: none;
  line-height: 1.35;
  transition: color 0.15s ease;
}
.toc ol a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.72rem;
  padding-top: 0.2em;
  color: var(--on-paper-soft);
}
.toc ol a:hover { color: var(--accent); }
.toc-other { margin-top: 22px; }
@media (max-width: 900px) {
  .legal { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
}

.prose { max-width: 46rem; counter-reset: sec; }
.prose > section { counter-increment: sec; padding-top: 8px; }
.prose > section + section { margin-top: clamp(44px, 5vw, 64px); }
.prose h2 {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  align-items: baseline;
  margin-bottom: 20px;
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  font-weight: 800;
  font-stretch: 116%;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.prose h2::before {
  content: counter(sec, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  font-stretch: 100%;
  letter-spacing: 0;
  color: var(--accent);
}
.prose h3 {
  margin: 30px 0 10px;
  font-size: 1.12rem;
  font-weight: 750;
  font-stretch: 110%;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.prose p, .prose ul, .prose ol, .prose .table { margin-bottom: 1.05em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--accent); }
.prose a:not(.btn) {
  color: inherit;
  text-decoration-color: var(--red-500);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose a:not(.btn):hover { color: var(--accent); }
.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.12em 0.4em;
  background: var(--paper-2);
}

.short {
  margin-bottom: clamp(40px, 5vw, 60px);
  padding: 26px 28px 12px;
  background: var(--panel);
  color: var(--on-ink);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}
.short h2 {
  display: block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  font-stretch: 100%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-400);
}
.short h2::before { content: none; }
.short ul { list-style: none; padding: 0; }
.short li { position: relative; padding-left: 22px; }
.short li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 10px;
  height: 2px;
  background: var(--red-500);
}
.short a { text-decoration-color: var(--red-500); }
.short a:hover { color: var(--red-300); }

.table { overflow-x: auto; border-top: 2px solid var(--on-paper); }
.table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.95rem; line-height: 1.5; }
.table th, .table td {
  padding: 12px 16px 13px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule-paper);
}
.table th {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-paper-soft);
  white-space: nowrap;
}
.table td:first-child { font-weight: 650; }

.requests { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 26px; }
.prose .btn-ink { background: var(--hover-bg); color: var(--hover-fg); }
.prose .btn-ink:hover { background: var(--hover-bg); opacity: 0.88; }
.prose .btn-ink:focus-visible { box-shadow: inset 0 0 0 3px var(--red-400); }

.address { font-style: normal; padding-left: 18px; border-left: 3px solid var(--red-500); margin-bottom: 1.05em; }

mark.todo {
  background: #ffe08a;
  color: #2b2000;
  padding: 0.05em 0.35em;
  font-family: var(--mono);
  font-size: 0.86em;
}

/* ───────────────────────── Portfolio ───────────────────────── */

.masthead-lead {
  max-width: 34em;
  margin: 24px 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.jump { background: var(--ink); color: var(--on-ink); }
.jump ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  list-style: none;
  padding-block: 15px;
  font-size: 0.74rem;
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.jump a {
  display: inline-block;
  padding-block: 5px;
  text-decoration: none;
  background: linear-gradient(var(--red-500), var(--red-500)) left bottom / 0 2px no-repeat;
  transition: background-size 0.22s ease;
}
.jump a:hover { background-size: 100% 2px; }

.section-tight { padding-top: 0; }

/* steps also work on paper */
.on-paper .steps,
.on-paper .steps li { border-color: var(--rule-paper); }
.on-paper .steps p { color: var(--on-paper-soft); }

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.about-shot { position: relative; padding-bottom: 56px; }
.about-shot > img {
  width: 100%;
  height: auto;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
}
.about-shot .quote { position: absolute; right: clamp(12px, 3vw, 36px); bottom: 0; max-width: 360px; }
@media (max-width: 900px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .about-shot { padding-bottom: 0; }
  .about-shot .quote { position: static; max-width: none; margin-top: 10px; }
}

.quote {
  margin: 0;
  padding: 22px 24px 24px;
  background: var(--panel);
  color: var(--on-ink);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}
.quote::before {
  content: "\201C";
  display: block;
  height: 0.5em;
  margin-bottom: 8px;
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--red-500);
}
.quote p { margin: 0; font-size: 1.04rem; font-weight: 600; line-height: 1.45; }
.quote footer { margin-top: 16px; font-size: 0.84rem; line-height: 1.45; color: var(--on-ink-soft); }
.quote footer strong { display: block; font-size: 0.98rem; color: var(--on-ink); }

/* Setups: big alternating rows */
.work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(28px, 4vw, 52px);
  border-bottom: 1px solid var(--rule-paper);
}
.work:first-of-type { border-top: 2px solid var(--on-paper); }
.work:nth-of-type(even) .work-img { order: 2; }
.work-img {
  display: block;
  overflow: hidden;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
}
.work-img img { width: 100%; height: auto; transition: transform 0.4s ease; }
.work-img:hover img { transform: scale(1.03); }
.work-no { margin: 0; font-family: var(--mono); font-size: 0.8rem; font-weight: 500; color: var(--accent); }
.work h3 {
  margin-top: 10px;
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  font-weight: 800;
  font-stretch: 120%;
  letter-spacing: -0.03em;
}
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-paper-soft);
}
.work-desc { max-width: 34em; margin: 18px 0 22px; color: var(--on-paper-soft); }
@media (max-width: 760px) {
  .work { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .work:nth-of-type(even) .work-img { order: 0; }
}

/* Plugins: ruled cards on ink */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  border-top: 2px solid var(--on-ink);
  border-left: 1px solid var(--rule-ink);
}
.cards li { border-right: 1px solid var(--rule-ink); border-bottom: 1px solid var(--rule-ink); }
.cards a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px 18px 22px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.cards img { width: 100%; height: auto; margin-bottom: 20px; }
.cards strong { font-size: 1.24rem; font-weight: 750; font-stretch: 116%; letter-spacing: -0.02em; }
.cards a > span { display: block; margin: 10px 0 18px; font-size: 0.95rem; line-height: 1.55; color: var(--on-ink-soft); }
.cards em {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-400);
}
.cards em svg { width: 15px; height: 15px; transition: transform 0.2s ease; }
.cards a:hover { background: var(--ink-2); }
.cards a:hover em svg { transform: translate(3px, -3px); }
.cards a:focus-visible { outline-offset: -4px; }
.cards .cards-more a { justify-content: flex-end; background: var(--red-600); }
.cards .cards-more strong { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; line-height: 1.1; }
.cards .cards-more a > span { color: rgba(255, 255, 255, 0.9); }
.cards .cards-more em { margin-top: 0; color: #fff; }
.cards .cards-more a:hover { background: var(--red-700); }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards { grid-template-columns: minmax(0, 1fr); } }

/* Configs: pack + how it looks in game */
.configs { list-style: none; border-top: 2px solid var(--on-paper); }
.configs li { border-bottom: 1px solid var(--rule-paper); }
.configs a {
  display: grid;
  grid-template-columns: 230px minmax(0, 0.62fr) minmax(0, 1.38fr) 2.4rem;
  align-items: center;
  gap: 12px 28px;
  padding: 16px clamp(8px, 1.4vw, 20px);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.cfg-banner { width: 100%; height: auto; }
.cfg-name {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 750;
  font-stretch: 116%;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.cfg-name small {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  font-stretch: 100%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-paper-soft);
}
.cfg-ex { width: 100%; height: 132px; object-fit: cover; object-position: left top; background: var(--ink); }
.configs a:hover,
.configs a:focus-visible { background: var(--hover-bg); color: var(--hover-fg); }
.configs a:hover .cfg-name small,
.configs a:focus-visible .cfg-name small { color: var(--hover-soft); }
.configs a:hover .index-go { color: var(--hover-accent); transform: translate(4px, -4px); }
.configs a:focus-visible { outline-offset: -3px; }
@media (max-width: 900px) {
  .configs a { grid-template-columns: 150px minmax(0, 1fr) 1.6rem; }
  .cfg-ex { grid-column: 1 / -1; grid-row: 2; height: auto; max-height: 190px; }
  .configs .index-go { grid-row: 1; grid-column: 3; }
}

/* Textures and graphic design */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}
.gallery figure { position: relative; margin: 0; overflow: hidden; background: var(--ink-2); }
.gallery img { width: 100%; height: auto; transition: transform 0.4s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery-note {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  padding: clamp(20px, 3vw, 40px);
  background: var(--red-600);
  color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
}
.gallery-note p { margin: 0; max-width: 32em; font-size: clamp(1rem, 1.5vw, 1.16rem); font-weight: 600; line-height: 1.45; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-note { grid-column: 1 / -1; }
}
@media (max-width: 460px) { .gallery { grid-template-columns: minmax(0, 1fr); } }

/* Videos: two wide, three tall */
.videos {
  display: grid;
  grid-template-columns: minmax(0, 1.56fr) minmax(0, 3fr);
  gap: 10px;
}
.videos-wide { display: grid; grid-auto-rows: 1fr; gap: 10px; }
.videos-tall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.video {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ink-2);
  color: #fff;
  text-decoration: none;
}
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease, opacity 0.2s ease; }
.video:hover img { transform: scale(1.04); opacity: 0.86; }
.videos-tall .video { aspect-ratio: 9 / 16; }
.video-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 34px 14px 13px;
  background: linear-gradient(rgba(13, 10, 10, 0), rgba(13, 10, 10, 0.92));
  font-size: 0.93rem;
  font-weight: 650;
  line-height: 1.25;
}
.video-cap small {
  display: block;
  margin-bottom: 3px;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-300);
}
.video .play {
  flex: none;
  width: 38px;
  height: 38px;
  padding: 9px;
  background: var(--red-500);
  transition: background-color 0.2s ease;
}
.video:hover .play { background: #fff; color: var(--ink); }
.video:focus-visible { outline-offset: -4px; }
.videos-note { margin: 16px 0 0; font-size: 0.86rem; color: var(--on-ink-soft); }
@media (max-width: 900px) {
  .videos { grid-template-columns: minmax(0, 1fr); }
  .videos-wide .video { aspect-ratio: 16 / 9; }
  .videos-tall .video-cap > span { display: none; }
}

/* Team and reviews */
.team {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}
.team figure {
  margin: 0;
  padding: 28px 20px 24px;
  background: var(--panel);
  color: var(--on-ink);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}
.team img { width: min(100%, 230px); height: auto; margin: 0 auto 22px; image-rendering: pixelated; }
.team figcaption { border-top: 1px solid var(--rule-ink); padding-top: 16px; }
.team small {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-400);
}
.team strong { display: block; margin-top: 6px; font-size: 1.3rem; font-weight: 800; font-stretch: 118%; letter-spacing: -0.02em; }
.reviews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}
.reviews .quote { height: 100%; display: flex; flex-direction: column; }
.reviews .quote footer { margin-top: auto; padding-top: 16px; }
@media (max-width: 760px) {
  .team, .reviews { grid-template-columns: minmax(0, 1fr); }
  .team figure { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 18px; padding: 18px; }
  .team img { margin: 0; }
  .team figcaption { border-top: 0; padding-top: 0; }
}

/* Closing band */
.cta-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(64px, 9vw, 120px);
}
.cta h2 {
  margin-top: 22px;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  font-weight: 800;
  font-stretch: 120%;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.cta-lead { max-width: 36em; margin: 24px 0 0; line-height: 1.6; color: rgba(255, 255, 255, 0.92); }
.cta-shot {
  width: 100%;
  height: auto;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
  filter: drop-shadow(0 24px 36px rgba(60, 0, 2, 0.4));
}
@media (max-width: 900px) { .cta-body { grid-template-columns: minmax(0, 1fr); } }

/* 404 */
.lost { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.lost-body { display: grid; align-content: center; padding-block: 48px 96px; }
.lost h1 {
  font-size: clamp(4rem, 17vw, 12rem);
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.05em;
  line-height: 0.9;
}
.lost p { margin: 22px 0 34px; font-size: 1.2rem; }

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

@media print {
  .lacquer, .on-ink, .foot, .short { background: #fff !important; color: #000 !important; clip-path: none; }
  .lacquer::before, .lacquer::after, .nav, .toc, .hero-mark, .skip { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .legal { display: block; padding-block: 12pt; }
  .masthead-meta, .foot-base, .foot-about p { color: #000; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
