/* Pooka website — shared styles.
   Palette from Pooka-branding/pooka_banner_5x.png. */

:root {
  /* Brand */
  --midnight: #211c1b;
  --lantern: #ff891f;
  --amber: #ffb64b;
  --scarf: #d95b17;
  --cream: #fff6e9;
  --ember: #79452f;
  --forest: #30463d;
  --violet: #75618e;

  /* Derived */
  --paper: #fffbf4;
  --midnight-2: #2b2422;
  --midnight-3: #3a302d;
  --ink: var(--midnight);
  --muted: #6e5d55;
  --line: rgba(33, 28, 27, 0.12);
  --line-strong: rgba(33, 28, 27, 0.22);
  --on-dark: #f6ead9;
  --on-dark-muted: #bfae9e;
  --line-dark: rgba(255, 246, 233, 0.12);
  --glow: radial-gradient(closest-side, rgba(255, 137, 31, 0.35), rgba(255, 137, 31, 0));

  /* Code */
  --code-bg: #1a1615;
  --code-keyword: #ff9b3d;
  --code-type: #c3b1dc;
  --code-string: #a9c9a4;
  --code-number: #ffc66d;
  --code-comment: #8c7b70;
  --code-function: #ffe2b8;
  --code-punct: #c9b8a8;

  /* Type */
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* Shape */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(33, 28, 27, 0.06), 0 8px 24px rgba(33, 28, 27, 0.08);
  --shadow-lift: 0 2px 4px rgba(33, 28, 27, 0.08), 0 16px 40px rgba(33, 28, 27, 0.14);
  --wrap: 1160px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--scarf);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ember);
}

:focus-visible {
  outline: 3px solid var(--lantern);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

:not(pre) > code {
  background: rgba(121, 69, 47, 0.1);
  color: var(--ember);
  padding: 0.12em 0.4em;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--midnight);
  color: var(--cream);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 246, 233, 0.86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
}

.brand img {
  width: 40px;
  height: auto;
}

.brand:hover {
  color: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
}

.nav a:hover {
  background: rgba(255, 137, 31, 0.14);
  color: var(--ink);
}

.nav a[aria-current="page"] {
  background: var(--midnight);
  color: var(--cream);
}

.nav .nav-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  width: 42px;
  height: 38px;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
  }

  .nav.open {
    display: flex;
  }

  .nav .btn {
    margin-top: 8px;
    justify-content: center;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 22px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

.btn-primary {
  background: var(--lantern);
  color: var(--midnight);
  box-shadow: 0 6px 20px rgba(255, 137, 31, 0.35);
}

.btn-primary:hover {
  background: var(--amber);
  color: var(--midnight);
}

.btn-ghost {
  border-color: currentColor;
  color: inherit;
}

.btn-ghost:hover {
  color: inherit;
  background: rgba(255, 137, 31, 0.12);
}

.btn-dark {
  background: var(--midnight);
  color: var(--cream);
}

.btn-dark:hover {
  background: var(--midnight-3);
  color: var(--cream);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* ------------------------------------------------------------ Small bits */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--scarf);
  margin-bottom: 14px;
}

.eyebrow .num {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line-dark);
  background: rgba(255, 246, 233, 0.06);
  color: var(--on-dark);
}

.pill:hover {
  color: var(--cream);
  background: rgba(255, 246, 233, 0.1);
}

.pill .tag {
  background: var(--lantern);
  color: var(--midnight);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 800;
  font-size: 0.78rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(117, 97, 142, 0.14);
  color: var(--violet);
  white-space: nowrap;
}

.chip-release {
  background: rgba(255, 137, 31, 0.16);
  color: var(--scarf);
}

.chip-library {
  background: rgba(48, 70, 61, 0.13);
  color: var(--forest);
}

.chip-community {
  background: rgba(117, 97, 142, 0.14);
  color: var(--violet);
}

.chip-guide {
  background: rgba(121, 69, 47, 0.12);
  color: var(--ember);
}

.version {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--midnight);
  color: var(--amber);
}

.muted {
  color: var(--muted);
}

/* ----------------------------------------------------------------- Hero */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--midnight);
  color: var(--on-dark);
  padding: 72px 0 96px;
}

.hero::before {
  content: "";
  position: absolute;
  width: 820px;
  height: 820px;
  right: -140px;
  top: -120px;
  background: var(--glow);
  pointer-events: none;
}

