/* ==========================================================================
   Simple — a calm, conventional landing page in Omarchy's skin.
   Tokyo Night palette (themes/tokyo-night/colors.toml), JetBrains Mono only.
   One column. Big type. Air. One picture per idea.
   ========================================================================== */
:root {
  --bg: #1a1b26; --fg: #a9b1d6; --accent: #7aa2f7; --green: #9ece6a;
  --wall: url('wallpapers/tokyo-night.webp');
  --bg-2:    color-mix(in srgb, var(--bg), #000 22%);
  --surface: color-mix(in srgb, var(--bg), var(--fg) 6%);
  --border:  color-mix(in srgb, var(--bg), var(--fg) 14%);
  --strong:  color-mix(in srgb, var(--fg), #fff 30%);
  --muted:   color-mix(in srgb, var(--fg), var(--bg) 45%);

  --font: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 72rem;
  --text: 46rem;
  --radius: 12px;
  --shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8);
  --section: clamp(4rem, 9vw, 7.5rem);
  --ease: 0.2s cubic-bezier(0.33, 1, 0.68, 1);
}

:root[data-light="1"] { --strong: var(--fg); --bg-2: color-mix(in srgb, var(--bg), #000 4%); }
* { box-sizing: border-box; }
body, .nav, .btn, .theme-chip { transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }
strong, b { font-weight: 700; color: var(--strong); }
em, i { font-style: italic; }
img { max-width: 100%; height: auto; display: block; }
kbd {
  font: inherit; font-weight: 500; font-size: 0.85em;
  color: var(--strong);
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.05em 0.45em;
  white-space: nowrap;
}
.dim { color: var(--muted); }
.eyebrow { margin: 0 0 1rem; color: var(--muted); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.04em; }
.eyebrow a { color: inherit; }

.wrap { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }
.wrap--text { max-width: var(--text); text-align: center; }
.wrap--text p, .wrap--text ol { margin-inline: auto; }

h1, h2, h3 { color: var(--strong); font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(1.6rem, 1rem + 2.2vw, 2.5rem); line-height: 1.15; }
h3 { font-size: 1.05rem; letter-spacing: 0; }
.lede { font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem); line-height: 1.55; color: var(--fg); margin: 1.5rem auto 0; max-width: 38rem; text-wrap: pretty; }
.lede a { color: var(--strong); font-weight: 500; }
.more { display: inline-block; margin-top: 1.25rem; font-weight: 500; }

/* ------------------------------------------------------------------ nav -- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.nav__inner {
  width: min(100% - 3rem, var(--wrap)); margin-inline: auto;
  height: 3.5rem;
  display: flex; align-items: center; gap: 2rem;
}
.nav__brand { display: block; line-height: 0; }
.nav__brand .logo { height: 1.05rem; width: auto; fill: var(--green); }
.nav__links { display: flex; gap: 1.6rem; margin-left: auto; font-size: 0.9rem; font-weight: 500; }
.nav__links a { color: var(--fg); }
.nav__links a:hover { color: var(--strong); text-decoration: none; }
.nav__cta {
  font-size: 0.85rem; font-weight: 700;
  color: var(--bg); background: var(--accent);
  padding: 0.4em 0.95em; border-radius: 999px;
}
.nav__cta:hover { text-decoration: none; filter: brightness(1.1); }
@media (max-width: 48em) { .nav__links { display: none; } .nav__cta { margin-left: auto; } }

/* --------------------------------------------------------------- buttons -- */
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: inherit; margin-top: 2rem; }
.wrap--text .actions { justify-content: center; }
.btn {
  display: inline-flex; align-items: baseline; gap: 0.7ch;
  font: inherit; font-weight: 700; font-size: 0.95rem;
  padding: 0.8em 1.4em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: filter var(--ease), border-color var(--ease);
}
.btn:hover { text-decoration: none; }
.btn small { font-weight: 400; opacity: 0.7; }
.btn--primary { background: var(--accent); color: var(--bg); }
.btn--primary:hover { filter: brightness(1.1); }
.btn--quiet { color: var(--strong); border-color: var(--border); }
.btn--quiet:hover { border-color: var(--accent); }

/* ----------------------------------------------------------------- hero -- */
.hero {
  position: relative;
  padding: calc(var(--section) * 1.15) 0 0;
  background-image:
    linear-gradient(to bottom,
      color-mix(in srgb, var(--bg) 35%, transparent) 0%,
      color-mix(in srgb, var(--bg) 70%, transparent) 55%,
      var(--bg) 100%),
    var(--wall);
  background-size: cover, cover;
  background-position: center, center 30%;
  background-repeat: no-repeat;
  transition: background-image 0.6s ease;
}
.hero .eyebrow, .hero .lede { text-shadow: 0 1px 12px color-mix(in srgb, var(--bg) 80%, transparent); }
.hero__h1 { text-shadow: 0 2px 24px color-mix(in srgb, var(--bg) 90%, transparent); }
.hero .btn--quiet { background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(8px); }
.shot img { box-shadow: 0 50px 120px -30px rgba(0,0,0,0.85); }
.hero__h1 {
  font-size: clamp(2rem, 1.1rem + 3.6vw, 4rem);
  line-height: 1.08;
  max-width: 16ch;
  margin-inline: auto;
}
.hero__h1 a { color: var(--accent); }
.shot { margin: clamp(3rem, 6vw, 5rem) auto 0; }
.shot img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.shot figcaption { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 1rem; }

/* -------------------------------------------------------------- mission -- */
.mission { padding: var(--section) 0; }
.mission__line {
  margin: 0;
  font-size: clamp(1.8rem, 1.2rem + 3vw, 3.4rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.1;
  color: var(--green);
}
.mission__sub { margin: 1rem 0 0; color: var(--muted); font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.85rem; }

/* -------------------------------------------------------------- feature -- */
.feature {
  display: grid; gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: calc(var(--section) * 0.6) 0;
}
@media (min-width: 60em) {
  .feature { grid-template-columns: 1fr 1.2fr; }
  .feature--flip .feature__text { order: 2; }
}
.feature__text p { margin: 1.25rem 0 0; max-width: 40ch; text-wrap: pretty; }
.feature__img, .collage img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.collage { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.collage img { border-radius: 8px; box-shadow: none; }

.keys { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.55rem; max-width: 26rem; font-size: 0.92rem; }
.keys li { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; border-bottom: 1px solid var(--border); padding-bottom: 0.55rem; }
.keys li span:last-child { color: var(--muted); }

.term {
  margin: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.8rem;
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--strong);
  overflow-x: auto;
}
.term .p { color: var(--green); }
.term .c { color: var(--muted); }
.cursor { display: inline-block; width: 0.6em; height: 1.1em; background: var(--accent); vertical-align: -0.2em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------------------------------------------------------------- stats -- */
.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem;
  padding: 3rem 0;
  margin-top: calc(var(--section) * 0.5);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
@media (min-width: 48em) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats strong { display: block; font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); letter-spacing: -0.02em; line-height: 1; }
.stats span { display: block; margin-top: 0.5rem; color: var(--muted); font-size: 0.9rem; }

/* -------------------------------------------------------------- patrons -- */
.patrons { padding: var(--section) 0 0; text-align: center; }
.patrons__list {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem 1rem;
}
@media (max-width: 48em) { .patrons__list { grid-template-columns: repeat(2, 1fr); } }
.patrons__list li { display: grid; justify-items: center; gap: 0.15rem; font-size: 0.9rem; }
.patrons__list img { width: 4.5rem; border-radius: 999px; filter: grayscale(1) contrast(1.05); margin-bottom: 0.5rem; transition: filter var(--ease); }
.patrons__list li:hover img { filter: none; }
.patrons__list span { color: var(--strong); font-weight: 500; }
.patrons__list small { color: var(--muted); font-size: 0.8rem; }
.patrons__line { margin: 2.5rem 0 0; color: var(--muted); }

/* ---------------------------------------------------------------- watch -- */
.watch { padding: var(--section) 0 0; text-align: center; }
.videos { display: grid; gap: 1rem; margin-top: 2.5rem; }
.video { min-width: 0; }
.video--grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 48em) { .video--grid { grid-template-columns: repeat(4, 1fr); } }
.video__facade {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-2); padding: 0; cursor: pointer;
}
.video__facade img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--ease); }
.video__facade:hover img { transform: scale(1.02); }
.video__play { position: absolute; inset: 0; display: grid; place-items: center; }
.video__play svg { width: min(14%, 4.5rem); filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5)); }
.video--grid .video__facade { border-radius: 8px; }

