/* Padigo — the parent brand of KITCHEN, COOKBOOK, DASHBOARD, COUNTER and CHAT.
   The one design language all five apps share: colours, type, radii, focus, the Padigo wordmark, the "Padigo / APP" lockup and
   the switcher between apps. Each app's build puts this file FIRST, then its own CSS, which builds on these tokens.
   Components (brand.jsx): <Wordmark/>, <Lockup app="Kitchen"/>, <AppSwitcher/>, <PlatformLinks/>. Fonts: brand-head.mjs. */

:root {
  /* brand */
  --pd-green: #0f6b4f;          /* Padigo green: primary actions, links, the app name in the lockup */
  --pd-green-strong: #0b573f;   /* hover / pressed */
  --pd-green-soft: #e8f4ee;     /* selected rows, info notes, chips */
  --pd-green-line: #b9dccb;
  --pd-green-ink: #0a4433;      /* text on --pd-green-soft */
  --pd-marigold: #f0a020;       /* the wordmark's dot; small highlights only, never text on white */
  --pd-ink: #11201a;            /* sidebars and dark surfaces */
  --pd-ink-2: #1a2c25;
  --pd-ink-3: #233a31;
  --pd-ink-text: #c6d3cd;
  --pd-ink-muted: #8a9b94;
  --pd-ink-accent: #8fd8b6;     /* the app name and links on --pd-ink */

  /* neutrals */
  --pd-paper: #f7f7f4;
  --pd-panel: #ffffff;
  --pd-line: #e3e6e1;
  --pd-line-strong: #c9cec7;
  --pd-text: #17201c;
  --pd-muted: #64706a;

  /* meaning */
  --pd-success: #2b8a3e; --pd-success-soft: #ebfbee;
  --pd-warning: #b35c00; --pd-warning-soft: #fff4e6;
  --pd-danger: #d0352b;  --pd-danger-soft: #fff3f2;
  --pd-info: #1f5fa8;    --pd-info-soft: #eaf2fc;

  /* shape and type */
  --pd-radius-sm: 6px; --pd-radius: 8px; --pd-radius-lg: 12px; --pd-radius-xl: 16px;
  --pd-shadow: 0 1px 2px rgba(17, 32, 26, .05), 0 12px 32px -16px rgba(17, 32, 26, .22);
  --pd-shadow-pop: 0 18px 44px -18px rgba(17, 32, 26, .38);
  --pd-font-ui: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pd-font-brand: 'Bricolage Grotesque', var(--pd-font-ui);
  --pd-focus: 0 0 0 3px color-mix(in srgb, var(--pd-green) 32%, transparent);

  /* the names every app's CSS already uses, pointed at the brand */
  --bg: var(--pd-paper); --panel: var(--pd-panel); --line: var(--pd-line); --text: var(--pd-text); --muted: var(--pd-muted);
  --accent: var(--pd-green); --accent-strong: var(--pd-green-strong); --accent-soft: var(--pd-green-soft);
  --accent-line: var(--pd-green-line); --accent-ink: var(--pd-green-ink); --danger: var(--pd-danger);
  --side: var(--pd-ink); --side-2: var(--pd-ink-2); --side-3: var(--pd-ink-3); --side-text: var(--pd-ink-text);
  --side-muted: var(--pd-ink-muted); --side-link: var(--pd-ink-accent);
}

/* keyboard focus looks the same everywhere */
:focus-visible { outline: none; box-shadow: var(--pd-focus); }
a:focus-visible, button:focus-visible { border-radius: var(--pd-radius-sm); }

/* ---------- the wordmark ----------
   Bricolage Grotesque ExtraBold at its display optical size, set tight. The i is dotless and wears a marigold dot instead:
   that dot is the one signature detail (there is no logo yet). Screen readers hear "Padigo". */
.pd-wordmark {
  display: inline-block; font-family: var(--pd-font-brand); font-weight: 800; font-size: 22px; line-height: 1;
  letter-spacing: -.03em; font-variation-settings: 'opsz' 96; font-kerning: normal; color: inherit; white-space: nowrap;
}
.pd-wordmark .pd-P { margin-right: -.02em; }          /* close the P–a gap the bowl leaves */
/* the i gets a little air on both sides, so the dot reads as its own mark between d and g */
.pd-wordmark .pd-i { position: relative; display: inline-block; letter-spacing: 0; margin: 0 .005em 0 .015em; }
.pd-wordmark .pd-i::after {
  content: ''; position: absolute; left: 50%; top: var(--pd-dot-top, .09em); width: .19em; height: .19em; transform: translateX(-50%);
  border-radius: 50%; background: var(--pd-marigold);
}