.hero::after {
  /* Fireflies */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 22%, rgba(255, 182, 75, 0.9), transparent 60%),
    radial-gradient(2px 2px at 28% 78%, rgba(255, 182, 75, 0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 46% 12%, rgba(255, 182, 75, 0.8), transparent 60%),
    radial-gradient(2px 2px at 64% 88%, rgba(255, 182, 75, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 86% 30%, rgba(255, 182, 75, 0.9), transparent 60%),
    radial-gradient(2px 2px at 94% 70%, rgba(255, 182, 75, 0.6), transparent 60%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  color: var(--cream);
  margin: 22px 0 18px;
}

.hero h1 em {
  font-style: normal;
  color: var(--lantern);
  background: linear-gradient(180deg, var(--amber), var(--lantern) 55%, var(--scarf));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .lede {
  font-size: 1.18rem;
  color: var(--on-dark-muted);
  max-width: 36em;
}

.hero .lede strong {
  color: var(--on-dark);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 22px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--on-dark-muted);
}

.hero-facts li::before {
  content: "✦";
  color: var(--lantern);
  margin-right: 8px;
}

.hero-visual {
  position: relative;
  min-height: 460px;
}

.hero-visual .mascot {
  position: absolute;
  width: 270px;
  right: -12px;
  bottom: -40px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
  z-index: 2;
}

.hero-visual .window {
  position: relative;
  z-index: 1;
  margin-right: 140px;
}

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

  .hero-visual {
    min-height: 0;
  }

  .hero-visual .window {
    margin-right: 0;
  }

  .hero-visual .mascot {
    position: static;
    width: 200px;
    margin: -40px auto 0;
  }
}

/* --------------------------------------------------------- Install box */

.install {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 560px;
  background: var(--code-bg);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 10px 10px 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--on-dark);
}

.install .prompt {
  color: var(--lantern);
  user-select: none;
}

.install code {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  background: none;
  color: inherit;
  padding: 0;
}

.copy {
  flex: none;
  font: 600 0.8rem var(--font-body);
  background: rgba(255, 246, 233, 0.08);
  color: var(--on-dark);
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  padding: 7px 12px;
  cursor: pointer;
}

.copy:hover {
  background: rgba(255, 137, 31, 0.2);
}

.copy.copied {
  background: var(--forest);
  border-color: var(--forest);
}

.install-note {
  font-size: 0.86rem;
  color: var(--on-dark-muted);
  margin-top: 10px;
}

.install-note a {
  color: var(--amber);
}

/* ------------------------------------------------------- Code windows */

.window {
  background: var(--code-bg);
  border: 1px solid rgba(255, 246, 233, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  color: var(--on-dark);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-dark);
  background: rgba(255, 246, 233, 0.03);
}

.window-bar .dots {
  display: flex;
  gap: 7px;
  margin-right: 8px;
}

.window-bar .dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--midnight-3);
}

.window-bar .dots span:first-child {
  background: var(--scarf);
}

.window-bar .dots span:nth-child(2) {
  background: var(--amber);
}

.window-bar .dots span:nth-child(3) {
  background: #5f7a6c;
}

.window-bar .title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--on-dark-muted);
}

.window pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.65;
}

.window .terminal {
  border-top: 1px solid var(--line-dark);
  background: rgba(0, 0, 0, 0.22);
}

.window .terminal pre {
  color: var(--on-dark);
}

.cmd::before {
  content: "$ ";
  color: var(--lantern);
}

.terminal .out {
  color: var(--on-dark-muted);
}

.terminal .ok {
  color: var(--code-string);
}

pre.code,
.code-block {
  background: var(--code-bg);
  color: var(--on-dark);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  line-height: 1.65;
  font-size: 0.86rem;
  margin: 0 0 1.4em;
}

/* Syntax colours (filled in by js/site.js) */
.tok-keyword {
  color: var(--code-keyword);
  font-weight: 600;
}

.tok-type {
  color: var(--code-type);
}

.tok-string {
  color: var(--code-string);
}

.tok-number {
  color: var(--code-number);
}

.tok-comment {
  color: var(--code-comment);
  font-style: italic;
}

.tok-function {
  color: var(--code-function);
}

.tok-punct {
  color: var(--code-punct);
}

/* ------------------------------------------------------------ Sections */

.section {
  padding: 96px 0;
}

