/* ==========================================================================
   Morning Standup — static site
   Shared tokens, header, home page, install page. No external assets.
   ========================================================================== */

:root {
  color-scheme: light;
  --paper: #f2ebdd;
  --paper-2: #fbf7ec;
  --paper-3: #e9e0cc;
  --ink: #1b1712;
  --ink-soft: #4a4136;
  --ink-faint: #655a4b;
  --line: #d8cdb6;
  --line-strong: #8a7c67;
  --red: #b23c25;
  --mustard: #8a6212;
  --blue: #2f5474;
  --green: #476237;
  --focus: #2f5474;
  --header-bg: rgba(242, 235, 221, 0.93);
  --dot: rgba(27, 23, 18, 0.06);
  --notice-bg: #f6edd7;
  --notice-line: #e0cfa4;
  --green-bg: #e3edd9;
  --green-line: #9db28c;
  --green-ink: #2f4a24;
  --check: #fbf7ec;
  --radius: 14px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman",
    serif;
  --font-sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #17130e;
  --paper-2: #211b14;
  --paper-3: #2b241a;
  --ink: #f5ecdc;
  --ink-soft: #d8ccb8;
  --ink-faint: #b6a892;
  --line: #453b2c;
  --line-strong: #7f6f58;
  --red: #e8896e;
  --mustard: #e8bb6a;
  --blue: #9cc3e6;
  --green: #b3d39a;
  --focus: #9cc3e6;
  --header-bg: rgba(23, 19, 14, 0.93);
  --dot: rgba(245, 236, 220, 0.06);
  --notice-bg: #2c2416;
  --notice-line: #5a4a2a;
  --green-bg: #22301c;
  --green-line: #4a6140;
  --green-ink: #cfe3bd;
  --check: #17130e;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
p,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

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

a {
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

::selection {
  background: var(--ink);
  color: var(--paper-2);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

:where(a, button, [role="button"], summary) {
  min-height: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper-2);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 40px);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.mono {
  font-family: var(--font-mono);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.text-link:hover {
  text-decoration-thickness: 3px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding-block: 11px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 3px 3px 0 var(--ink);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px 9px 8px 8px;
  background: var(--paper-2);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 55% 62%, 0 100%);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.01em;
}

.brand-copy span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.site-nav {
  margin-inline: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
}

.site-nav a:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--paper-3);
  border-color: var(--line-strong);
}

.site-nav .nav-github {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--ink);
}

.theme-toggle svg {
  flex: 0 0 auto;
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--paper-2);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.btn:hover {
  transform: translate(-1px, -1px);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper-2);
  box-shadow: 4px 4px 0 var(--red);
}

