/* Armadillo Workshop

   Liquid glass: every surface is a pane of frosted glass floating over a dark ground lit by
   three soft colours (amber, green, blue). A pane is a see-through fill, a blur of whatever
   is behind it, a bright top edge and a soft drop shadow. Corners are round, buttons are pills.

   The accents are still Minecraft's chat colours (gold &6, green &a, red &c), the same
   ones every module prints in game.

   Item icons in assets/item/ come from the Minecraft client.

   Fonts come from Google Fonts, which only loads after the visitor allows it in the
   cookie banner (site.js loadFonts). Until then the stacks below fall back to system
   fonts, so every size here has to hold up in Segoe UI and Consolas too. */

:root {
  --sans: "Bricolage Grotesque", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;

  --bg: #070A12;
  --glow-a: rgba(255, 170, 0, 0.22);
  --glow-b: rgba(40, 215, 140, 0.15);
  --glow-c: rgba(70, 120, 255, 0.24);

  /* glass */
  --panel: rgba(255, 255, 255, 0.065);     /* a pane */
  --panel-2: rgba(255, 255, 255, 0.12);    /* a pane on a pane, or a hovered one */
  --solid: rgba(22, 26, 36, 0.78);         /* bars that must stay readable over anything */
  --pop: rgba(26, 30, 42, 0.97);           /* the colour picker: it opens inside a pane, where a second blur can't work */
  --line: rgba(255, 255, 255, 0.11);
  --line-2: rgba(255, 255, 255, 0.24);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.26), inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  --lift: 0 22px 46px -22px rgba(0, 0, 0, 0.75);
  --blur: blur(22px) saturate(170%);

  --text: #D4D9E2;
  --strong: #FFFFFF;
  --muted: #A0A8B6;
  --gold: #FFB733;        /* text and lines */
  --green: #6BFF7C;
  --red: #FF6B6B;
  --code-bg: rgba(0, 0, 0, 0.42);
  --code-text: #D2DACB;

  /* the filled gold button is the same in both themes */
  --gold-fill: #FFAA00;
  --on-gold: #1A1200;

  --r-pane: 26px;
  --r-card: 18px;
  --r-field: 13px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #E9EDF5;
  --glow-a: rgba(255, 180, 60, 0.42);
  --glow-b: rgba(90, 220, 160, 0.34);
  --glow-c: rgba(110, 150, 255, 0.42);
  --panel: rgba(255, 255, 255, 0.52);
  --panel-2: rgba(255, 255, 255, 0.78);
  --solid: rgba(250, 251, 254, 0.86);
  --pop: rgba(252, 253, 255, 0.98);
  --line: rgba(30, 45, 80, 0.10);
  --line-2: rgba(30, 45, 80, 0.22);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(30, 45, 80, 0.06);
  --lift: 0 22px 46px -24px rgba(40, 60, 110, 0.38);
  --text: #2A3040;
  --strong: #0B0E16;
  --muted: #586070;
  --gold: #8A5200;
  --green: #12751F;
  --red: #C22B2B;
  --code-bg: rgba(14, 18, 28, 0.88);
  --code-text: #D2DACB;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #E9EDF5;
    --glow-a: rgba(255, 180, 60, 0.42);
    --glow-b: rgba(90, 220, 160, 0.34);
    --glow-c: rgba(110, 150, 255, 0.42);
    --panel: rgba(255, 255, 255, 0.52);
    --panel-2: rgba(255, 255, 255, 0.78);
    --solid: rgba(250, 251, 254, 0.86);
    --pop: rgba(252, 253, 255, 0.98);
  --pop: rgba(252, 253, 255, 0.98);
    --line: rgba(30, 45, 80, 0.10);
    --line-2: rgba(30, 45, 80, 0.22);
    --edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(30, 45, 80, 0.06);
    --lift: 0 22px 46px -24px rgba(40, 60, 110, 0.38);
    --text: #2A3040;
    --strong: #0B0E16;
    --muted: #586070;
    --gold: #8A5200;
    --green: #12751F;
    --red: #C22B2B;
    --code-bg: rgba(14, 18, 28, 0.88);
    --code-text: #D2DACB;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
}