.section-tight {
  padding: 64px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 44px;
}

.section-head p {
  font-size: 1.1rem;
  color: var(--muted);
}

.section-head h2 em,
.page-head h1 em {
  font-style: normal;
  color: var(--scarf);
}

.section-dark {
  background: var(--midnight);
  color: var(--on-dark);
}

.section-dark .section-head p {
  color: var(--on-dark-muted);
}

.section-dark h2 {
  color: var(--cream);
}

.section-dark h2 em {
  color: var(--lantern);
}

.section-paper {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.section-forest {
  background: var(--forest);
  color: var(--cream);
}

/* -------------------------------------------------------- Feature grid */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.feature .icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  font-size: 1.3rem;
  margin-bottom: 16px;
  background: var(--midnight);
  color: var(--lantern);
}

.feature h3 {
  margin-bottom: 8px;
}

.feature p {
  color: var(--muted);
  margin: 0;
  font-size: 0.97rem;
}

@media (max-width: 900px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .features {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- Tabs */

.tabs {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

.tab-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tab-list button {
  text-align: left;
  font: inherit;
  background: transparent;
  color: var(--on-dark-muted);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
}

.tab-list button strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--on-dark);
}

.tab-list button span {
  font-size: 0.88rem;
}

.tab-list button:hover {
  background: rgba(255, 246, 233, 0.05);
}

.tab-list button[aria-selected="true"] {
  background: rgba(255, 137, 31, 0.1);
  border-color: rgba(255, 137, 31, 0.45);
}

.tab-list button[aria-selected="true"] strong {
  color: var(--lantern);
}

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

@media (max-width: 860px) {
  .tabs {
    grid-template-columns: 1fr;
  }

  .tab-list {
    flex-direction: row;
    overflow-x: auto;
  }

  .tab-list button {
    flex: none;
  }

  .tab-list button span {
    display: none;
  }
}

/* --------------------------------------------------------------- Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.step .n {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--lantern);
  display: block;
  margin-bottom: 12px;
}

.step pre {
  margin: 14px 0 0;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------- Diagnostics */

.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.diagnostic pre {
  color: var(--on-dark);
}

.diagnostic .d-error {
  color: #ff7b5c;
  font-weight: 700;
}

.diagnostic .d-path {
  color: var(--code-type);
}

.diagnostic .d-gutter {
  color: var(--code-comment);
}

.diagnostic .d-mark {
  color: var(--lantern);
}

.diagnostic .d-help {
  color: var(--code-string);
  font-weight: 700;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.checklist li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
}

.checklist .tick {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 137, 31, 0.15);
  color: var(--lantern);
  font-weight: 900;
}

.checklist strong {
  display: block;
  font-family: var(--font-display);
  color: var(--cream);
}

.checklist span {
  color: var(--on-dark-muted);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------- Neighbours */

.neighbours {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.neighbours span {
  font-family: var(--font-display);
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 246, 233, 0.25);
}

/* --------------------------------------------------------------- Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.card:hover,
.card.is-link:hover {
  color: var(--ink);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(255, 137, 31, 0.5);
}

.card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--muted);
}

.card .foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.more-link {
  font-family: var(--font-display);
  font-weight: 800;
  text-decoration: none;
}

.more-link::after {
  content: " →";
}

/* ------------------------------------------------------------ Page head */

.page-head {
  position: relative;
  overflow: hidden;
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(255, 137, 31, 0.16), transparent 70%),
    var(--cream);
}

.page-head .wrap {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 32px;
  align-items: end;
}

.page-head p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 40em;
  margin: 0;
}

.page-head .mascot {
  width: 200px;
  margin-bottom: -48px;
}

@media (max-width: 700px) {
  .page-head .wrap {
    grid-template-columns: 1fr;
  }

  .page-head .mascot {
    display: none;
  }
}

/* -------------------------------------------------------------- Toolbar */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.search {
  position: relative;
  flex: 1 1 320px;
}

.search input {
  width: 100%;
  font: inherit;
  padding: 12px 16px 12px 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
}

.search input:focus {
  outline: none;
  border-color: var(--lantern);
  box-shadow: 0 0 0 4px rgba(255, 137, 31, 0.2);
}

.search::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  transform: translateY(-60%);
}

.search::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 58%;
  width: 7px;
  height: 2px;
  background: var(--muted);
  transform: rotate(45deg);
}

.search kbd {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 1px 7px;
}

