/* ==========================================================================
   Koala Embedded - site styles
   Single stylesheet, no build step, no external dependencies.
   Sections: 1 fonts  2 tokens  3 base  4 layout  5 header  6 search
             7 buttons  8 blocks  9 cards 10 forms 11 footer 12 utilities
   ========================================================================== */

/* 1 ----------------------------------------------------------- fonts ----- */
/* Koala Embedded display family. Basic Latin only, one weight each, so they
   are used for the wordmark and headings, never for body copy. Anything
   outside U+0020-007E falls back to the body sans automatically.            */

@font-face {
  font-family: "Koala Grove";
  src: url("/assets/fonts/KoalaGrove-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E;
}
@font-face {
  font-family: "Eucalyptus Circuit";
  src: url("/assets/fonts/EucalyptusCircuit-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E;
}
@font-face {
  font-family: "Koala Fieldwork";
  src: url("/assets/fonts/KoalaFieldwork-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E;
}

/* 2 ---------------------------------------------------------- tokens ----- */

:root {
  /* surfaces */
  --paper: #FBF6EE;
  --paper-sunk: #F3E9D9;
  --card: #FFFCF6;
  --bark: #1F241C;
  --bark-lift: #2C3328;

  /* ink */
  --ink: #23271F;
  --ink-soft: #4E564A;
  --ink-faint: #6E7568;
  --ink-invert: #F4EEE2;

  /* lines */
  --line: #E2D6C2;
  --line-soft: #EDE3D3;

  /* brand */
  --gum: #2E6640;
  --gum-deep: #1E4A2C;
  --gum-soft: #E4EEDF;
  --copper: #8F4F20;
  --copper-lit: #B87333;
  --wattle: #E8B21F;
  --wattle-soft: #FBEFCB;
  --teal: #1F6E75;
  --teal-soft: #DCEDEE;

  /* type */
  --font-display: "Koala Grove", "Eucalyptus Circuit", ui-sans-serif, system-ui, sans-serif;
  --font-heading: "Eucalyptus Circuit", "Koala Grove", ui-sans-serif, system-ui, sans-serif;
  --font-note: "Koala Fieldwork", ui-sans-serif, system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas,
               "Liberation Mono", monospace;

  /* rhythm */
  --wrap: 1180px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --band: clamp(3.5rem, 7vw, 6rem);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(35, 39, 31, .06), 0 2px 8px rgba(35, 39, 31, .04);
  --shadow-md: 0 2px 4px rgba(35, 39, 31, .05), 0 10px 26px rgba(35, 39, 31, .08);

  /* the fine field grid used behind sunken bands */
  --grid-line: rgba(46, 102, 64, .07);
}

/* 3 ------------------------------------------------------------ base ----- */

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

/* Components below set display:grid / display:flex, which would otherwise beat
   the user-agent rule for [hidden] and leave hidden blocks on screen. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, .97rem + .15vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.15;
  text-wrap: balance;
  font-weight: 600;
}

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.15rem, 1.5rem + 3vw, 3.45rem);
  letter-spacing: -.005em;
}
h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(1.7rem, 1.35rem + 1.6vw, 2.5rem);
}
h3 { font-size: clamp(1.12rem, 1.05rem + .35vw, 1.3rem); }
h4 { font-size: 1rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--gum-deep); text-underline-offset: .18em; text-decoration-thickness: .07em; }
a:hover { color: var(--copper); }

ul, ol { padding-left: 1.25em; }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--paper-sunk);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: .08em .34em;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--band) 0;
}

::selection { background: var(--wattle-soft); color: var(--ink); }

/* focus - always visible, never removed */
:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: .75rem;
  top: -100vh;
  z-index: 200;
  background: var(--gum-deep);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0; color: #fff; }

main:focus { outline: none; }

/* 4 ---------------------------------------------------------- layout ----- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 760px; }
.wrap--mid { max-width: 940px; }

.band { padding-block: var(--band); }
.band--tight { padding-block: clamp(2.25rem, 4.5vw, 3.5rem); }

.band--sunk {
  background-color: var(--paper-sunk);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  border-block: 1px solid var(--line);
}

.band--dark {
  background: var(--bark);
  color: var(--ink-invert);
  border-block: 1px solid #141812;
}
.band--dark h2, .band--dark h3 { color: #fff; }
/* :not(.btn) so button colours are never overridden inside a dark band */
.band--dark a:not(.btn) { color: #CFE3C4; }
.band--dark a:not(.btn):hover { color: var(--wattle); }
.band--dark .kicker { color: var(--wattle); }
.band--dark .lead, .band--dark p { color: #D6D3C6; }

.band__head { max-width: 62ch; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.band__head--split {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: end;
  justify-content: space-between;
}
.band__head--split > div { max-width: 62ch; }

.kicker {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 .85rem;
  font-weight: 600;
}
.kicker::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: currentColor;
  flex: none;
  border-radius: 2px;
}

.lead {
  font-size: clamp(1.06rem, 1rem + .4vw, 1.28rem);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 60ch;
}

.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.6rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 218px), 1fr)); }

/* circuit-trace divider */
.trace {
  display: block;
  width: 100%;
  height: 26px;
  color: var(--line);
  overflow: hidden;
}

/* 5 ---------------------------------------------------------- header ----- */

.announce {
  background: var(--gum-deep);
  color: #F1EDE1;
  font-size: .9rem;
  text-align: center;
  padding: .55rem var(--gutter);
  border-bottom: 1px solid #17361f;
}
.announce a { color: var(--wattle); font-weight: 600; }
.announce__dot {
  display: inline-block;
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: var(--wattle);
  margin-right: .5rem;
  vertical-align: baseline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(4px)) {
  .site-header { background: var(--paper); }
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
  /* wider than the content column so the full bar fits on one line */
  max-width: 1340px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
  padding: .35rem 0;
}
.brand__mark { color: var(--gum); display: flex; flex: none; }
.brand__mark .mark { width: 38px; height: 38px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: .005em;
}
.brand__tag {
  font-family: var(--font-mono);
  font-size: .63rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: .18rem;
}
.brand:hover .brand__mark { color: var(--copper-lit); }

/* Hidden by default, and only ever shown on narrow viewports WITH JavaScript -
   without JS the nav is simply stacked and always visible. */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: .5rem .9rem;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  min-height: 44px;
}
.nav-toggle__box { display: grid; gap: 4px; width: 18px; }
.nav-toggle__box span {
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__box span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.75rem);
  flex-wrap: wrap;
}

.nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  display: block;
  padding: .55rem .62rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .93rem;
  white-space: nowrap;
}
.nav__link:hover { background: var(--gum-soft); color: var(--gum-deep); }
.nav__link.is-active {
  color: var(--gum-deep);
  box-shadow: inset 0 -2px 0 var(--gum);
}

.nav__actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.nav__actions .btn { font-size: .88rem; padding-inline: .95rem; }

.search-open {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: .55rem .95rem;
  min-height: 44px;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.search-open:hover { border-color: var(--gum); color: var(--gum-deep); }

/* 6 ---------------------------------------------------------- search ----- */

.search-panel {
  position: sticky;
  top: 4.25rem;
  z-index: 55;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.search-panel[hidden] { display: none; }
.search-panel__inner { padding-block: 1.25rem 1.5rem; }

.search-form__label {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--copper);
  font-weight: 600;
  margin-bottom: .5rem;
}
.search-form__row { display: flex; gap: .55rem; flex-wrap: wrap; }
.search-form__input {
  flex: 1 1 16rem;
  min-width: 0;
  font: inherit;
  padding: .7rem .9rem;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
.search-form__input:focus-visible { border-color: var(--gum); }
.search-form__note {
  margin: .6rem 0 0;
  font-size: .84rem;
  color: var(--ink-faint);
}

.search-results { margin-top: 1.1rem; }
.search-results__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.search-results__item a {
  display: block;
  padding: .65rem .8rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
}
.search-results__item a:hover { border-color: var(--gum); background: var(--gum-soft); }
.search-results__kind {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--copper);
  display: block;
}
.search-results__title { font-weight: 650; }
.search-results__desc { font-size: .88rem; color: var(--ink-soft); margin: .1rem 0 0; }
.search-results__count { font-size: .85rem; color: var(--ink-faint); margin: 0 0 .6rem; }

/* 7 --------------------------------------------------------- buttons ----- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 46px;
  padding: .65rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: .95rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform .14s ease, background-color .14s ease, border-color .14s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* site.js rewrites Shop/GitHub actions into their "coming soon" state as soon as
   it runs. Suppressing the transition until then stops that showing as a visible
   colour fade on every page load. */
html:not(.config-ready) .btn { transition: none; }

.btn--primary { background: var(--gum); color: #fff; }
.btn--primary:hover { background: var(--gum-deep); color: #fff; }

.btn--ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--gum); color: var(--gum-deep); background: var(--gum-soft); }

.btn--shop {
  background: var(--wattle);
  color: #2A2409;
  border-color: #CE9C12;
  box-shadow: 0 1px 0 #C79712;
}
.btn--shop:hover { background: #F2BE2E; color: #2A2409; }

.btn--code {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
  font-size: .9rem;
  padding-inline: .95rem;
}
.btn--code:hover { border-color: var(--ink-soft); color: var(--ink); }

.btn--quiet { background: transparent; color: var(--ink-soft); border-color: transparent; }
.btn--quiet:hover { background: var(--paper-sunk); color: var(--ink); }

.btn--small { min-height: 38px; padding: .35rem .8rem; font-size: .85rem; }

.btn--onDark { background: var(--wattle); color: #2A2409; }
.btn--onDark:hover { background: #F2BE2E; color: #2A2409; }
.btn--onDarkGhost { background: transparent; border-color: #59614F; color: #EFEADF; }
.btn--onDarkGhost:hover { border-color: var(--wattle); color: #fff; background: rgba(255,255,255,.05); }

/* a "not configured yet" action - looks deliberate, never a dead link */
.btn.is-soon,
.btn[aria-disabled="true"] {
  background: var(--paper-sunk);
  color: var(--ink-faint);
  border-color: var(--line);
  cursor: not-allowed;
  box-shadow: none;
}
.btn.is-soon:hover, .btn[aria-disabled="true"]:hover { transform: none; }

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

/* 8 ---------------------------------------------------------- blocks ----- */

/* hero -------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(70% 90% at 88% 12%, var(--gum-soft) 0%, transparent 62%),
    radial-gradient(50% 70% at 4% 90%, var(--wattle-soft) 0%, transparent 60%),
    var(--paper);
}
.hero__grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); }
}
/* slightly tighter than the global h1 so "Hardware you can hack." holds one line */
.hero h1 {
  margin-bottom: .35em;
  font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.15rem);
}
.hero__sub {
  font-size: clamp(1.08rem, 1rem + .5vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 1.6rem;
}
.hero__note {
  margin-top: 1.4rem;
  font-family: var(--font-note);
  font-size: 1.02rem;
  color: var(--ink-faint);
}

.hero__figure {
  position: relative;
  margin: 0;
  justify-self: center;
  max-width: 460px;
}
.hero__figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-md);
}
.hero__stamp {
  position: absolute;
  left: -.6rem;
  bottom: 1.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--wattle);
  border-radius: 10px;
  padding: .55rem .85rem;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  max-width: 15rem;
}

/* page header (interior pages) --------------------------------------- */
.page-head {
  padding-block: clamp(2rem, 4vw, 3.25rem) clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 92% 0%, var(--gum-soft) 0%, transparent 60%),
    var(--paper);
}
.page-head__grid {
  display: grid;
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .page-head__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); }
}
.page-head__figure { margin: 0; justify-self: center; max-width: 330px; }
.page-head__figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.crumbs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .5rem;
  margin: 0 0 1rem;
  padding: 0;
  font-size: .85rem;
  color: var(--ink-faint);
}
.crumbs li::after { content: "/"; margin-left: .55rem; color: var(--line); }
.crumbs li:last-child::after { content: none; }
.crumbs a { color: var(--ink-soft); }

