:root {
  --ease: cubic-bezier(0.2, 0.8, 0.25, 1);
  --fast: 0.14s;
  --med: 0.32s;
  --paper: #F6F5F1;
  --ink: #26262B;
  --ink-soft: #55555E;
  --hl: #FFD23F;
  --hl-soft: rgba(255, 210, 63, 0.22);
  --pen: #D0342C;
  --line: #DCDAD2;
  --card: #FFFFFF;
  --card-soft: #FBFAF7;
  --nav-bg: rgba(246, 245, 241, 0.92);
  --footer-ink: #1C1C21;
}

/* ---------- THE STUDIO: theme presets ---------- */
/* Same composition-notebook design language, new paint. Every theme keeps
   AA contrast for body text on paper and card surfaces. */
body[data-theme="blueberry-milk"] {
  --paper: #EEF2F9; --ink: #1F2937; --ink-soft: #4B5563;
  --hl: #A5C8FF; --hl-soft: rgba(165, 200, 255, 0.28);
  --pen: #4356C0; --line: #CBD5E4; --card: #FFFFFF; --card-soft: #F7F9FD;
  --nav-bg: rgba(238, 242, 249, 0.92); --footer-ink: #161B26;
}
body[data-theme="recess"] {
  --paper: #EFF5EC; --ink: #21301F; --ink-soft: #48584A;
  --hl: #BCE784; --hl-soft: rgba(188, 231, 132, 0.3);
  --pen: #D96C2C; --line: #CFDCCA; --card: #FFFFFF; --card-soft: #F7FBF4;
  --nav-bg: rgba(239, 245, 236, 0.92); --footer-ink: #16200F;
}
body[data-theme="grape-jelly"] {
  --paper: #F4EFF8; --ink: #2C2338; --ink-soft: #564B66;
  --hl: #E4C6FF; --hl-soft: rgba(228, 198, 255, 0.3);
  --pen: #B03A8C; --line: #DCD2E6; --card: #FFFFFF; --card-soft: #FAF7FD;
  --nav-bg: rgba(244, 239, 248, 0.92); --footer-ink: #1F1729;
}
body[data-theme="golden-hour"] {
  --paper: #FAF3E3; --ink: #33261A; --ink-soft: #5C4B38;
  --hl: #FFC24B; --hl-soft: rgba(255, 194, 75, 0.28);
  --pen: #C24E22; --line: #E6D8BE; --card: #FFFFFF; --card-soft: #FDF9F0;
  --nav-bg: rgba(250, 243, 227, 0.92); --footer-ink: #241A10;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { background: var(--paper); color: var(--ink); font-family: 'Source Serif 4', Georgia, serif; font-size: 17px; line-height: 1.65; }
.disp { font-family: 'Bricolage Grotesque', 'Arial Black', sans-serif; }
.mono { font-family: 'IBM Plex Mono', Menlo, monospace; }
img { max-width: 100%; }
a { color: inherit; }

/* ---------- NAV ---------- */
.skip-link {
  position: absolute; left: 12px; top: 12px; z-index: 200;
  padding: 10px 14px; background: var(--ink); color: var(--paper);
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 14px;
  text-decoration: none; transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); outline: 3px solid var(--hl); outline-offset: 2px; }