/* ---------- Padigo / APP ---------- */
.pd-lockup {
  display: inline-flex; align-items: baseline; gap: .5em; min-width: 0; color: var(--pd-text); text-decoration: none; white-space: nowrap;
}
.pd-lockup .pd-wordmark { font-size: 21px; }
.pd-sep { font-family: var(--pd-font-ui); font-weight: 300; font-size: 17px; color: var(--pd-line-strong); transform: translateY(-.02em); }
.pd-app {
  font-family: var(--pd-font-ui); font-size: 11px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; color: var(--pd-green);
}
.pd-lockup.sm .pd-wordmark { font-size: 18px; }
.pd-lockup.sm .pd-sep { font-size: 15px; }
.pd-lockup.sm .pd-app { font-size: 10px; letter-spacing: .15em; }
.pd-lockup.lg .pd-wordmark { font-size: 28px; }
.pd-lockup.lg .pd-sep { font-size: 22px; }
.pd-lockup.lg .pd-app { font-size: 12.5px; }
.pd-on-dark .pd-lockup, .pd-lockup.pd-on-dark { color: #fff; }
.pd-on-dark .pd-sep { color: rgba(255, 255, 255, .3); }
.pd-on-dark .pd-app { color: var(--pd-ink-accent); }
a.pd-lockup:hover .pd-app { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- moving between the apps ---------- */
.pd-switch { position: relative; display: inline-flex; }
.pd-switch-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: var(--pd-radius);
  border: 1px solid transparent; background: transparent; color: var(--pd-muted); cursor: pointer;
}
.pd-switch-btn:hover, .pd-switch-btn[aria-expanded='true'] { background: color-mix(in srgb, var(--pd-text) 6%, transparent); color: var(--pd-text); }
.pd-on-dark .pd-switch-btn { color: var(--pd-ink-muted); }
.pd-on-dark .pd-switch-btn:hover, .pd-on-dark .pd-switch-btn[aria-expanded='true'] { background: var(--pd-ink-2); color: #fff; }
.pd-switch-btn svg { width: 16px; height: 16px; }
.pd-switch-menu {
  position: absolute; z-index: 300; top: calc(100% + 6px); left: 0; width: 270px; padding: 6px; background: var(--pd-panel);
  border: 1px solid var(--pd-line); border-radius: var(--pd-radius-lg); box-shadow: var(--pd-shadow-pop); display: flex; flex-direction: column;
  font-family: var(--pd-font-ui); font-size: 14px; text-align: left;
}
.pd-switch-menu.right { left: auto; right: 0; }
.pd-switch-head { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 10px 10px; border-bottom: 1px solid var(--pd-line); margin-bottom: 4px; color: var(--pd-text); }
.pd-switch-head .pd-wordmark { font-size: 18px; }
.pd-switch-head small { color: var(--pd-muted); font-size: 11.5px; }
.pd-switch-menu a {
  display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 8px 10px; border-radius: var(--pd-radius); color: var(--pd-text); text-decoration: none;
}
.pd-switch-menu a:hover { background: var(--pd-green-soft); }
.pd-switch-menu a[aria-current='page'] { background: color-mix(in srgb, var(--pd-text) 5%, transparent); }
.pd-switch-menu .pd-app { grid-column: 1; }
.pd-switch-menu .what { grid-column: 1; font-size: 12.5px; color: var(--pd-muted); }
.pd-switch-menu .here { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 11px; color: var(--pd-muted); }

/* in a dark sidebar: the other apps as a list */
.pd-platforms { display: flex; flex-direction: column; gap: 2px; }
.pd-platforms .side-title { display: flex; align-items: baseline; gap: 6px; }
.side-group.pd-platforms a { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 10px; border-radius: var(--pd-radius); color: var(--side-text); text-decoration: none; }
.side-group.pd-platforms a:hover { background: var(--side-2); color: #fff; }
.pd-platforms a .pd-app { color: inherit; font-size: 10.5px; letter-spacing: .15em; }
.pd-platforms a .what { font-size: 12px; color: var(--side-muted); }
.pd-platforms a:hover .what { color: var(--side-text); }

@media (max-width: 760px) {
  /* tight top bars on a phone: smaller, but both names stay (which app this is matters most on a small screen) */
  .pd-lockup.collapse { gap: .35em; }
  .pd-lockup.collapse .pd-wordmark { font-size: 16px; }
  .pd-lockup.collapse .pd-sep { font-size: 13px; }
  .pd-lockup.collapse .pd-app { font-size: 9px; letter-spacing: .12em; }
  .pd-switch-menu { position: fixed; left: 12px; right: 12px; top: 56px; width: auto; }
}

/* Colours and type come from brand.css (Padigo), prepended by registry/site/build.mjs. The Cookbook also follows the system's
   dark mode, so it redefines the same tokens for dark here. */
:root {
  --shadow: var(--pd-shadow); --radius: 14px;
  font-family: var(--pd-font-ui); font-size: 14px; color: var(--text); background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1512; --panel: #131e1a; --line: #24332d; --text: #e9efec; --muted: #94a39c; --accent: #5cc79c; --accent-soft: #15302a;
    --accent-ink: #bfeedb; --pd-text: #e9efec; --pd-muted: #94a39c; --pd-panel: #131e1a; --pd-line: #24332d; --pd-line-strong: #3a4c45;
    --pd-green: #5cc79c; --pd-green-soft: #15302a; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 16px 40px -20px rgba(0,0,0,.7); }
}
h1, h2, .detail-title, .hero h1 { font-family: var(--pd-font-brand); letter-spacing: -.02em; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
code, .mono, pre { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
button, input, select { font: inherit; color: inherit; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.empty { padding: 80px 24px; text-align: center; color: var(--muted); }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; font-weight: 500; font-size: 13px; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s; }
.btn:hover { border-color: color-mix(in srgb, var(--text) 25%, transparent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-strong, var(--accent)); filter: none; }
.btn.dark { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.ghost { border-color: transparent; background: transparent; }
.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, var(--text) 7%, transparent);
  font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pill.green { background: #e6f7ed; color: #1d8a4b; margin-left: 8px; }
.avatar { display: inline-grid; place-items: center; border-radius: 999px; color: #fff; font-weight: 700; flex: none; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: color-mix(in srgb, var(--text) 6%, transparent); gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 7px; cursor: pointer; font-size: 12.5px; color: var(--muted); text-transform: capitalize; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 500; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px;
  border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); z-index: 100; animation: pop .2s ease; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 8px); } }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; height: 60px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-brand { display: flex; align-items: center; gap: 4px; }
.search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; background: none; color: var(--text); }
kbd { font-size: 11px; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--muted); }
.top-nav { display: flex; gap: 4px; margin-left: auto; }
.top-nav a { padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500; }
.top-nav a.on, .top-nav a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.store-pick { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.store-pick select { max-width: 200px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; color: inherit; }
.store-signin { font-size: 12px; white-space: nowrap; }
button.btn:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: auto; }
.store-chip { font-size: 12px; color: var(--muted); padding: 5px 10px; border: 1px dashed var(--line); border-radius: 8px; }

/* browse */
.browse { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 60px); }
.side { position: sticky; top: 60px; align-self: start; height: calc(100vh - 60px); overflow: auto; padding: 20px 14px; border-right: 1px solid var(--line); }
.side-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }
.side-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 10px 8px; }
.side button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 0; background: none; border-radius: 8px;
  cursor: pointer; text-align: left; color: var(--muted); }