/* -------------------------------------------------------------- install -- */
.install { padding: var(--section) 0 0; }
.install__text { max-width: var(--text); margin-inline: auto; }
.steps { margin: 2rem 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 1.4rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; align-items: baseline; }
.steps li::before {
  content: counter(step);
  font-weight: 700; color: var(--accent);
  border: 1px solid var(--border); border-radius: 999px;
  width: 2rem; height: 2rem; display: grid; place-items: center;
  font-size: 0.9rem;
}
.install .dim { margin-top: 1.25rem; font-size: 0.9rem; }

/* ----------------------------------------------------------------- news -- */
.news { padding: var(--section) 0; }
.post-list { list-style: none; margin: 2rem 0 0; padding: 0; text-align: left; }
.post-list li { display: grid; grid-template-columns: 6ch 1fr; gap: 1.25rem; padding: 0.8rem 0; border-top: 1px solid var(--border); }
.post-list li:last-child { border-bottom: 1px solid var(--border); }
.post-list time { color: var(--muted); font-size: 0.9rem; padding-top: 0.1em; }
.post-list a { color: var(--strong); font-weight: 500; }

/* --------------------------------------------------------------- footer -- */
.footer { border-top: 1px solid var(--border); padding: 4rem 0 5rem; margin-top: var(--section); font-size: 0.9rem; }
.footer__inner { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }
.footer__cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem 2rem; }
@media (min-width: 48em) { .footer__cols { grid-template-columns: repeat(4, 1fr); } }
.footer h3 { color: var(--muted); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.9rem; }
.footer__cols a { display: block; color: var(--fg); padding: 0.2rem 0; }
.footer__cols a:hover { color: var(--strong); }
.footer__line { color: var(--muted); margin: 3rem 0 0; max-width: 70ch; }
.footer__line a { color: var(--fg); }

/* ------------------------------------------------------------ doc pages -- */
.doc { padding: calc(var(--section) * 0.7) 0 0; }
.doc__head { margin-bottom: 2.5rem; }
.doc__head h1, .prose h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem); line-height: 1.12; }
.doc__head .dim { margin: 0.9rem 0 0; }
.header__subtext { font-style: italic; color: var(--fg); margin: 1rem 0 0; max-width: 60ch; }
.wrap--text .header__subtext { margin-inline: auto; }
.doc.wrap--text { text-align: left; }
.doc.wrap--text .doc__head { text-align: center; }

.manual { display: grid; gap: 3rem; align-items: start; padding: calc(var(--section) * 0.5) 0 0; }
@media (min-width: 64em) {
  .manual { grid-template-columns: 15rem 1fr; gap: 4rem; }
  .manual__side { position: sticky; top: 4.5rem; max-height: calc(100dvh - 5.5rem); overflow: auto; }
}
.manual__side .eyebrow { margin-bottom: 0.75rem; }
.manual__toc ol { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
.manual__toc a { display: block; color: var(--muted); padding: 0.22rem 0.6rem; border-left: 2px solid transparent; }
.manual__toc a:hover { color: var(--strong); text-decoration: none; }
.manual__toc a[aria-current="page"] { color: var(--strong); border-left-color: var(--accent); }
.manual .doc { padding-top: 0; max-width: 46rem; }

/* ---------------------------------------------------------------- prose -- */
.prose { max-width: var(--text); }
body[data-type="page"] .prose, body[data-type="news-index"] .prose, body[data-type="manual-toc"] .prose { max-width: none; }
.prose > h1:first-child { margin-bottom: 1rem; }
.prose h2 { font-size: 1.35rem; margin: 2.2em 0 0.6em; }
.prose h3 { margin: 1.8em 0 0.4em; }
.prose p { margin: 0.9em 0; text-wrap: pretty; }
.prose ul, .prose ol { margin: 0.9em 0; padding-left: 1.4em; }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.prose blockquote { margin: 1.2em 0; padding: 0.2em 1.2em; border-left: 2px solid var(--accent); color: var(--fg); }
.prose img { border: 1px solid var(--border); border-radius: 8px; }
.prose figure { margin: 1.5em 0; }
.prose figcaption { color: var(--muted); font-size: 0.85em; margin-top: 0.5em; }
.prose code { font-family: inherit; font-size: 0.92em; color: var(--strong); background: var(--surface); border-radius: 5px; padding: 0.1em 0.4em; }
.prose pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  line-height: 1.55;
  margin: 1.2em 0;
}
.prose pre code { background: none; padding: 0; color: var(--fg); }
.prose table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: 0.92em; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--border); padding: 0.55em 0.8em; text-align: left; vertical-align: top; }
.prose th { color: var(--muted); font-weight: 500; font-size: 0.8em; letter-spacing: 0.06em; text-transform: uppercase; }
.prose iframe, .prose video { max-width: 100%; border-radius: 8px; }

.manual__pagination {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 2.5em; padding-top: 1.2em;
  font-size: 0.9em; font-weight: 500;
}
.prose > .manual__pagination:first-of-type { display: none; }  /* one set is enough: the bottom */
.manual__pagination-contents { color: var(--muted); }

/* ------------------------------------------ original content families ---- */
.news-card { border-top: 1px solid var(--border); padding: 1.4rem 0; }
.news-card:first-child { border-top: 0; padding-top: 0; }
.news-card__title { margin: 0 0 0.3em; font-size: 1.15rem; }
.news-card__title a { color: var(--strong); }
.news-meta, .news-date, .news-byline { color: var(--muted); font-size: 0.85em; }

.themes__intro { max-width: 60ch; }
.themes__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.themes__theme { margin: 0; }
.themes__theme img { border-radius: 8px; box-shadow: none; transition: transform var(--ease); }
.themes__theme a:hover img { transform: translateY(-2px); }
.themes__theme figcaption { font-size: 0.9em; font-weight: 500; margin-top: 0.6rem; }

.workstations__images { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1.25rem; }
.workstations__image { border: 0; background: none; padding: 0; cursor: zoom-in; }
.workstations__image figure { margin: 0; }
.workstations__image img { border-radius: 8px; width: 100%; }