/* the light the glass bends: three soft colours that stay put while the page scrolls */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(52vmax 46vmax at 6% -6%, var(--glow-a), transparent 62%),
    radial-gradient(46vmax 44vmax at 104% 26%, var(--glow-b), transparent 60%),
    radial-gradient(60vmax 52vmax at 38% 112%, var(--glow-c), transparent 62%);
}

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img.item { image-rendering: pixelated; display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
::selection { background: var(--gold-fill); color: var(--on-gold); }

/* ---------- the pane: everything that is a sheet of glass ---------- */

.nav, .screen, .listing, .steps, .pitch, .versions, .source-row, .step, .buildbar .wrap, .toast {
  background: var(--panel);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  box-shadow: var(--edge), var(--lift);
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.page { padding: 40px 24px 72px; }
.mono { font-family: var(--mono); }

.page-title {
  font: 800 clamp(30px, 5vw, 44px)/1.05 var(--sans);
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  color: var(--strong);
}
.page-sub { margin: 0 0 28px; color: var(--muted); max-width: 60ch; }

/* ---------- top bar: a capsule that floats over the page ---------- */

.top { position: sticky; top: 12px; z-index: 20; margin-top: 12px; }
.nav { display: flex; align-items: center; gap: 20px; min-height: 54px; padding: 6px 8px 6px 20px; border-radius: 999px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 16px var(--sans); letter-spacing: -0.01em; color: var(--strong); }
.brand img { width: 24px; height: 24px; }
.nav nav { display: flex; gap: 4px; flex: 1; }
.nav nav a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font: 500 14.5px var(--sans);
  text-decoration: none;
  color: var(--muted);
}
.nav nav a:hover { color: var(--strong); background: var(--line); }
.nav nav a[aria-current="page"] { color: var(--strong); background: var(--panel-2); box-shadow: var(--edge); }
.nav-right { display: flex; align-items: center; gap: 8px; }

/* ---------- controls ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--panel-2);
  box-shadow: var(--edge);
  color: var(--strong);
  font: 600 14.5px var(--sans);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s, background 0.12s, box-shadow 0.12s;
}
.btn:hover { background: var(--line-2); }
.btn:active { transform: scale(0.97); }
/* gold glass: lit from above, with a glow underneath */
.btn.primary {
  background: linear-gradient(180deg, #FFC84D 0%, #FFAA00 55%, #F09800 100%);
  border-color: rgba(255, 215, 130, 0.9);
  color: var(--on-gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -1px 0 rgba(120, 60, 0, 0.3), 0 10px 26px -10px rgba(255, 170, 0, 0.75);
}
.btn.primary:hover { background: linear-gradient(180deg, #FFD470 0%, #FFB51F 55%, #F7A30A 100%); }
.btn.wide { width: 100%; }
.btn[disabled], .btn[disabled]:hover {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: none;
  color: var(--muted);
  cursor: default;
  transform: none;
}
.icon-btn { width: 42px; padding: 0; }
.icon-btn svg { width: 17px; height: 17px; }

/* an item icon in its bubble */
.slot {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  box-shadow: var(--edge);
}
.slot img.item { width: 32px; height: 32px; }
.slot.big { width: 88px; height: 88px; border-radius: 24px; }
.slot.big img.item { width: 64px; height: 64px; }
.slot.sm { width: 38px; height: 38px; border-radius: 12px; }
.slot.sm img.item { width: 24px; height: 24px; }

.vbar { font: 500 12.5px var(--mono); color: var(--muted); white-space: nowrap; }
.vbar.good { color: var(--green); }
.vbar.brassy { color: var(--gold); }

/* ---------- a panel: title row, body, optional foot ---------- */

.screen { margin-bottom: 20px; min-width: 0; border-radius: var(--r-pane); overflow: hidden; }
.screen > .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px 8px 22px;
  border-bottom: 1px solid var(--line);
}
.screen > .bar h2, .screen > .bar h1 { font: 700 16px var(--sans); margin: 0; color: var(--strong); }
.screen > .bar a { font: 500 13px var(--mono); color: var(--gold); text-underline-offset: 3px; }
.screen > .body { padding: 20px 22px; }
.screen > .foot {
  display: flex;
  justify-content: space-between;
  gap: 6px 16px;
  flex-wrap: wrap;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 400 12.5px var(--mono);
}
.screen p { margin: 0 0 12px; }
.screen p a { color: var(--gold); text-underline-offset: 3px; }
.screen .muted { color: var(--muted); }
.screen h3 { font: 700 16px var(--sans); margin: 0 0 8px; color: var(--strong); }
.empty { color: var(--muted); margin: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- home: hero ---------- */

.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: end; padding: 32px 0 56px; }
.hero h1 {
  font: 800 clamp(38px, 6.4vw, 68px)/0.98 var(--sans);
  letter-spacing: -0.035em;
  margin: 0 0 18px;
  color: var(--strong);
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--green); }
.hero .lede { margin: 0 0 28px; max-width: 46ch; font-size: 17.5px; }

.name-ask { display: grid; gap: 6px; margin-bottom: 16px; max-width: 420px; }
.name-ask label { font: 600 14px var(--sans); color: var(--strong); }
.name-ask .hint { font-size: 13.5px; color: var(--muted); min-height: 1.5em; }
.name-ask .hint.bad { color: var(--red); }

input.paper, .name-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-field);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.16);
  color: var(--strong);
  font: 500 15px var(--mono);
}
input.paper:focus, .name-field input:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
input.paper::placeholder { color: var(--muted); }

