@font-face {
  font-family: "Silkscreen";
  src: url("assets/fonts/Silkscreen-Regular.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: "Silkscreen";
  src: url("assets/fonts/Silkscreen-Bold.ttf") format("truetype");
  font-display: swap;
  font-weight: 700;
}
@font-face {
  font-family: "DSEG7";
  src: url("assets/fonts/DSEG7Classic-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --sage: #a9be8e;
  --sage-light: #d7e2c3;
  --sage-dark: #61734f;
  --ink: #10120d;
  --ink-soft: #252a20;
  --dim: rgba(16, 18, 13, 0.64);
  --panel: #11150f;
  --panel-raised: #1c2119;
  --panel-text: #cfe4ad;
  --signal: #ffb51b;
  --signal-hot: #ff713d;
  --line: rgba(16, 18, 13, 0.28);
  --paper: #e5ecd7;
  --shadow: 0 18px 50px rgba(24, 31, 19, 0.2);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px) 0 0 / 100% 4px,
    var(--sage);
  color: var(--ink);
  font-family: Avenir, "Avenir Next", "Trebuchet MS", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
a { color: currentColor; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { display: block; max-width: 100%; }
code { font-family: "SFMono-Regular", Consolas, monospace; font-size: .9em; }

.wrap { max-width: 760px; margin: 0 auto; padding: 36px 22px 80px; }
.wrap--wide { max-width: 1160px; }
header { border-bottom: 2px solid var(--ink); padding-bottom: 20px; margin-bottom: 36px; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand svg { width: 52px; height: 52px; flex: none; box-shadow: 5px 5px 0 rgba(16,18,13,.16); }
.brand h1,
.brand-name,
h1, h2, h3,
nav,
.cta,
.eyebrow,
.badge,
.step-number,
.download-link {
  font-family: "Silkscreen", "SFMono-Regular", Consolas, monospace;
}
.brand h1,
.brand-name { margin: 0; font-size: 25px; letter-spacing: .06em; line-height: 1; }
.tag { margin: 8px 0 0; color: var(--dim); font-size: 15px; }
nav { margin-top: 20px; display: flex; gap: 9px; flex-wrap: wrap; }
nav a {
  text-decoration: none;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 7px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}
nav a:hover,
nav a:focus-visible,
nav a[aria-current="page"] { background: var(--ink); color: var(--sage); transform: translateY(-1px); }

h1 { font-size: clamp(2.2rem, 7vw, 5.8rem); line-height: .92; letter-spacing: -.04em; margin: 0; }
h2 { font-size: clamp(1.25rem, 3vw, 1.8rem); line-height: 1.2; letter-spacing: .02em; text-transform: uppercase; margin: 50px 0 15px; }
h2:first-of-type { margin-top: 8px; }
h3 { font-size: 1rem; line-height: 1.35; margin: 26px 0 7px; }
p { max-width: 72ch; }
ul { padding-left: 22px; }
li { margin: 7px 0; }
.updated, .fine-print { color: var(--dim); font-size: 14px; }
.eyebrow { margin: 0 0 14px; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }

.panel {
  background: var(--panel);
  color: var(--panel-text);
  border: 2px solid var(--ink);
  border-radius: 3px;
  padding: 20px 22px;
  margin: 28px 0;
  box-shadow: 8px 8px 0 rgba(16,18,13,.2);
}
.panel a { color: var(--panel-text); }
.cta,
.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid currentColor;
  padding: 10px 15px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: 12px;
  line-height: 1.2;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, color 120ms ease;
}
.cta:hover,
.cta:focus-visible,
.download-link:hover,
.download-link:focus-visible { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 currentColor; }
.cta--dark { background: var(--ink); color: var(--sage-light); border-color: var(--ink); }
.cta--light { background: transparent; color: var(--ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.workshop-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 34px;
  align-items: end;
  padding: 24px 0 54px;
  border-bottom: 2px solid var(--ink);
}
.workshop-hero .lede { font-size: clamp(1.05rem, 2vw, 1.28rem); max-width: 55ch; margin: 24px 0 0; }
.workbench-readout {
  background: var(--panel);
  color: var(--panel-text);
  border: 10px solid var(--ink-soft);
  outline: 2px solid var(--ink);
  padding: 18px;
  box-shadow: var(--shadow);
}
.readout-label { color: var(--signal); font-family: "Silkscreen", monospace; font-size: 11px; text-transform: uppercase; }
.readout-value { font-family: "DSEG7", monospace; font-size: clamp(1.55rem, 4vw, 2.45rem); letter-spacing: .05em; margin: 8px 0 18px; text-shadow: 0 0 12px rgba(207,228,173,.36); }
.readout-grid { border-top: 1px solid rgba(207,228,173,.25); padding-top: 12px; }
.readout-row { display: flex; justify-content: space-between; gap: 18px; padding: 5px 0; font-family: "Silkscreen", monospace; font-size: 10px; text-transform: uppercase; }
.readout-row span:first-child { color: rgba(207,228,173,.58); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 56px 0 22px; }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 0; color: var(--dim); font-size: 14px; }
.builder-rack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.builder-unit {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  background: var(--panel);
  color: var(--panel-text);
  border: 2px solid var(--ink);
  padding: 26px;
  box-shadow: 8px 8px 0 rgba(16,18,13,.2);
}
.builder-unit::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: repeating-linear-gradient(90deg, var(--signal) 0 28px, var(--signal-hot) 28px 38px, transparent 38px 46px);
}
.builder-unit h3 { color: var(--paper); font-size: clamp(1.2rem, 3vw, 1.7rem); margin: 18px 0 10px; }
.builder-unit p { color: rgba(207,228,173,.78); }
.builder-unit ul { margin: 6px 0 24px; padding-left: 18px; font-size: 15px; }
.builder-unit .cta { margin-top: auto; align-self: flex-start; color: var(--panel-text); }
.badge { display: inline-flex; align-self: flex-start; border: 1px solid currentColor; padding: 5px 8px; font-size: 10px; text-transform: uppercase; color: var(--signal); }

.deck-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.deck-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(229,236,215,.66);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(16,18,13,.15);
}
.deck-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / .88;
  padding: 16px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255,255,255,.45), transparent 38%),
    repeating-linear-gradient(135deg, rgba(16,18,13,.05) 0 1px, transparent 1px 10px);
  border-bottom: 2px solid var(--ink);
}
.deck-preview img { width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 11px 11px rgba(16,18,13,.28)); }
.deck-body { display: flex; flex-direction: column; flex: 1; padding: 18px; }
.deck-body h3 { margin: 0; font-size: 15px; }
.deck-body p { color: var(--dim); font-size: 14px; line-height: 1.5; }
.deck-body .download-link { margin-top: auto; align-self: stretch; }