.select {
  font: inherit;
  font-size: 0.95rem;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.filters button:hover {
  border-color: var(--lantern);
}

.filters button[aria-pressed="true"] {
  background: var(--midnight);
  border-color: var(--midnight);
  color: var(--cream);
}

.result-count {
  font-size: 0.9rem;
  color: var(--muted);
  margin-left: auto;
}

/* ------------------------------------------------------------- Packages */










.skeleton {
  min-height: 210px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent) -400px 0 / 400px 100% no-repeat,
    var(--paper);
  animation: shimmer 1.3s infinite;
}

@keyframes shimmer {
  to {
    background-position: calc(100% + 400px) 0, 0 0;
  }
}

.notice {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px dashed var(--line-strong);
}

.notice img {
  width: 120px;
}

.notice h3 {
  margin-bottom: 6px;
}

.notice p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 600px) {
  .notice {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------------- News */

.posts {
  display: grid;
  gap: 18px;
}

.post-item {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 28px;
  align-items: start;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-item:hover {
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(255, 137, 31, 0.5);
}

.post-item time {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--muted);
  font-size: 0.95rem;
}

.post-item h2 {
  font-size: 1.5rem;
  margin: 8px 0 8px;
}

.post-item p {
  margin: 0;
  color: var(--muted);
}

.post-item .arrow {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--scarf);
  white-space: nowrap;
}

.post-item.featured {
  background: var(--midnight);
  color: var(--on-dark);
  border-color: var(--midnight);
}

.post-item.featured h2 {
  color: var(--cream);
}

.post-item.featured p,
.post-item.featured time {
  color: var(--on-dark-muted);
}

.post-item.featured .arrow {
  color: var(--lantern);
}

@media (max-width: 760px) {
  .post-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* -------------------------------------------------------------- Article */

.article-head {
  padding: 64px 0 36px;
  border-bottom: 1px solid var(--line);
}

.article-head .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.article-head .lede {
  font-size: 1.22rem;
  color: var(--muted);
  max-width: 40em;
}

.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-size: 0.95rem;
}

.byline img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--midnight);
  object-fit: cover;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) 1fr;
  gap: 64px;
  padding: 48px 0 96px;
}

.prose {
  font-size: 1.08rem;
}

.prose h2 {
  font-size: 1.7rem;
  margin-top: 1.8em;
}

.prose h3 {
  margin-top: 1.6em;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose li::marker {
  color: var(--lantern);
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  border-left: 4px solid var(--lantern);
  background: var(--paper);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--ember);
}

.prose blockquote p:last-child {
  margin: 0;
}

.callout {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(48, 70, 61, 0.08);
  border: 1px solid rgba(48, 70, 61, 0.2);
  margin: 1.6em 0;
  font-size: 0.98rem;
}

.callout .ic {
  font-size: 1.2rem;
}

.callout p:last-child {
  margin: 0;
}

.toc {
  position: sticky;
  top: 96px;
  font-size: 0.92rem;
}

.toc h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.toc ol {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  border-left: 2px solid var(--line);
}

.toc a {
  display: block;
  padding: 5px 14px;
  color: var(--muted);
  text-decoration: none;
  margin-left: -2px;
  border-left: 2px solid transparent;
}

.toc a:hover {
  color: var(--ink);
  border-left-color: var(--lantern);
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 56px;
}

.pager a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
}

.pager a:hover {
  border-color: var(--lantern);
  color: var(--ink);
}

.pager small {
  display: block;
  color: var(--muted);
}

.pager strong {
  font-family: var(--font-display);
}

.pager .next {
  text-align: right;
  grid-column: 2;
}

@media (max-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    display: none;
  }
}

/* ------------------------------------------------------------- Cookbook */

.shelf {
  margin-bottom: 56px;
}

.shelf-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.shelf-head h2 {
  font-size: 1.5rem;
  margin: 0;
}

.shelf-head .count {
  color: var(--muted);
  font-size: 0.9rem;
}

.shelf-head .emoji {
  font-size: 1.4rem;
}

.recipe-card .level {
  font-size: 0.8rem;
  color: var(--muted);
}

.recipe-card .uses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recipe-card .uses code {
  font-size: 0.75rem;
}

.recipe-steps {
  counter-reset: rstep;
  list-style: none;
  padding: 0;
}