.nav { position: sticky; top: 0; z-index: 100; background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1.5px solid var(--ink); }
.nav-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; background: var(--hl); border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); flex-shrink: 0; position: relative; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; left: 8px; right: 8px; height: 2px; background: var(--ink); }
.brand-mark::before { top: 12px; }
.brand-mark::after { top: 20px; }
.brand-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; }
.nav-menu { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; flex-wrap: wrap; }
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-links a { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 14.5px; text-decoration: none; color: var(--ink-soft); padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); background: var(--hl-soft); }
.nav-links a.active { color: var(--ink); background: var(--hl); }
.nav-primary a { color: var(--ink); }
.nav-secondary a { font-size: 13.5px; }
.nav-toggle {
  display: none; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase; background: var(--card); color: var(--ink);
  border: 1.5px solid var(--ink); padding: 8px 12px; cursor: pointer; margin-left: auto;
}
.nav-account { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-avatar { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink); object-fit: cover; display: none; }
.nav-avatar.on { display: block; }
.nav-signout { margin: 0; }
.nav-signout button { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; background: transparent; color: var(--ink-soft); border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.nav-signout button:hover { color: var(--pen); border-color: var(--pen); }
.home-hello { max-width: 1160px; margin: 28px auto 0; padding: 0 24px; font-family: 'Caveat', cursive; font-size: 26px; color: var(--pen); line-height: 1.3; }
.path-strip { max-width: 1160px; margin: 0 auto; padding: 8px 24px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.empty-state { margin-top: 12px; padding: 18px 20px; background: var(--card); border: 1.5px dashed var(--ink); }
.empty-state .pen-note { margin-top: 0; }
.empty-state .go { display: inline-block; margin-top: 10px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 3px solid var(--hl); text-decoration: none; }

/* ---------- HERO ---------- */
.hero { max-width: 1160px; margin: 0 auto; padding: 60px 24px 44px; }
.kicker { display: inline-block; background: var(--hl); padding: 5px 14px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 13.5px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 18px; border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
h1 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(36px, 6vw, 60px); line-height: 1.04; letter-spacing: -0.015em; text-wrap: balance; }
.lede { margin-top: 18px; font-size: 19.5px; color: var(--ink-soft); max-width: 62ch; }
.lede strong { color: var(--ink); }

/* ---------- LAYOUT ---------- */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px 80px; }
.narrow { max-width: 880px; }
section { margin-top: 56px; }
.sec-label { display: inline-block; background: var(--hl); padding: 5px 14px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
h2 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(26px, 4vw, 36px); line-height: 1.12; letter-spacing: -0.01em; }
h3 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 21px; }
.sec-why { color: var(--ink-soft); max-width: 64ch; margin-top: 8px; }

/* ---------- CARDS ---------- */
.card { background: var(--card); border: 1.5px solid var(--ink); margin-top: 26px; }
.card-head { display: flex; align-items: baseline; gap: 14px; padding: 20px 24px 4px; }
.card-num { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 14.5px; color: var(--pen); flex-shrink: 0; min-width: 34px; }
.card-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 20px; line-height: 1.25; }
.card-when { padding: 6px 24px 0 72px; color: var(--ink-soft); font-size: 15.5px; }
.promptbox { position: relative; margin: 16px 24px 20px; background: var(--card-soft); border: 1px solid var(--line); }
.promptbox pre { font-family: 'IBM Plex Mono', Menlo, monospace; font-size: 13px; line-height: 1.62; padding: 20px 96px 20px 22px; white-space: pre-wrap; word-break: break-word; }
.copy { position: absolute; top: 10px; right: 10px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; background: var(--ink); color: var(--paper); border: none; padding: 7px 14px; cursor: pointer; }
.copy:hover { background: #000; }
.copy:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--hl); outline-offset: 2px; }
.tip { margin: 0 24px 22px; padding: 12px 16px; background: var(--hl-soft); border-left: 3px solid var(--hl); font-size: 15px; }
.tip strong { font-family: 'Bricolage Grotesque', sans-serif; font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; }

/* ---------- HOME NAV CARDS ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 30px; }
.nav-card { display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 1.5px solid var(--ink); padding: 28px; position: relative; transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease); box-shadow: 5px 5px 0 var(--ink); }
.nav-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.nav-card .step { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--pen); font-weight: 600; }
.nav-card h3 { margin-top: 8px; font-size: 24px; }
.nav-card p { margin-top: 10px; color: var(--ink-soft); font-size: 16px; }
.nav-card .go { display: inline-block; margin-top: 16px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 3px solid var(--hl); }

/* ---------- RULES / STEPS ---------- */
.rules { background: var(--card); border: 1.5px solid var(--ink); padding: 28px 30px; margin-top: 30px; box-shadow: 5px 5px 0 var(--ink); }
.rules h2 { font-size: 22px; margin-bottom: 14px; }
.rules ol { padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.rules li strong { font-family: 'Bricolage Grotesque', sans-serif; }
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 0; margin-top: 26px; }
.step-item { position: relative; padding: 22px 24px 22px 84px; background: var(--card); border: 1.5px solid var(--ink); border-top: none; }
.step-item:first-child { border-top: 1.5px solid var(--ink); }
.step-item::before { counter-increment: step; content: counter(step); position: absolute; left: 24px; top: 22px; width: 38px; height: 38px; background: var(--hl); border: 1.5px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 18px; }
.step-item h4 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 18px; margin-bottom: 6px; }
.step-item p { color: var(--ink-soft); font-size: 16px; }
.step-item p strong { color: var(--ink); }