/* in-game chat: smoked glass, dark whatever the theme, because that's what the game draws */
.chat-box {
  border-radius: var(--r-pane);
  overflow: hidden;
  background: rgba(4, 6, 12, 0.66);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), var(--lift);
}
.chat-box .cap { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.09); font: 400 12px var(--mono); color: #98A0AE; }
.chat { padding: 16px 20px; font: 500 14px/1.75 var(--mono); color: #AAAAAA; overflow-x: auto; }
.chat div { white-space: nowrap; }

/* ---------- home: the file listing ---------- */

.listing { margin-bottom: 56px; border-radius: var(--r-pane); overflow: hidden; }
.listing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  font: 400 13px var(--mono);
  color: var(--muted);
}
.listing-head .path { color: var(--strong); font: 700 16px var(--sans); }
.files { list-style: none; margin: 0; padding: 0; }
.file { display: grid; grid-template-columns: minmax(0, 1fr) 228px 228px; border-bottom: 1px solid var(--line); }
.file:last-child { border-bottom: 0; }
.file-main { display: flex; align-items: center; gap: 14px; padding: 14px 22px; text-decoration: none; min-width: 0; }
.file-main .text { min-width: 0; }
.file-main b { display: block; font: 700 17px/1.3 var(--sans); letter-spacing: -0.01em; color: var(--strong); }
.file-main .sum { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.file-main:hover b { text-decoration: underline; text-decoration-color: var(--gold-fill); text-underline-offset: 4px; text-decoration-thickness: 2px; }

.get {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 2px 10px;
  margin: 8px 8px 8px 0;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: none;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: 400 12.5px var(--mono);
  color: var(--muted);
  transition: background 0.12s, border-color 0.12s;
}
.get:hover { background: var(--panel-2); border-color: var(--line-2); box-shadow: var(--edge); }
.get .fname { color: var(--strong); font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.get .meta { grid-column: 1; white-space: nowrap; }
.get .arrow { grid-row: span 2; align-self: center; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--panel-2); font-weight: 700; font-size: 14px; color: var(--muted); }
.get:hover .arrow { background: var(--gold-fill); color: var(--on-gold); }
.group { padding: 22px 22px 8px; border-bottom: 1px solid var(--line); font: 700 13px var(--sans); color: var(--muted); }
.files .group:first-child { padding-top: 14px; }

input.search { width: 240px; max-width: 100%; min-height: 38px; border-radius: 999px; font: 400 14px var(--sans); }
.listing-head input.search { margin-left: auto; }
.listing-head #listing-count { order: 0; }
.get.none { cursor: default; opacity: 0.6; }
.get.none:hover { background: none; border-color: transparent; box-shadow: none; }
.no-match { padding: 22px; }
.file[hidden], .group[hidden], .pcard[hidden], .pgroup[hidden] { display: none; }
.quick input.search { margin-left: auto; }
.sktag { font: 500 11px var(--mono); font-style: normal; color: var(--gold); margin-left: 4px; }
.pcard[disabled] { opacity: 0.4; cursor: not-allowed; }
.pcard[disabled]:hover { background: var(--panel); }
.pcard[disabled]:active { transform: none; }

/* ---------- home: install steps ---------- */

.section-title { font: 800 clamp(24px, 3.4vw, 32px)/1.1 var(--sans); letter-spacing: -0.025em; color: var(--strong); margin: 0 0 20px; }
.steps { list-style: none; margin: 0 0 56px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: var(--r-pane); overflow: hidden; counter-reset: step; }
.steps li { padding: 22px; border-left: 1px solid var(--line); counter-increment: step; }
.steps li:first-child { border-left: 0; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); box-shadow: var(--edge); font: 700 13px var(--mono); color: var(--gold); margin-bottom: 12px; }
.steps b { display: block; color: var(--strong); font-weight: 700; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 14.5px; }
code { font: 500 0.86em var(--mono); background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; padding: 1px 6px; color: var(--strong); overflow-wrap: anywhere; }