.recipe-steps > li {
  counter-increment: rstep;
  position: relative;
  padding-left: 52px;
  margin-bottom: 1.4em;
}

.recipe-steps > li::before {
  content: counter(rstep);
  position: absolute;
  left: 0;
  top: -2px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--midnight);
  color: var(--lantern);
  font-family: var(--font-display);
  font-weight: 900;
}

.ingredients {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 24px;
}

.ingredients h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.ingredients ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
}

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.empty img {
  width: 140px;
  margin: 0 auto 12px;
}

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

.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--midnight);
  color: var(--on-dark);
  border-radius: 28px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 32px;
  align-items: center;
}

.cta-band::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  right: -120px;
  bottom: -220px;
  background: var(--glow);
}

.cta-band > * {
  position: relative;
}

.cta-band h2 {
  color: var(--cream);
}

.cta-band p {
  color: var(--on-dark-muted);
}

.cta-band img {
  width: 220px;
  margin-bottom: -48px;
}

@media (max-width: 760px) {
  .cta-band {
    grid-template-columns: 1fr;
    padding: 32px;
  }

  .cta-band img {
    display: none;
  }
}

.site-footer {
  background: var(--midnight);
  color: var(--on-dark-muted);
  padding: 64px 0 28px;
  font-size: 0.93rem;
}

.site-footer .grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
}

.site-footer .brand {
  color: var(--cream);
}

.site-footer .brand img {
  width: 34px;
  height: 34px;
}

.site-footer .tagline {
  margin-top: 14px;
  max-width: 22em;
}

.site-footer h4 {
  color: var(--cream);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.site-footer a {
  color: var(--on-dark-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--lantern);
}

.site-footer .bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .site-footer .grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer .grid > :first-child {
    grid-column: 1 / -1;
  }
}










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

.section-dark :not(pre) > code,
.hero :not(pre) > code,
.cta-band :not(pre) > code,
.post-item.featured :not(pre) > code {
  background: rgba(255, 246, 233, 0.1);
  color: var(--amber);
}

.pill {
  max-width: 100%;
}

.pill .tag {
  flex: none;
}

.toc .btn {
  display: inline-flex;
  margin-left: 0;
  padding: 8px 16px;
  border-left: 0;
  color: var(--cream);
}

.toc .btn:hover {
  color: var(--cream);
}

@media (max-width: 600px) {
  .hero {
    padding: 48px 0 64px;
  }

  .install-note {
    overflow-wrap: anywhere;
  }
}

.hero .install code {
  background: none;
  color: inherit;
  padding: 0;
}

/* ----------------------------------------------------------------- Docs */

.docs-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 200px;
  gap: 48px;
  padding: 40px 0 96px;
  align-items: start;
}

.doc-nav {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  font-size: 0.93rem;
}

.doc-nav h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 22px 0 8px;
}

.doc-nav h4:first-child {
  margin-top: 0;
}

.doc-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.doc-nav a {
  display: block;
  padding: 6px 12px;
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
}

.doc-nav a:hover {
  background: rgba(255, 137, 31, 0.12);
  color: var(--ink);
}

.doc-nav a[aria-current="page"] {
  background: var(--midnight);
  color: var(--cream);
  font-weight: 600;
}

.doc {
  max-width: 780px;
}

.doc-group {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--scarf);
  margin-bottom: 10px;
}

.doc h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.doc .prose > p:first-child {
  font-size: 1.2rem;
  color: var(--muted);
}

.prose h2 {
  scroll-margin-top: 90px;
  padding-top: 0.4em;
  border-top: 1px solid var(--line);
}

.prose h3,
.prose h4 {
  scroll-margin-top: 90px;
}

.prose h4 {
  font-size: 1.05rem;
  margin-top: 1.4em;
}

.prose pre.code {
  font-size: 0.85rem;
}

.prose pre.code[data-lang="text"] {
  background: #2b2422;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.4em 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.4em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose th {
  font-family: var(--font-display);
  font-weight: 800;
  background: rgba(33, 28, 27, 0.04);
}