.btn-primary:hover {
  box-shadow: 6px 6px 0 var(--red);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-danger {
  color: var(--red);
  border-color: currentColor;
}

.btn-danger:hover {
  border-color: var(--red);
}

.btn-small {
  min-height: 44px;
  padding: 9px 15px;
  font-size: 12px;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* --------------------------------------------------------------------------
   Home: hero
   -------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(40px, 6vw, 80px) clamp(28px, 4vw, 52px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 5.6vw, 4.15rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero h1 .hl {
  background-image: linear-gradient(transparent 64%, #e7c884 64%);
  padding-inline: 0.04em;
}

:root[data-theme="dark"] .hero h1 .hl {
  background-image: linear-gradient(transparent 64%, #5d4a1f 64%);
}

.hero-lead {
  max-width: 54ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-lead code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper-2);
  color: var(--ink);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
  margin-top: 2px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.hero-actions .text-link {
  margin-inline: 4px;
}

.hero-fineprint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.hero-fineprint span + span::before {
  content: "·";
  padding-inline: 8px;
}

/* Hero comic cover — deliberately printed on paper at all times. */

.cover {
  min-width: 0;
  margin: 0;
}

.cover-frame {
  position: relative;
  padding: 16px;
  background: #fbf7ec;
  color: #1b1712;
  border: 2px solid #1b1712;
  border-radius: 8px;
  box-shadow: 10px 10px 0 #b23c25;
  isolation: isolate;
}

.cover-frame::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: #b23c25;
  border-radius: 5px 5px 0 0;
}

.cover-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px 12px;
}

.cover-kicker {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #655a4b;
}

.cover-title {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  max-width: 20ch;
}

.comic-stamp {
  flex: 0 0 auto;
  width: 66px;
  height: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 2px solid #1b1712;
  border-radius: 50%;
  background: #f2ebdd;
  box-shadow: 2px 2px 0 #1b1712;
  transform: rotate(-7deg);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini {
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  border: 2px solid #1b1712;
  border-radius: 4px;
  overflow: hidden;
  background: #fbf7ec;
}

.mini-art {
  position: relative;
  aspect-ratio: 12 / 7;
  background: #c9dfef;
  overflow: hidden;
}

.mini-body {
  padding: 6px 8px 8px;
  border-top: 2px solid #1b1712;
}

/* Compact versions of the engine's in-panel inserts for the small cover panels. */

.cover .panel-inserts {
  padding: 7px 8px;
  gap: 4px;
}

.cover .panel-bubble {
  max-width: 64%;
  padding: 3px 6px 4px;
  border-width: 1.6px;
  border-radius: 8px 8px 8px 2px;
  font-size: 8.5px;
  line-height: 1.18;
  box-shadow: 1px 1px 0 #1b1712;
}

.cover .panel-bubble::after {
  left: 10px;
  bottom: -6px;
  width: 9px;
  height: 7px;
  border-left-width: 1.6px;
  border-bottom-width: 1.6px;
}

.cover .panel-screentag {
  padding: 2px 4px;
  border-width: 1.4px;
  font-size: 6.5px;
  letter-spacing: 0.05em;
}

.cover .panel-sfx {
  padding: 1px 4px 2px;
  border-width: 1.6px;
  font-size: 8.5px;
  box-shadow: 1px 1px 0 #1b1712;
}

.mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4a4136;
}

.mini-head .mini-badge {
  padding: 1px 4px;
  border-radius: 2px;
  background: #1b1712;
  color: #fbf7ec;
  font-weight: 700;
}

.mini:nth-child(n + 3) .mini-badge {
  background: #476237;
}

.mini-title {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.15;
}

.cover-caption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-align: center;
}

.clipboard-helper {
  position: fixed;
  top: -1000px;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Fact strip */

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(34px, 5vw, 56px);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.fact {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 18px;
  background: var(--paper-2);
}

.fact strong {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
}

.fact span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Home: features
   -------------------------------------------------------------------------- */

.section {
  padding-block: clamp(40px, 6vw, 72px);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 12px 40px;
  align-items: end;
  margin-bottom: clamp(24px, 3vw, 36px);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.section-head .section-sub {
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
  justify-self: end;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-top: 4px solid var(--card-accent, var(--red));
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(27, 23, 18, 0.04), 0 16px 30px -28px rgba(27, 23, 18, 0.6);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.feature-card:nth-child(n + 4) {
  grid-column: span 3;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(27, 23, 18, 0.04), 0 22px 34px -26px rgba(27, 23, 18, 0.55);
}

.feature-card[data-accent="mustard"] {
  --card-accent: var(--mustard);
}

.feature-card[data-accent="blue"] {
  --card-accent: var(--blue);
}

.feature-card[data-accent="green"] {
  --card-accent: var(--green);
}

.feature-card[data-accent="plum"] {
  --card-accent: #6b4a8a;
}

.feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-3);
  color: var(--ink);
}

.feature-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.feature-card p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.feature-card code,
.page-hero .lead code,
.section-sub code,
.run-hint code,
.install-note code,
.side-card code,
.demo-banner code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}

.feature-tag {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.feature-card .text-link {
  font-size: 12.5px;
  align-self: flex-start;
}

/* CTA band */

.cta-band {
  margin-block: clamp(28px, 4vw, 48px);
  padding: clamp(24px, 3.4vw, 42px);
  background: var(--ink);
  color: var(--paper-2);
  border-radius: 8px;
  box-shadow: 9px 9px 0 var(--red);
}

.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 22px 40px;
  align-items: center;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.012em;
  margin-top: 6px;
}

.cta-band p {
  max-width: 56ch;
  margin-top: 10px;
  font-size: 0.93rem;
  line-height: 1.6;
  opacity: 0.9;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.cta-band .btn {
  min-height: 46px;
  font-size: 13.5px;
}

.cta-band .btn-primary {
  background: var(--paper-2);
  color: var(--ink);
  border-color: var(--paper-2);
  box-shadow: 4px 4px 0 var(--red);
}

.cta-band .btn-ghost {
  color: var(--paper-2);
  border-color: var(--paper-2);
}

.cta-band .text-link {
  flex-basis: 100%;
  justify-content: flex-end;
  color: var(--paper-2);
  font-size: 12px;
}

.cta-band :where(a, button):focus-visible {
  outline-color: var(--paper-2);
}

.cta-band .eyebrow {
  color: var(--paper-2);
  opacity: 0.72;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: clamp(20px, 3vw, 40px);
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 28px 32px;
  padding-block: clamp(28px, 4vw, 44px);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand p {
  max-width: 34ch;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.footer-col h2 {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 12.5px;
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-col p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  padding-block: 14px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Install page
   -------------------------------------------------------------------------- */

.page-hero {
  padding-block: clamp(36px, 5.5vw, 68px) clamp(20px, 3vw, 30px);
}

.page-hero h1 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.8vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.015em;
  max-width: 20ch;
  text-wrap: balance;
}

.page-hero .lead {
  max-width: 62ch;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.65;
}

.prereqs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  list-style: none;
}

.prereq {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.prereq svg {
  color: var(--green);
}

.terminal-card {
  margin-top: 10px;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 8px 8px 0 var(--red);
  overflow: hidden;
}

.terminal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 14px;
  background: var(--paper-3);
  border-bottom: 2px solid var(--ink);
}

.terminal-dots {
  display: inline-flex;
  gap: 5px;
}

.terminal-dots span {
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.terminal-dots span:first-child {
  background: var(--red);
}

.terminal-dots span:nth-child(2) {
  background: var(--mustard);
}

.terminal-dots span:nth-child(3) {
  background: var(--green);
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.terminal-badge {
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 10px;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.tab {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.tab:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper-2);
  border-color: var(--ink);
}

.cmd-panel {
  position: relative;
  background: #14110c;
  color: #f2ebdd;
}

.cmd-panel[hidden] {
  display: none;
}

.cmd-panel .copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 7px 13px;
  border: 1px solid #f2ebdd;
  border-radius: 999px;
  background: #f2ebdd;
  color: #14110c;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.cmd-panel .copy-btn:hover {
  background: #fff;
}

.cmd-panel .copy-btn:focus-visible {
  outline: 3px solid #9cc3e6;
  outline-offset: 3px;
}

.cmd-panel:focus-visible {
  outline-color: #9cc3e6;
}

.cmd {
  margin: 0;
  padding: 58px 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2.05;
  color: #f4eddd;
  tab-size: 2;
}

.cmd code {
  font: inherit;
  white-space: pre;
}

.cmd-panel .prompt {
  color: #b3a58e;
  user-select: none;
}

.terminal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 14px;
  border-top: 2px solid var(--ink);
  background: var(--paper-3);
  font-size: 11.5px;
  color: var(--ink-soft);
}

.terminal-foot .copy-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  min-height: 1.3em;
}

.run-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  background: var(--paper-2);
}

.run-card p {
  font-size: 13px;
  color: var(--ink-soft);
}

.run-card strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.run-card .run-hint {
  max-width: 40ch;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-faint);
}

.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.install-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.install-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
}