/* ---------- GLOSSARY ---------- */
.term { background: var(--card); border: 1.5px solid var(--ink); border-top: none; padding: 20px 24px; }
.term:first-of-type { border-top: 1.5px solid var(--ink); }
.term dt { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 19px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.term dt .say { font-family: 'Caveat', cursive; font-weight: 600; font-size: 19px; color: var(--pen); }
.term dd { margin-top: 6px; color: var(--ink-soft); }
.term dd strong { color: var(--ink); }
.term dd .why { display: block; margin-top: 6px; font-size: 15px; }
.term dd .why b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); background: var(--hl-soft); padding: 2px 8px; }

/* ---------- PROMPTS PAGE ---------- */
.prompts-layout { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: start; }
.side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 2px; }
.side a { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--ink-soft); padding: 9px 14px; border-left: 3px solid transparent; }
.side a:hover { color: var(--ink); background: var(--hl-soft); }
.side a .n { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--pen); margin-right: 8px; }
.searchbar { margin-top: 26px; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--ink); padding: 4px 4px 4px 18px; box-shadow: 4px 4px 0 var(--ink); }
.searchbar input { flex: 1; border: none; background: transparent; font-family: 'Bricolage Grotesque', sans-serif; font-size: 16px; padding: 12px 0; color: var(--ink); outline: none; }
.searchbar .count { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--ink-soft); padding: 0 14px; white-space: nowrap; }
.searchbar .grade-filter { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.searchbar select { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--ink); background: transparent; border: 1.5px solid var(--ink); padding: 6px 8px; }
.cat { margin-top: 46px; }
.cat-head { display: flex; align-items: baseline; gap: 14px; border-bottom: 3px solid var(--ink); padding-bottom: 10px; }
.cat-head .cat-letter { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 15px; background: var(--ink); color: var(--paper); padding: 4px 12px; }
.cat-head h2 { font-size: 26px; }
.cat-intro { margin-top: 10px; color: var(--ink-soft); max-width: 66ch; font-size: 16px; }

/* ---------- CALLOUT ---------- */
.callout { background: var(--ink); color: var(--paper); padding: 30px 32px; margin-top: 40px; }
.callout h3 { color: var(--hl); margin-bottom: 8px; }
.callout p { color: rgba(246,245,241,0.85); }
.callout a { color: var(--hl); }
.pen-note { color: var(--pen); font-family: 'Caveat', cursive; font-size: 23px; line-height: 1.35; margin-top: 34px; }

/* ---------- PAGER ---------- */
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; }
.pager a { flex: 1; max-width: 46%; text-decoration: none; color: var(--ink); background: var(--card); border: 1.5px solid var(--ink); padding: 18px 22px; box-shadow: 4px 4px 0 var(--ink); }
.pager a:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.pager .dir { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--pen); text-transform: uppercase; letter-spacing: 0.08em; }
.pager .dest { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 17px; margin-top: 4px; }
.pager .next { margin-left: auto; text-align: right; }