.docs-layout .toc ol {
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

@media (max-width: 1100px) {
  .docs-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .docs-layout .toc {
    display: none;
  }
}

@media (max-width: 760px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .doc-nav {
    position: static;
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }

  .doc-nav h4 {
    display: none;
  }

  .doc-nav ul {
    display: contents;
  }

  .doc-nav a {
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 5px 12px;
  }
}

/* Terminal output, in the colours the pooka CLI uses (FORCE_COLOR=1). */
.t-label {
  color: #ff891f;
  font-weight: 700;
}

.t-pass {
  color: #61af6f;
  font-weight: 700;
}

.t-fail {
  color: #d95b17;
  font-weight: 700;
}

.t-msg {
  color: #ffb64b;
  font-weight: 700;
}

.t-dim {
  color: #8b94a8;
}

.t-violet {
  color: #75618e;
}

.t-bold {
  font-weight: 700;
}

pre.terminal-output,
.window pre[data-term],
.window .terminal pre {
  color: #e8ded3;
}

.prose pre.terminal-output {
  background: var(--code-bg);
}

/* ----------------------------------------------------------- Package rows */

.package-list {
  display: grid;
  gap: 12px;
}

.package-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: center;
  padding: 20px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.package-row:hover {
  border-color: rgba(255, 137, 31, 0.5);
  box-shadow: var(--shadow);
}

.package-row .name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.package-row h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.package-row h3 a {
  color: var(--ink);
  text-decoration: none;
}

.package-row h3 a:hover {
  color: var(--scarf);
}

.package-row p {
  margin: 0 0 6px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.package-row .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--muted);
}

.package-row .use {
  display: grid;
  gap: 8px;
}

.package-row .add {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--midnight);
  color: var(--on-dark);
  border-radius: 10px;
  padding: 6px 6px 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.package-row .add code {
  flex: 1;
  background: none;
  color: inherit;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.package-row .add .copy {
  padding: 4px 10px;
}

.package-row .links {
  display: flex;
  gap: 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

.package-row .links a {
  text-decoration: none;
}

.package-row.skeleton {
  min-height: 104px;
}

@media (max-width: 760px) {
  .package-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .package-row p {
    white-space: normal;
  }
}

/* ------------------------------------------------------- Later refinements */

.pill-version {
  padding: 4px;
}

.byline img {
  width: 44px;
  height: auto;
  border-radius: 0;
  background: none;
  object-fit: contain;
}

.page-head .total {
  color: var(--lantern);
  font-weight: 800;
}

.section-forest .section-head p,
.section-forest .muted {
  color: rgba(255, 246, 233, 0.75) !important;
}

.section-forest h2 {
  color: var(--cream);
}

.section-forest h2 em {
  color: var(--amber);
}

.section-forest .eyebrow {
  color: var(--amber);
}

.section-forest .eyebrow .num,
.section-forest .checklist span {
  color: rgba(255, 246, 233, 0.7);
}

.section-forest .checklist .tick {
  background: rgba(255, 182, 75, 0.18);
  color: var(--amber);
}

.section-forest :not(pre) > code {
  background: rgba(255, 246, 233, 0.12);
  color: var(--amber);
}

/* ---------------------------------------------------------------- Tour */

.tour-head .mascot {
  width: 190px;
}

.tour-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 760px);
  gap: 64px;
  padding: 48px 0 96px;
  align-items: start;
}

.tour-nav {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.tour-nav h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 10px;
}

.tour-nav ol {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 2px;
}

.tour-nav li a {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: baseline;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.93rem;
  line-height: 1.35;
}

.tour-nav li a:hover {
  background: rgba(255, 137, 31, 0.12);
  color: var(--ink);
}

.tour-nav li a.active {
  background: var(--midnight);
  color: var(--cream);
}

.tour-nav .n {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--lantern);
}

.tour-docs {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding-left: 10px;
}

.tour h2 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  margin-top: 2.2em;
  padding-top: 1.2em;
}

.tour h2:first-child {
  margin-top: 0;
}

.chapter-num {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--scarf);
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .tour-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .tour-nav {
    position: static;
    max-height: none;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }
}

/* More token kinds, for Erlang, Elixir, Gleam and LFE. */
.tok-atom {
  color: #e9a46a;
}

.tok-variable {
  color: #f3d27a;
}

/* File trees: folders in Amber Glow, notes beside a file in grey. */
.t-dir {
  color: #ffb64b;
}

/* Recipes not written yet: listed, but without a page. */
.recipe-card.is-draft {
  border-style: dashed;
  background: transparent;
}

.recipe-card .soon {
  color: var(--scarf);
  font-weight: 700;
}

.prose .ingredients h4 {
  font-size: 0.78rem;
  margin-top: 0;
}