.team { margin: 0 0 3rem; }
.team__members { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.member { display: grid; gap: 0.3rem; font-size: 0.9em; }
.member img { border-radius: 999px; width: 100%; }
.member h3, .member strong { color: var(--strong); font-size: 1em; margin: 0.6rem 0 0; }

.air__lede { font-style: italic; font-size: 1.1em; max-width: 60ch; }
.resident { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.4rem 1.5rem; align-items: start; margin: 2rem 0; }
.resident > * { grid-column: 2; margin: 0; }
.resident__avatar { grid-column: 1; grid-row: 1 / span 4; border-radius: 999px; width: 100%; }
@media (max-width: 40em) { .resident { grid-template-columns: 1fr; } .resident__avatar { max-width: 6rem; } }

.sponsorship { border-top: 1px solid var(--border); padding: 2rem 0; max-width: 60ch; }
.sponsorship:first-child { border-top: 0; padding-top: 0; }
.sponsorship__logo img { max-height: 3.2rem; width: auto; max-width: 14rem; }
.sponsorship__name { margin: 1em 0 0; }
.sponsorship__terms { color: var(--green); font-weight: 700; font-size: 0.8em; letter-spacing: 0.08em; text-transform: uppercase; margin: 0.2em 0 0; }

.brand__section { margin: 0 0 3rem; }
.brand__figure { background: #fff; border-radius: var(--radius); padding: 2.5rem; display: grid; place-items: center; }
.brand__figure img { max-width: 24rem; border: 0; }
.brand__files { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: 0.9em; }
.brand__hint { color: var(--muted); }

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

/* ==========================================================================
   Omarchy Text: the wordmark's grid, stems trimmed 25 units a side for reading.
   Caps only. Cap height is 80% of the em, so sizes run a little smaller.
   ========================================================================== */
@font-face {
  font-family: 'Omarchy Light';
  src: url('fonts/OmarchyLight.woff2?v=1788171480') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
:root { --display: 'Omarchy Light', 'JetBrains Mono', monospace; --small: 'Omarchy Small', 'JetBrains Mono', monospace; }
@font-face {
  font-family: 'Omarchy Small';
  src: url('fonts/OmarchySmall.woff2?v=1788171480') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

h1, h2, .mission__line, .stats strong, .doc__head h1, .prose h1, .prose h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.hero__h1 { font-size: clamp(1.5rem, 0.8rem + 3vw, 3.3rem); line-height: 1.18; max-width: 18ch; }
h2 { font-size: clamp(1.25rem, 0.8rem + 1.7vw, 2rem); line-height: 1.22; }
.mission__line { font-size: clamp(1.5rem, 1rem + 2.6vw, 3rem); line-height: 1.2; }
.stats strong { font-size: clamp(1.5rem, 1rem + 1.7vw, 2.2rem); }
.doc__head h1, .prose h1 { font-size: clamp(1.4rem, 1rem + 1.9vw, 2.4rem); line-height: 1.2; }
.prose h2 { font-size: 0.92rem; letter-spacing: 0.04em; }

.nav__brand { font-family: var(--display); font-size: 1.05rem; color: var(--green); letter-spacing: 0.02em; }
.nav__brand:hover { text-decoration: none; color: var(--strong); }
.footer h3 { font-family: var(--display); font-size: 0.7rem; letter-spacing: 0.08em; }

/* Text cut is light enough to carry more than headings. */
.nav__links, .nav__cta, .btn, .eyebrow, .stats span, .steps li::before, .footer__cols a, .more, .footer h3, .prose h2 {
  font-family: var(--small); font-weight: 400; text-transform: uppercase;
}
.nav__links { font-size: 0.62rem; letter-spacing: 0.1em; gap: 2rem; }
.nav__cta { font-size: 0.55rem; letter-spacing: 0.1em; padding: 1.05em 1.6em 0.95em; }
.btn { font-size: 0.6rem; letter-spacing: 0.1em; padding: 1.6em 2.4em 1.5em; line-height: 1; }
.eyebrow { font-size: 0.62rem; letter-spacing: 0.12em; }
.stats span { font-size: 0.62rem; letter-spacing: 0.08em; }
.footer__cols a { font-size: 0.68rem; letter-spacing: 0.04em; }
.more { font-size: 0.7rem; letter-spacing: 0.05em; }
.hero__h1 { line-height: 1.24; }
h2 { line-height: 1.28; }
.doc__head h1, .prose h1 { line-height: 1.26; }

/* Theme chip in the nav. */
.theme-chip {
  display: inline-flex; align-items: center; gap: 0.7ch;
  font-family: var(--small); font-size: 0.55rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--strong); background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 1.05em 1.3em 0.95em; cursor: pointer; margin-left: 1.5rem;
}
.theme-chip:hover { border-color: var(--accent); }
.theme-chip i { width: 0.7em; height: 0.7em; border-radius: 50%; background: var(--accent); display: inline-block; }
@media (max-width: 48em) { .theme-chip span { display: none; } .theme-chip { margin-left: auto; } }

/* Theme grid replaces the collage in the themes feature. */
.themes-grid { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.6rem; }
.theme-btn {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.7rem;
  width: 100%; text-align: left;
  font-family: var(--font); font-weight: 500; font-size: 0.82rem;
  color: var(--tfg); background: var(--tbg);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0.6rem 0.75rem; cursor: pointer;
  transition: border-color var(--ease), transform var(--ease);
}
.theme-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-btn[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme-btn .dots { display: grid; grid-template-columns: repeat(2, 0.65em); gap: 2px; }
.theme-btn .dots i { width: 0.65em; height: 0.65em; display: block; border-radius: 2px; }
.theme-btn .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* GitHub Invertocat, monochrome per GitHub's logo guidelines. */
.nav__gh { display: inline-flex; align-items: center; color: var(--strong); margin-left: 0.25rem; }
.nav__gh svg { width: 1.15rem; height: 1.15rem; }
.nav__gh:hover { color: var(--accent); text-decoration: none; }

/* One line box for everything in the nav, centered on the same axis. */
.nav__inner { align-items: center; }
.nav__links { align-items: center; }
.nav__links a, .nav__cta, .theme-chip, .nav__gh { display: inline-flex; align-items: center; line-height: 1; }
.nav__gh svg { display: block; }

/* Mobile: a hamburger opens the links as a panel under the bar. */
.nav__toggle { display: none; margin-left: 0.75rem; width: 2.4rem; height: 2.4rem; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: none; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav__toggle span { display: block; width: 1.05rem; height: 2px; background: var(--strong); border-radius: 1px; transition: transform var(--ease), opacity var(--ease); }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 48em) {
  .nav { position: sticky; }
  .nav__toggle { display: inline-flex; }
  .nav__links { display: none; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem;
    position: absolute; top: 100%; left: 0; right: 0;
    padding: 1.25rem 1.5rem 1.5rem;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }
  .nav.is-open .nav__links a { font-size: 1rem; }
  .nav__gh { margin-left: 0; }
}

/* Fixed-width chip so a longer theme name never shifts the other links. */
.theme-chip { width: 12.6rem; justify-content: center; }
.theme-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 48em) { .theme-chip { width: auto; } }

/* Mobile bar: tighter so brand, chip, Download and the menu button all fit. */
@media (max-width: 48em) {
  .nav__inner { gap: 0.6rem; width: min(100% - 2rem, var(--wrap)); }
  .nav__brand { font-size: 0.85rem; }
  .nav__brand .logo { height: 0.9rem; }
  .nav__cta { padding-inline: 1.1em; margin-left: auto; }
  .theme-chip { margin-left: auto; padding-inline: 0.8em; }
  .theme-chip + .nav__cta { margin-left: 0; }
  .nav__toggle { margin-left: 0.25rem; flex: none; }
}

/* Mid widths (48-72em): the bar carries too much. Swap the wordmark for the
   square mark and collapse the theme chip to its dot. Links and Download stay. */
.brand-mark { display: none; line-height: 0; }
.brand-mark .mark { height: 1.35rem; width: auto; fill: var(--green); display: block; }
@media (min-width: 48em) and (max-width: 72em) {
  .brand-word { display: none; }
  .brand-mark { display: block; }
  .nav__inner { gap: 1.25rem; }
  .nav__links { gap: 1.25rem; }
  .theme-chip { width: auto; padding-inline: 0.9em; margin-left: 0.5rem; }
  .theme-chip span { display: none; }
}

/* Site notice: the thin banner the current site runs above everything. */
.notice {
  display: block; text-align: center;
  padding: 0.55rem 1.5rem 0.5rem;
  background: var(--accent); color: var(--bg);
  font-size: 0.85rem; font-weight: 500;
}

/* Etch reveal for the wordmark (see site.js). */
.logo.etch rect { opacity: 0; animation: etch-in 0.45s ease-out forwards; }
@keyframes etch-in { 0% { opacity: 0; fill: #fff; } 30% { opacity: 1; fill: #fff; } 100% { opacity: 1; fill: var(--green); } }
.etch-beam {
  position: absolute; top: -12%; bottom: -12%; left: 0; width: 3px;
  background: #fff; box-shadow: 0 0 14px 4px color-mix(in srgb, var(--green) 70%, #fff), 0 0 40px 10px color-mix(in srgb, var(--green) 45%, transparent);
  pointer-events: none; opacity: 0.95;
  animation: etch-beam linear forwards;
}
@keyframes etch-beam { 0% { left: 0; opacity: 0.95; } 85% { opacity: 0.95; } 100% { left: 100%; opacity: 0; } }


/* ------------------------------------------------------- subpage hero ---- */
.subhero {
  text-align: center;
  padding: calc(var(--section) * 0.75) 0 calc(var(--section) * 0.55);
  border-bottom: 1px solid var(--border);
  margin-bottom: calc(var(--section) * 0.55);
}
.subhero h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem); line-height: 1.15; margin-inline: auto; max-width: 20ch; }
.subhero .eyebrow { margin-bottom: 1.1rem; }
.subhero .dim { margin: 1rem 0 0; }
.subhero .header__subtext { margin: 1.25rem auto 0; font-style: normal; color: var(--fg); font-size: 1.05rem; max-width: 46rem; }
.doc { padding-top: 0; }
.doc.wrap--text { text-align: left; }

/* Shared .button markup that arrives inside content (e.g. the Luma link). */
.prose .button {
  display: inline-flex; align-items: center; gap: 0.7ch;
  font-weight: 700; font-size: 0.95rem;
  background: var(--accent); color: var(--bg);
  padding: 0.75em 1.4em; border-radius: 999px;
}
.prose .button:hover { text-decoration: none; filter: brightness(1.1); }
.prose .button svg { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

/* Meetups: Luma embed + the rules list. */
.meetups { display: grid; gap: 3rem; max-width: 46rem; margin: 0 auto; }
.meetups__calendar { display: grid; gap: 1.25rem; justify-items: center; text-align: center; }
.meetups__embed { width: 100%; height: 450px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
.rules { border-top: 1px solid var(--border); padding-top: 2.5rem; display: grid; gap: 1.5rem; }
.rules__header { text-align: center; }
.rules__title { margin: 0; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--strong); }
.rules ol { list-style: none; margin: 0; padding: 0; counter-reset: rule; display: grid; gap: 1.1rem; }
.rules .rule { position: relative; padding-left: 3.25rem; margin: 0; }
.rules .rule::before { counter-increment: rule; content: counter(rule); position: absolute; left: 0; top: -0.15rem; font-weight: 700; color: var(--accent); border: 1px solid var(--border); border-radius: 999px; width: 2rem; height: 2rem; display: grid; place-items: center; font-size: 0.9rem; }
.rule__name { display: block; margin-bottom: 0.25rem; }
.rule__name { color: var(--strong); font-weight: 700; }
.rules__note { border-top: 1px solid var(--border); padding-top: 1.5rem; color: var(--muted); text-align: center; }

/* Wallpaper behind the subpage hero too, more heavily veiled than on home. */
.subhero {
  background-image:
    linear-gradient(to bottom, color-mix(in srgb, var(--bg) 60%, transparent), color-mix(in srgb, var(--bg) 88%, transparent) 70%, var(--bg)),
    var(--wall);
  background-size: cover, cover; background-position: center, center 35%;
  border-bottom: 0;
}
.subhero h1 { text-shadow: 0 2px 24px color-mix(in srgb, var(--bg) 90%, transparent); }

/* Dismissable notice. */
.notice { position: relative; padding-inline: 3rem; }
.notice__link { color: inherit; display: block; }
.notice__link:hover { text-decoration: underline; }
.notice__close {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  width: 1.7rem; height: 1.7rem; border: 0; border-radius: 999px;
  background: transparent; color: inherit; opacity: 0.6;
  font: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.notice__close:hover { opacity: 1; background: color-mix(in srgb, var(--bg) 18%, transparent); }
.notice[hidden] { display: none; }

/* Text etch (hero headline). */
.etch-text .etch-ch { display: inline-block; opacity: 0; animation: etch-ch 0.32s ease-out forwards; }
@keyframes etch-ch { 0% { opacity: 0; color: #fff; text-shadow: 0 0 14px #fff; } 40% { opacity: 1; color: #fff; text-shadow: 0 0 8px #fff; } 100% { opacity: 1; color: inherit; text-shadow: none; } }
.etch-text .etch-beam { top: -10%; bottom: -10%; }
.etch-text .etch-word { display: inline-block; white-space: nowrap; }

/* Brand hover etch: the small nav wordmark/text uses the same keyframes. */
.nav__brand .etch-text, .nav__brand .logo.etch { cursor: pointer; }
.brand-word.etch-text .etch-ch { display: inline-block; }
.etch-beam { display: none; }

/* ---- Laseretch headline (see etch.js) ------------------------------------
   The <pre> is the layout box and the fallback; the canvas etches over it. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero__h1--etch { max-width: none; line-height: 0; }
.etchbox { display: block; position: relative; width: fit-content; max-width: 100%; margin: 0 auto; overflow: hidden; }
.etchart {
  margin: 0; color: var(--strong);
  font-family: var(--font); font-weight: 400;
  font-size: clamp(0.28rem, 0.72vw, 0.56rem); line-height: 1.09; letter-spacing: -0.04em;
  white-space: pre; text-align: left; display: inline-block;
}
.etchbox--pending .etchart { visibility: hidden; animation: etch-fallback 0s 2.5s forwards; }
@keyframes etch-fallback { to { visibility: visible; } }
.etchbox--live .etchart { visibility: hidden; animation: none; }
.etchbox canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; mix-blend-mode: screen; pointer-events: none; }
:root[data-light="1"] .etchbox canvas { mix-blend-mode: multiply; }

/* Settled state: the same art as an SVG in the theme colour. The canvas
   fades out over it when the effect finishes. */
.etchfinal { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity 0.7s ease; }
.etchfinal__svg { display: block; width: 100%; height: 100%; fill: var(--strong); }
.etchbox canvas { transition: opacity 0.7s ease; }
.etchbox--done .etchfinal { opacity: 1; }
.etchbox--done canvas { opacity: 0; }
.etchbox--pending .etchfinal, .etchbox--static .etchfinal { opacity: 1; transition: none; }
.etchbox--static .etchart { visibility: hidden; }

/* Lead paragraph under a centered subpage hero: centered too. */
body[data-type="page"] .doc .prose > p:first-child,
.doc .prose .themes__intro, .doc .prose .air__lede, .doc .prose .meetups__calendar > p {
  display: block; max-width: 60ch; margin: 0 auto 2.5rem; text-align: center; text-wrap: balance;
}

/* ==========================================================================
   Stage: features that use the screen. Text sits in the column; the
   screenshot is big and runs off the viewport edge.
   ========================================================================== */
.stage { position: relative; overflow: hidden; padding: calc(var(--section) * 0.7) 0; }
.stage__inner {
  width: min(100% - 3rem, var(--wrap)); margin-inline: auto;
  display: grid; align-items: center; gap: clamp(2rem, 4vw, 4rem);
}
.stage__text p { margin: 1.25rem 0 0; max-width: 40ch; text-wrap: pretty; }
.stage__text .keys { margin-top: 1.5rem; }
.stage__img, .stage__term {
  width: 100%;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.85);
}
@media (min-width: 60em) {
  .stage__inner { grid-template-columns: 26rem minmax(0, 1fr); }
  .stage--left .stage__inner { grid-template-columns: minmax(0, 1fr) 26rem; }
  .stage__text { min-width: 0; }
  /* 60vw of screenshot, cropped by the viewport edge. */
  .stage--right .stage__img, .stage--right .stage__term { width: 60vw; max-width: none; justify-self: start; }
  .stage--left .stage__img { width: 60vw; max-width: none; justify-self: end; }
  .stage--right .stage__term { width: 52vw; }
}
/* Fanned stack of three desktops. */
.stage__stack { position: relative; aspect-ratio: 16 / 10; }
.stage__stack img {
  position: absolute; width: 78%; left: 0; top: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85);
  transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}
.stage__stack img:nth-child(1) { transform: translate(-14%, 4%) rotate(-3deg); z-index: 1; }
.stage__stack img:nth-child(2) { transform: translate(4%, 18%) rotate(1.5deg); z-index: 2; }
.stage__stack img:nth-child(3) { transform: translate(22%, 32%) rotate(4deg); z-index: 3; }
.stage--stack:hover .stage__stack img:nth-child(1) { transform: translate(-20%, 0%) rotate(-5deg); }
.stage--stack:hover .stage__stack img:nth-child(3) { transform: translate(28%, 36%) rotate(6deg); }
@media (min-width: 60em) { .stage--stack .stage__stack { width: 52vw; max-width: none; justify-self: end; } }
.stage .themes-grid { margin-top: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(7.2rem, 1fr)); gap: 0.4rem; }
.stage .theme-btn { font-size: 0.72rem; padding: 0.45rem 0.55rem; }

/* + buttons and modals, Apple product-page style. */
.plus {
  display: inline-flex; align-items: center; gap: 0.7rem; margin-top: 1.5rem;
  font: inherit; font-weight: 500; font-size: 0.9rem; color: var(--strong);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.plus__ring {
  display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 999px;
  background: var(--accent); color: var(--bg); font-size: 1.3rem; line-height: 1; font-weight: 500;
  transition: transform var(--ease);
}
.plus:hover .plus__ring { transform: scale(1.08); }
.plus:hover { text-decoration: underline; }

.modal { border: 0; padding: 0; background: none; max-width: none; max-height: none; width: 100%; height: 100%; }
.modal::backdrop { background: color-mix(in srgb, #000 60%, transparent); backdrop-filter: blur(10px); }
.modal[open] { display: grid; place-items: center; }
.modal__box {
  position: relative; width: min(60rem, 92vw); max-height: 88vh; overflow: auto;
  background: var(--bg); color: var(--fg); border: 1px solid var(--border); border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  box-shadow: 0 60px 120px -30px rgba(0, 0, 0, 0.9);
  animation: modal-in 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal__box h2 { margin: 0.25rem 0 1rem; }
.modal__box p { margin: 0.9em 0; max-width: 62ch; }
.modal__box .keys { max-width: 34rem; margin: 1.25rem 0; }
.modal__box img { width: 100%; border-radius: 12px; border: 1px solid var(--border); margin-top: 1.5rem; }
.modal__collage { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.5rem; }
.modal__collage img { margin: 0; border-radius: 8px; }
.modal__close {
  position: absolute; top: 1rem; right: 1rem; width: 2.4rem; height: 2.4rem; border-radius: 999px;
  border: 0; background: var(--surface); color: var(--strong); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.modal__close:hover { background: var(--border); }
body.modal-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .modal__box { animation: none; } .stage__stack img { transition: none; } }

/* ==========================================================================
   Docs layout for the manual: grouped chapters | chapter | on this page.
   Same chrome and hero band as every other page.
   ========================================================================== */
.subhero--docs { padding-bottom: calc(var(--section) * 0.35); margin-bottom: 0; }
.subhero--docs h1 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); }
.docs { display: grid; gap: 3rem; align-items: start; padding: 2.5rem 0 4rem; }
@media (min-width: 64em) { .docs { grid-template-columns: 16rem minmax(0, 1fr); gap: 4rem; } }
@media (min-width: 84em) { .docs { grid-template-columns: 16rem minmax(0, 1fr) 13rem; } }

/* Sidebar */
.docs__side { position: sticky; top: 4.5rem; max-height: calc(100dvh - 5.5rem); overflow: auto; padding-right: 0.5rem; font-size: 0.85rem; }
@media (max-width: 64em) { .docs__side { position: static; max-height: none; } }
.docs__search { position: relative; display: block; margin-bottom: 1.25rem; }
.docs__search input {
  width: 100%; font: inherit; color: var(--strong);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.55rem 2.4rem 0.55rem 0.8rem;
}
.docs__search kbd { position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%); font-size: 0.75rem; }
.toc-group { border-top: 1px solid var(--border); }
.toc-group:first-of-type { border-top: 0; }
.toc-group summary {
  list-style: none; cursor: pointer;
  font-family: var(--small); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); padding: 0.85rem 0.35rem 0.6rem; display: flex; justify-content: space-between; align-items: center;
}
.toc-group summary::-webkit-details-marker { display: none; }
.toc-group summary::after { content: "+"; font-family: var(--font); font-size: 1rem; color: var(--muted); }
.toc-group[open] summary::after { content: "–"; }
.toc-group summary:hover { color: var(--strong); }
.toc-group ol { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.manual__toc--grouped a { display: block; color: var(--fg); padding: 0.28rem 0.6rem; border-left: 2px solid var(--border); margin-left: 0.35rem; }
.manual__toc--grouped a:hover { color: var(--strong); border-left-color: var(--muted); text-decoration: none; }
.manual__toc--grouped a[aria-current="page"] { color: var(--strong); border-left-color: var(--accent); font-weight: 500; }
.manual__toc--grouped li[hidden] { display: none; }
.toc-group.is-filtered summary { display: none; }

/* Chapter */
.docs__main { min-width: 0; }
.docs__main .prose { max-width: 46rem; }
.docs__main .prose > h1:first-child { display: none; }          /* the hero band shows it */
.docs__main .prose > .manual__pagination:first-of-type { display: none; }
.docs__main .prose h2 { scroll-margin-top: 5rem; padding-top: 0.5rem; }
.docs__main .prose h2 a.anchor { color: var(--muted); opacity: 0; margin-left: 0.4ch; font-weight: 400; text-decoration: none; }
.docs__main .prose h2:hover a.anchor { opacity: 1; }
.docs__main .prose pre { border-radius: 12px; }
/* prev / next as two cards */
.docs__main .manual__pagination {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 0; margin-top: 3rem; padding-top: 0;
  font-family: var(--font); font-size: 0.95rem;
}
.docs__main .manual__pagination a { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; color: var(--strong); font-weight: 500; }
.docs__main .manual__pagination a:hover { border-color: var(--accent); text-decoration: none; }
.docs__main .manual__pagination-prev, .docs__main .manual__pagination-previous { text-align: left; }
.docs__main .manual__pagination-next { text-align: right; }
.docs__main .manual__pagination-contents { display: none; }
.docs__main .manual__pagination a::before { display: block; font-family: var(--small); font-size: 0.55rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.docs__main .manual__pagination-previous::before, .docs__main .manual__pagination-prev::before { content: "Previous"; }
.docs__main .manual__pagination-next::before { content: "Next"; }

/* Section cards on the manual's front page */
.doc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin-top: 3rem; }
.doc-card { border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem 1.4rem; background: var(--surface); }
.doc-card h3 { margin: 0 0 0.75rem; font-family: var(--small); font-weight: 400; font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.doc-card ul { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.doc-card li { padding: 0.22rem 0; }
.doc-card a { color: var(--strong); }
.doc-card .more-count { color: var(--muted); font-size: 0.8rem; padding-top: 0.4rem; }

/* On this page */
.docs__onpage { position: sticky; top: 4.5rem; font-size: 0.82rem; display: none; }
@media (min-width: 84em) { .docs__onpage:not([hidden]) { display: block; } }
.docs__onpage .eyebrow { margin-bottom: 0.75rem; }
.docs__onpage a { display: block; color: var(--muted); padding: 0.22rem 0.75rem; border-left: 2px solid var(--border); }
.docs__onpage a:hover { color: var(--strong); text-decoration: none; }
.docs__onpage a.is-active { color: var(--strong); border-left-color: var(--accent); }

/* Form fields: focus is an accent border plus a soft ring, no offset gap. */
input:focus-visible, select:focus-visible, textarea:focus-visible, .docs__search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

/* The hero H1 is etched letter by letter (spans), which disables kerning during the
   animation. Keep kerning off permanently so the text does not shift when the spans go. */
.hero__h1 { font-kerning: none; font-feature-settings: 'kern' 0; }

/* ==========================================================================
   The Omarch — mascot drawn from the square logo's 15x15 grid.
   Lives in the footer, cropped below the waist; hover and he peeks up.
   ========================================================================== */
.footer { position: relative; overflow: hidden; }
.mascot {
  --px: 7px;
  position: absolute; right: clamp(1rem, 8vw, 8rem); bottom: calc(var(--px) * -9);
  width: calc(var(--px) * 17); height: calc(var(--px) * 17);
  font-size: var(--px); line-height: 0;
  pointer-events: auto; cursor: pointer;
  transition: bottom 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: mascot-bob 3.2s ease-in-out infinite;
}
.mascot > i { position: absolute; left: 1em; top: 0; width: 1em; height: 1em; display: block; }
.mascot__body { background: transparent; box-shadow:
    0em 0em 0 0 var(--green),
    1em 0em 0 0 var(--green),
    2em 0em 0 0 var(--green),
    3em 0em 0 0 var(--green),
    4em 0em 0 0 var(--green),
    5em 0em 0 0 var(--green),
    6em 0em 0 0 var(--green),
    7em 0em 0 0 var(--green),
    8em 0em 0 0 var(--green),
    9em 0em 0 0 var(--green),
    10em 0em 0 0 var(--green),
    11em 0em 0 0 var(--green),
    12em 0em 0 0 var(--green),
    13em 0em 0 0 var(--green),
    14em 0em 0 0 var(--green),
    0em 1em 0 0 var(--green),
    7em 1em 0 0 var(--green),
    14em 1em 0 0 var(--green),
    0em 2em 0 0 var(--green),
    2em 2em 0 0 var(--green),
    3em 2em 0 0 var(--green),
    4em 2em 0 0 var(--green),
    5em 2em 0 0 var(--green),
    6em 2em 0 0 var(--green),
    7em 2em 0 0 var(--green),
    11em 2em 0 0 var(--green),
    12em 2em 0 0 var(--green),
    14em 2em 0 0 var(--green),
    0em 3em 0 0 var(--green),
    2em 3em 0 0 var(--green),
    12em 3em 0 0 var(--green),
    14em 3em 0 0 var(--green),
    0em 4em 0 0 var(--green),
    2em 4em 0 0 var(--green),
    12em 4em 0 0 var(--green),
    14em 4em 0 0 var(--green),
    0em 5em 0 0 var(--green),
    2em 5em 0 0 var(--green),
    12em 5em 0 0 var(--green),
    14em 5em 0 0 var(--green),
    0em 6em 0 0 var(--green),
    2em 6em 0 0 var(--green),
    12em 6em 0 0 var(--green),
    14em 6em 0 0 var(--green),
    0em 7em 0 0 var(--green),
    1em 7em 0 0 var(--green),
    2em 7em 0 0 var(--green),
    12em 7em 0 0 var(--green),
    14em 7em 0 0 var(--green),
    0em 8em 0 0 var(--green),
    2em 8em 0 0 var(--green),
    12em 8em 0 0 var(--green),
    14em 8em 0 0 var(--green),
    0em 9em 0 0 var(--green),
    2em 9em 0 0 var(--green),
    12em 9em 0 0 var(--green),
    14em 9em 0 0 var(--green),
    0em 10em 0 0 var(--green),
    2em 10em 0 0 var(--green),
    12em 10em 0 0 var(--green),
    14em 10em 0 0 var(--green),
    0em 11em 0 0 var(--green),
    2em 11em 0 0 var(--green),
    12em 11em 0 0 var(--green),
    14em 11em 0 0 var(--green),
    0em 12em 0 0 var(--green),
    2em 12em 0 0 var(--green),
    3em 12em 0 0 var(--green),
    4em 12em 0 0 var(--green),
    5em 12em 0 0 var(--green),
    6em 12em 0 0 var(--green),
    7em 12em 0 0 var(--green),
    8em 12em 0 0 var(--green),
    9em 12em 0 0 var(--green),
    10em 12em 0 0 var(--green),
    11em 12em 0 0 var(--green),
    12em 12em 0 0 var(--green),
    14em 12em 0 0 var(--green),
    0em 13em 0 0 var(--green),
    7em 13em 0 0 var(--green),
    14em 13em 0 0 var(--green),
    0em 14em 0 0 var(--green),
    1em 14em 0 0 var(--green),
    2em 14em 0 0 var(--green),
    3em 14em 0 0 var(--green),
    4em 14em 0 0 var(--green),
    5em 14em 0 0 var(--green),
    6em 14em 0 0 var(--green),
    7em 14em 0 0 var(--green),
    9em 14em 0 0 var(--green),
    10em 14em 0 0 var(--green),
    11em 14em 0 0 var(--green),
    12em 14em 0 0 var(--green),
    13em 14em 0 0 var(--green),
    14em 14em 0 0 var(--green); }
.mascot__eyes { background: transparent; transform-origin: 0 6em; transition: transform 0.25s ease;
  animation: mascot-blink 5s steps(1) infinite; box-shadow:
    5em 5em 0 0 var(--green),
    5em 6em 0 0 var(--green),
    9em 5em 0 0 var(--green),
    9em 6em 0 0 var(--green); }
.mascot__mouth { background: transparent; transition: box-shadow 0.25s ease; box-shadow:
    6em 9em 0 0 var(--green),
    6em 9em 0 0 var(--green),
    7em 9em 0 0 var(--green),
    8em 9em 0 0 var(--green),
    8em 9em 0 0 var(--green); }
.mascot__arms { background: transparent; transition: transform 0.25s ease; box-shadow:
    -1em 7em 0 0 var(--green),
    -1em 8em 0 0 var(--green),
    15em 7em 0 0 var(--green),
    15em 8em 0 0 var(--green); }
.mascot__legs { background: transparent; box-shadow:
    3em 15em 0 0 var(--green),
    3em 16em 0 0 var(--green),
    5em 15em 0 0 var(--green),
    5em 16em 0 0 var(--green),
    9em 15em 0 0 var(--green),
    9em 16em 0 0 var(--green),
    11em 15em 0 0 var(--green),
    11em 16em 0 0 var(--green); }

.mascot:hover, .mascot:focus-visible { bottom: calc(var(--px) * 1); animation: none; }
.mascot:hover .mascot__eyes, .mascot:focus-visible .mascot__eyes { transform: translateY(-1em); animation: none; }
.mascot:hover .mascot__mouth, .mascot:focus-visible .mascot__mouth { box-shadow:
    5em 8em 0 0 var(--green),
    6em 9em 0 0 var(--green),
    7em 9em 0 0 var(--green),
    8em 9em 0 0 var(--green),
    9em 8em 0 0 var(--green); }
.mascot:hover .mascot__arms { animation: mascot-wave 0.5s ease-in-out infinite alternate; }
.mascot:hover .mascot__legs { animation: mascot-legs 0.35s steps(2) infinite; }

@keyframes mascot-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.4em); } }
@keyframes mascot-blink { 0%, 92%, 100% { transform: scaleY(1); } 94%, 98% { transform: scaleY(0.15); } }
@keyframes mascot-wave { from { transform: translateY(0); } to { transform: translateY(-2em); } }
@keyframes mascot-legs { from { transform: translateY(0); } to { transform: translateY(-1em); } }
@media (prefers-reduced-motion: reduce) { .mascot, .mascot * { animation: none !important; transition: none !important; } }
@media (max-width: 48em) { .mascot { --px: 5px; right: 1rem; } }

/* ==========================================================================
   Pixel draw: the headline art, one half-cell pixel at a time, in draw
   order (letter -> column -> row). JS sizes the box to a whole number of
   device pixels per cell, so the grid renders crisp with no seams.
   ========================================================================== */
.hero__h1--px { max-width: none; line-height: 0; }
.pxdraw { display: block; position: relative; width: min(100%, 62rem); margin: 0 auto; --dur: 1600ms; }
.pxdraw__svg, .pxfinal__svg { display: block; width: 100%; height: 100%; fill: var(--strong); }
.pxdraw__svg rect { opacity: 1; }
.pxdraw--run .pxdraw__svg rect {
  opacity: 0;
  animation: px-in 180ms steps(2, end) forwards;
  animation-delay: calc(var(--i) * (var(--dur) / var(--n)));
}
@keyframes px-in {
  0%   { opacity: 0; }
  1%   { opacity: 1; fill: #fff; }
  100% { opacity: 1; fill: var(--strong); }
}
.pxdraw__pen {
  position: absolute; display: none; width: 0; height: 0;
  box-shadow: 0 0 0 2px #fff, 0 0 10px 4px color-mix(in srgb, var(--accent) 80%, #fff), 0 0 26px 10px color-mix(in srgb, var(--accent) 45%, transparent);
  pointer-events: none;
}
.pxdraw--run .pxdraw__pen { display: block; }
.pxdraw__final { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity 0.4s ease; }
.pxdraw--done .pxdraw__final { opacity: 1; }
.pxdraw--done .pxdraw__svg { opacity: 0; transition: opacity 0.4s ease; }
.pxdraw--run:not(.pxdraw--done) .pxdraw__final { opacity: 0; }
.hero .pxdraw { filter: drop-shadow(0 2px 24px color-mix(in srgb, var(--bg) 90%, transparent)); }

/* Ambient pixel embers behind the headline: one element per ember, its
   box-shadow list keyframed (the campfire trick). */
.hero__embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero__embers i {
  position: absolute; left: 50%; bottom: 20%; width: 4px; height: 4px; background: transparent;
  opacity: 0; animation: ember 9s linear infinite;
  box-shadow:
    -22vw 0 0 0 var(--accent), -9vw 6vh 0 0 var(--green), 8vw -4vh 0 0 var(--accent),
    19vw 3vh 0 0 var(--green), 27vw -8vh 0 0 var(--accent), -31vw -6vh 0 0 var(--green);
}
.hero__embers i:nth-child(2) { animation-delay: -3s; left: 46%; }
.hero__embers i:nth-child(3) { animation-delay: -6s; left: 54%; }
@keyframes ember {
  0%   { transform: translateY(0); opacity: 0; }
  10%  { opacity: 0.55; }
  70%  { opacity: 0.35; }
  100% { transform: translateY(-46vh); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .hero__embers { display: none; } .pxdraw--run .pxdraw__svg rect { animation: none; opacity: 1; } .pxdraw__pen { display: none !important; } }

/* ==========================================================================
   Omarchy menu (walker-style), keybindings sheet, and the mark button in the
   bar — the way you get around in Omarchy itself.
   ========================================================================== */
.nav__omenu {
  display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; margin-right: 0.25rem;
  background: none; border: 1px solid transparent; border-radius: 8px; cursor: pointer; padding: 0;
}
.nav__omenu .mark { width: 1.3rem; height: 1.3rem; fill: var(--green); display: block; transition: transform var(--ease); }
.nav__omenu:hover { border-color: var(--border); background: var(--surface); }
.nav__omenu:hover .mark { transform: scale(1.08); }
.hero__key { margin-top: 1.25rem; }
.hero__key kbd { font-size: 0.8em; }

.omenu, .okeys { border: 0; padding: 0; background: none; max-width: none; max-height: none; width: 100%; height: 100%; }
.omenu::backdrop, .okeys::backdrop { background: color-mix(in srgb, #000 55%, transparent); backdrop-filter: blur(8px); }
.omenu[open], .okeys[open] { display: grid; place-items: start center; padding-top: 12vh; }
.omenu__box, .okeys__box {
  width: min(40rem, 92vw);
  background: color-mix(in srgb, var(--bg) 96%, transparent); color: var(--fg);
  border: 1px solid var(--accent); border-radius: 12px;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  animation: modal-in 0.22s cubic-bezier(0.33, 1, 0.68, 1);
}
.okeys__box { width: min(60rem, 92vw); padding: 0 0 1rem; }
.omenu__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.75rem; color: var(--muted); }
.omenu__title { font-family: var(--small); letter-spacing: 0.1em; text-transform: uppercase; color: var(--strong); }
.omenu__hint kbd { font-size: 0.75rem; margin-right: 0.2rem; }
.omenu__input { width: 100%; font: inherit; font-size: 1.05rem; color: var(--strong); background: none; border: 0; padding: 0.9rem 1rem; outline: none; }
.omenu__input::placeholder { color: var(--muted); }
.omenu__list { list-style: none; margin: 0; padding: 0.4rem; max-height: 50vh; overflow: auto; border-top: 1px solid var(--border); }
.omenu__group { padding: 0.75rem 0.7rem 0.3rem; font-family: var(--small); font-size: 0.55rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.omenu__item { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 0.5rem 0.7rem; border-radius: 6px; cursor: pointer; color: var(--fg); }
.omenu__item small { color: var(--muted); font-size: 0.75rem; }
.omenu__item.is-active { background: var(--accent); color: var(--bg); }
.omenu__item.is-active small { color: color-mix(in srgb, var(--bg) 70%, var(--accent)); }
.omenu__item .swatch { width: 0.8rem; height: 0.8rem; border-radius: 3px; border: 1px solid var(--border); flex: none; margin-right: 0.6rem; }
.omenu__empty { padding: 1rem 0.7rem; color: var(--muted); }
.okeys__cols { display: grid; gap: 1rem 2rem; padding: 0.5rem 1.25rem 0.5rem; }
@media (min-width: 48em) { .okeys__cols { grid-template-columns: 1fr 1fr; } }
.okeys h3 { margin: 0.75rem 0 0.5rem; font-family: var(--small); font-weight: 400; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.okeys .keys { max-width: none; }

/* Notice on narrow screens: wrap on two lines at most, keep the × clear of the text. */
@media (max-width: 40em) {
  .notice { font-size: 0.78rem; line-height: 1.35; padding: 0.5rem 2.4rem 0.5rem 0.9rem; text-align: left; }
  .notice__close { right: 0.4rem; }
}

/* Pixel headline only where it has room; phones get the type version. */
.hero__h1-text { display: none; }
@media (max-width: 48em) {
  .hero__h1--px { line-height: 1.22; max-width: 16ch; }
  .hero__h1--px .pxdraw { display: none; }
  .hero__h1--px .hero__h1-text { display: inline; }
}
@media (min-width: 48.01em) {
  .hero__h1--px .hero__h1-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* No Super key on a phone. */
@media (max-width: 48em) { .hero__key, .stage__key, .stage__fine { display: none; } .nav__omenu { display: none; } }

/* Phones: the chapter list folds behind a "Chapters" toggle. Desktop: always open, no toggle. */
.docs__fold-summary { display: none; }
@media (max-width: 64em) {
  .docs__fold-summary {
    display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none;
    font-family: var(--small); font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--strong);
    border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 0.9rem; background: var(--surface);
  }
  .docs__fold-summary::-webkit-details-marker { display: none; }
  .docs__fold-summary::after { content: "+"; font-family: var(--font); font-size: 1rem; color: var(--muted); }
  .docs__fold[open] .docs__fold-summary::after { content: "–"; }
  .docs__fold[open] .docs__fold-summary { margin-bottom: 1rem; }
}

.stage__key { margin-top: 1.25rem; max-width: 40ch; }
.stage__key kbd { font-size: 0.8em; }

/* Tighten the mark-to-wordmark gap in the bar (the flex gap is 2rem / 1.25rem). */
@media (min-width: 72.01em) { .nav__omenu + .nav__brand { margin-left: -1.4rem; } }
@media (min-width: 48em) and (max-width: 72em) { .nav__omenu + .nav__brand { margin-left: -0.65rem; } }

/* News: left-aligned, same column as the install steps. */
.news__inner { max-width: var(--text); margin-inline: auto; text-align: left; }
.news__inner .post-list { margin-top: 1.75rem; }

.stage__key { color: var(--fg); font-size: 0.9rem; }
.stage__fine { margin-top: 0.5rem; max-width: 40ch; color: var(--muted); font-size: 0.72rem; line-height: 1.5; }
.stage__fine kbd { font-size: 0.9em; }

/* Super key icon inside <kbd>Super</kbd>. */
kbd .kbd-ico { display: inline-block; width: 0.95em; height: 0.95em; margin-right: 0.35em; vertical-align: -0.1em; line-height: 1; font-size: 1em; opacity: 0.85; }
kbd span.kbd-ico { width: auto; }

/* Clickable key combos. */
.keycombo { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; display: inline; }
.keycombo kbd { transition: border-color var(--ease), transform var(--ease), color var(--ease); }
.keycombo:hover kbd { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.keycombo:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Key combos never wrap; the description does. */
.keys li > span:first-child { white-space: nowrap; flex: none; }
.keys li > span:last-child { text-align: right; }

/* News index cards: the whole card is the link (the accessible "Read more"
   link is stretched over it), one visible "Read more" pill, lift on hover. */
.news-list { display: grid; gap: 1rem; }
.news-card {
  position: relative; display: grid; gap: 0.6rem;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  padding: 1.5rem 1.6rem 1.4rem; margin: 0;
  transition: transform 0.25s cubic-bezier(0.33, 1, 0.68, 1), border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.news-card:first-child { border-top: 1px solid var(--border); padding-top: 1.5rem; }
.news-card header { display: grid; gap: 0.35rem; }
.news-card .news-meta { margin: 0; font-size: 0.8rem; }
.news-card__title { margin: 0; font-size: 1.15rem; line-height: 1.3; color: var(--strong); transition: color 0.25s ease; }
.news-card__excerpt { color: var(--fg); max-width: 62ch; }
.news-card__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; color: transparent; font-size: 0; text-decoration: none; }
.news-card__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.news-card__more { margin-top: 0.4rem; }
.news-card__button {
  display: inline-flex; align-items: center; gap: 0.6ch;
  font-size: 0.8rem; font-weight: 500; color: var(--accent);
  border: 1px solid var(--border); border-radius: 999px; padding: 0.35em 0.9em;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.news-card__button::after { content: "→"; display: inline-block; transition: transform 0.25s cubic-bezier(0.33, 1, 0.68, 1); }
.news-card:hover, .news-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--surface) 85%, var(--accent) 15%);
}
.news-card:hover .news-card__title { color: var(--accent); }
.news-card:hover .news-card__button { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.news-card:hover .news-card__button::after { transform: translateX(4px); }
.news-card .news-byline a { position: relative; z-index: 2; }   /* the author link stays clickable */
@media (prefers-reduced-motion: reduce) { .news-card, .news-card * { transition: none !important; } .news-card:hover { transform: none; } }

/* Pixel confetti layer. */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 10000; overflow: hidden; }
.confetti i { position: absolute; left: 0; top: 0; display: block; will-change: transform, opacity; }

/* Live hotkey rows: click one and the screenshot beside it changes. */
.keyrow { cursor: pointer; border-radius: 6px; transition: background 0.2s ease; }
.keyrow:hover, .keyrow:focus-visible { background: color-mix(in srgb, var(--surface) 70%, var(--accent) 12%); }
.keyrow:hover kbd, .keyrow.is-active kbd { border-color: var(--accent); color: var(--accent); }
.keyrow.is-active > span:last-child { color: var(--strong); }
.keyrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#f-keys .stage__ghost { transition: opacity 0.6s ease; z-index: 1; }