/* ---------- FOOTER ---------- */
.footer { background: var(--footer-ink); color: #B9B8BE; margin-top: 90px; }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 56px 24px 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer .f-brand { display: flex; align-items: center; gap: 10px; }
.footer .f-brand .brand-mark { box-shadow: 3px 3px 0 #000; border-color: #000; }
.footer .f-brand .brand-name { color: #F6F5F1; }
.footer .f-blurb { margin-top: 14px; font-size: 15px; max-width: 40ch; }
.footer h5 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: #F6F5F1; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer ul a { color: #B9B8BE; text-decoration: none; font-size: 15px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; }
.footer ul a:hover { color: var(--hl); }
.footer-bar { border-top: 1px solid rgba(246,245,241,0.14); }
.footer-bar-inner { max-width: 1160px; margin: 0 auto; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer-bar .made { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 14px; color: #8F8E96; }
.built-form { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 14px; color: #F6F5F1; background: rgba(246,245,241,0.06); border: 1px solid rgba(246,245,241,0.2); padding: 8px 16px; border-radius: 999px; }
.built-form:hover { border-color: #3D6BFF; }
.form-logo { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; letter-spacing: -0.04em; font-size: 1.2em; }
.form-logo .fdot { color: #3D6BFF; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .prompts-layout { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; }
  .side a { border-left: none; border: 1px solid var(--line); background: var(--card); }
  .grid-cards, .path-strip { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 760px) {
  .nav-inner { height: auto; flex-wrap: wrap; padding: 12px 16px; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-menu {
    display: none; width: 100%; order: 3; flex-direction: column; align-items: stretch;
    gap: 8px; padding: 8px 0 4px; border-top: 1px solid var(--line);
  }
  .nav.is-open .nav-menu { display: flex; }
  .nav-links { width: 100%; flex-direction: column; align-items: stretch; }
  .nav-links a { white-space: normal; }
  .nav-secondary { padding-top: 4px; border-top: 1px dashed var(--line); }
  .nav-account { margin-left: 0; }
  .card-when { padding-left: 24px; }
  .pager { flex-direction: column; }
  .pager a { max-width: 100%; }
  .pager .next { text-align: left; }
  .home-hello { padding: 0 16px; margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-card, .pager a { transition: none; }
}

@media (max-width: 560px) {
  .promptbox pre { padding-right: 22px; padding-top: 48px; }
}
/* styled file input (craft pass, technique class: uiverse file-upload buttons, re-tokenized) */
.file-btn { display: inline-block; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; background: #fff; color: var(--ink); border: 1.5px solid var(--ink); padding: 11px 18px; cursor: pointer; }
.file-btn:hover { background: var(--hl-soft); }
.file-name { display: block; margin-top: 8px; font-size: 13.5px; color: var(--ink-soft); }
.visually-hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
/* submit-wait state (craft pass, technique class: uiverse loading buttons, re-tokenized) */
button[data-busy="1"] { opacity: 0.75; pointer-events: none; }

/* ---------- MOTION SYSTEM ---------- */
/* Cross-page transitions: native View Transitions API. Progressive, browsers
   without it just navigate instantly; reduced-motion gets instant cuts. */
@view-transition { navigation: auto; }
.nav { view-transition-name: studio-nav; }
.footer { view-transition-name: studio-footer; }
::view-transition-old(root) { animation: vt-out 0.22s var(--ease) both; }
::view-transition-new(root) { animation: vt-in 0.3s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* Hero entrance: kicker -> title -> lede, one gentle stagger on every page. */
.hero .kicker, .hero h1, .hero .lede, .hero .searchbar { animation: rise 0.5s var(--ease) both; }
.hero h1 { animation-delay: 0.06s; }
.hero .lede { animation-delay: 0.12s; }
.hero .searchbar { animation-delay: 0.18s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* Home: nav-cards arrive as a set. */
.grid-cards .nav-card { animation: rise 0.5s var(--ease) both; }
.grid-cards .nav-card:nth-child(2) { animation-delay: 0.07s; }
.grid-cards .nav-card:nth-child(3) { animation-delay: 0.14s; }
.grid-cards .nav-card:nth-child(4) { animation-delay: 0.21s; }

/* Basics: highlighter sweep under a term on hover. */
.term dt { background-image: linear-gradient(var(--hl), var(--hl)); background-repeat: no-repeat; background-position: 0 88%; background-size: 0% 0.35em; transition: background-size var(--med) var(--ease); width: fit-content; }
.term:hover dt { background-size: 100% 0.35em; }

/* Copy success: a small stamp pop. copy.js adds .copied for 1.6s. */
.copy.copied { background: var(--pen); animation: stamp 0.3s var(--ease); }
@keyframes stamp { 0% { transform: scale(1); } 40% { transform: scale(1.12) rotate(-2deg); } 100% { transform: scale(1); } }

/* Prompts: cards drift in as they enter the viewport (copy.js observer).
   Scoped under html.js so content never hides if scripts fail to load. */
html.js .card[data-search] { opacity: 0; transform: translateY(14px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
html.js .card[data-search].in-view { opacity: 1; transform: none; }

/* Quality: walkthrough steps check themselves off as you pass them. */
.step-item.done::before { content: "\2713"; background: var(--pen); color: #fff; transition: background var(--med) var(--ease); }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root),
  .hero .kicker, .hero h1, .hero .lede, .hero .searchbar,
  .grid-cards .nav-card, .copy.copied { animation: none; }
  html.js .card[data-search] { opacity: 1; transform: none; transition: none; }
  .term dt { transition: none; }
}

/* ---------- MOBILE POLISH ---------- */
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .hero { padding-top: 36px; }
  .nav-links a, .nav-toggle { padding: 12px 14px; min-height: 44px; }
  .card-head { flex-wrap: wrap; gap: 8px; }
  .searchbar { flex-wrap: wrap; }
  .searchbar .count { padding-bottom: 8px; }
  .annot-trigger { bottom: 14px; right: 14px; }
  .rules { padding: 22px 20px; }
  .panel { padding: 22px 20px; }
  .callout { padding: 24px 20px; }
  .step-item { padding-left: 76px; }
}

.card-locked { background: var(--paper); }
.locked-panel { padding: 4px 22px 22px; }
.locked-label { font-family: 'Caveat', cursive; font-weight: 600; font-size: 26px; color: var(--pen); margin-bottom: 6px; }
.locked-panel p { margin: 0 0 12px; color: var(--ink-soft); }
.locked-panel a.go { display: inline-block; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 3px solid var(--hl); color: var(--ink); text-decoration: none; }

.panel { background: var(--card); border: 1.5px solid var(--ink); padding: 28px; box-shadow: 5px 5px 0 var(--ink); }
.panel h3 { margin-bottom: 6px; }
.panel .sub { color: var(--ink-soft); font-size: 15px; margin: 0 0 16px; }
.panel form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.panel label, .panel label.check { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.panel label.check { text-transform: none; letter-spacing: 0; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.panel input[type="text"], .panel input[type="email"], .panel input[type="password"], .panel input[type="number"], .panel input[type="tel"], .panel select {
  width: 100%; max-width: 420px; font-family: 'Bricolage Grotesque', sans-serif; font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--ink); padding: 10px 12px;
}
.panel button {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink);
  padding: 10px 14px; cursor: pointer; align-self: flex-start;
}
.banner { border-left: 3px solid; padding: 11px 14px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 14.5px; margin-top: 18px; }
.banner.ok { background: rgba(46,125,50,0.09); border-color: #2E7D32; color: #2E7D32; }
.style-chip { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; }
.style-chip .swatches { display: inline-flex; gap: 4px; }
.style-chip .swatches i { width: 16px; height: 16px; border: 1.5px solid var(--ink); display: inline-block; }
.door-preview { border: 1.5px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 28px; margin: 8px 0 16px; }
.door-preview strong { display: block; font-size: 42px; line-height: 1.1; }
.promptbox .copy-alt { position: static; display: inline-block; margin: 0 24px 16px; background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
mark.bracket { background: var(--hl); color: inherit; padding: 0 0.12em; }
.font-licenses { margin: 8px 0 16px; padding-left: 18px; }
.color-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-bottom: 8px; }
.banner.err { background: rgba(208,52,44,0.08); border-color: var(--pen); color: var(--pen); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.admin-table th, .admin-table td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: 10px 8px; }
.admin-table form { margin: 0 0 8px; }
.admin-table select { max-width: 140px; }
.audit { margin: 0; padding-left: 18px; }
.audit li { margin: 6px 0; }
.pathfinder, .tool-card { background: var(--card); border: 1.5px solid var(--ink); padding: 22px 24px; margin-top: 22px; box-shadow: 4px 4px 0 var(--ink); }
.pathfinder label, .pathfinder legend { display: block; margin: 8px 0; }
.pathfinder legend, .tool-card h2 { font-family: 'Bricolage Grotesque', sans-serif; }
.tool-card h3 { margin-top: 16px; font-size: 16px; }
.tool-card.start-here { box-shadow: 6px 6px 0 var(--hl); }
.start-label { display: none; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; background: var(--hl); padding: 4px 8px; border: 1.5px solid var(--ink); }
.tool-card.start-here .start-label { display: inline-block; }
.review-flag { font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.review-flag.needs-review { background: var(--hl); padding: 8px 10px; }
.tool-card .sources { font-size: 14px; }
.tool-card form { margin-top: 16px; }
.tool-card button, .note-sheet form button, .text-btn {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink);
  padding: 10px 14px; cursor: pointer;
}
.text-btn { background: transparent; color: var(--ink); margin: 0 24px 16px; }
.progress { height: 12px; border: 1.5px solid var(--ink); margin-top: 10px; }
.progress span { display: block; height: 100%; background: var(--hl); }

/* First-piece onboarding rail */
.first-rail { margin: 0 0 22px; }
.first-rail ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.first-rail-step {
  border: 1.5px solid var(--ink);
  background: var(--card);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 14px;
}
.first-rail-label {
  display: block;
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
}
.first-rail-step.todo .first-rail-label { color: var(--ink-soft); }
.first-rail-step.current {
  background: var(--hl);
}
.first-rail-step.done {
  background: var(--paper);
}
.first-rail-step.done .first-rail-label::after {
  content: " done";
  color: var(--pen);
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 18px;
}
a.first-rail-label:hover { text-decoration: underline; }
@media (max-width: 520px) {
  .first-rail ol { flex-direction: column; }
}
.kit-steps { padding-left: 20px; }
@media print {
  .nav, .footer, form, .pager-line { display: none !important; }
}