/* journey / steps ---------------------------------------------------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.4rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.25rem;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--gum);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: .8rem;
}
.step h3 { margin-bottom: .35rem; }
.step p { font-size: .95rem; color: var(--ink-soft); margin: 0; }

/* principles --------------------------------------------------------- */
.principle {
  display: flex;
  gap: .9rem;
  padding: 1.15rem 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.principle:first-child { border-top: 0; }
.principle__icon { flex: none; color: var(--wattle); margin-top: .15rem; }
.principle h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.principle p { font-size: .95rem; margin: 0; }

/* split feature ------------------------------------------------------ */
.split {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 880px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--flip .split__media { order: -1; }
}
.split__media { margin: 0; }
.split__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.split__media figcaption {
  margin-top: .6rem;
  font-family: var(--font-note);
  font-size: .95rem;
  color: var(--ink-faint);
}

/* callout / notes ---------------------------------------------------- */
.note {
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  font-size: .95rem;
}
.note--wattle { border-left-color: var(--wattle); background: var(--wattle-soft); }
.note--gum { border-left-color: var(--gum); background: var(--gum-soft); }
.note h2, .note h3 { font-size: 1rem; margin-bottom: .3rem; font-family: var(--font-body); font-weight: 700; }
.note p:last-child { margin-bottom: 0; }

/* empty states ------------------------------------------------------- */
.empty {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  justify-items: center;
  text-align: center;
  padding: clamp(2rem, 5vw, 3.25rem) 1.25rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--card);
}
.empty img { width: min(200px, 55vw); opacity: .92; }
.empty h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(1.35rem, 1.2rem + .8vw, 1.85rem);
  margin-bottom: .35rem;
}
.empty p { max-width: 48ch; color: var(--ink-soft); margin-inline: auto; }