.side button span:last-child { margin-left: auto; font-size: 12px; }
.side button:hover { background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); }
.side button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-note { margin: 8px 6px; padding: 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; }
.side-note p { margin: 8px 0 0; color: var(--muted); }
.side-note code { font-size: 11px; }
.content { padding: 28px 32px 64px; min-width: 0; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.intro h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.intro p { margin: 0; color: var(--muted); max-width: 60ch; }
.theme-pick { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.theme-pick select, .pill-select { height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); padding: 0 8px; }
.theme-pick select { text-transform: capitalize; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.grid--templates { grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }

.card { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); overflow: hidden;
  transition: box-shadow .2s, transform .2s, border-color .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: color-mix(in srgb, var(--text) 16%, transparent); }
.card-preview { display: block; border-bottom: 1px solid var(--line); background: #fff; }
.scaled { position: relative; width: 100%; overflow: hidden; }
.scaled iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; pointer-events: none; background: #fff; }
.layout-art { aspect-ratio: 1024 / 640; display: grid; grid-template-rows: 14% 1fr 18%; gap: 8px; padding: 18px; background: var(--bg); }
.layout-art i { border-radius: 8px; border: 1.5px dashed color-mix(in srgb, var(--text) 25%, transparent); }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; flex: 1; }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-title { display: flex; flex-direction: column; text-decoration: none; min-width: 0; flex: 1; }
.card-title b { font-size: 14px; }
.card-title span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-desc { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-actions { display: flex; gap: 8px; margin-top: auto; }
.card-actions .btn { flex: 1; justify-content: center; }

/* detail */
.detail { max-width: 1240px; margin: 0 auto; padding: 22px 32px 80px; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.detail-head { display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; margin-bottom: 20px; }
.detail-head h1 { margin: 0 0 10px; font-size: 30px; letter-spacing: -.02em; }
.detail-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lead { margin: 14px 0 0; color: var(--muted); max-width: 64ch; line-height: 1.6; font-size: 15px; }
.detail-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; min-width: 320px; }
.detail-actions > .btn { justify-content: center; height: 38px; }
.ref-box { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.ref-box code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0; background: var(--panel); }
.preview-bar .btn { margin-left: auto; }
.stage { display: flex; justify-content: center; padding: 18px; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius);
  background: repeating-conic-gradient(color-mix(in srgb, var(--text) 3%, transparent) 0 25%, transparent 0 50%) 0 0 / 20px 20px; overflow: auto; }
.stage iframe { border: 1px solid var(--line); border-radius: 10px; background: #fff; max-width: 100%; transition: width .25s; }
.stage iframe.framed { border: 8px solid #16161a; border-radius: 26px; }
.tabs { display: flex; gap: 4px; margin: 28px 0 0; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 500; text-transform: capitalize;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); border-color: var(--text); }
.tab-body { padding: 22px 0; }
.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: color-mix(in srgb, var(--text) 3%, transparent); }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.slot { margin: 0 4px; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.code { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: var(--panel); border-bottom: 1px solid var(--line); }
pre { margin: 0; padding: 16px 18px; overflow: auto; background: #0f0f14; color: #e6e6f0; line-height: 1.6; border-radius: 12px; max-height: 560px; }
.code pre { border-radius: 0; }
.usage { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.step { display: flex; gap: 14px; }
.step > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 700; flex: none; }
.step p { margin: 6px 0 10px; color: var(--muted); line-height: 1.55; }
.step .ref-box { margin-top: 8px; }
.usage h3, .deps h3 { margin: 12px 0 4px; font-size: 14px; }
.deps { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.dep-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); text-decoration: none; }
.dep-row:hover { border-color: var(--accent); }
.dep-row .pill, .dep-row .muted { margin-left: auto; }
.pages-list { display: flex; flex-direction: column; gap: 8px; }
.page-row { display: grid; grid-template-columns: 140px 120px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
/* ---- responsive */
.chips { display: none; }
.table-wrap { overflow-x: auto; border-radius: 12px; }
.table-wrap .table { min-width: 560px; }
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; white-space: nowrap; }
.preview-bar { row-gap: 8px; }
.code-head { gap: 8px; flex-wrap: wrap; }
.code-head .seg { overflow-x: auto; max-width: 100%; }
.detail-meta code { overflow-wrap: anywhere; }
@media (max-width: 1080px) { .store-chip, .store-signin { display: none; } }
@media (max-width: 900px) {
  .detail-head { flex-direction: column; gap: 18px; } .detail-actions { min-width: 0; width: 100%; }
  .page-row { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 760px) {
  .top { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px 12px; }
  .search { order: 3; flex: 1 1 100%; max-width: none; }
  .search kbd { display: none; }
  .top-nav { margin-left: auto; }
  .top-nav a { padding: 6px 10px; }
  .browse { grid-template-columns: 1fr; }
  .side { display: none; }
  .chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 16px; padding: 0 16px 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .chips button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13px; cursor: pointer; }
  .chips button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
  .chips-sep { flex: none; width: 1px; background: var(--line); margin: 4px 2px; }
  .content { padding: 20px 16px 48px; }
  .intro { flex-direction: column; align-items: flex-start; gap: 12px; }
  .intro h1 { font-size: 22px; }
  .detail { padding: 16px 16px 64px; }
  .detail-head h1 { font-size: 24px; }
  .stage { padding: 10px; }
  .preview-bar .btn { margin-left: 0; }
}
@media (max-width: 520px) {
  .hide-sm { display: none; }
  .top-nav a { font-size: 13px; }
}
.search { min-width: 0; }
.search input { min-width: 0; width: 100%; }
.top > * { flex-shrink: 0; }
.top > .search { flex-shrink: 1; }
@media (max-width: 760px) {
  .top .btn.dark { order: 2; margin-left: auto; }
  .top .search { order: 3; }
  .top-nav { order: 4; flex: 1 1 100%; margin: 0; padding: 2px; border-radius: 10px; background: color-mix(in srgb, var(--text) 6%, transparent); }
  .top-nav a { flex: 1; text-align: center; padding: 7px 10px; }
  .top-nav a.on { background: var(--panel); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
}