.classic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.classic-theme {
  --theme-screen: #10120d;
  --theme-ink: #a9be8e;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  padding: 15px;
  background: var(--theme-screen);
  color: var(--theme-ink);
  border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.08);
}
.classic-theme::before {
  content: "88:88";
  font-family: "DSEG7", monospace;
  font-size: 25px;
  letter-spacing: .06em;
  opacity: .72;
  margin-bottom: 26px;
}
.classic-theme strong { font-family: "Silkscreen", monospace; font-size: 11px; line-height: 1.45; }
.classic-theme span { opacity: .7; font-size: 12px; margin: 6px 0 12px; }
.classic-theme .download-link { margin-top: auto; padding: 8px; font-size: 10px; }

.install-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; background: var(--ink); border: 2px solid var(--ink); margin-top: 24px; }
.install-step { background: var(--paper); padding: 22px; }
.step-number { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 14px; background: var(--ink); color: var(--sage); font-size: 12px; }
.install-step h3 { margin: 0 0 8px; }
.install-step p { margin: 0; color: var(--dim); font-size: 14px; }

.home-skins {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  color: var(--panel-text);
  border: 2px solid var(--ink);
  padding: 26px;
  margin: 34px 0;
  box-shadow: 8px 8px 0 rgba(16,18,13,.2);
}
.home-skins::after { content: "SKIN_07"; position: absolute; right: 16px; top: 8px; color: rgba(207,228,173,.1); font-family: "DSEG7", monospace; font-size: 52px; }
.home-skins h2 { color: var(--paper); margin: 0 0 10px; position: relative; z-index: 1; }
.home-skins p { color: rgba(207,228,173,.8); position: relative; z-index: 1; }
.home-skins .cta { color: var(--panel-text); position: relative; z-index: 1; }

.reference { max-width: 900px; }
.reference h1 { font-size: clamp(2rem, 6vw, 4rem); margin: 18px 0 24px; }
.reference h2 { scroll-margin-top: 20px; }
.reference h3 { font-size: 1.05rem; }
.reference pre {
  overflow-x: auto;
  padding: 18px;
  background: var(--panel);
  color: var(--panel-text);
  border: 2px solid var(--ink);
  font: 13px/1.55 "SFMono-Regular", Consolas, monospace;
}
.reference table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14px; }
.reference th, .reference td { padding: 10px; border: 1px solid var(--ink); text-align: left; vertical-align: top; }
.reference th { background: var(--ink); color: var(--sage-light); font-family: "Silkscreen", monospace; font-size: 10px; }
.reference-note { border-left: 6px solid var(--signal-hot); padding: 4px 0 4px 16px; }

footer { margin-top: 66px; border-top: 2px solid var(--ink); padding-top: 19px; color: var(--dim); font-size: 13px; }
:focus-visible { outline: 3px solid var(--signal-hot); outline-offset: 3px; }

@media (max-width: 820px) {
  .workshop-hero { grid-template-columns: 1fr; }
  .workbench-readout { max-width: 520px; }
  .deck-gallery { grid-template-columns: 1fr 1fr; }
  .classic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install-strip { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 24px 16px 60px; }
  .brand h1, .brand-name { font-size: 21px; }
  .brand svg { width: 46px; height: 46px; }
  nav { gap: 6px; }
  nav a { flex: 1; text-align: center; padding-inline: 7px; }
  .workshop-hero { padding-top: 8px; }
  .builder-rack, .deck-gallery, .classic-grid { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 10px; }
  .builder-unit { min-height: 0; }
  .deck-preview { aspect-ratio: 1.2 / 1; }
}

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