/* status + tags ------------------------------------------------------ */
.status {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .28rem .6rem;
  border-radius: var(--radius-pill);
  border: 1px solid;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.status--template { color: var(--copper); background: #F8EADD; border-color: #E4C6AC; }
.status--soon { color: var(--teal); background: var(--teal-soft); border-color: #B8D9DC; }
.status--dev { color: #6A5300; background: var(--wattle-soft); border-color: #E7CE8A; }
.status--available { color: var(--gum-deep); background: var(--gum-soft); border-color: #B9D3B4; }
.status--concept { color: var(--ink-soft); background: var(--paper-sunk); border-color: var(--line); }

.tags { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.tag {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .05em;
  color: var(--ink-soft);
  background: var(--paper-sunk);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: .15rem .45rem;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .95rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.meta-list strong { color: var(--ink-soft); font-weight: 700; }

/* template banner ---------------------------------------------------- */
.template-banner {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  background: repeating-linear-gradient(
    -45deg, #F8EADD 0 12px, #F4E1D0 12px 24px);
  border: 1px solid #E0BFA2;
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}
.template-banner__icon { flex: none; color: var(--copper); margin-top: .1rem; }
.template-banner h2 {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 750;
  margin-bottom: .25rem;
  color: var(--ink);
}
.template-banner p { font-size: .93rem; color: #6B4426; margin: 0; }

/* 9 ----------------------------------------------------------- cards ----- */

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.card:hover { border-color: #C9B899; box-shadow: var(--shadow-md); }
.card__body { padding: 1.15rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.card__title { margin: 0; font-size: 1.1rem; line-height: 1.25; }
.card__title a { text-decoration: none; color: var(--ink); }
.card__title a:hover { color: var(--gum-deep); text-decoration: underline; }
.card__desc { font-size: .94rem; color: var(--ink-soft); margin: 0; }
.card__foot {
  margin-top: auto;
  padding-top: .85rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .9rem;
  align-items: center;
}
.card__price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink);
}
.card__price--tbc { color: var(--ink-faint); font-weight: 500; }
.card__links { display: flex; flex-wrap: wrap; gap: .1rem .75rem; font-size: .87rem; }
.card__media {
  aspect-ratio: 4 / 3;
  /* deliberately a shade off --paper-sunk so the card still reads as a card
     when it sits on a sunken band */
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 24px 24px,
    #F8F1E5;
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-faint);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }

/* category card ------------------------------------------------------ */
.cat-card {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.35rem 1.2rem 1.3rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.cat-card:hover {
  border-color: var(--gum);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--ink);
}
.cat-card__icon {
  width: 42px;
  height: 42px;
  color: var(--gum);
  flex: none;
}
.cat-card:hover .cat-card__icon { color: var(--copper-lit); }
.cat-card__name { font-weight: 700; font-size: 1.04rem; }
.cat-card__desc { font-size: .9rem; color: var(--ink-soft); margin: 0; }
.cat-card__count {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: auto;
  padding-top: .55rem;
}

/* informational variant - not a link, so it must not behave like one */
.cat-card--static { scroll-margin-top: 6rem; }
.cat-card--static:hover {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}
.cat-card--static:hover .cat-card__icon { color: var(--gum); }

/* a chip used as a static label rather than a control */
.chip[aria-disabled="true"] {
  cursor: default;
  color: var(--ink-faint);
  background: var(--paper-sunk);
  display: inline-flex;
  align-items: center;
}
.chip[aria-disabled="true"]:hover { border-color: var(--line); color: var(--ink-faint); }

/* link list card ----------------------------------------------------- */
.link-card {
  display: block;
  padding: 1.15rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.link-card:hover { border-color: var(--gum); box-shadow: var(--shadow-sm); color: var(--ink); }
.link-card h3 { margin-bottom: .25rem; font-size: 1.05rem; }
.link-card h3 span { color: var(--gum-deep); }
.link-card p { font-size: .92rem; color: var(--ink-soft); margin: 0; }

/* definition / spec list --------------------------------------------- */
.spec {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.spec > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: .1rem;
  padding: .8rem 1rem;
  border-top: 1px solid var(--line-soft);
}
.spec > div:first-child { border-top: 0; }
@media (min-width: 620px) {
  .spec > div { grid-template-columns: minmax(11rem, 34%) 1fr; gap: 1rem; }
}
.spec dt {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}
.spec dd { margin: 0; font-size: .96rem; }
.tbc { color: var(--ink-faint); font-style: italic; }

/* filter chips ------------------------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  align-items: flex-end;
  padding: 1.1rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.filters__group { display: flex; flex-direction: column; gap: .5rem; flex: 1 1 auto; min-width: 0; }
.filters__legend {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--copper);
  font-weight: 700;
  padding: 0;
}
.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.chip {
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  min-height: 38px;
  padding: .3rem .8rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { border-color: var(--gum); color: var(--gum-deep); }
.chip[aria-pressed="true"] {
  background: var(--gum);
  border-color: var(--gum-deep);
  color: #fff;
}
.chip[aria-pressed="true"]::before { content: "\2713\00a0"; }

.filter-search { display: flex; flex-direction: column; gap: .5rem; flex: 1 1 15rem; max-width: 24rem; }
.filter-search input {
  font: inherit;
  padding: .55rem .8rem;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  width: 100%;
}
.filter-status {
  font-size: .88rem;
  color: var(--ink-faint);
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  letter-spacing: .03em;
}

/* 10 ---------------------------------------------------------- forms ----- */

.contact-grid { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); }

.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.contact-card h3 { margin: 0; font-size: 1.08rem; }
.contact-card p { font-size: .94rem; color: var(--ink-soft); margin: 0; }
.contact-card__action { margin-top: auto; padding-top: .6rem; }

.mail-link {
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 600;
  word-break: break-word;
}

/* a link whose target is not configured yet - must not look clickable */
a.is-soon {
  color: var(--ink-faint);
  text-decoration: none;
  cursor: not-allowed;
}
a.is-soon:hover { color: var(--ink-faint); }
.band--dark a.is-soon { color: #9C9A8E; }

/* 11 --------------------------------------------------------- footer ----- */

.site-footer {
  background: var(--bark);
  color: #C9C6B9;
  padding-block: clamp(2.75rem, 5vw, 4rem) 1.75rem;
  margin-top: var(--band);
  font-size: .94rem;
}
.site-footer a { color: #D9D5C8; text-decoration: none; }
.site-footer a:hover { color: var(--wattle); text-decoration: underline; }

.footer__grid {
  display: grid;
  gap: clamp(1.75rem, 3.5vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
}
.footer__col--brand { grid-column: 1 / -1; max-width: 34rem; }
@media (min-width: 900px) {
  .footer__grid { grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); }
  .footer__col--brand { grid-column: auto; }
}
.brand--footer { color: #F1EDE1; margin: 0 0 .9rem; }
.brand--footer .brand__mark { color: var(--wattle); }
.brand--footer .brand__name { color: #F5F1E6; }
.footer__blurb { color: #ABA89B; font-size: .92rem; max-width: 40ch; }
.footer__contact { font-size: .92rem; }

.footer__heading {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--wattle);
  font-weight: 700;
  margin: 0 0 .8rem;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }

.footer__base {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.35rem;
  border-top: 1px solid #343B30;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.5rem;
  justify-content: space-between;
}
.footer__legal { font-size: .85rem; color: #9C9A8E; margin: 0; }
.footer__legal--muted { color: #7E7C72; }

/* 12 ------------------------------------------------------- utilities ---- */

.js-only { display: none; }
.has-js .js-only { display: inline-flex; }
.has-js .search-panel.js-only { display: block; }
.has-js .search-panel.js-only[hidden] { display: none; }
.no-js-hide {}
.has-js .no-js-only { display: none; }

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

.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: clamp(1.75rem, 3.5vw, 2.75rem); }
.center { text-align: center; margin-inline: auto; }
.mt-1 { margin-top: .75rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: clamp(1.75rem, 3.5vw, 2.75rem); }

/* prose - used by the guide / post templates */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.9em; font-size: 1.15rem; }
.prose ul, .prose ol { margin: 0 0 1.1em; display: grid; gap: .4rem; }
.prose figure { margin: 1.75rem 0; }
.prose figcaption {
  font-family: var(--font-note);
  font-size: .95rem;
  color: var(--ink-faint);
  margin-top: .5rem;
}
.prose blockquote {
  margin: 1.5rem 0;
  padding: .35rem 0 .35rem 1.15rem;
  border-left: 3px solid var(--gum);
  color: var(--ink-soft);
  font-style: italic;
}

.diagram {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 1rem;
}

/* 404 */
.notfound { text-align: center; padding-block: clamp(3rem, 8vw, 6rem); }
.notfound img { width: min(300px, 70vw); margin-inline: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.notfound__code {
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .2em;
  color: var(--copper);
  font-weight: 700;
}

/* ------------------------------------------------------- responsive ------ */

@media (max-width: 860px) {
  .has-js .nav-toggle { display: inline-flex; }
  .has-js .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding-block: .75rem 1.25rem;
    border-top: 1px solid var(--line);
    margin-top: .25rem;
  }
  .has-js .site-nav.is-open { display: flex; }
  .site-nav { width: 100%; }
  .nav__list { flex-direction: column; gap: .1rem; }
  .nav__link { padding: .7rem .75rem; font-size: 1rem; }
  .nav__link.is-active { box-shadow: inset 3px 0 0 var(--gum); background: var(--gum-soft); }
  .nav__actions { width: 100%; }
  .nav__actions .btn, .search-open { flex: 1 1 auto; }
  .search-panel { top: 0; }
}

@media (max-width: 520px) {
  .brand__name { font-size: 1.2rem; }
  .brand__mark .mark { width: 32px; height: 32px; }
  .hero__stamp { position: static; margin-top: .85rem; max-width: none; }
  .btn-row .btn { flex: 1 1 100%; }
}

/* ---------------------------------------------------- motion + print ----- */

.reveal { opacity: 0; transform: translateY(12px); }
.has-js .reveal { transition: opacity .5s ease, transform .5s ease; }
.reveal.is-in { opacity: 1; transform: none; }

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

@media print {
  .site-header, .site-footer, .search-panel, .announce, .skip-link { display: none !important; }
  body { background: #fff; }
  .band { padding-block: 1rem; }
}