.install-card h3 {
  font-family: var(--font-display);
  font-size: 1.32rem;
  line-height: 1.15;
}

.install-tag {
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.steps {
  counter-reset: step;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 32px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper-3);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.steps code,
.install-card code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}

.install-note {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-faint);
}

.why-local {
  margin-block: 12px 0;
  padding: clamp(22px, 3vw, 30px);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 10px;
}

.why-local h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 1.95rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.why-local > p {
  max-width: 76ch;
  margin-top: 10px;
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.why-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  margin-top: 18px;
  list-style: none;
}

.why-list li {
  position: relative;
  padding-left: 22px;
  font-size: 12.8px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.why-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 10px;
  height: 10px;
  border: 2px solid var(--green);
  border-radius: 3px;
  transform: rotate(45deg);
}

.why-local strong {
  color: var(--ink);
}

.tradeoff {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover {
    max-width: 560px;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .section-head .section-sub {
    justify-self: start;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card,
  .feature-card:nth-child(n + 4) {
    grid-column: span 1;
  }

  .cta-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-actions {
    justify-content: flex-start;
  }

  .cta-band .text-link {
    justify-content: flex-start;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 128px;
  }

  .header-inner {
    gap: 6px 12px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-inline: 0;
    overflow-x: auto;
  }

  .site-nav ul {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .site-nav a {
    padding-inline: 10px;
    white-space: nowrap;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .install-grid,
  .why-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-band {
    box-shadow: 6px 6px 0 var(--red);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
}

@media (max-width: 640px) {
  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-card,
  .feature-card:nth-child(n + 4) {
    grid-column: span 1;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-actions .text-link {
    margin: 2px auto 0;
  }

  .cover-frame {
    padding: 12px;
    box-shadow: 6px 6px 0 #b23c25;
  }

  .cover-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mini:nth-child(n + 3) {
    display: none;
  }

  .comic-stamp {
    display: none;
  }

  .terminal-head .terminal-badge {
    display: none;
  }

  .cmd {
    font-size: 11.5px;
    padding: 54px 14px 18px;
  }

  .run-card {
    align-items: flex-start;
  }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