.pitch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: center; padding: 28px; border-radius: var(--r-pane); }
.pitch h2 { font: 800 clamp(22px, 3vw, 28px)/1.1 var(--sans); letter-spacing: -0.02em; color: var(--strong); margin: 0 0 6px; }
.pitch p { margin: 0; color: var(--muted); max-width: 58ch; }

/* ---------- builder ---------- */

.name-field { display: flex; align-items: center; gap: 8px; min-width: 0; font: 500 18px var(--mono); }
.name-field .ext { color: var(--muted); }
.name-field input { box-sizing: content-box; font-size: 18px; min-height: 46px; padding: 0 16px; width: 11ch; min-width: 6ch; max-width: calc(100% - 34px); }
.name-field input.bad { border-color: var(--red); outline-color: var(--red); }
.name-error { color: var(--red); font-size: 13px; margin: 6px 0 0; min-height: 1.4em; }

.chip { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--panel); overflow: hidden; }
.chip-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.chip-head b { flex: 1; min-width: 0; font: 700 15px var(--sans); color: var(--strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-body { padding: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.chip-body[hidden] { display: none; }

.setting { display: grid; gap: 5px; }
.setting > span { font-size: 13px; color: var(--muted); }
.setting.inline { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.setting.inline > span { color: var(--text); }
.unit { display: flex; align-items: center; gap: 8px; }
.unit em { font: 400 13px var(--mono); color: var(--muted); font-style: normal; }

/* a switch: a glass track with a bead that slides */
.lever { appearance: none; flex: none; width: 48px; height: 28px; margin: 0; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.25); position: relative; cursor: pointer; transition: background 0.16s, border-color 0.16s; }
.lever::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); transition: transform 0.16s; }
.lever:checked { background: var(--gold-fill); border-color: rgba(255, 215, 130, 0.9); }
.lever:checked::after { transform: translateX(20px); }

/* a pair or row of choices in one glass track */
.seg, .tabs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.18); }
.seg .btn, .tabs .btn { min-height: 36px; padding: 0 16px; border-color: transparent; background: none; box-shadow: none; color: var(--muted); }
.seg .btn:hover, .tabs .btn:hover { color: var(--strong); }
.seg .btn[aria-pressed="true"], .tabs .btn[aria-pressed="true"] { background: var(--panel-2); border-color: var(--line-2); box-shadow: var(--edge); color: var(--strong); }
.small { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* ---------- builder: numbered steps down one column ---------- */

.build-page { max-width: 920px; padding-bottom: 150px; }
.step { margin-bottom: 16px; padding: 26px 28px 30px; border-radius: var(--r-pane); }
/* a pane with a popover hanging out of it must not clip it, so no overflow here */
.step > h2, .step > summary { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; font: 800 24px/1.2 var(--sans); letter-spacing: -0.02em; color: var(--strong); }
.step .n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(180deg, #FFC84D, #FFAA00); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 6px 16px -6px rgba(255, 170, 0, 0.8); color: var(--on-gold); font: 700 15px var(--mono); letter-spacing: 0; }
.step .hint { margin: 0 0 18px 44px; color: var(--muted); }
.fine > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
.fine[open] > summary { margin-bottom: 6px; }
.fine > summary::-webkit-details-marker { display: none; }
.fine > summary em { font: 400 13px var(--mono); letter-spacing: 0; color: var(--muted); margin-left: auto; }
.fine > summary::after { content: "+"; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); box-shadow: var(--edge); font: 400 20px var(--mono); color: var(--strong); }
.fine[open] > summary::after { content: "\2212"; }
.fine:not([open]) { padding-bottom: 26px; }
/* the colour step sits above the steps after it, so its picker can drop over them */
.step:has(.cfields) { position: relative; z-index: 3; }

.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.quick .btn, .presets .btn, .toc .btn { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.pgroup { display: flex; align-items: baseline; gap: 12px; margin: 22px 0 8px; font: 700 13px var(--sans); color: var(--muted); }
.pgroup .linkish { font-weight: 400; font-size: 13px; }
.pgroup .linkish:hover { color: var(--gold); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pcard { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--panel); box-shadow: var(--edge); text-align: left; cursor: pointer; color: var(--text); transition: transform 0.12s, background 0.12s, border-color 0.12s; }
.pcard:hover { background: var(--panel-2); }
.pcard:active { transform: scale(0.985); }
.pcard .text { flex: 1; min-width: 0; }
.pcard b { display: block; font: 700 15px var(--sans); color: var(--strong); }
.pcard .text span { display: block; font-size: 13px; line-height: 1.35; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .tick { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); display: grid; place-items: center; font: 700 14px var(--mono); color: var(--on-gold); }
/* ticked: the glass turns amber */
.pcard[aria-pressed="true"] { border-color: rgba(255, 190, 70, 0.75); background: linear-gradient(180deg, rgba(255, 190, 70, 0.26), rgba(255, 170, 0, 0.12)); box-shadow: inset 0 1px 0 rgba(255, 230, 170, 0.5), 0 10px 26px -14px rgba(255, 170, 0, 0.7); }
.pcard[aria-pressed="true"] .tick { background: linear-gradient(180deg, #FFC84D, #FFAA00); border-color: rgba(255, 215, 130, 0.9); }
.pcard[aria-pressed="true"] .tick::after { content: "\2713"; }

.look { display: grid; grid-template-columns: minmax(0, 310px) minmax(0, 1fr); gap: 24px; align-items: start; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cfields { display: grid; gap: 8px; }
/* a colour: its name, then a bead of that colour that holds its hex code */
.cfield { position: relative; display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 10px; }
.cfield label { font-size: 13.5px; color: var(--text); }
.chex { width: 100%; min-height: 38px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -6px 10px -6px rgba(0, 0, 0, 0.3), 0 6px 14px -8px rgba(0, 0, 0, 0.6); font: 700 13.5px var(--mono); letter-spacing: 0.02em; cursor: pointer; }
.chex:focus { outline: 2px solid var(--strong); outline-offset: 2px; cursor: text; }
.cpop { position: absolute; z-index: 30; top: calc(100% + 8px); left: 120px; width: 248px; padding: 12px; border-radius: 22px; background: var(--pop); border: 1px solid var(--line-2); box-shadow: var(--edge), 0 26px 56px -18px rgba(0, 0, 0, 0.8); display: grid; gap: 12px; }
.cpop .sv { position: relative; height: 150px; border-radius: 14px; cursor: crosshair; touch-action: none; background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, rgba(255, 255, 255, 0)); }
.cpop .sv i { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.5); pointer-events: none; }
.cpop .hue { appearance: none; width: 100%; height: 16px; margin: 0; border-radius: 999px; cursor: pointer; background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.cpop .hue::-webkit-slider-thumb { appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid rgba(0, 0, 0, 0.4); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.cpop .hue::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid rgba(0, 0, 0, 0.4); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.cpop .mc { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.cpop .mc button { aspect-ratio: 1; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); cursor: pointer; }
.cpop .mc button:hover { transform: scale(1.15); }
.prefix-field { margin-top: 16px; }
.picked { display: grid; gap: 10px; margin-left: 44px; }

/* the build bar: one more capsule, floating at the bottom */
.buildbar { position: fixed; left: 0; right: 0; bottom: 14px; z-index: 25; padding: 0 16px; pointer-events: none; }
.buildbar .wrap { pointer-events: auto; max-width: 920px; display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 8px; border-radius: 999px; background: var(--solid); border-color: var(--line-2); }
.buildbar .small { flex: 1; margin: 0; min-width: 0; }
.buildbar #build { min-height: 46px; padding: 0 24px; font-size: 15.5px; }
.build-page ~ footer.foot { padding-bottom: 90px; }

.source-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 0 0 20px; padding: 10px 10px 10px 24px; border-radius: 999px; color: var(--muted); font-size: 14.5px; }
.source-row .btn { font: 500 13.5px var(--mono); }

/* ---------- module page ---------- */

.crumb { font: 400 13px var(--mono); color: var(--muted); margin: 0 0 20px; }
.crumb a { color: var(--text); text-underline-offset: 3px; }
.m-head { display: flex; align-items: center; gap: 22px; margin-bottom: 28px; }
.m-head h1 { font: 800 clamp(34px, 6vw, 56px)/1 var(--sans); letter-spacing: -0.035em; margin: 0 0 8px; color: var(--strong); }
.m-head p { margin: 0; color: var(--muted); font-size: 17px; max-width: 56ch; }
.versions { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 12px; border-radius: var(--r-pane); overflow: hidden; }
.ver { display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.ver + .ver { border-left: 1px solid var(--line); }
.ver h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0; font: 700 18px var(--sans); color: var(--strong); }
.ver h3 .vbar { font-size: 13.5px; font-weight: 700; }
.ver p { flex: 1; color: var(--muted); font-size: 14.5px; margin: 0 0 6px; }
.ver .btn { align-self: flex-start; font-family: var(--mono); font-size: 13.5px; }
.does { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.does li { position: relative; padding-left: 22px; }
.does li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-fill); box-shadow: 0 0 10px rgba(255, 170, 0, 0.7); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: 400 12.5px var(--mono); color: var(--muted); padding: 0 16px 8px 0; white-space: nowrap; }
td { padding: 10px 16px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
td.mono { font: 13px var(--mono); color: var(--strong); }
td.dim { color: var(--muted); }
.scroll { overflow-x: auto; }
.note { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

.tabs { max-width: 100%; overflow-x: auto; }
#source > .bar { flex-wrap: wrap; }
.tabs .btn { min-height: 32px; padding: 0 14px; font: 500 12.5px var(--mono); }
pre.code { margin: -20px -22px; background: var(--code-bg); color: var(--code-text); font: 12.5px/1.65 var(--mono); padding: 20px 22px; overflow: auto; max-height: 460px; tab-size: 4; }

/* ---------- guide + legal ---------- */

.guide, .legal { max-width: 800px; }
.guide .body ol, .legal .body ul { margin: 0 0 12px; padding-left: 22px; }
.guide .body li, .legal .body li { margin-bottom: 6px; }
.guide .body > :last-child, .legal .body > :last-child { margin-bottom: 0; }
.legal .body h3 { margin-top: 20px; }
.legal .body h3:first-child { margin-top: 0; }
.legal .fill { background: var(--gold-fill); color: var(--on-gold); padding: 0 7px; border-radius: 6px; font-weight: 600; }
.updated { font: 400 13px var(--mono); color: var(--muted); margin: 0 0 20px; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }

/* ---------- toast, dialog, notices ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 20px);
  border-radius: 999px;
  background: var(--solid);
  border-color: var(--line-2);
  color: var(--strong);
  font: 600 14px var(--sans);
  padding: 12px 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  max-width: calc(100% - 32px);
  text-align: center;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

dialog { border: 0; padding: 0; background: none; max-width: 440px; width: calc(100% - 32px); color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog .screen { margin: 0; }

.consent { position: fixed; right: 16px; bottom: 16px; width: min(520px, calc(100% - 32px)); z-index: 60; }
.consent .screen { margin: 0; background: var(--solid); border-color: var(--line-2); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: var(--edge), 0 26px 56px -18px rgba(0, 0, 0, 0.8); }
.consent p { font-size: 14.5px; }
.consent-opts { margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--panel); }
.consent-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.consent-opt:last-child { border-bottom: 0; }
div.consent-opt { cursor: default; }
.consent-opt .text { flex: 1; min-width: 0; }
.consent-opt b { display: block; font: 600 14px var(--sans); color: var(--strong); }
.consent-opt span { font-size: 13px; color: var(--muted); }
.consent-opt .always { font: 400 12px var(--mono); color: var(--green); white-space: nowrap; }
.consent .btn-row { justify-content: flex-end; }
.consent .btn-row .btn { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

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

footer.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 8px; padding-bottom: 40px; font-size: 13px; color: var(--muted); }
footer.foot .links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
footer.foot a { text-underline-offset: 3px; }
footer.foot a:hover, footer.foot .linkish:hover { color: var(--strong); }

/* ---------- small screens ---------- */

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
  .file { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-bottom: 8px; }
  .file-main { grid-column: 1 / -1; }
  .get { margin: 0 8px; }
  .get + .get { margin-left: 0; }
}

@media (max-width: 720px) {
  :root { --r-pane: 22px; }
  .wrap { padding: 0 14px; }
  .page { padding: 28px 14px 56px; }
  .top { top: 8px; margin-top: 8px; }
  .nav { flex-wrap: wrap; gap: 0 12px; padding: 6px 8px 6px 16px; border-radius: 26px; }
  .brand { min-height: 42px; }
  .nav nav { order: 3; flex-basis: 100%; overflow-x: auto; margin: 0 -8px; }
  .nav-right { margin-left: auto; }
  .hero { padding: 16px 0 40px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { border-left: 0; border-top: 1px solid var(--line); }
  .steps li:first-child { border-top: 0; }
  .pitch { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .versions { grid-template-columns: 1fr; }
  .ver + .ver { border-left: 0; border-top: 1px solid var(--line); }
  .m-head { align-items: flex-start; gap: 14px; }
  .slot.big { width: 60px; height: 60px; border-radius: 18px; }
  .slot.big img.item { width: 48px; height: 48px; }
  .step { padding: 20px 18px 22px; }
  .look { grid-template-columns: minmax(0, 1fr); }
  .step .hint, .picked { margin-left: 0; }
  .buildbar { bottom: 8px; padding: 0 8px; }
  .buildbar .wrap { flex-wrap: wrap; gap: 8px 10px; border-radius: 26px; padding: 8px; }
  .buildbar .small { order: 3; flex-basis: 100%; padding: 0 10px 4px; }
  .buildbar #build { flex: 1; }
  .build-page { padding-bottom: 190px; }
  .cpop { left: 0; }
  .chip-body { grid-template-columns: minmax(0, 1fr); }
  .source-row { border-radius: 22px; padding: 14px 16px; }
  .screen > .body { padding: 18px; }
  .screen > .bar { padding-left: 18px; }
  pre.code { margin: -18px; padding: 18px; }
  .consent { right: 8px; bottom: 8px; width: calc(100% - 16px); }
  .consent .btn-row .btn { flex: 1; }
}

@media (max-width: 460px) {
  .get .meta { white-space: normal; }
  .hero .btn-row .btn { flex: 1 1 100%; }
}

/* ---------- when glass isn't wanted, or can't be drawn ---------- */

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --panel: rgba(30, 34, 46, 0.92); --panel-2: rgba(48, 54, 70, 0.95); --solid: rgba(22, 26, 36, 0.98); }
  :root[data-theme="light"] { --panel: rgba(255, 255, 255, 0.92); --panel-2: #FFFFFF; --solid: #FFFFFF; }
}

@media (prefers-reduced-transparency: reduce) {
  :root { --panel: #171B26; --panel-2: #242A38; --solid: #171B26; --blur: none; }
  :root[data-theme="light"] { --panel: #FFFFFF; --panel-2: #F1F3F8; --solid: #FFFFFF; }
}

@media (prefers-reduced-motion: reduce) {
  .toast, .lever, .lever::after, .btn, .pcard, .get { transition: none; }
  .btn:active, .pcard:active { transform: none; }
  .cpop .mc button:hover { transform: none; }
}
