[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg-0); color: var(--text-1); font: var(--text-size, 15px)/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-s); }
a { color: var(--amber-text); }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--amber); color: var(--ink-on-amber); padding: 8px 12px; border-radius: var(--radius-s); }
.skip:focus { left: 8px; }
.mono, .cost, .score { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }

/* ---------- wordmark ---------- */
.wordmark { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-1); text-decoration: none; }
.wordmark .ai { color: var(--amber-text); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr 340px; grid-template-rows: 1fr; height: 100vh; }
.rail { background: var(--bg-1); border-right: 1px solid var(--hairline); display: flex; flex-direction: column; padding: var(--space-4); gap: var(--space-4); overflow-y: auto; }
.rail nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail nav a { white-space: nowrap; display: flex; gap: var(--space-2); align-items: center; padding: 8px 10px; border-radius: var(--radius-s); color: var(--text-2); text-decoration: none; }
.rail nav a:hover { background: var(--bg-2); color: var(--text-1); }
.rail nav a[aria-current="page"] { background: var(--bg-2); color: var(--text-1); }
.rail nav a[aria-current="page"]::before { content: ""; width: 3px; height: 16px; border-radius: 2px; background: var(--amber); margin-left: -6px; }
.canvas { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.canvas-main { flex: 1; overflow-y: auto; padding: var(--space-8); }
.drawer { background: var(--bg-1); border-left: 1px solid var(--hairline); overflow-y: auto; padding: var(--space-5); }
.drawer h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); margin: 0 0 var(--space-3); }
.banner { background: var(--bg-2); border: 1px solid var(--hairline); border-radius: var(--radius-m); padding: var(--space-3) var(--space-4); color: var(--text-2); margin-bottom: var(--space-5); }
h1.page { font-family: var(--font-display); font-size: 30px; margin: 0 0 var(--space-2); }
h1.page:focus { box-shadow: none; } /* focused for screen readers on navigation, no ring needed */

/* ---------- command bar ---------- */
.command { border-top: 1px solid var(--hairline); background: var(--bg-1); padding: var(--space-3) var(--space-5) var(--space-4); }
.command form { display: grid; gap: var(--space-2); max-width: 960px; margin: 0 auto; }
.command textarea { width: 100%; min-height: 56px; max-height: 200px; resize: vertical; background: var(--bg-2); border: 1px solid var(--hairline); border-radius: var(--radius-m); padding: var(--space-3) var(--space-4); color: var(--text-1); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-2); border: 1px solid var(--hairline); border-radius: 999px; padding: 4px 6px 4px 12px; color: var(--text-2); font-size: 13px; }
.chip select { background: transparent; border: 0; color: var(--text-1); padding: 2px 4px; border-radius: 999px; }
.chip select option { background: var(--bg-1); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); border-radius: var(--radius-s); border: 1px solid var(--hairline); background: var(--bg-2); color: var(--text-1); padding: 8px 14px; cursor: pointer; min-height: 36px; text-decoration: none; }
.btn:hover { border-color: var(--text-3); }
.btn.primary { background: var(--amber); color: var(--ink-on-amber); border-color: transparent; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.spacer { flex: 1; }

/* ---------- cards ---------- */
.card { background: var(--bg-1); border: 1px solid var(--hairline); border-radius: var(--radius-m); padding: var(--space-5); }
.card + .card { margin-top: var(--space-4); }
.grid { display: grid; gap: var(--space-4); }
.goal-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.goal { text-align: left; padding: var(--space-4); border-radius: var(--radius-m); background: var(--bg-1); border: 1px solid var(--hairline); cursor: pointer; }
.goal:hover { border-color: var(--amber); }
.goal strong { display: block; font-family: var(--font-display); font-size: 18px; margin-bottom: 4px; }

/* ---------- plan card ---------- */
.plan .cast { list-style: none; padding: 0; margin: var(--space-3) 0; display: grid; gap: var(--space-2); }
.plan .cast li { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2); padding: var(--space-2) 0; border-bottom: 1px solid var(--hairline); }
.plan .why { grid-column: 1 / -1; font-size: 13px; color: var(--text-2); }
.plan .total { display: flex; align-items: baseline; justify-content: space-between; margin: var(--space-3) 0; font-size: 18px; }
.segmented { display: inline-flex; border: 1px solid var(--hairline); border-radius: var(--radius-s); overflow: hidden; }
.segmented label { padding: 6px 12px; cursor: pointer; color: var(--text-2); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + span { color: var(--ink-on-amber); }
.segmented label:has(input:checked) { background: var(--amber); color: var(--ink-on-amber); }
.segmented label:has(input:focus-visible) { box-shadow: inset var(--focus); }
.field { display: grid; gap: 4px; margin: var(--space-3) 0; }
.field label { font-size: 13px; color: var(--text-2); }
input[type="range"] { accent-color: var(--amber); width: 100%; }
input[type="text"], input[type="search"], input:not([type]).input, input[type="url"], input[type="email"], input[type="password"], select.input, textarea.input { background: var(--bg-2); border: 1px solid var(--hairline); border-radius: var(--radius-s); padding: 8px 10px; width: 100%; }

/* ---------- proofs (contact sheet) ---------- */
.proofs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-3); }
.proof { position: relative; margin: 0; background: var(--bg-2); border-radius: var(--radius-m); overflow: hidden; border: 2px solid transparent; }
.proof img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.proof figcaption { display: flex; gap: var(--space-2); padding: var(--space-2); align-items: center; font-size: 13px; }
.proof[aria-selected="true"] { border-color: var(--amber); }
.develop img { animation: develop 600ms var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes develop { from { filter: blur(12px) contrast(0.6) brightness(0.8); } to { filter: blur(0) contrast(1) brightness(1); } }
.final img { max-width: min(100%, 640px); height: auto; border-radius: var(--radius-m); display: block; }
.film-grain { position: relative; }
.film-grain::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.06; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ---------- status ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.status[data-state="drafting"]::before, .status[data-state="checking"]::before { background: var(--amber); animation: pulse 1.2s ease-in-out infinite; }
.status[data-state="ready"]::before { background: var(--pass); }
.status[data-state="failed"]::before, .status[data-state="blocked"]::before { background: var(--fail); }
@keyframes pulse { 50% { opacity: 0.35; } }
.notice { border-radius: var(--radius-m); padding: var(--space-3) var(--space-4); border: 1px solid var(--hairline); background: var(--bg-2); display: flex; gap: var(--space-3); align-items: flex-start; }
.notice[data-kind="warn"] { border-color: var(--warn); } .notice[data-kind="fail"] { border-color: var(--fail); } .notice[data-kind="pass"] { border-color: var(--pass); }

/* ---------- seals ---------- */
.seals { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.seal { display: inline-flex; align-items: center; gap: 6px; border: 1px solid currentColor; border-radius: 999px; padding: 2px 10px 2px 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.seal svg { width: 18px; height: 18px; }
.seal.ai { color: var(--amber-text); } .seal.checked { color: var(--pass); } .seal.certified { color: var(--text-1); } .seal.dev { color: var(--text-2); }

/* ---------- light meter ---------- */
.meter { display: flex; align-items: center; gap: var(--space-3); }
.meter svg { width: 64px; height: 40px; }
.meter .needle { transition: transform var(--motion-slow) var(--ease); transform-origin: 32px 34px; }

/* ---------- takes / wipe compare ---------- */
.takes { display: flex; gap: var(--space-2); overflow-x: auto; padding-bottom: var(--space-2); }
.take { position: relative; width: 96px; flex: none; border-radius: var(--radius-s); overflow: hidden; border: 2px solid transparent; background: var(--bg-2); padding: 0; cursor: pointer; }
.take img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.take[aria-pressed="true"] { border-color: var(--amber); }
.take[aria-pressed="true"]::after { content: ""; position: absolute; inset: 6px; border: 2px solid var(--amber); border-radius: 50%; }
.wipe { position: relative; max-width: 512px; aspect-ratio: 1; border-radius: var(--radius-m); overflow: hidden; }
.wipe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wipe .top { clip-path: inset(0 calc(100% - var(--wipe, 50%)) 0 0); }
.wipe input { position: absolute; left: 0; right: 0; bottom: 8px; width: calc(100% - 16px); margin: 0 8px; }

/* ---------- film strip / timeline ---------- */
.filmstrip { display: flex; gap: var(--space-3); overflow-x: auto; padding: var(--space-3); background: var(--bg-1); border-radius: var(--radius-m); border: 1px solid var(--hairline); }
.shot { flex: none; width: 220px; background: var(--bg-2); border-radius: var(--radius-s); padding: var(--space-3); display: grid; gap: var(--space-2); font-size: 13px; }
.shot img, .shot .ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--bg-0); }
.shot header { display: flex; justify-content: space-between; color: var(--text-2); }

/* ---------- engine details drawer ---------- */
details.engine { border-top: 1px solid var(--hairline); padding: var(--space-3) 0; }
details.engine summary { cursor: pointer; }
dl.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: var(--space-2) 0 0; font-size: 13px; }
dl.kv dt { color: var(--text-2); } dl.kv dd { margin: 0; }

/* ---------- dialogs ---------- */
dialog { background: var(--bg-1); color: var(--text-1); border: 1px solid var(--hairline); border-radius: var(--radius-l); padding: var(--space-6); max-width: 520px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.palette { padding: 0; max-width: 560px; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--hairline); background: transparent; padding: var(--space-4) var(--space-5); font-size: 16px; }
.palette ul { list-style: none; margin: 0; padding: var(--space-2); max-height: 50vh; overflow: auto; }
.palette li { padding: 10px 12px; border-radius: var(--radius-s); cursor: pointer; }
.palette li[aria-selected="true"] { background: var(--bg-2); }
.preview-frame { width: 100%; height: 560px; border: 1px solid var(--hairline); border-radius: var(--radius-m); background: #fff; }

/* ---------- Glim ---------- */
.glim { width: 72px; height: 72px; flex: none; }
.glim .abdomen { fill: url(#glimGlow); }
.glim .halo { fill: var(--glow-0); opacity: 0.18; }
.glim .wing { fill: rgba(243, 239, 232, 0.35); stroke: var(--text-2); stroke-width: 1.5; }
.glim .body { fill: var(--bg-2); stroke: var(--text-2); stroke-width: 1.5; }
.glim .eye { fill: var(--text-1); } .glim .glint { fill: var(--bg-0); }
.glim .antenna { fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-linecap: round; }
.glim[data-state="idle"] .halo { animation: glow 3s ease-in-out infinite; }
.glim[data-state="drafting"] { animation: flit 1.6s ease-in-out infinite; }
.glim[data-state="drafting"] .wing { animation: flap 160ms linear infinite alternate; transform-origin: 36px 30px; }
.glim[data-state="proud"] .halo { opacity: 0.35; }
.glim[data-state="flicker"] .halo, .glim[data-state="flicker"] .abdomen { animation: flicker 1.4s ease-in-out 2; }
.glim[data-state="sleepy"] .halo { opacity: 0.06; } .glim[data-state="sleepy"] .eye { transform: scaleY(0.25); transform-origin: center 34px; }
.glim[data-state="welcome"] { animation: wave 1.2s ease-in-out 2; transform-origin: 50% 80%; }
@keyframes glow { 50% { opacity: 0.32; } }
@keyframes flit { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(6px, -4px); } 50% { transform: translate(12px, 0); } 75% { transform: translate(6px, 3px); } }
@keyframes flap { to { transform: scaleY(0.6); } }
@keyframes flicker { 30% { opacity: 0.08; } 60% { opacity: 0.22; } }
@keyframes wave { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.glim-row { display: flex; gap: var(--space-4); align-items: center; }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .develop img { animation: fade 150ms linear both !important; filter: none; }
  .glim, .glim * { animation: none !important; }
}
html[data-reduce-motion="true"] *, html[data-reduce-motion="true"] *::before { animation: none !important; transition: none !important; }
html[data-reduce-motion="true"] .develop img { animation: fade 150ms linear both !important; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- mobile: canvas first, drawers become bottom sheets, thumb-zone prompt ---------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--hairline); padding: var(--space-2) var(--space-3); }
  .rail nav ul { display: flex; } .rail .rail-extra { display: none; }
  .canvas { height: auto; min-height: calc(100vh - 56px); }
  .canvas-main { padding: var(--space-4); }
  .command { position: sticky; bottom: 0; }
  .rail { padding-right: 104px; } /* room for the compact Plan button, so no tab sits under it */
  .drawer { position: fixed; left: 0; right: 0; bottom: 0; max-height: 70vh; border-left: 0; border-top: 1px solid var(--hairline); border-radius: var(--radius-l) var(--radius-l) 0 0; transform: translateY(100%); visibility: hidden; transition: transform var(--motion-mid) var(--ease), visibility var(--motion-mid); z-index: 20; }
  .drawer[data-open="true"] { transform: none; visibility: visible; }
  .drawer-toggle { top: 8px; bottom: auto !important; box-shadow: 0 0 0 8px var(--bg-1); }
  .drawer-toggle .long { display: none; }
  .kbd-hint, .lane-chip { display: none !important; }
}
@media (min-width: 961px) { .drawer-toggle { display: none; } }
.drawer-toggle .short { display: none; }
@media (max-width: 960px) { .drawer-toggle .short { display: inline; } }


/* =================== Hive: bee, honey, flowers =================== */
body { font-size: var(--text-size, 15px); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--pattern-opacity, .05); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0 32V66' fill='none' stroke='%23F5B301' stroke-width='1.2'/%3E%3C/svg%3E"); }
:root[data-pattern="off"] body::before { display: none; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; }
.wm-hex { flex: none; filter: drop-shadow(0 0 6px rgba(245, 179, 1, .35)); }
.btn.primary { background: linear-gradient(180deg, var(--honey-glow), var(--honey)); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 4px 14px -6px rgba(245,179,1,.7); }
.btn.tiny { min-height: 26px; padding: 2px 8px; font-size: 12px; }
.card { backdrop-filter: blur(2px); }
.goal:hover, .hive-card:hover { border-color: var(--honey); box-shadow: 0 6px 24px -14px rgba(245,179,1,.8); }

/* mascot */
.glim .halo { fill: var(--honey); opacity: .14; }
.glim .abdomen { fill: var(--honey); }
.glim .stripe { fill: none; stroke: #1A1204; stroke-width: 4; stroke-linecap: round; }
.glim .body { fill: #1A1204; stroke: none; }
.glim .sting { fill: #1A1204; }
.glim .wing { fill: rgba(255, 250, 235, .55); stroke: rgba(255,255,255,.7); stroke-width: 1; }
.glim .eye { fill: #fff; } .glim .glint { fill: #1A1204; }
.glim .smile { fill: none; stroke: #fff; stroke-width: 1.3; stroke-linecap: round; }
.glim .antenna { stroke: #1A1204; stroke-width: 1.8; }
@media (prefers-color-scheme: dark) { .glim .antenna { stroke: var(--honey-glow); } }
.glim .wings { transform-origin: 37px 28px; animation: flap 140ms linear infinite alternate; }
.glim[data-state="sleepy"] .wings, .glim[data-state="flicker"] .wings { animation: none; }

/* the flying bee */
.bee { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; will-change: transform; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.bee svg { display: block; overflow: visible; }
.bee-wing { fill: rgba(255, 250, 235, .6); stroke: rgba(255,255,255,.85); stroke-width: 1; }
.bee-wings { transform-origin: 32px 26px; animation: flap 90ms linear infinite alternate; }
.bee[data-mode="rest"] .bee-wings { animation-duration: 600ms; }
.bee-abdomen { fill: var(--honey); }
.bee-stripe { fill: none; stroke: #1A1204; stroke-width: 4.4; stroke-linecap: round; }
.bee-head, .bee-sting { fill: #1A1204; }
.bee-eye { fill: #fff; } .bee-glint { fill: #1A1204; }
.bee-antenna { fill: none; stroke: #1A1204; stroke-width: 1.8; stroke-linecap: round; }
.bee-smile { fill: none; stroke: #fff; stroke-width: 1.3; stroke-linecap: round; }
.bee-buzz svg { animation: buzz 70ms linear 4; }
.bee-icon { flex: none; vertical-align: middle; }
.bee-icon .bee-wings { animation-duration: 160ms; }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(.35); } }
@keyframes buzz { 0%,100% { transform: translate(0,0); } 50% { transform: translate(1px,-1px); } }

/* honey drops while working */
.honey-drop { position: fixed; z-index: 59; width: 7px; height: 9px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 30%, #fff6c8, var(--honey) 45%, var(--honey-deep)); pointer-events: none; animation: drip 1.4s cubic-bezier(.4,0,.8,.6) forwards; }
@keyframes drip { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; transform: translateY(2px) scale(1); } 100% { transform: translateY(70px) scale(.8, 1.2); opacity: 0; } }

/* honeycomb progress */
.honeycomb { display: inline-grid; place-items: center; flex: none; }
.honeycomb .cell { fill: rgba(245,179,1,.06); stroke: var(--honey); stroke-opacity: .55; stroke-width: 1.5; transition: fill var(--motion-mid) var(--ease); }
.honeycomb .cell.full { fill: var(--honey); fill-opacity: .9; }
.honeycomb.sealed svg { animation: seal .6s var(--ease); }
@keyframes seal { 50% { transform: scale(1.08); } }

/* flowers */
.meadow { display: flex; align-items: flex-end; gap: 6px; margin-top: auto; padding-top: 12px; min-height: 90px; }
.flower { overflow: visible; transform-origin: 50% 100%; animation: sway 5s ease-in-out infinite; animation-delay: var(--sway-delay, 0s); }
.flower .stem { fill: none; stroke: var(--stem); stroke-width: 2.4; stroke-linecap: round; }
.flower .leaf { fill: var(--leaf); }
.flower .pollen { fill: var(--honey); }
.petal-a .petal { fill: var(--petal-a); } .petal-b .petal { fill: var(--petal-b); } .petal-c .petal { fill: var(--petal-c); } .petal-d .petal { fill: var(--petal-d); }
.flower .bloom { transform-origin: 20px 20px; animation: bloom 9s linear infinite; }
@keyframes sway { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes bloom { to { transform: rotate(360deg); } }

/* dashboard Hive card */
.hive-card { display: flex; gap: var(--space-4); align-items: center; text-decoration: none; color: inherit; margin-bottom: var(--space-4); background: linear-gradient(120deg, rgba(245,179,1,.14), transparent 60%), var(--bg-1); }
.hive-card > div { flex: 1; display: grid; gap: 2px; } .hive-card strong { font-size: 20px; }

/* =================== Hive workspace =================== */
:root[data-screen="hive"] .command { display: none; }
.hive { display: grid; grid-template-columns: minmax(340px, 1fr) minmax(360px, 1.1fr); gap: var(--space-4); height: 100%; min-height: 0; }
.hive-chat, .hive-side { display: flex; flex-direction: column; min-height: 0; gap: var(--space-3); }
.hive-head { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.hive-head h1 { margin: 0; }
.hive-log { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: var(--space-3); padding-right: 4px; }
.msg { border-radius: var(--radius-m); padding: var(--space-3) var(--space-4); border: 1px solid var(--hairline); background: var(--bg-1); min-width: 0; }
.msg.user { background: rgba(245,179,1,.10); border-color: rgba(245,179,1,.35); justify-self: end; max-width: 88%; }
.msg.live { border-style: dashed; border-color: rgba(245,179,1,.5); }
.msg .who { display: flex; align-items: center; gap: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: 4px; }
.md p { margin: 0 0 8px; } .md p:last-child { margin-bottom: 0; } .md h3, .md h4 { margin: 10px 0 6px; font-family: var(--font-display); }
.md ul, .md ol { margin: 0 0 8px; padding-left: 20px; }
.md code { font-family: var(--font-mono); font-size: 13px; background: var(--bg-2); padding: 1px 5px; border-radius: 4px; }
.code { border: 1px solid var(--hairline); border-radius: var(--radius-s); overflow: hidden; margin: 8px 0; background: var(--code-bg, #0B0906); }
.code-bar { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; background: var(--bg-2); font-size: 12px; }
.code pre { margin: 0; padding: 10px 12px; overflow: auto; max-height: 420px; }
.code pre code { background: none; padding: 0; color: #F3EFE8; font-size: 12.5px; line-height: 1.55; }
.hive-form { display: grid; gap: var(--space-2); }
.hive-form textarea { resize: vertical; min-height: 64px; max-height: 240px; background: var(--bg-2); border: 1px solid var(--hairline); border-radius: var(--radius-m); padding: var(--space-3); }
.hive-form textarea:focus { border-color: var(--honey); }
.hive-preview { flex: 1; min-height: 320px; border: 1px solid var(--hairline); border-radius: var(--radius-m); overflow: hidden; background: #fffdf6; display: grid; }
.hive-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.hive-empty { display: grid; place-items: center; align-content: center; gap: 8px; background: var(--bg-1); text-align: center; padding: 24px; }
.hive-starters { display: grid; gap: 8px; }
.starter { text-align: left; background: var(--bg-1); border: 1px solid var(--hairline); border-radius: var(--radius-m); padding: 10px 14px; cursor: pointer; color: var(--text-1); }
.starter:hover { border-color: var(--honey); }
.chat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.chat-list button { width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: var(--radius-s); color: var(--text-2); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list button:hover, .chat-list button.on { background: var(--bg-2); color: var(--text-1); }
@media (max-width: 1100px) { .hive { grid-template-columns: 1fr; height: auto; } .hive-log { max-height: 60vh; } .hive-preview { min-height: 420px; } }

@media (prefers-reduced-motion: reduce) {
  .bee, .honey-drop { display: none; }
  .flower, .flower .bloom, .glim .wings, .bee-icon .bee-wings { animation: none !important; }
}
:root[data-reduce-motion="true"] .flower, :root[data-reduce-motion="true"] .flower .bloom, :root[data-reduce-motion="true"] .glim .wings { animation: none !important; }


/* =================== Hive design, round two =================== */
::selection { background: rgba(245, 179, 1, .35); }
* { scrollbar-color: color-mix(in srgb, var(--honey) 45%, transparent) transparent; scrollbar-width: thin; }
:root[data-density="compact"] { --space-3: 8px; --space-4: 12px; --space-5: 14px; --space-6: 18px; --space-8: 22px; }
:root[data-meadow="off"] .rail .meadow { display: none; }
.danger { color: var(--fail); border-color: color-mix(in srgb, var(--fail) 50%, transparent); }
.warn-text { color: var(--warn); }
.pill { display: inline-flex; align-items: center; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--honey) 16%, transparent); color: var(--amber-text); border: 1px solid color-mix(in srgb, var(--honey) 35%, transparent); white-space: nowrap; }

/* rail: hexagon marker for the current page, honey drip under the wordmark */
.rail nav a[aria-current="page"]::before { width: 10px; height: 11px; border-radius: 0; margin-left: -4px; background: var(--honey); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.rail nav a[aria-current="page"] { background: color-mix(in srgb, var(--honey) 14%, var(--bg-2)); }
.honey-rim { position: relative; height: 14px; margin: -6px -16px 0; pointer-events: none; }
.honey-rim svg { display: block; width: 100%; height: 22px; }
.honey-rim .rim { fill: var(--honey); opacity: .9; }
.honey-rim .fall { fill: var(--honey); animation: fall 6s ease-in infinite; transform-box: fill-box; }
@keyframes fall { 0%, 70% { transform: translateY(0) scale(.2); opacity: 0; } 76% { opacity: 1; transform: translateY(0) scale(1); } 100% { transform: translateY(60px) scale(.8, 1.3); opacity: 0; } }

/* cards wear a little comb in the corner */
.card { position: relative; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='60' viewBox='0 0 90 60'%3E%3Cg fill='none' stroke='%23F5B301' stroke-opacity='.16' stroke-width='1.2'%3E%3Cpath d='M60 2l12 7v14l-12 7-12-7V9zM84 2l12 7v14l-12 7-12-7V9zM72 23l12 7v14l-12 7-12-7V30z'/%3E%3C/g%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: top right; }
.goal { position: relative; overflow: hidden; transition: transform var(--motion-fast) var(--ease), border-color var(--motion-fast); }
.goal::after { content: ""; position: absolute; right: -10px; bottom: -12px; width: 46px; height: 52px; background: linear-gradient(160deg, var(--honey-glow), var(--honey) 60%, var(--honey-deep)); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); opacity: .22; transition: opacity var(--motion-mid); }
.goal:hover { transform: translateY(-2px); } .goal:hover::after { opacity: .5; }
.btn.primary { border-radius: 10px; }
.status[data-state] { border-radius: 999px; }

/* =================== Settings =================== */
:root[data-screen="settings"] .command { display: none; }
.settings { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: var(--space-6); align-items: start; max-width: 1080px; }
.set-head { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--space-4); }
.set-head h1 { margin: 0; }
.set-nav { position: sticky; top: 0; display: grid; gap: 2px; }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-s); color: var(--text-2); text-decoration: none; }
.set-nav a::before { content: ""; width: 9px; height: 10px; background: color-mix(in srgb, var(--honey) 55%, transparent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.set-nav a:hover { background: var(--bg-2); color: var(--text-1); } .set-nav a:hover::before { background: var(--honey); }
.set-content { display: grid; gap: var(--space-4); min-width: 0; }
.set-card { scroll-margin-top: 12px; }
.set-card h2 { margin-top: 0; }
.set-card h2:focus { box-shadow: none; }
.set-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); margin: var(--space-5) 0 var(--space-2); }
.set-card summary { cursor: pointer; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 10px 0; border-top: 1px solid var(--hairline); }
.set-row label, .set-row > span:first-child { display: grid; gap: 2px; }
.set-row .faint { font-size: 13px; }
.switch { position: relative; flex: none; width: 46px; height: 26px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-ui { position: absolute; inset: 0; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--hairline); transition: background var(--motion-fast); }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform var(--motion-mid) var(--ease), background var(--motion-fast); }
.switch input:checked + .switch-ui { background: var(--honey); border-color: transparent; }
.switch input:checked + .switch-ui::after { transform: translateX(20px); background: var(--ink-on-amber); }
.switch input:focus-visible + .switch-ui { box-shadow: var(--focus); }
.segmented { display: inline-flex; flex-wrap: wrap; background: var(--bg-2); border: 1px solid var(--hairline); border-radius: 999px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; cursor: pointer; color: var(--text-2); font-size: 13.5px; }
.segmented button[aria-checked="true"] { background: var(--honey); color: var(--ink-on-amber); font-weight: 600; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); margin: var(--space-3) 0 var(--space-4); }
.theme-card { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 10px; border-radius: var(--radius-m); border: 2px solid var(--hairline); background: var(--bg-1); cursor: pointer; color: var(--text-1); }
.theme-card svg { width: 100%; height: auto; border-radius: 8px; }
.theme-card .faint { font-size: 12px; }
.theme-card:hover { border-color: color-mix(in srgb, var(--honey) 60%, transparent); }
.theme-card[aria-checked="true"] { border-color: var(--honey); box-shadow: 0 0 0 3px color-mix(in srgb, var(--honey) 30%, transparent); }
.bee-stage { display: flex; align-items: flex-end; gap: var(--space-4); padding: var(--space-3); border-radius: var(--radius-m); background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--leaf) 14%, transparent)); margin-bottom: var(--space-2); }
.bee-stage .meadow { margin: 0; flex: none; }
.bee-stage p { margin: 0 0 8px; font-size: 13px; }
.toast { opacity: 0; color: var(--pass); font-size: 13px; }
.toast.show { animation: toast 2.2s ease forwards; }
@keyframes toast { 10%, 70% { opacity: 1; } 100% { opacity: 0; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); }
.stat { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius-m); background: var(--bg-2); border: 1px solid var(--hairline); }
.stat .faint { font-size: 12px; } .stat strong { font-size: 17px; font-family: var(--font-mono); }
.servers { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.server { display: grid; gap: 2px; padding: 8px 12px; border-radius: var(--radius-s); background: var(--bg-1); border: 1px solid var(--hairline); }
.server-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.server-title strong { margin-right: auto; }
.server .faint { font-size: 12.5px; }
.fast-lane { margin-top: 10px; background: linear-gradient(120deg, color-mix(in srgb, var(--honey) 12%, transparent), transparent 70%), var(--bg-1); }
.fast-lane p { margin: 4px 0 8px; font-size: 13px; }
.fast-lane .input { width: min(340px, 100%); }
.dot { width: 9px; height: 10px; flex: none; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--text-3); }
.dot.on { background: var(--pass); box-shadow: 0 0 8px var(--pass); }
@media (max-width: 860px) {
  .settings { grid-template-columns: 1fr; }
  .set-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .set-nav a { white-space: nowrap; background: var(--bg-1); border: 1px solid var(--hairline); }
}
@media (prefers-reduced-motion: reduce) { .honey-rim .fall { display: none; } }
:root[data-reduce-motion="true"] .honey-rim .fall, :root[data-reduce-motion="true"] .bee-stage .flower { animation: none; }
.bee { transform-origin: 22px 22px; }
:root[data-screen="settings"] #drawer-toggle { display: none !important; }
@media (min-width: 961px) { :root[data-screen="settings"] .shell { grid-template-columns: 232px 1fr; } }
:root[data-screen="settings"] .drawer { display: none; }
@media (max-width: 960px) { .rail .honey-rim { display: none; } .settings { gap: var(--space-3); } }

/* =================== Round three: perching bee, buttons, Chat, Apps, Admin =================== */
.bee-legs { fill: none; stroke: #1A1204; stroke-width: 1.6; stroke-linecap: round; opacity: 0; transition: opacity .3s; }
.bee[data-mode="rest"] .bee-legs { opacity: 1; }
.bee[data-mode="rest"] .bee-wings { animation-duration: 900ms; }
.bee-perch { box-shadow: 0 -3px 0 -1px color-mix(in srgb, var(--honey) 70%, transparent), 0 6px 18px -10px var(--honey) !important; }
.btn { transition: transform var(--motion-fast) var(--ease), box-shadow var(--motion-fast), border-color var(--motion-fast), background var(--motion-fast); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:not(.primary):hover { border-color: color-mix(in srgb, var(--honey) 55%, transparent); background: color-mix(in srgb, var(--honey) 8%, var(--bg-2)); }
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s var(--ease); pointer-events: none; }
.btn.primary:hover::after { transform: translateX(120%); }
.icon-btn { border: 0; background: transparent; color: var(--text-3); cursor: pointer; padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.icon-btn:hover { color: var(--text-1); background: var(--bg-2); }
.launch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.launch-grid .hive-card { margin: 0; flex-wrap: wrap; }
.site-banner { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: color-mix(in srgb, var(--honey) 20%, var(--bg-1)); border-bottom: 1px solid color-mix(in srgb, var(--honey) 45%, transparent); font-weight: 500; }
.site-banner span { flex: 1; } .site-banner[data-kind="warn"] { background: color-mix(in srgb, var(--warn) 22%, var(--bg-1)); }

/* Chat */
:root[data-screen="hive"] .command, :root[data-screen="apps"] .command, :root[data-screen="admin"] .command { display: none; }
:root[data-screen="hive"] .drawer, :root[data-screen="apps"] .drawer, :root[data-screen="admin"] .drawer,
:root[data-screen="hive"] #drawer-toggle, :root[data-screen="apps"] #drawer-toggle, :root[data-screen="admin"] #drawer-toggle { display: none !important; }
@media (min-width: 961px) { :root[data-screen="hive"] .shell, :root[data-screen="apps"] .shell, :root[data-screen="admin"] .shell { grid-template-columns: 232px 1fr; } }
:root[data-screen="hive"] .canvas-main { padding: 0; overflow: hidden; }
.chat { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: 100%; min-height: 0; }
.chat-side { border-right: 1px solid var(--hairline); padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); min-height: 0; background: color-mix(in srgb, var(--bg-1) 70%, transparent); }
.chat-side .input { width: 100%; }
.convo-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: grid; align-content: start; gap: 1px; }
.convo-group { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 10px 8px 4px; }
.convo { display: flex; align-items: center; border-radius: var(--radius-s); }
.convo:hover, .convo.on { background: var(--bg-2); }
.convo.on { box-shadow: inset 3px 0 0 var(--honey); }
.convo-open { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 8px 10px; color: var(--text-1); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-tools { display: none; } .convo:hover .convo-tools, .convo:focus-within .convo-tools, .convo.on .convo-tools { display: flex; }
.chat-main { display: flex; flex-direction: column; min-height: 0; position: relative; }
.thread { flex: 1; overflow-y: auto; padding: var(--space-6) max(var(--space-6), calc((100% - 820px) / 2)); display: grid; align-content: start; gap: var(--space-5); }
.turn { display: grid; gap: 6px; min-width: 0; }
.turn.user { justify-items: end; }
.turn.user .bubble { background: color-mix(in srgb, var(--honey) 13%, var(--bg-1)); border: 1px solid color-mix(in srgb, var(--honey) 35%, transparent); border-radius: 18px 18px 4px 18px; padding: 10px 14px; max-width: min(85%, 640px); }
.turn.user .bubble .pill { margin-bottom: 4px; }
.turn .who { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.turn.assistant .md { line-height: 1.65; }
.turn-tools { display: flex; gap: 4px; opacity: .55; transition: opacity var(--motion-fast); flex-wrap: wrap; }
.turn:hover .turn-tools, .turn-tools:focus-within { opacity: 1; }
.source { font-size: 12.5px; color: var(--text-3); }
.caret { display: inline-block; width: 8px; height: 16px; background: var(--honey); border-radius: 2px; vertical-align: text-bottom; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chat-image { margin: 0; display: grid; gap: 6px; } .chat-image img { max-width: min(100%, 520px); border-radius: var(--radius-m); border: 1px solid var(--hairline); }
.chat-empty { display: grid; justify-items: center; text-align: center; gap: var(--space-3); padding-top: 8vh; }
.chat-empty h2 { margin: 0; font-size: 28px; }
.suggest { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; width: min(100%, 760px); }
.hero-comb .honeycomb svg { width: 120px; height: auto; filter: drop-shadow(0 6px 20px color-mix(in srgb, var(--honey) 40%, transparent)); }
.composer { position: relative; margin: 0 max(var(--space-6), calc((100% - 820px) / 2)) 6px; border: 1px solid var(--hairline); border-radius: 22px; background: var(--bg-1); padding: 10px 12px 8px; box-shadow: 0 10px 30px -18px rgba(0,0,0,.6); }
.composer:focus-within { border-color: color-mix(in srgb, var(--honey) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--honey) 18%, transparent), 0 10px 30px -18px rgba(0,0,0,.6); }
.composer-input { width: 100%; border: 0; background: transparent; resize: none; outline: none; padding: 4px 4px 6px; max-height: 240px; line-height: 1.5; }
.composer-input:focus-visible { box-shadow: none; }
.composer-bar { display: flex; align-items: center; gap: 6px; }
.route-line { font-size: 12px; }
.send-hex { width: 38px; height: 40px; border: 0; cursor: pointer; background: linear-gradient(160deg, var(--honey-glow), var(--honey) 60%, var(--honey-deep)); color: var(--ink-on-amber); font-weight: 800; font-size: 18px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); transition: transform var(--motion-fast); }
.send-hex:hover { transform: scale(1.08) rotate(30deg); } .send-hex:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 2px; }
.chat-note { text-align: center; font-size: 12px; margin: 0 0 8px; }
.cmd-popup { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: var(--bg-1); border: 1px solid var(--hairline); border-radius: var(--radius-m); box-shadow: 0 16px 40px -16px rgba(0,0,0,.6); display: grid; gap: 2px; z-index: 5; }
.cmd { display: grid; grid-template-columns: 14px auto 1fr; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius-s); cursor: pointer; }
.cmd[aria-selected="true"], .cmd:hover { background: var(--bg-2); }
.cmd .faint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.plugin-hex { width: 14px; height: 16px; background: var(--plugin, var(--honey)); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: inline-block; flex: none; }
@media (max-width: 960px) {
  .chat { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .chat-side { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--hairline); max-height: 40vh; }
  .chat-side .input { flex: 1; width: auto; } .convo-list { flex-basis: 100%; max-height: 22vh; }
  :root[data-screen="hive"] .canvas-main { overflow: visible; }
  .thread { padding: var(--space-4); min-height: 50vh; } .composer { margin: 0 var(--space-3) 6px; }
}

/* Apps & plugins */
.apps, .admin { display: grid; gap: var(--space-4); max-width: 1100px; }
.plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
.plugin { border: 1px solid var(--hairline); border-radius: var(--radius-m); padding: 12px; background: var(--bg-1); display: grid; gap: 6px; border-top: 3px solid var(--plugin); }
.plugin header { display: flex; align-items: center; gap: 10px; }
.plugin header > div { flex: 1; display: grid; }
.plugin code { font-family: var(--font-mono); font-size: 12.5px; color: var(--amber-text); }
.plugin p { margin: 0; font-size: 13px; }
.connect-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.connect-form .input { flex: 1 1 200px; width: auto; }
.plugin-dialog { width: min(640px, 92vw); }
.plugin-dialog textarea { width: 100%; }

/* Admin */
.honey-meter { height: 14px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--hairline); overflow: hidden; margin: var(--space-3) 0; }
.honey-meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--honey-glow), var(--honey), var(--honey-deep)); border-radius: inherit; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 6px 8px; border-bottom: 1px solid var(--hairline); }
.admin-table td { padding: 7px 8px; border-bottom: 1px solid var(--hairline); }
.admin .input { width: auto; flex: 1 1 280px; }
input:focus-visible, textarea.input:focus-visible, select.input:focus-visible { border-color: var(--honey); }
.memory-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.memory-list li { display: flex; align-items: center; gap: 10px; }
.memory-list .input { flex: 1; }
#mem-add { flex: 1 1 280px; width: auto; }

/* ---------- answers: maths, tables, quotes, rules ---------- */
.md math { font-size: 1.12em; color: var(--text-1); }
.md .math-block { overflow-x: auto; overflow-y: hidden; padding: 10px 0; margin: 4px 0 10px; text-align: center; }
.md math[display="block"] { font-size: 1.3em; }
.md .math-boxed { border: 1.5px solid var(--honey); border-radius: 8px; padding: 6px 12px; background: color-mix(in srgb, var(--honey) 10%, transparent); }
.md .math-bold { font-weight: 700; }
.md hr { border: 0; height: 12px; margin: 14px 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='12' viewBox='0 0 22 12'%3E%3Cpath d='M5 1l4 2.5v5L5 11 1 8.5v-5z' fill='%23F5B301' fill-opacity='.45'/%3E%3C/svg%3E") center / 22px 12px repeat-x; mask: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); }
.md blockquote { margin: 8px 0; padding: 6px 14px; border-left: 3px solid var(--honey); background: color-mix(in srgb, var(--honey) 7%, transparent); border-radius: 0 8px 8px 0; color: var(--text-2); }
.md .table-wrap { overflow-x: auto; margin: 8px 0 12px; border: 1px solid var(--hairline); border-radius: var(--radius-s); }
.md-table { border-collapse: collapse; width: 100%; font-size: .95em; }
.md-table th { background: color-mix(in srgb, var(--honey) 12%, var(--bg-1)); font-weight: 600; }
.md-table th, .md-table td { padding: 7px 12px; border-bottom: 1px solid var(--hairline); }
.md-table tr:last-child td { border-bottom: 0; }
.md-table tbody tr:hover { background: color-mix(in srgb, var(--honey) 6%, transparent); }
.md li.nested { margin-left: 18px; list-style-type: circle; }
.md del { opacity: .7; }
.md h3 { font-size: 1.2em; } .md h4 { font-size: 1.05em; }

/* =================== Living interface =================== */
/* bee states */
.bee-eyes { transition: transform .25s ease-out; transform-box: fill-box; transform-origin: center; }
.bee:not(.asleep) .bee-eyes .bee-eye { animation: blink 5.5s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.bee[data-mode="dance"] .bee-wings { animation-duration: 60ms; }
.bee.asleep .bee-wings { animation: none; transform: scaleY(.55) rotate(-8deg); }
.bee.asleep .bee-legs { opacity: 1; }
.bee-zzz { position: absolute; left: 30px; top: -10px; font: 700 12px/1 var(--font-ui); color: var(--amber-text); opacity: 0; pointer-events: none; }
.bee-zzz i, .bee-zzz b { position: absolute; font-style: normal; }
.bee-zzz i { left: 8px; top: -9px; font-size: 14px; } .bee-zzz b { left: 17px; top: -20px; font-size: 16px; }
.bee.asleep .bee-zzz { opacity: 1; }
.bee.asleep .bee-zzz, .bee.asleep .bee-zzz i, .bee.asleep .bee-zzz b { animation: zzz 2.4s ease-in-out infinite; }
.bee.asleep .bee-zzz i { animation-delay: .4s; } .bee.asleep .bee-zzz b { animation-delay: .8s; }
.bee[data-flip="1"] .bee-zzz { transform: scaleX(-1); }
@keyframes zzz { 0% { opacity: 0; translate: 0 6px; } 30%, 70% { opacity: .9; } 100% { opacity: 0; translate: 6px -10px; } }
.pollen-dot { position: fixed; z-index: 58; width: 4px; height: 4px; border-radius: 50%; background: var(--honey-glow); box-shadow: 0 0 4px var(--honey); pointer-events: none; animation: pollen 1.2s ease-in forwards; animation-delay: var(--d, 0s); }
@keyframes pollen { 0% { opacity: 0; transform: translate(0, 0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx, 0), 46px); } }
.flower.visited { animation: visited 1.2s var(--ease); }
.flower.visited .bloom { animation-duration: 2.5s; }
@keyframes visited { 0% { transform: rotate(0); } 25% { transform: rotate(-7deg) scale(1.08); } 55% { transform: rotate(5deg) scale(1.04); } 100% { transform: rotate(0) scale(1); } }

/* pages and cards arrive */
.page-enter > *, .page-enter .admin > *, .page-enter .settings .set-content > *, .page-enter .apps > * { animation: rise .38s var(--ease) both; }
.page-enter > *:nth-child(2), .page-enter .admin > *:nth-child(2), .page-enter .set-content > *:nth-child(2), .page-enter .apps > *:nth-child(2) { animation-delay: 40ms; }
.page-enter > *:nth-child(3), .page-enter .admin > *:nth-child(3), .page-enter .set-content > *:nth-child(3), .page-enter .apps > *:nth-child(3) { animation-delay: 80ms; }
.page-enter > *:nth-child(4), .page-enter .admin > *:nth-child(4), .page-enter .set-content > *:nth-child(4), .page-enter .apps > *:nth-child(4) { animation-delay: 120ms; }
.page-enter > *:nth-child(n+5), .page-enter .admin > *:nth-child(n+5), .page-enter .set-content > *:nth-child(n+5), .page-enter .apps > *:nth-child(n+5) { animation-delay: 160ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.goal-grid > .goal, .plugin-grid > .plugin, .theme-grid > .theme-card, .suggest > .starter, .launch-grid > * { animation: rise .45s var(--ease) both; }
.goal-grid > :nth-child(2), .plugin-grid > :nth-child(2), .theme-grid > :nth-child(2), .suggest > :nth-child(2), .launch-grid > :nth-child(2) { animation-delay: 50ms; }
.goal-grid > :nth-child(3), .plugin-grid > :nth-child(3), .theme-grid > :nth-child(3), .suggest > :nth-child(3), .launch-grid > :nth-child(3) { animation-delay: 100ms; }
.goal-grid > :nth-child(n+4), .plugin-grid > :nth-child(n+4), .theme-grid > :nth-child(n+4), .suggest > :nth-child(n+4) { animation-delay: 150ms; }
.card, .plugin, .theme-card, .starter { transition: transform var(--motion-mid) var(--ease), box-shadow var(--motion-mid) var(--ease), border-color var(--motion-fast); }
.plugin:hover, .starter:hover, .launch-grid .hive-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -18px color-mix(in srgb, var(--honey) 70%, #000); }
.rail nav a { background-image: linear-gradient(90deg, color-mix(in srgb, var(--honey) 16%, transparent), transparent); background-size: 0% 100%; background-repeat: no-repeat; transition: background-size .35s var(--ease), color var(--motion-fast); }
.rail nav a:hover { background-size: 100% 100%; }
.thread > .turn:last-child, .thread > .turn.live { animation: rise .3s var(--ease) both; }
.honeycomb .cell.full { animation: fill .45s var(--ease) both; }
@keyframes fill { from { fill-opacity: 0; } to { fill-opacity: .9; } }

/* admin control room */
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pass); box-shadow: 0 0 0 0 var(--pass); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pass) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.auto-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.tiles .tile { position: relative; overflow: hidden; }
.tiles .tile::after { content: ""; position: absolute; right: -14px; bottom: -16px; width: 44px; height: 50px; background: var(--honey); opacity: .12; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.tile-num { font-size: 24px !important; }
.honey-meter span { transition: width .8s var(--ease); }
.honey-meter[data-level="mid"] span { background: linear-gradient(90deg, var(--honey-glow), var(--honey-deep)); }
.honey-meter[data-level="high"] span { background: linear-gradient(90deg, var(--warn), var(--fail)); }
.chart-fig { margin: 8px 0 0; }
.admin-chart { width: 100%; height: auto; display: block; }
.admin-chart .grid { stroke: var(--hairline); stroke-width: 1; }
.admin-chart .bar { fill: color-mix(in srgb, var(--honey) 70%, transparent); transform-box: fill-box; transform-origin: bottom; animation: grow .6s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
.admin-chart .bar.today { fill: var(--honey); }
.admin-chart .bar:hover { fill: var(--honey-deep); }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.admin-chart .activity { fill: none; stroke: var(--pass); stroke-width: 2; stroke-linejoin: round; }
.admin-chart .activity-dot { fill: var(--pass); }
.admin-chart .axis { fill: var(--text-3); font: 11px var(--font-ui); }
.legend { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.legend .key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.legend .key.bar { background: var(--honey); } .legend .key.line { height: 3px; background: var(--pass); }
.mini-bar { display: inline-block; vertical-align: middle; width: 60px; height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--honey); }
.kbd-line { font-size: 12px; margin: 8px 0 0; }

@media (prefers-reduced-motion: reduce) {
  .page-enter > *, .page-enter .admin > *, .page-enter .set-content > *, .page-enter .apps > *, .goal-grid > *, .plugin-grid > *, .theme-grid > *, .suggest > *, .launch-grid > *, .turn, .admin-chart .bar, .honeycomb .cell.full, .live-dot, .flower.visited, .pollen-dot { animation: none !important; }
}
:root[data-reduce-motion="true"] .page-enter > *, :root[data-reduce-motion="true"] .turn, :root[data-reduce-motion="true"] .admin-chart .bar, :root[data-reduce-motion="true"] .goal-grid > *, :root[data-reduce-motion="true"] .plugin-grid > * { animation: none !important; }

/* =================== Hive engine room =================== */
.hive-side { min-height: 0; }
.hive-toolbar { align-items: center; }
.hive-tabs { display: inline-flex; gap: 2px; background: var(--bg-2); border: 1px solid var(--hairline); border-radius: 999px; padding: 3px; }
.hive-tabs [role=tab] { border: 0; background: none; color: var(--text-2); padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; position: relative; }
.hive-tabs [role=tab][aria-selected="true"] { background: var(--honey); color: var(--ink-on-amber); font-weight: 600; }
.hive-tabs [role=tab].ok::after { content: ""; position: absolute; top: 4px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--pass); }
.hive-panel { flex: 1; min-height: 320px; display: grid; }
.hive-panel > * { min-height: 0; animation: panel-in .28s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }
.console-box { background: #0b0906; }
.run-frame { background: #0b0906; }
.hive-files { display: grid; grid-template-columns: minmax(112px, min(30%, 220px)) minmax(0, 1fr); gap: 0; border: 1px solid var(--hairline); border-radius: var(--radius-m); overflow: hidden; min-height: 320px; background: var(--bg-1); }
.file-tree { list-style: none; margin: 0; padding: 6px; overflow: auto; border-right: 1px solid var(--hairline); display: grid; align-content: start; gap: 1px; }
.file-tree button { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; background: none; border: 0; padding: 6px 8px; border-radius: var(--radius-s); color: var(--text-2); cursor: pointer; font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-tree button:hover, .file-tree button.on { background: var(--bg-2); color: var(--text-1); }
.file-tree button.on { box-shadow: inset 2px 0 0 var(--honey); }
.file-dot { width: 8px; height: 9px; flex: none; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--text-3); }
.ft-html, .ft-htm { background: #E66A3C; } .ft-css { background: #4F8DF5; } .ft-js, .ft-mjs { background: #F5D33B; } .ft-ts, .ft-tsx { background: #3B82F6; } .ft-py { background: #4FB3E6; }
.ft-cpp, .ft-c, .ft-h { background: #9C7BF0; } .ft-java { background: #E07A5F; } .ft-go { background: #59C4E0; } .ft-rs { background: #D08E5A; } .ft-json { background: #9BD169; } .ft-md { background: #C8C2B4; } .ft-sql { background: #E4A84F; } .ft-cs { background: #8B6CEF; }
.file-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.file-pane .code-bar { flex-wrap: wrap; }
.file-view, .file-edit { flex: 1; margin: 0; overflow: auto; background: var(--code-bg, #0B0906); color: #F3EFE8; font: 12.5px/1.55 var(--font-mono); padding: 10px 12px 10px 0; max-height: 70vh; min-height: 260px; }
.file-edit { width: 100%; border: 0; resize: none; color: #F3EFE8; font: 12.5px/1.55 var(--font-mono); padding: 10px 12px; outline: none; tab-size: 2; }
.fix-bar { display: flex; align-items: center; gap: 10px; margin: 0; }
.fix-bar .fix-text { flex: 1; font-family: var(--font-mono); font-size: 12.5px; white-space: pre-wrap; max-height: 5.6em; overflow: auto; }
.continue-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px; border-radius: var(--radius-s); background: color-mix(in srgb, var(--honey) 12%, transparent); border: 1px dashed color-mix(in srgb, var(--honey) 55%, transparent); }
.chip-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--bg-2); font-size: 13px; cursor: pointer; user-select: none; }
.chip-toggle:has(input:checked) { background: color-mix(in srgb, var(--honey) 22%, var(--bg-2)); border-color: color-mix(in srgb, var(--honey) 60%, transparent); }
.chip-toggle input { accent-color: var(--honey); margin: 0; }
.starter .pill { margin-left: 8px; }

/* code: highlighting and line numbers (readable on the dark code background in every theme) */
.hl { display: block; counter-reset: ln; }
.hl .ln { display: block; counter-increment: ln; padding-left: 3.6em; position: relative; min-height: 1.55em; white-space: pre; }
.hl .ln::before { content: counter(ln); position: absolute; left: 0; width: 2.6em; text-align: right; color: #6E6658; user-select: none; }
pre:has(> .hl) { padding-left: 0 !important; }
.t-com { color: #8C8471; font-style: italic; } .t-str { color: #B8E07F; } .t-num, .t-lit { color: #F5B97A; } .t-kw { color: #F2C14E; font-weight: 600; }
.t-type { color: #7FD4E8; } .t-fn { color: #9DB8FF; } .t-attr { color: #E8A0D8; } .t-tag { color: #FF9A76; } .t-var { color: #E8A0D8; }
.code pre.folded { max-height: 22em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.code-more { display: block; width: 100%; border: 0; border-top: 1px solid var(--hairline); background: var(--bg-2); color: var(--amber-text); padding: 6px; cursor: pointer; font-size: 12.5px; }
.code-more:hover { background: color-mix(in srgb, var(--honey) 14%, var(--bg-2)); }

/* =================== Motion, round four =================== */
/* page and theme changes cross-fade (View Transitions) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .26s; animation-timing-function: cubic-bezier(.2,.7,.2,1); }
::view-transition-old(root) { animation-name: vt-out; } ::view-transition-new(root) { animation-name: vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-4px) scale(.995); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px) scale(.995); } }
/* messages rise in, the newest one with a little bounce */
.msg, .turn { animation: msg-in .34s cubic-bezier(.2,.8,.25,1.15) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
/* typing: three honey hexagons */
.typing { display: inline-flex; gap: 5px; padding: 4px 0; }
.typing i { width: 10px; height: 11px; background: var(--honey); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); animation: hex-bob 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes hex-bob { 0%, 100% { transform: translateY(0) scale(.85); opacity: .5; } 50% { transform: translateY(-5px) scale(1); opacity: 1; } }
/* send: the hexagon spins and glows while pressed, and pulses while the answer streams */
.send-hex:active { transform: scale(.9) rotate(60deg); }
:root[data-working="true"] .btn.primary[type=submit]:disabled, :root[data-working="true"] .send-hex { animation: honey-pulse 1.4s ease-in-out infinite; }
@keyframes honey-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--honey) 25%, transparent); } }
/* code blocks slide open, buttons respond */
.code { animation: code-in .3s var(--ease) both; }
@keyframes code-in { from { opacity: 0; transform: translateY(6px); } }
.starter { transition: transform var(--motion-fast) var(--ease), border-color var(--motion-fast), background var(--motion-fast); }
.starter:hover { transform: translateX(3px); background: color-mix(in srgb, var(--honey) 7%, var(--bg-1)); }
.rail nav a { transition: background var(--motion-fast), color var(--motion-fast), padding-left var(--motion-mid) var(--ease); }
.rail nav a:hover { padding-left: 16px; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .msg, .turn, .code, .hive-panel > *, .typing i { animation: none !important; }
  .rail nav a:hover { padding-left: inherit; }
}
:root[data-reduce-motion="true"] .msg, :root[data-reduce-motion="true"] .turn, :root[data-reduce-motion="true"] .code, :root[data-reduce-motion="true"] .typing i, :root[data-reduce-motion="true"] .hive-panel > * { animation: none !important; }
@media (max-width: 960px) { .hive-files { grid-template-columns: 1fr; } .file-tree { border-right: 0; border-bottom: 1px solid var(--hairline); max-height: 160px; } }

/* =================== Hive: one window for chat and code =================== */
.studio { --side: 248px; --panel: 0px; display: grid; grid-template-columns: var(--side) minmax(0, 1fr) var(--panel); height: 100%; min-height: 0; transition: grid-template-columns .42s cubic-bezier(.2,.8,.2,1); position: relative; }
.studio.has-project { --panel: minmax(380px, 47%); }
.studio.has-project.panel-hidden { --panel: 0px; }
.studio-side { grid-column: 1; grid-row: 1; border-right: 1px solid var(--hairline); padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); min-height: 0; background: color-mix(in srgb, var(--bg-1) 70%, transparent); }
.studio-side .input { width: 100%; }
.studio-main { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
.studio-top { display: flex; align-items: center; gap: 8px; padding: 8px max(var(--space-4), calc((100% - 860px) / 2)) 0; min-height: 40px; }
.studio-title { font-family: var(--font-display); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; animation: fade .3s var(--ease); }
.chats-btn { display: none; }
.studio-top .btn { white-space: nowrap; }
/* with the project open, the chat list folds away behind "Chats" so the conversation keeps its width */
@media (min-width: 1101px) {
  .studio.has-project:not(.panel-hidden) { --side: 0px; }
  .studio.has-project:not(.panel-hidden) .studio-side { position: absolute; z-index: 6; top: 0; bottom: 0; left: 0; width: 280px; transform: translateX(-104%); transition: transform .3s var(--ease); box-shadow: 0 0 40px -10px rgba(0,0,0,.5); background: var(--bg-1); }
  .studio.has-project.side-open:not(.panel-hidden) .studio-side { transform: none; }
  .studio.has-project:not(.panel-hidden) .chats-btn { display: inline-flex; }
}
.studio .thread { padding-top: var(--space-4); }
.studio-actions { margin: 0 max(var(--space-4), calc((100% - 860px) / 2)) 8px; }
.studio-actions:empty { display: none; }
.studio-panel { grid-column: 3; grid-row: 1; min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-left: 1px solid var(--hairline); background: linear-gradient(180deg, color-mix(in srgb, var(--honey) 6%, var(--bg-1)), var(--bg-1) 40%); opacity: 0; transform: translateX(24px); transition: opacity .3s var(--ease), transform .42s cubic-bezier(.2,.8,.2,1); }
.studio.has-project:not(.panel-hidden) .studio-panel { opacity: 1; transform: none; }
.studio.panel-hidden .studio-panel, .studio:not(.has-project) .studio-panel { pointer-events: none; padding: 0; border: 0; }
.hive-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.panel-close { display: none; }
.convo-open { display: flex; align-items: center; gap: 8px; }
.convo-kind { flex: none; width: 9px; height: 10px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--text-3); opacity: .6; }
.convo-kind.code { background: var(--honey); opacity: 1; }

/* the sliding honey pill behind the selected tab */
.hive-tabs { position: relative; isolation: isolate; font-size: 13px; }
.hive-tabs [role=tab] { font-size: inherit; padding-left: 0; padding-right: 0; }
.hive-tabs [role=tab] { position: relative; z-index: 1; transition: color .2s var(--ease); width: 6.4em; text-align: center; }
.hive-tabs [role=tab][aria-selected="true"] { background: none; }
.hive-tabs::before { content: ""; position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: 6.4em; border-radius: 999px; background: linear-gradient(180deg, var(--honey-glow), var(--honey)); box-shadow: 0 2px 10px -3px color-mix(in srgb, var(--honey) 80%, transparent); transform: translateX(calc(var(--tab-i, 0) * (100% + 2px))); transition: transform .32s cubic-bezier(.3,1.4,.5,1); }

/* answers: prose in the conversation, files as cards */
.mode-pill { margin-left: 4px; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; background: color-mix(in srgb, var(--honey) 22%, transparent); color: var(--amber-text); }
.build { display: grid; gap: 8px; }
.file-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 14px; background: var(--bg-1); position: relative; overflow: hidden; animation: card-in .35s cubic-bezier(.2,.9,.3,1.25) both; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.file-card:hover { border-color: color-mix(in srgb, var(--honey) 55%, transparent); transform: translateY(-1px); box-shadow: 0 10px 24px -16px color-mix(in srgb, var(--honey) 70%, transparent); }
.file-card .fc-main { display: grid; min-width: 0; } .file-card .fc-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card .fc-main .faint { font-size: 12px; font-variant-numeric: tabular-nums; }
.fc-tools { display: flex; gap: 4px; }
.file-hex { width: 34px; height: 38px; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--dot, var(--honey)); color: #fff; font: 700 9.5px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.file-hex.ft-html, .file-hex.ft-htm { --dot: #E8613C; } .file-hex.ft-css { --dot: #3C7BE8; } .file-hex.ft-js, .file-hex.ft-mjs { --dot: #D9A400; } .file-hex.ft-ts, .file-hex.ft-tsx { --dot: #2F74C0; }
.file-hex.ft-py { --dot: #3B78A8; } .file-hex.ft-json { --dot: #8A8A8A; } .file-hex.ft-md { --dot: #6E6E6E; } .file-hex.ft-cpp, .file-hex.ft-c, .file-hex.ft-h { --dot: #6D4BC2; } .file-hex.ft-java, .file-hex.ft-kt { --dot: #C0632F; } .file-hex.ft-go { --dot: #2AA7C9; } .file-hex.ft-rs { --dot: #B7410E; } .file-hex.ft-sql { --dot: #3E9C6B; } .file-hex.ft-cs { --dot: #7A3EB8; }
.file-card.writing { border-color: color-mix(in srgb, var(--honey) 60%, transparent); background: linear-gradient(100deg, var(--bg-1) 30%, color-mix(in srgb, var(--honey) 14%, var(--bg-1)) 50%, var(--bg-1) 70%) 0 0 / 260% 100%; animation: card-in .35s cubic-bezier(.2,.9,.3,1.25) both, shimmer 1.6s linear infinite; }
.file-card.writing .file-hex { animation: hex-breathe 1.1s ease-in-out infinite; }
.fc-bar { width: 64px; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--honey) 18%, transparent); overflow: hidden; position: relative; }
.fc-bar::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: inherit; background: var(--honey); animation: bar-run 1.1s ease-in-out infinite; }
.fc-code { margin-top: -2px; animation: code-in .25s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes shimmer { to { background-position: -160% 0; } }
@keyframes hex-breathe { 50% { transform: scale(.9) rotate(30deg); } }
@keyframes bar-run { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

/* the live answer: a slow honey glow runs round it while Hive writes */
.turn.assistant.live { position: relative; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--honey) 4%, var(--bg-1)); }
.turn.assistant.live::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--spin, 0deg), transparent 0 60%, var(--honey) 75%, var(--honey-glow) 82%, transparent 92%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin-border 2.4s linear infinite; pointer-events: none; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin-border { to { --spin: 360deg; } }
.live-status { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); min-height: 22px; }
.live-status span:last-child { animation: fade .25s var(--ease); }
.live-body:empty { display: none; }
.route-tag { font-size: 11.5px; margin-left: auto; align-self: center; }

/* while Hive builds, the preview shows the files appearing */
.build-board { display: grid; place-content: center; justify-items: center; gap: 12px; padding: 28px; background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--honey) 12%, var(--bg-1)), var(--bg-1) 70%); text-align: center; }
.build-board .honeycomb svg { width: 96px; height: auto; filter: drop-shadow(0 8px 24px color-mix(in srgb, var(--honey) 45%, transparent)); }
.build-status { margin: 0; font-weight: 600; color: var(--text-1); }
.build-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-width: min(320px, 80vw); }
.build-files li { display: grid; grid-template-columns: 10px 1fr auto 18px; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--bg-1); border: 1px solid var(--hairline); text-align: left; animation: card-in .35s cubic-bezier(.2,.9,.3,1.25) both; animation-delay: calc(var(--i, 0) * 40ms); }
.build-files li.writing { border-color: color-mix(in srgb, var(--honey) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--honey) 14%, transparent); }
.build-files li.writing .bf-state { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--honey); border-right-color: transparent; animation: spin .7s linear infinite; }
.build-files li.done .bf-state { color: var(--pass); font-weight: 800; animation: pop .35s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: scale(0); } }

/* finishing touch: a burst of honey hexagons over the project */
.studio.celebrate .studio-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(circle at 20% 30%, var(--honey) 0 4px, transparent 5px), radial-gradient(circle at 75% 25%, var(--honey-glow) 0 3px, transparent 4px),
  radial-gradient(circle at 60% 70%, var(--honey) 0 5px, transparent 6px), radial-gradient(circle at 35% 80%, var(--honey-glow) 0 3px, transparent 4px),
  radial-gradient(circle at 85% 60%, var(--honey) 0 4px, transparent 5px); animation: burst 1s ease-out forwards; }
.studio-panel { position: relative; }
@keyframes burst { 0% { opacity: 0; transform: scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.35) translateY(-20px); } }

/* composer and starters */
.studio.busy .composer { border-color: color-mix(in srgb, var(--honey) 50%, transparent); }
.studio .composer { margin-left: max(var(--space-4), calc((100% - 860px) / 2)); margin-right: max(var(--space-4), calc((100% - 860px) / 2)); transition: box-shadow .25s var(--ease), border-color .25s; }
.send-hex { transition: transform .25s cubic-bezier(.3,1.5,.5,1), filter .2s; }
.send-hex:hover { filter: brightness(1.08) drop-shadow(0 4px 10px color-mix(in srgb, var(--honey) 60%, transparent)); }
.chat-empty .suggest .starter { display: flex; gap: 10px; align-items: flex-start; animation: card-in .4s cubic-bezier(.2,.9,.3,1.25) both; animation-delay: calc(80ms + var(--i, 0) * 45ms); }
.starter-kind { color: var(--honey); font-size: 15px; line-height: 1.2; flex: none; }
.starter.chat .starter-kind { color: var(--text-3); }
.chat-empty > p { max-width: 560px; margin: 0; }
.hive-hero { padding: var(--space-5); background: radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--honey) 22%, transparent), transparent 60%), var(--bg-1); border-color: color-mix(in srgb, var(--honey) 40%, var(--hairline)); }
.hive-hero strong { font-size: 24px !important; }

/* buttons feel physical */
.btn { transition: transform .12s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.btn:active { transform: translateY(1px) scale(.98); }

@media (max-width: 1100px) {
  .studio { --side: 0px; grid-template-columns: minmax(0, 1fr); }
  .studio-main { grid-column: 1; }
  .studio-side { position: absolute; z-index: 6; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); transform: translateX(-104%); transition: transform .3s var(--ease); box-shadow: 0 0 40px -10px rgba(0,0,0,.5); background: var(--bg-1); }
  .studio.side-open .studio-side { transform: none; }
  .chats-btn { display: inline-flex; }
  .studio-panel { position: absolute; z-index: 7; inset: 0 0 0 auto; width: min(100%, 720px); box-shadow: -20px 0 50px -20px rgba(0,0,0,.6); }
  .panel-close { display: inline-grid; }
}
@media (prefers-reduced-motion: reduce) {
  .studio, .studio-panel, .file-card, .build-files li, .hive-tabs::before, .chat-empty .suggest .starter { transition: none !important; animation: none !important; }
  .turn.assistant.live::before, .studio.celebrate .studio-panel::after, .fc-bar::after, .file-card.writing .file-hex { animation: none !important; }
}
:root[data-reduce-motion="true"] .studio, :root[data-reduce-motion="true"] .studio-panel, :root[data-reduce-motion="true"] .file-card, :root[data-reduce-motion="true"] .build-files li, :root[data-reduce-motion="true"] .hive-tabs::before, :root[data-reduce-motion="true"] .turn.assistant.live::before, :root[data-reduce-motion="true"] .studio.celebrate .studio-panel::after { transition: none !important; animation: none !important; }

.convo-empty { font-size: 13px; padding: 10px 8px; }
@media (max-width: 960px) { .hive-files { grid-template-rows: auto minmax(0, 1fr); } }

/* Settings: free keys and the folded "More" */
.key-card { display: grid; gap: 6px; padding: 14px 16px; margin-top: 10px; border-radius: 16px; border: 1px solid var(--hairline); background: linear-gradient(120deg, color-mix(in srgb, var(--honey) 10%, transparent), transparent 65%), var(--bg-1); transition: border-color .2s, box-shadow .2s; }
.key-card.on { border-color: color-mix(in srgb, var(--pass) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pass) 12%, transparent); }
.key-card p { margin: 0; font-size: 13.5px; line-height: 1.55; }
.key-card .input { width: min(360px, 100%); }
.key-steps { margin: 2px 0 6px; padding-left: 20px; display: grid; gap: 2px; font-size: 13.5px; }
.key-steps li::marker { color: var(--honey); font-weight: 700; }
.route-order { margin: 0 0 10px; padding-left: 22px; display: grid; gap: 4px; font-size: 14px; }
.route-order li::marker { color: var(--honey); font-weight: 700; }
.set-more { display: grid; gap: var(--space-4); }
.set-more > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--radius-l); border: 1px dashed color-mix(in srgb, var(--honey) 45%, var(--hairline)); background: var(--bg-1); transition: background .2s, border-color .2s; }
.set-more > summary::-webkit-details-marker { display: none; }
.set-more > summary::before { content: "▸"; color: var(--honey); transition: transform .25s var(--ease); display: inline-block; }
.set-more[open] > summary::before { transform: rotate(90deg); }
.set-more > summary:hover { background: color-mix(in srgb, var(--honey) 7%, var(--bg-1)); border-style: solid; }
.set-more > summary .display { font-size: 18px; }
.set-more[open] > :not(summary) { animation: card-in .35s cubic-bezier(.2,.9,.3,1.1) both; }

/* Free AI keys: provider tiles */
.key-summary { display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; }
.key-meter { display: flex; gap: 4px; }
.key-meter i { width: 18px; height: 20px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: color-mix(in srgb, var(--text-3) 30%, transparent); transition: background .3s, transform .3s; }
.key-meter i.on { background: var(--hue); transform: scale(1.08); }
.provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; align-items: start; }
.provider { border: 1px solid var(--hairline); border-radius: 16px; background: var(--bg-1); overflow: hidden; transition: border-color .2s, box-shadow .25s, transform .2s var(--ease); }
.provider:hover { border-color: color-mix(in srgb, var(--hue) 45%, var(--hairline)); box-shadow: 0 10px 28px -20px var(--hue); }
.provider[open] { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--hue) 55%, var(--hairline)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hue) 14%, transparent); }
.provider.on { border-color: color-mix(in srgb, var(--pass) 50%, var(--hairline)); }
.provider > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "mark name state" "mark badge state"; column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px 14px; }
.provider > summary::-webkit-details-marker { display: none; }
.provider-mark { grid-area: mark; width: 40px; height: 44px; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(150deg, color-mix(in srgb, var(--hue) 70%, #fff), var(--hue)); color: #fff; font: 800 14px/1 var(--font-sans, system-ui); text-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .3s cubic-bezier(.3,1.5,.5,1); }
.provider:hover .provider-mark, .provider[open] .provider-mark { transform: rotate(30deg) scale(1.04); }
.provider-mark { animation: none; }
.provider-name { grid-area: name; display: flex; gap: 8px; align-items: baseline; min-width: 0; flex-wrap: wrap; }
.provider-name .faint { font-size: 13px; }
.provider-badge { grid-area: badge; justify-self: start; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--hue) 14%, transparent); color: color-mix(in srgb, var(--hue) 70%, var(--text-1)); }
.provider-state { grid-area: state; font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--text-2); white-space: nowrap; }
.provider-state.on { border-color: transparent; background: color-mix(in srgb, var(--pass) 16%, transparent); color: var(--pass); }
.provider-state.on::before { content: "✓ "; }
.provider-body { padding: 0 16px 14px 66px; display: grid; gap: 8px; animation: card-in .3s var(--ease) both; }
.provider-body p { margin: 0; font-size: 13.5px; line-height: 1.55; }
.provider-body .input { width: min(380px, 100%); }
.key-safety { font-size: 12px !important; }
.route-orders { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 8px; }
.route-orders h3 { margin-top: 12px !important; }
.route-chain { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: rc; }
.route-chain li { counter-increment: rc; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; background: var(--bg-2); font-size: 13px; }
.route-chain li::before { content: counter(rc); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--honey); color: var(--ink-on-amber); font-size: 11px; font-weight: 700; }
@media (max-width: 700px) { .provider-body { padding-left: 16px; } }

/* =================== Design pass: type, surfaces, navigation, dashboard =================== */
body { font-feature-settings: "cv11" 1, "ss03" 1; letter-spacing: -0.003em; }
.display, h1.page, .wordmark { font-family: var(--font-display); }
h1.page { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
h2.display { font-size: 22px; letter-spacing: -0.015em; }
.section-title { margin: var(--space-8) 0 var(--space-3); }

/* surfaces: one lit, layered material everywhere */
.card { background: linear-gradient(180deg, color-mix(in srgb, var(--text-1) 2.5%, transparent), transparent 120px), var(--bg-1); box-shadow: var(--lift), var(--shadow-1); border-radius: 16px; }
:root[data-scheme="light"] { --shadow-1: 0 1px 2px rgba(80,55,0,.06), 0 4px 14px -8px rgba(80,55,0,.18); --shadow-2: 0 2px 6px rgba(80,55,0,.06), 0 14px 34px -16px rgba(80,55,0,.28); --shadow-3: 0 6px 14px rgba(80,55,0,.08), 0 28px 60px -24px rgba(80,55,0,.32); --lift: inset 0 1px 0 rgba(255,255,255,.7); }
.btn { border-radius: 10px; font-weight: 500; }
.btn.ghost:hover { background: var(--bg-2); border-color: var(--hairline); }
.btn.primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px -8px color-mix(in srgb, var(--honey) 80%, transparent); }
.input, .chip select, textarea.input, select.input { border-radius: 10px; }
.input { transition: border-color .15s, box-shadow .2s; }
.input:focus-visible, textarea:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--honey) 22%, transparent); border-color: color-mix(in srgb, var(--honey) 70%, transparent); }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-3) 45%, transparent) transparent; }

/* navigation rail: grouped, with icons and a lit honey pill for the current page */
.rail { gap: var(--space-3); padding: var(--space-4) var(--space-3); }
.rail .wordmark { padding: 2px 8px; }
.nav-group { display: grid; gap: 2px; }
.nav-group + .nav-group { margin-top: 10px; }
.nav-label { margin: 0 0 2px; padding: 0 12px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.rail nav a { gap: 10px; padding: 8px 12px; border-radius: 10px; font-weight: 500; transition: background .15s, color .15s, transform .15s var(--ease); }
.rail nav a .icon { flex: none; opacity: .75; transition: opacity .15s, transform .25s cubic-bezier(.3,1.5,.5,1); }
.rail nav a:hover .icon { opacity: 1; transform: scale(1.08); }
.rail nav a[aria-current="page"] { background: color-mix(in srgb, var(--honey) 15%, var(--bg-1)); color: var(--text-1); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--honey) 30%, transparent); }
.rail nav a[aria-current="page"]::before { display: none; }
.rail nav a[aria-current="page"] .icon { opacity: 1; color: var(--amber-text); }
.rail-extra { margin-top: auto; display: grid; gap: 6px; padding: 0 8px; }
.rail-tagline { font-size: 12.5px; margin: 0; }
.rail-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: 13px; }
.rail-links a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.rail-links a:hover { text-decoration: underline; }
.rail-legal { font-size: 11.5px; margin: 0; }

/* dashboard hero: greet, ask, go */
.hero { position: relative; margin: var(--space-2) 0 var(--space-6); padding: var(--space-6); border-radius: var(--radius-xl); border: 1px solid color-mix(in srgb, var(--honey) 28%, var(--hairline)); background:
  radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--honey) 16%, transparent), transparent 55%),
  radial-gradient(90% 120% at 100% 100%, color-mix(in srgb, var(--honey-glow) 9%, transparent), transparent 60%), var(--bg-1);
  box-shadow: var(--lift), var(--shadow-2); overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 240px; height: 240px; opacity: .08; pointer-events: none;
  background: conic-gradient(from 30deg, var(--honey) 0 60deg, transparent 0 120deg, var(--honey) 0 180deg, transparent 0 240deg, var(--honey) 0 300deg, transparent 0);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); animation: hero-spin 40s linear infinite; }
@keyframes hero-spin { to { transform: rotate(360deg); } }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); flex-wrap: wrap; }
.hero-hello { margin: 0 0 4px; color: var(--amber-text); font-weight: 600; font-size: 14px; letter-spacing: .01em; }
.hero-title { margin: 0; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; letter-spacing: -0.02em; }
.hero-meter { display: grid; justify-items: end; gap: 6px; }
.hero-meter .meter { background: color-mix(in srgb, var(--bg-0) 55%, transparent); padding: 8px 14px 8px 8px; border-radius: 14px; border: 1px solid var(--hairline); }
.hero-meter .meter strong { font-size: 13px; } .hero-meter .meter .mono { font-size: 12px; }
.hero-ask { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 10px; margin-top: var(--space-5); padding: 10px 10px 10px 18px; border-radius: 20px; background: var(--bg-0); border: 1px solid var(--hairline); box-shadow: var(--shadow-1); transition: border-color .2s, box-shadow .25s; }
.hero-ask:focus-within { border-color: color-mix(in srgb, var(--honey) 65%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--honey) 16%, transparent), var(--shadow-2); }
.hero-input { flex: 1; border: 0; outline: none; background: transparent; resize: none; font-size: 16px; line-height: 1.5; padding: 8px 0; max-height: 160px; }
.hero-input:focus-visible { box-shadow: none; }
.hero-quick { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.quick-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--hairline); background: color-mix(in srgb, var(--bg-0) 60%, transparent); color: var(--text-2); cursor: pointer; font-size: 13.5px; font-weight: 500; transition: color .15s, border-color .15s, transform .15s var(--ease), background .15s; }
.quick-chip:hover { color: var(--text-1); border-color: color-mix(in srgb, var(--honey) 55%, transparent); background: color-mix(in srgb, var(--honey) 10%, var(--bg-0)); transform: translateY(-1px); }
.quick-chip .icon { color: var(--amber-text); }

/* studio cards */
.studio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .studio-grid { grid-template-columns: 1fr; } }
.studio-card { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: start; padding: 16px; border-radius: 18px; text-decoration: none; color: inherit; background: var(--bg-1); border: 1px solid var(--hairline); box-shadow: var(--lift), var(--shadow-1); transition: transform .2s var(--ease), box-shadow .25s, border-color .2s; animation: card-in .45s cubic-bezier(.2,.9,.3,1.15) both; animation-delay: calc(var(--i, 0) * 60ms); }
.studio-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--honey) 45%, var(--hairline)); box-shadow: var(--lift), var(--shadow-2); }
.studio-icon { grid-row: span 2; width: 44px; height: 48px; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(150deg, var(--honey-glow), var(--honey) 55%, var(--honey-deep)); color: var(--ink-on-amber); transition: transform .35s cubic-bezier(.3,1.5,.5,1); }
.studio-card:hover .studio-icon { transform: rotate(30deg); }
.studio-card:hover .studio-icon .icon { transform: rotate(-30deg); }
.studio-icon .icon { transition: transform .35s cubic-bezier(.3,1.5,.5,1); }
.studio-text { display: grid; gap: 3px; padding-right: 22px; }
.studio-text strong { font-family: var(--font-display); font-size: 17px; letter-spacing: -0.01em; }
.studio-text .muted { font-size: 13.5px; line-height: 1.45; }
.studio-arrow { position: absolute; right: 14px; top: 16px; color: var(--text-3); transition: transform .2s var(--ease), color .2s; }
.studio-card:hover .studio-arrow { transform: translateX(3px); color: var(--amber-text); }

/* goals with icons */
.goal { position: relative; display: grid; gap: 4px; align-content: start; padding: 16px; border-radius: 16px; box-shadow: var(--lift), var(--shadow-1); transition: transform .2s var(--ease), border-color .2s, box-shadow .25s; }
.goal:hover { transform: translateY(-2px); box-shadow: var(--lift), var(--shadow-2); }
.goal-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; margin-bottom: 6px; background: color-mix(in srgb, var(--honey) 16%, transparent); color: var(--amber-text); }
.empty-card { margin-top: var(--space-5); }

@media (max-width: 720px) { .hero { padding: var(--space-4); border-radius: 20px; } .hero-meter { justify-items: start; } }
@media (prefers-reduced-motion: reduce) { .hero::after, .studio-card { animation: none !important; } }
:root[data-reduce-motion="true"] .hero::after, :root[data-reduce-motion="true"] .studio-card { animation: none !important; }
.provider.unavailable summary .provider-mark { filter: grayscale(.7); opacity: .7; }
.provider.unavailable .provider-badge { background: color-mix(in srgb, var(--text-3) 14%, transparent); color: var(--text-2); }
.provider.unavailable .provider-body > .notice { margin-bottom: 10px; }

/* ======================= Stage 22: simpler buttons, composer, plan, bee skins ======================= */

/* ---- Buttons: one system. Primary (one per view), secondary (.ghost), quiet. One height, clear focus. ---- */
.btn { --btn-h: 40px; min-height: var(--btn-h); padding: 0 16px; gap: 8px; border-radius: 10px; font: 500 14.5px/1.1 var(--font-ui); letter-spacing: 0;
  background: var(--bg-1); color: var(--text-1); border: 1px solid color-mix(in srgb, var(--text-1) 16%, transparent); box-shadow: none; filter: none;
  transition: background .15s, border-color .15s, color .15s, transform .1s var(--ease); white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--bg-2); border-color: color-mix(in srgb, var(--text-1) 28%, transparent); }
.btn:not(.primary):hover { background: var(--bg-2); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--honey) 75%, transparent); outline-offset: 2px; }
.btn.primary { background: var(--amber); color: var(--ink-on-amber); border-color: transparent; font-weight: 600; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset; overflow: visible; }
.btn.primary:hover { background: var(--amber); filter: brightness(1.06) saturate(1.05); }
.btn.primary::after { content: none !important; }
.btn.ghost { background: transparent; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.quiet:hover { background: color-mix(in srgb, var(--text-1) 7%, transparent); color: var(--text-1); }
.btn.small, .btn.tiny { --btn-h: 32px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.btn.large { --btn-h: 46px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.btn .icon { flex: none; }
:root[data-working="true"] .btn.primary[type=submit]:disabled { animation: none; }
@media (forced-colors: active) { .btn { border: 1px solid ButtonText; } .btn.primary { background: Highlight; color: HighlightText; } }

/* ---- Brief composer: one calm box, grows as you type, controls inside ---- */
.command { background: color-mix(in srgb, var(--bg-0) 82%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--hairline); padding: 12px var(--space-5) 14px; }
.command form { max-width: 900px; }
.composer { display: grid; gap: 6px; padding: 10px 10px 10px 14px; border-radius: 18px; background: var(--bg-1); border: 1px solid color-mix(in srgb, var(--text-1) 14%, transparent);
  box-shadow: var(--lift), var(--shadow-1); transition: border-color .2s, box-shadow .25s; }
.composer:focus-within { border-color: color-mix(in srgb, var(--honey) 70%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--honey) 16%, transparent), var(--shadow-2); }
.command .composer textarea { width: 100%; min-height: 26px; max-height: 220px; resize: none; border: 0; outline: none; background: transparent; padding: 6px 2px 2px; margin: 0;
  font: 400 16px/1.5 var(--font-ui); color: var(--text-1); box-shadow: none; overflow-y: auto; }
.command .composer textarea:focus, .command .composer textarea:focus-visible { box-shadow: none; outline: none; border: 0; }
.command .composer textarea::placeholder { color: var(--text-3); }
.composer-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.composer-bar .spacer { flex: 1; }
.select-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 10px; border-radius: 999px; color: var(--text-2);
  background: color-mix(in srgb, var(--text-1) 5%, transparent); border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.select-chip:hover { background: color-mix(in srgb, var(--text-1) 9%, transparent); color: var(--text-1); }
.select-chip:focus-within { border-color: color-mix(in srgb, var(--honey) 70%, transparent); color: var(--text-1); }
.select-chip .icon { color: var(--amber-text); }
.select-chip select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: inherit; font: 500 13.5px var(--font-ui); padding: 0 16px 0 0; cursor: pointer; outline: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-size: 4px 4px; background-position: right 5px center, right 1px center; background-repeat: no-repeat; }
.select-chip select option { color: #1a1204; background: #fff; }
.kbd-hint { display: inline-flex; gap: 3px; color: var(--text-3); font-size: 12px; margin-right: 2px; }
.kbd-hint kbd { font: 500 11px/1 var(--font-ui); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--hairline); background: var(--bg-2); color: var(--text-2); box-shadow: 0 1px 0 var(--hairline); }
.demo-badge { font: 600 11px/1 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; color: var(--amber-text); background: color-mix(in srgb, var(--honey) 14%, transparent); }
@media (max-width: 640px) { .kbd-hint { display: none; } .composer-bar .btn.quiet span, .composer-bar .btn.quiet { font-size: 13px; } }

/* ---- Studio intro: what happens in three steps, ideas to start from ---- */
.studio-intro { max-width: 760px; }
.studio-intro .lead { font-size: 17px; line-height: 1.55; color: var(--text-2); margin: 4px 0 var(--space-5); }
.how-steps { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: none; }
.how-steps li { position: relative; display: grid; gap: 4px; padding: 16px; border-radius: 16px; background: var(--bg-1); border: 1px solid var(--hairline); box-shadow: var(--lift), var(--shadow-1);
  animation: card-in .45s cubic-bezier(.2,.9,.3,1.1) both; animation-delay: calc(var(--i, 0) * 70ms); }
.how-steps li + li::before { content: ""; position: absolute; left: -12px; top: 34px; width: 12px; height: 2px; background: color-mix(in srgb, var(--honey) 55%, transparent); }
.how-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 6px; color: var(--amber-text); background: color-mix(in srgb, var(--honey) 16%, transparent); }
.how-num { position: absolute; top: 14px; right: 14px; font: 600 12px/1 var(--font-ui); color: var(--text-3); }
.how-steps strong { font-size: 15px; } .how-steps .muted { font-size: 13.5px; line-height: 1.45; }
.examples-title { font: 600 12px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 10px; }
.example-list { display: grid; gap: 8px; }
.example { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--hairline); background: transparent; color: var(--text-1);
  font: 400 15px/1.4 var(--font-ui); cursor: pointer; transition: background .15s, border-color .15s, transform .15s var(--ease); }
.example .icon { color: var(--amber-text); flex: none; }
.example:hover { background: var(--bg-1); border-color: color-mix(in srgb, var(--honey) 50%, var(--hairline)); transform: translateX(2px); }
.example:focus-visible { outline: 3px solid color-mix(in srgb, var(--honey) 75%, transparent); outline-offset: 2px; }
.intro-foot { margin-top: var(--space-5); font-size: 13px; }
@media (max-width: 720px) { .how-steps { grid-template-columns: 1fr; } .how-steps li + li::before { display: none; } }

/* ---- Plan card and the Cast ---- */
.card.plan { padding: 20px 22px; border-radius: 20px; max-width: 760px; }
.plan-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.eyebrow { margin: 0 0 2px; font: 600 12px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--amber-text); }
.plan-head h2 { margin: 0; font-size: 24px; }
.plan-total { display: grid; justify-items: end; gap: 2px; } .plan-total strong { font: 600 20px/1 var(--font-display); }
.plan-note { margin: 8px 0 14px; }
.brief-echo { font-family: var(--font-display); font-size: 17px; font-style: italic; color: var(--text-2); max-width: 760px; }
.cast-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cast-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--text-1) 3.5%, transparent); border: 1px solid var(--hairline); }
.cast-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--amber-text); background: color-mix(in srgb, var(--honey) 15%, transparent); }
.cast-main { display: grid; gap: 1px; min-width: 0; }
.cast-what { font-weight: 600; font-size: 14.5px; } .cast-count { color: var(--text-3); font-weight: 500; }
.cast-who { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cast-cost { font: 600 12.5px/1 var(--font-ui); padding: 6px 9px; border-radius: 999px; color: var(--amber-text); background: color-mix(in srgb, var(--honey) 14%, transparent); }
.cast-row.missing .cast-icon { color: var(--text-3); background: color-mix(in srgb, var(--text-1) 6%, transparent); }
.cast-row.missing .cast-who { color: var(--text-3); font-style: italic; }
.cast-row.browser { border-style: dashed; }
.cast-why { grid-column: 2 / -1; }
.cast-why summary, .plan-options summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; font: 500 13px/1 var(--font-ui); color: var(--text-2); padding: 6px 0; border-radius: 6px; }
.cast-why summary::-webkit-details-marker, .plan-options summary::-webkit-details-marker { display: none; }
.cast-why summary::before, .plan-options summary::before { content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .2s var(--ease); margin-right: 2px; }
.cast-why[open] summary::before, .plan-options[open] summary::before { transform: rotate(45deg); }
.cast-why summary:hover, .plan-options summary:hover { color: var(--text-1); }
.cast-why summary:focus-visible, .plan-options summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--honey) 75%, transparent); outline-offset: 2px; }
.cast-why p { margin: 4px 0 2px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.cast-list.detailed .cast-row { background: transparent; }
.drawer .cast-list.detailed .cast-who { white-space: normal; }
.plan-options { margin-top: 14px; border-top: 1px solid var(--hairline); padding-top: 8px; }
.plan-options[open] { display: grid; gap: 12px; }
.plan-field { border: 0; padding: 0; margin: 0; } .plan-field legend { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.plan-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.notice-inline { margin: 10px 0 0; font-size: 13.5px; color: var(--text-2); padding: 10px 12px; border-radius: 10px; border-left: 3px solid var(--honey); background: color-mix(in srgb, var(--honey) 8%, transparent); }
.card.plan.skeleton { display: grid; gap: 12px; }
.sk-row { height: 54px; border-radius: 12px; background: linear-gradient(90deg, color-mix(in srgb, var(--text-1) 4%, transparent) 25%, color-mix(in srgb, var(--text-1) 9%, transparent) 50%, color-mix(in srgb, var(--text-1) 4%, transparent) 75%); background-size: 200% 100%; animation: sk-shimmer 1.4s linear infinite; }
.sk-row.short { width: 60%; }
@keyframes sk-shimmer { to { background-position: -200% 0; } }

/* ---- Empty states ---- */
.empty-state { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 36px 20px 28px; }
.empty-state.compact { grid-template-columns: auto 1fr; justify-items: start; text-align: left; gap: 18px; padding: 6px 4px; align-items: center; }
.empty-bee { position: relative; display: grid; place-items: center; animation: bee-float 3.2s ease-in-out infinite; }
.empty-bee .bee-wings { animation: flap 110ms linear infinite alternate; transform-origin: 32px 26px; transform-box: view-box; }
.empty-shadow { position: absolute; bottom: -6px; width: 46%; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--text-1) 14%, transparent); filter: blur(3px); animation: bee-shadow 3.2s ease-in-out infinite; }
.empty-title { font: 600 20px/1.25 var(--font-display); margin: 0; letter-spacing: -0.01em; }
.empty-state.compact .empty-title { font-size: 18px; }
.empty-text p { margin: 4px 0 0; max-width: 46ch; line-height: 1.5; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.empty-state:not(.compact) .empty-actions { justify-content: center; }
@keyframes bee-float { 50% { transform: translateY(-7px) rotate(-2deg); } }
@keyframes bee-shadow { 50% { transform: scale(.82); opacity: .6; } }
.empty-card { padding: 18px 20px; }

/* ---- The mascot in notices (same drawing as the flying bee) ---- */
.glim { position: relative; display: inline-grid; place-items: center; width: 64px; height: 64px; flex: none; }
.glim .bee-art { position: relative; width: 56px; height: 56px; }
.glim-halo { position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--honey) 30%, transparent), transparent 70%); }
.glim .bee-wings { animation: flap 140ms linear infinite alternate; transform-origin: 32px 26px; transform-box: view-box; }
.glim[data-state="idle"] { animation: bee-float 3.4s ease-in-out infinite; }
.glim[data-state="drafting"] { animation: flit 1.6s ease-in-out infinite; }
.glim[data-state="proud"] .bee-eyes { display: none; } .glim[data-state="proud"] .bee-happy { display: inline; }
.glim[data-state="sleepy"] .bee-eyes { transform: scaleY(.15); transform-origin: 16px 34px; transform-box: view-box; } .glim[data-state="sleepy"] .bee-wings { animation: none; }
.glim[data-state="flicker"] .glim-halo { animation: flicker 1.4s ease-in-out 2; }
.glim[data-state="welcome"] { animation: wave 1.2s ease-in-out 2; transform-origin: 50% 80%; }

/* ---- Bee drawing and skins (colours only; every bee on the page follows :root[data-bee-skin]) ---- */
:root, [data-bee-skin="honey"] { --bee-body: #FFC21A; --bee-body-2: #EE9200; --bee-stripe: #2A1C05; --bee-stripe-2: #2A1C05; --bee-head: #2A1C05; --bee-pupil: #2A1C05; --bee-eye: #fff;
  --bee-cheek: #FF8A6B; --bee-wing: rgba(232, 246, 255, .62); --bee-wing-edge: rgba(255, 255, 255, .95); --bee-accent: #FFD54A; --bee-glow: transparent; --bee-fuzz: transparent; --bee-tip: var(--bee-head); }
[data-bee-skin="bumble"] { --bee-body: #FFCF3A; --bee-body-2: #E08400; --bee-stripe: #2B2118; --bee-stripe-2: #FFF3D6; --bee-head: #2B2118; --bee-pupil: #2B2118; --bee-fuzz: #FFCF3A; --bee-cheek: #FF9A7A; --bee-tip: #2B2118; }
[data-bee-skin="queen"] { --bee-body: #F6A800; --bee-body-2: #BE6200; --bee-stripe: #3A1A00; --bee-stripe-2: #3A1A00; --bee-head: #3A1A00; --bee-pupil: #3A1A00; --bee-accent: #FFD84D; --bee-cheek: #FF7E8A; --bee-tip: #FFD84D; }
[data-bee-skin="midnight"] { --bee-body: #5B66E0; --bee-body-2: #333AA0; --bee-stripe: #FFD15C; --bee-stripe-2: #FFD15C; --bee-head: #1E2156; --bee-pupil: #1E2156; --bee-wing: rgba(205, 214, 255, .5);
  --bee-glow: rgba(255, 209, 92, .45); --bee-cheek: #FF9DC4; --bee-tip: #FFD15C; }
[data-bee-skin="mint"] { --bee-body: #8FE3BE; --bee-body-2: #43B784; --bee-stripe: #24503F; --bee-stripe-2: #24503F; --bee-head: #24503F; --bee-pupil: #24503F; --bee-cheek: #FF9FB2; --bee-wing: rgba(226, 255, 244, .62); --bee-tip: #FF9FB2; }
[data-bee-skin="robo"] { --bee-body: #CFD8E3; --bee-body-2: #8A97AA; --bee-stripe: #4A5568; --bee-stripe-2: #4A5568; --bee-head: #4A5568; --bee-pupil: #0B2A33; --bee-accent: #3FDDFF; --bee-cheek: transparent;
  --bee-wing: rgba(190, 240, 255, .45); --bee-tip: #3FDDFF; }
[data-bee-skin="ember"] { --bee-body: #FF7A3D; --bee-body-2: #CC3A10; --bee-stripe: #2A120B; --bee-stripe-2: #2A120B; --bee-head: #2A120B; --bee-pupil: #2A120B; --bee-glow: rgba(255, 110, 40, .5); --bee-cheek: #FFB37A; --bee-tip: #FF9A3D; }
[data-bee-skin="prism"] { --bee-body: #FFE16B; --bee-body-2: #F2A93B; --bee-stripe: #FF5C8A; --bee-stripe-2: #4CC3FF; --bee-head: #6E4BE0; --bee-pupil: #2B1A66; --bee-cheek: #FF8FB8; --bee-tip: #4CC3FF; --bee-glow: rgba(180, 120, 255, .35); }
.bee-art .bee-abdomen { fill: var(--bee-body); }
.bee-art .bee-shade { fill: var(--bee-body-2); opacity: .55; }
.bee-art .bee-stripe { fill: none; stroke: var(--bee-stripe); stroke-width: 4.6; stroke-linecap: round; }
.bee-art .bee-stripe.s2 { stroke: var(--bee-stripe-2); }
.bee-art .bee-shine { fill: #fff; opacity: .5; }
.bee-art .bee-head, .bee-art .bee-sting { fill: var(--bee-head); }
.bee-art .bee-eye { fill: var(--bee-eye); } .bee-art .bee-pupil { fill: var(--bee-pupil); } .bee-art .bee-glint { fill: #fff; }
.bee-art .bee-cheek { fill: var(--bee-cheek); opacity: .75; }
.bee-art .bee-smile { fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; }
.bee-art .bee-happy { display: none; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.bee-art .bee-antenna { fill: none; stroke: var(--bee-head); stroke-width: 1.8; stroke-linecap: round; }
.bee-art .bee-tip { fill: var(--bee-tip); }
.bee-art .bee-wing { fill: var(--bee-wing); stroke: var(--bee-wing-edge); stroke-width: 1; }
.bee-art .bee-vein { fill: none; stroke: var(--bee-wing-edge); stroke-width: .7; opacity: .7; }
.bee-art .bee-legs { fill: none; stroke: var(--bee-head); stroke-width: 1.7; stroke-linecap: round; }
.bee-art .bee-fuzz { fill: none; stroke: var(--bee-fuzz); stroke-width: 2.2; stroke-dasharray: .1 2.6; stroke-linecap: round; }
.bee-art .bee-glow { fill: var(--bee-glow); filter: blur(3px); }
.bee-art .bee-crown, .bee-art .bee-visor { display: none; }
[data-bee-skin="queen"] .bee-art .bee-crown { display: inline; fill: var(--bee-accent); stroke: #B57A00; stroke-width: .8; stroke-linejoin: round; }
[data-bee-skin="robo"] .bee-art .bee-visor { display: inline; fill: color-mix(in srgb, var(--bee-accent) 35%, transparent); stroke: var(--bee-accent); stroke-width: 1.2; }
[data-bee-skin="robo"] .bee-art .bee-eye { fill: var(--bee-accent); } [data-bee-skin="robo"] .bee-art .bee-smile { stroke: var(--bee-accent); }
[data-bee-skin="midnight"] .bee-art .bee-tip, [data-bee-skin="robo"] .bee-art .bee-tip, [data-bee-skin="ember"] .bee-art .bee-tip { filter: drop-shadow(0 0 2px var(--bee-tip)); }
.bee-art .bee-glow { animation: bee-glow 2.2s ease-in-out infinite; } @keyframes bee-glow { 50% { opacity: .55; } }
.bee .bee-legs { opacity: 0; } .bee[data-mode="rest"] .bee-legs, .bee[data-mode="watch"] .bee-legs, .bee.asleep .bee-legs { opacity: 1; }
.bee[data-mode="watch"] .bee-wings { animation-duration: 700ms; }
.bee[data-speed="fast"] .bee-wings { animation-duration: 50ms; }
.bee[data-mood="happy"] .bee-eyes { display: none; } .bee[data-mood="happy"] .bee-happy { display: inline; }
.bee[data-mood="startled"] .bee-eye { transform: scale(1.25); transform-box: fill-box; transform-origin: center; }
.bee[data-mood="curious"] .bee-antenna { animation: antenna-twitch 1.6s ease-in-out infinite; transform-box: view-box; transform-origin: 20px 28px; }
@keyframes antenna-twitch { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-7deg); } 90% { transform: rotate(4deg); } }
.bee-spark { position: fixed; z-index: 59; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; pointer-events: none; background: var(--bee-tip); box-shadow: 0 0 6px var(--bee-tip);
  animation: spark-fade .7s ease-out forwards; }
@keyframes spark-fade { to { transform: translateY(6px) scale(.2); opacity: 0; } }

/* ---- Bee skin picker ---- */
.skin-picker { border: 0; padding: 0; margin: 8px 0 4px; }
.skin-picker legend { font-weight: 600; margin-bottom: 8px; }
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.skin-card { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 6px 9px; border-radius: 14px; border: 1px solid var(--hairline); background: var(--bg-1); cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s var(--ease); }
.skin-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--honey) 45%, var(--hairline)); }
.skin-card input { position: absolute; opacity: 0; pointer-events: none; }
.skin-card:has(input:checked) { border-color: var(--honey); background: color-mix(in srgb, var(--honey) 10%, var(--bg-1)); box-shadow: 0 0 0 1px var(--honey) inset; }
.skin-card:has(input:checked)::after { content: "✓"; position: absolute; top: 6px; right: 8px; font: 700 11px/1 var(--font-ui); color: var(--amber-text); }
.skin-card:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--honey) 75%, transparent); outline-offset: 2px; }
.skin-bee { display: grid; place-items: center; height: 48px; }
.skin-card:hover .skin-bee .bee-wings, .skin-card:has(input:checked) .skin-bee .bee-wings { animation: flap 120ms linear infinite alternate; transform-origin: 32px 26px; transform-box: view-box; }
.skin-name { font-size: 13px; font-weight: 500; }

/* ---- Motion off: everything new stands still ---- */
@media (prefers-reduced-motion: reduce) { .empty-bee, .empty-shadow, .glim, .glim *, .how-steps li, .sk-row, .skin-card .bee-wings, .bee-art .bee-glow, .empty-bee .bee-wings { animation: none !important; } }
:root[data-reduce-motion="true"] :is(.empty-bee, .empty-shadow, .glim, .glim *, .how-steps li, .sk-row, .skin-card .bee-wings, .bee-art .bee-glow, .empty-bee .bee-wings) { animation: none !important; }
.next-steps { list-style: none; counter-reset: n; margin: 0; padding: 0; display: grid; gap: 14px; }
.next-steps li { counter-increment: n; position: relative; padding-left: 36px; line-height: 1.5; color: var(--text-2); }
.next-steps li::before { content: counter(n); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font: 600 12px/1 var(--font-ui); color: var(--ink-on-amber); background: var(--amber); }
.next-steps li + li::after { content: ""; position: absolute; left: 11px; top: -12px; width: 2px; height: 10px; background: color-mix(in srgb, var(--honey) 45%, transparent); }

/* ---- More bee skins ---- */
[data-bee-skin="gold"] { --bee-body: #F2C14E; --bee-body-2: #A8780A; --bee-stripe: #5A3A00; --bee-stripe-2: #5A3A00; --bee-head: #3D2A00; --bee-pupil: #3D2A00; --bee-cheek: #FFB07A;
  --bee-wing: rgba(255, 245, 210, .6); --bee-tip: #FFE27A; --bee-glow: rgba(255, 215, 0, .45); }
[data-bee-skin="gold"] .bee-art .bee-shine { opacity: .85; }
[data-bee-skin="gold"] .bee-art .bee-abdomen { filter: drop-shadow(0 0 1.5px rgba(255, 220, 120, .9)); }
[data-bee-skin="ghost"] { --bee-body: rgba(250, 252, 255, .92); --bee-body-2: rgba(190, 200, 225, .7); --bee-stripe: rgba(140, 150, 185, .75); --bee-stripe-2: rgba(140, 150, 185, .75);
  --bee-head: #E6EAF5; --bee-pupil: #2B3045; --bee-cheek: #FFC0D0; --bee-wing: rgba(235, 242, 255, .45); --bee-tip: #C9D3F0; --bee-glow: rgba(200, 220, 255, .4); }
[data-bee-skin="ghost"] .bee-art { opacity: .92; }
[data-bee-skin="ghost"] .bee-art .bee-smile, [data-bee-skin="ghost"] .bee-art .bee-happy { stroke: #2B3045; }
[data-bee-skin="ghost"] .bee-art .bee-antenna, [data-bee-skin="ghost"] .bee-art .bee-legs { stroke: #9AA5C6; }

/* ---- Theme switch: the new colours grow out of the card you picked ---- */
html.theme-reveal::view-transition-old(root), html.theme-reveal::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-reveal::view-transition-new(root) { z-index: 2; }
.theme-card { transition: transform .2s var(--ease), border-color .2s, box-shadow .25s; }
.theme-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.theme-card[aria-checked="true"] { box-shadow: 0 0 0 2px var(--honey), var(--shadow-2); }
.theme-card svg polygon { transition: transform .35s cubic-bezier(.3,1.5,.5,1); transform-box: fill-box; transform-origin: center; }
.theme-card:hover svg polygon:nth-child(3n+2) { transform: scale(1.12) rotate(30deg); }
@media (prefers-reduced-motion: reduce) { .theme-card, .theme-card svg polygon { transition: none !important; } }

/* ---- Real bee species (free) ---- */
[data-bee-skin="carpenter"] { --bee-body: #23232C; --bee-body-2: #050507; --bee-stripe: #34344A; --bee-stripe-2: #34344A; --bee-head: #121217; --bee-pupil: #050507; --bee-cheek: #FF8A6B;
  --bee-wing: rgba(140, 100, 230, .55); --bee-wing-edge: rgba(200, 180, 255, .9); --bee-tip: #121217; }
[data-bee-skin="carpenter"] .bee-art .bee-shine { opacity: .75; }
[data-bee-skin="orchid"] { --bee-body: #1FB86A; --bee-body-2: #0B7340; --bee-stripe: #0B5E34; --bee-stripe-2: #0B5E34; --bee-head: #0E5C3A; --bee-pupil: #072A1A; --bee-cheek: #FFB0A0;
  --bee-wing: rgba(220, 255, 235, .55); --bee-tip: #0E5C3A; }
[data-bee-skin="orchid"] .bee-art .bee-shine, [data-bee-skin="mason"] .bee-art .bee-shine { opacity: .8; }
[data-bee-skin="orchid"] .bee-art .bee-abdomen, [data-bee-skin="mason"] .bee-art .bee-abdomen { filter: saturate(1.2) drop-shadow(0 0 1px rgba(255, 255, 255, .5)); }
[data-bee-skin="mason"] { --bee-body: #4466D6; --bee-body-2: #22398F; --bee-stripe: #1C2A66; --bee-stripe-2: #1C2A66; --bee-head: #1A2558; --bee-pupil: #0B1230; --bee-cheek: #FF9DB0;
  --bee-wing: rgba(220, 230, 255, .55); --bee-tip: #1A2558; }
[data-bee-skin="mining"] { --bee-body: #D9642B; --bee-body-2: #A3401A; --bee-stripe: #B9501E; --bee-stripe-2: #B9501E; --bee-head: #2B1A12; --bee-pupil: #2B1A12; --bee-fuzz: #EC8550; --bee-cheek: #FFC09A;
  --bee-wing: rgba(255, 240, 225, .55); --bee-tip: #2B1A12; }
[data-bee-skin="queen"] .bee-art .bee-glow { fill: rgba(255, 216, 77, .4); }

/* ---- Plans in the skin picker, custom bee and theme builders ---- */
.skin-group { margin: 14px 0 8px; font: 600 12px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.skin-picker legend { display: flex; align-items: center; gap: 8px; }
.plan-pill { font: 700 10.5px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: color-mix(in srgb, var(--text-1) 8%, transparent); color: var(--text-2); }
.plan-pill.pro { background: linear-gradient(120deg, #7C5CFF, #FF6FB5); color: #fff; }
.plan-pill.owner { background: linear-gradient(120deg, #FFD84D, #F59E0B 60%, #B45309); color: #1A1204; box-shadow: 0 0 12px rgba(255, 200, 60, .45); }
.skin-card.locked { cursor: not-allowed; }
.skin-card.locked .skin-bee { filter: grayscale(.85) opacity(.55); }
.skin-card.locked:hover { transform: none; }
.skin-lock { position: absolute; top: 6px; right: 6px; font: 700 9.5px/1 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; padding: 4px 6px; border-radius: 999px; color: #fff; background: linear-gradient(120deg, #7C5CFF, #FF6FB5); }
.skin-lock.owner { color: #1A1204; background: linear-gradient(120deg, #FFD84D, #F59E0B); }
.custom-bee, .custom-theme { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--honey) 45%, var(--hairline)); background: color-mix(in srgb, var(--honey) 5%, transparent); }
.custom-theme { margin: 12px 0 4px; } .custom-theme p { flex-basis: 100%; margin: 0; font-size: 13px; }
.custom-theme.locked { border-style: solid; opacity: .8; display: block; }
.color-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.color-field input[type=color] { width: 34px; height: 34px; padding: 0; border: 2px solid var(--hairline); border-radius: 50%; background: none; cursor: pointer; overflow: hidden; }
.color-field input[type=color]::-webkit-color-swatch-wrapper { padding: 0; } .color-field input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.color-field input[type=color]:focus-visible { outline: 3px solid color-mix(in srgb, var(--honey) 75%, transparent); outline-offset: 2px; }
.input.mini { height: 30px; padding: 0 8px; font-size: 12.5px; width: auto; border-radius: 8px; }
.plan-cell .give { display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; }
.admin-table td { vertical-align: middle; }
.admin-sub { font: 600 13px/1 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 8px; }
.route-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.route-list li { display: grid; grid-template-columns: minmax(160px, 1.2fr) 120px 1fr; align-items: center; gap: 10px; font-size: 13px; }
.route-list li.good .mini-bar span { background: var(--pass); } .route-list li.meh .mini-bar span { background: var(--warn); } .route-list li.bad .mini-bar span { background: var(--fail); }

/* ---- Honey jar: the bee's home in the menu ---- */
.rail-home { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.jar-wrap { position: relative; }
.honey-jar { position: relative; display: grid; place-items: center; width: 52px; height: 56px; border: 0; background: transparent; cursor: pointer; border-radius: 14px; transition: transform .2s cubic-bezier(.3,1.6,.5,1), background .15s; }
.honey-jar:hover { transform: translateY(-2px) rotate(-4deg); background: color-mix(in srgb, var(--honey) 10%, transparent); }
.honey-jar:focus-visible { outline: 3px solid color-mix(in srgb, var(--honey) 75%, transparent); outline-offset: 2px; }
.honey-jar .jar-honey { fill: var(--honey); transition: y .8s cubic-bezier(.2,.9,.3,1.2); }
.honey-jar .jar-glass { fill: color-mix(in srgb, var(--text-1) 6%, transparent); stroke: color-mix(in srgb, var(--text-1) 45%, transparent); stroke-width: 1.6; }
.honey-jar .jar-lid { fill: var(--honey-deep); }
.honey-jar .jar-shine { stroke: rgba(255, 255, 255, .55); stroke-width: 2; stroke-linecap: round; fill: none; }
.jar-count { position: absolute; right: 2px; bottom: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font: 700 11px/18px var(--font-ui); color: var(--ink-on-amber); background: var(--amber); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.honey-jar.drip { animation: jar-wobble .7s cubic-bezier(.3,1.6,.5,1); }
.honey-jar.drip .jar-count { animation: pop-in .5s cubic-bezier(.3,1.8,.5,1); }
@keyframes jar-wobble { 0% { transform: rotate(0); } 25% { transform: rotate(-9deg) scale(1.06); } 55% { transform: rotate(6deg); } 100% { transform: rotate(0); } }
@keyframes pop-in { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.jar-pop { position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 40; width: 260px; padding: 14px; border-radius: 16px; background: var(--bg-1); border: 1px solid var(--hairline); box-shadow: var(--shadow-3); animation: card-in .25s cubic-bezier(.2,.9,.3,1.1) both; }
.jar-title { margin: 0 0 8px; font: 600 15px/1.3 var(--font-display); }
.jar-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 13px; }
.jar-stats li { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; background: color-mix(in srgb, var(--text-1) 4%, transparent); }
.jar-stats .icon { color: var(--amber-text); }
.jar-streak { margin: 10px 0; font-size: 13px; color: var(--text-2); }
.jar-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.jar-name { display: grid; gap: 4px; margin-top: 10px; font-size: 12.5px; } .jar-name .input { height: 34px; }
/* the bee's moods */
.bee[data-mood="worried"] .bee-smile { transform: scaleY(-1) translateY(-2px); transform-box: fill-box; transform-origin: center; }
.bee[data-mood="worried"] .bee-antenna { animation: antenna-twitch .8s ease-in-out infinite; transform-box: view-box; transform-origin: 20px 28px; }
@media (prefers-reduced-motion: reduce) { .honey-jar, .honey-jar.drip, .jar-count, .jar-pop, .honey-jar .jar-honey { animation: none !important; transition: none !important; } }
.google-btn { width: 100%; justify-content: center; gap: 10px; background: #fff; color: #1F1F1F; border: 1px solid #DADCE0; font-weight: 500; margin: 6px 0 4px; }
.google-btn:hover { background: #F8F9FA; border-color: #C6C9CE; color: #1F1F1F; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; color: var(--text-3); font-size: 12.5px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }

/* ======================= Living backdrop and spotlight ======================= */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(70px); opacity: .16; will-change: transform; }
:root[data-scheme="light"] .aurora i { opacity: .28; }
.aurora .a1 { background: var(--honey); top: -18vmax; left: 8vw; animation: drift1 34s ease-in-out infinite alternate; }
.aurora .a2 { background: color-mix(in srgb, var(--honey) 35%, #FF6FB5); bottom: -22vmax; right: -6vw; animation: drift2 41s ease-in-out infinite alternate; }
.aurora .a3 { background: color-mix(in srgb, var(--honey) 25%, #38BDF8); top: 30vh; left: 45vw; width: 30vmax; height: 30vmax; opacity: .1; animation: drift3 47s ease-in-out infinite alternate; }
:root[data-scheme="light"] .aurora .a3 { opacity: .18; }
@keyframes drift1 { to { transform: translate(18vw, 10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-22vw, -14vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(-30vw, 18vh) scale(1.2); } }
:root[data-pattern="off"] .aurora { display: none; }
.shell { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none !important; } }
:root[data-reduce-motion="true"] .aurora i { animation: none !important; }

/* a soft light that follows the pointer across cards */
:is(.studio-card, .how-steps li, .cast-row, .goal, .provider, .theme-card, .skin-card, .example, .card.plan, .hero) { background-image: radial-gradient(260px circle at var(--mx, -400px) var(--my, -400px), color-mix(in srgb, var(--honey) 10%, transparent), transparent 70%); }
.hero { background-image: radial-gradient(420px circle at var(--mx, -600px) var(--my, -600px), color-mix(in srgb, var(--honey) 12%, transparent), transparent 70%),
  radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--honey) 18%, transparent), transparent 55%), radial-gradient(90% 120% at 100% 100%, color-mix(in srgb, #FF6FB5 10%, transparent), transparent 60%); }
/* richer accents */
.studio-icon { background: linear-gradient(150deg, var(--honey-glow), var(--honey) 50%, color-mix(in srgb, var(--honey-deep) 80%, #FF6FB5)); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--honey) 70%, transparent); }
.rail nav a[aria-current="page"] { background: linear-gradient(90deg, color-mix(in srgb, var(--honey) 22%, var(--bg-1)), color-mix(in srgb, var(--honey) 6%, var(--bg-1))); }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--amber) 88%, #fff), var(--amber)); }

/* =================== Every device: phone tab bar, top-layer panels, one clear input on Home =================== */
/* Home has its own "ask" box: no second composer and no side drawer there. */
:root[data-screen="home"] .command, :root[data-screen="home"] .drawer, :root[data-screen="home"] #drawer-toggle { display: none !important; }
@media (min-width: 961px) { :root[data-screen="home"] .shell { grid-template-columns: 232px 1fr; } }

/* Honey jar panel: browser top layer (popover), placed next to the jar by script and kept on screen. */
.jar-pop { position: fixed; inset: auto; margin: 0; left: 16px; top: 16px; width: 280px; max-width: calc(100vw - 24px); color: var(--text-1); overflow: visible; }
.jar-pop:not(:popover-open)[popover] { display: none; }
.jar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jar-head .jar-title { margin: 0; }
.jar-close { width: 32px; height: 32px; border-radius: 10px; }
.jar-meter { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--text-1) 8%, transparent); overflow: hidden; margin: 10px 0 2px; }
.jar-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--honey-deep, #D98E04), var(--honey)); transition: width .6s cubic-bezier(.2,.9,.3,1.1); }
.jar-pop::backdrop { background: transparent; }

/* Google's own sign-in button: hidden until it has drawn, centred in the card. */
.google-slot { display: flex; justify-content: center; min-height: 44px; margin: 4px 0 2px; }
.google-slot:not(.ready) { visibility: hidden; }
.signin-card .or-line[hidden] { display: none; }

/* Tab bar and More sheet exist only on phones and tablets. */
.tabbar { display: none; }
dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 86vh; border: 1px solid var(--hairline); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); background: var(--bg-1); color: var(--text-1); box-shadow: 0 -24px 60px -20px rgba(0,0,0,.6); animation: sheet-up .28s cubic-bezier(.2,.9,.3,1.05) both; }
dialog.sheet::backdrop { background: rgba(8, 6, 3, .55); backdrop-filter: blur(3px); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--text-1) 22%, transparent); margin: 2px auto 12px; }
.sheet nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sheet .nav-group + .nav-group { margin-top: 14px; }
.sheet .nav-label { padding: 0 4px; margin-bottom: 6px; }
.sheet nav a { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; border-radius: 14px; background: var(--bg-2); color: var(--text-1); text-decoration: none; font-weight: 600; border: 1px solid transparent; }
.sheet nav a .icon { color: var(--amber-text); flex: none; }
.sheet nav a[aria-current="page"] { border-color: color-mix(in srgb, var(--honey) 55%, transparent); background: color-mix(in srgb, var(--honey) 14%, var(--bg-2)); }
.sheet-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 16px 4px 4px; }
.sheet-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--amber-text); font-weight: 600; text-decoration: none; }
.sheet-legal { margin: 8px 4px 0; font-size: 13px; }

@media (max-width: 960px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    background: color-mix(in srgb, var(--bg-1) 90%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-top: 1px solid var(--hairline); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 54px; padding: 6px 2px; border: 0; border-radius: 14px; background: none; color: var(--text-2); font: inherit; font-size: 11.5px; font-weight: 600; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color .15s, background .15s; }
  .tabbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabbar .icon { transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
  .tabbar [aria-current="page"], .tabbar .is-here { color: var(--amber-text); background: color-mix(in srgb, var(--honey) 15%, transparent); }
  .tabbar [aria-current="page"] .icon { transform: translateY(-1px) scale(1.08); }
  .tabbar a:active .icon, .tabbar button:active .icon { transform: scale(.9); }
  .tabbar :focus-visible { outline: 3px solid var(--focus-color); outline-offset: -3px; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  /* the top bar keeps only the wordmark, the honey jar and the page button; places live in the tab bar */
  .rail { position: sticky; top: 0; z-index: 30; align-items: center; gap: var(--space-3); padding-top: max(var(--space-2), env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg-1) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: visible; }
  .rail nav { display: none; }
  .rail .rail-extra { display: flex !important; margin: 0 0 0 auto; padding: 0; }
  .rail .rail-extra > :not(.rail-home), .rail .rail-home .meadow { display: none; }
  .rail .honey-jar { width: 44px; height: 44px; }
  .command { bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 20; }
  .drawer { z-index: 40; padding-bottom: calc(var(--space-5) + env(safe-area-inset-bottom)); }
  .drawer-toggle { top: max(8px, env(safe-area-inset-top)) !important; }
  .canvas-main { padding: var(--space-4) max(var(--space-4), env(safe-area-inset-right)) var(--space-6) max(var(--space-4), env(safe-area-inset-left)); }
  .set-row { flex-wrap: wrap; }
  .set-row > label { flex: 1 1 220px; }
  .set-row > div { max-width: 100%; }
  .set-row select { max-width: 100%; }
}
@media (max-width: 600px) {
  .jar-pop { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-width: none; border-radius: 22px 22px 0 0; padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); }
  .jar-pop::backdrop { background: rgba(8, 6, 3, .45); }
  .jar-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
  .hero-quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--space-3)); padding-inline: var(--space-3); }
  .hero-quick::-webkit-scrollbar { display: none; }
  .quick-chip { flex: none; }
}
/* touch screens: comfortable targets everywhere */
@media (pointer: coarse) {
  .btn, .quick-chip, .select-chip, .icon-btn { min-height: 44px; }
  .icon-btn { min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) { dialog.sheet, .tabbar .icon, .jar-meter span { animation: none !important; transition: none !important; } }
/* the hidden preview panel waits just off the edge: clip it so it never widens the page */
.studio { overflow-x: clip; }
@media (max-width: 960px) {
  .shell { height: auto; min-height: 100dvh; }
  .composer-bar .select-chip { flex: 0 1 auto; min-width: 0; }
  .command .composer-bar { gap: 6px 8px; }
}
@media (max-width: 600px) {
  .command .composer-bar .select-chip { flex: 1 1 40%; }
  .command .composer-bar .select-chip select { width: 100%; min-width: 0; text-overflow: ellipsis; }
  .command { padding: var(--space-2) var(--space-3) var(--space-2); }
}
/* Hive on phones and tablets works like a messaging app: the conversation scrolls, the box stays above the tab bar */
@media (max-width: 960px) {
  :root[data-screen="hive"] body { height: 100dvh; overflow: hidden; }
  :root[data-screen="hive"] .shell { height: calc(100dvh - 68px - env(safe-area-inset-bottom)); min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
  :root[data-screen="hive"] .canvas { height: auto; min-height: 0; }
  :root[data-screen="hive"] .canvas-main { overflow: hidden; height: 100%; padding: 0; }
  :root[data-screen="hive"] .studio { height: 100%; }
}
.install-slot { display: flex; justify-content: flex-end; align-items: center; max-width: 340px; text-align: right; }
.install-how { font-size: 13px; }
@media (max-width: 960px) { .install-slot { justify-content: flex-start; text-align: left; max-width: none; } }
/* Apps and Admin: one column that can shrink, so long /commands and plugin cards never push past a phone screen */
.apps, .admin { grid-template-columns: minmax(0, 1fr); }
.apps > *, .admin > * { min-width: 0; }
.apps p, .admin p, .plugin p { overflow-wrap: anywhere; }
@media (max-width: 600px) { .plugin-grid { grid-template-columns: minmax(0, 1fr); } }
.seo-intro { max-width: 760px; display: grid; gap: 10px; }
.seo-intro ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--text-2); }

/* =================== Discover: spark of the day, your bee type, name story =================== */
:root[data-screen="discover"] .command, :root[data-screen="discover"] .drawer, :root[data-screen="discover"] #drawer-toggle { display: none !important; }
@media (min-width: 961px) { :root[data-screen="discover"] .shell { grid-template-columns: 232px 1fr; } }
.lead { font-size: 1.08em; line-height: 1.55; margin: 0; }
.discover-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-top: var(--space-5); max-width: 1180px; }
.disc-card { position: relative; display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: 22px; border: 1px solid var(--hairline); background: linear-gradient(160deg, color-mix(in srgb, var(--honey) 9%, var(--bg-1)), var(--bg-1) 55%); box-shadow: var(--shadow-2, 0 10px 30px -18px rgba(0,0,0,.5)); overflow: hidden; animation: card-in .45s cubic-bezier(.2,.9,.3,1.1) both; }
.disc-card:nth-child(2) { animation-delay: .06s; } .disc-card:nth-child(3) { animation-delay: .12s; }
.disc-card h2 { margin: 0; font-size: 1.45rem; line-height: 1.25; }
.disc-card p { margin: 0; }
.disc-card .chips { margin-top: 6px; }
.disc-card .input { flex: 1 1 180px; width: auto; }
.disc-card.spark::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--honey) 35%, transparent), transparent 70%); pointer-events: none; }
.disc-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-text); }
.bt-row { display: flex; gap: 16px; align-items: center; }
.bt-bee { display: inline-grid; place-items: center; flex: none; width: 88px; height: 88px; border-radius: 26px; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--honey) 22%, transparent), transparent 70%); animation: bee-bob 3.2s ease-in-out infinite; }
.bt-bee.big { width: 150px; height: 150px; border-radius: 40px; }
@keyframes bee-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }

/* the test: one statement at a time */
.bt-test { max-width: 680px; margin: 0 auto; display: grid; gap: 14px; }
.bt-top { display: flex; justify-content: space-between; align-items: center; }
.bt-progress { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--text-1) 9%, transparent); overflow: hidden; }
.bt-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--honey-deep, #D98E04), var(--honey)); transition: width .35s cubic-bezier(.2,.9,.3,1.1); }
.bt-lead { margin: 10px 0 0; }
.bt-q { font-size: clamp(1.6rem, 4.6vw, 2.3rem); line-height: 1.2; margin: 0 0 8px; animation: card-in .3s cubic-bezier(.2,.9,.3,1.1) both; }
.bt-scale { display: grid; gap: 10px; }
.bt-opt { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 14px; min-height: 56px; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--hairline); background: var(--bg-1); color: var(--text-1); font: inherit; font-weight: 600; text-align: left; cursor: pointer; transition: transform .12s, border-color .15s, background .15s; }
.bt-opt:hover { border-color: color-mix(in srgb, var(--honey) 60%, transparent); background: color-mix(in srgb, var(--honey) 8%, var(--bg-1)); transform: translateX(3px); }
.bt-opt:active { transform: scale(.98); }
.bt-opt.on { border-color: var(--honey); background: color-mix(in srgb, var(--honey) 16%, var(--bg-1)); }
.bt-opt kbd { font: 600 12px var(--font-mono); color: var(--text-3); border: 1px solid var(--hairline); border-radius: 6px; padding: 2px 6px; }
.bt-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--honey); background: color-mix(in srgb, var(--honey) calc(var(--k) * 25%), transparent); }
.bt-back { justify-self: start; }
@media (pointer: coarse) { .bt-opt kbd { display: none; } }

/* the result */
.bt-result { max-width: 760px; display: grid; gap: 18px; }
.bt-result > .btn { justify-self: start; }
.bt-hero { display: flex; gap: 22px; align-items: center; padding: 22px; border-radius: 26px; border: 1px solid color-mix(in srgb, var(--honey) 35%, var(--hairline)); background: linear-gradient(140deg, color-mix(in srgb, var(--honey) 14%, var(--bg-1)), var(--bg-1)); }
.bt-hero h1 { margin: 2px 0 6px; font-size: clamp(2rem, 6vw, 3rem); }
.bt-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bt-bars li { display: grid; grid-template-columns: minmax(120px, 170px) 1fr 40px 64px; gap: 12px; align-items: center; }
.bt-trait { font-weight: 600; }
.bt-bar { height: 14px; border-radius: 99px; background: color-mix(in srgb, var(--text-1) 9%, transparent); overflow: hidden; }
.bt-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--honey-deep, #D98E04), var(--honey)); animation: bar-grow .9s cubic-bezier(.2,.9,.3,1.05) both; transform-origin: left; }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bt-val { font: 600 15px var(--font-mono); text-align: right; }
.bt-notes { display: grid; gap: 8px; padding: 16px 18px; border-radius: 18px; background: var(--bg-1); border: 1px solid var(--hairline); }
.bt-notes p { margin: 0; }
.bt-fine { font-size: 12.5px; }
@media (max-width: 600px) {
  .bt-hero { flex-direction: column; text-align: center; }
  .bt-bars li { grid-template-columns: 1fr 40px; } .bt-bar { grid-column: 1 / -1; grid-row: 2; } .bt-lvl { display: none; }
}

/* Home: a promo for the bee test */
.promo-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 18px; margin: var(--space-4) 0; border-radius: 20px; text-decoration: none; color: var(--text-1); border: 1px solid color-mix(in srgb, var(--honey) 40%, var(--hairline)); background: linear-gradient(110deg, color-mix(in srgb, var(--honey) 16%, var(--bg-1)), var(--bg-1) 70%); transition: transform .2s cubic-bezier(.3,1.5,.5,1), box-shadow .2s; }
.promo-card:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -22px color-mix(in srgb, var(--honey) 70%, transparent); }
.promo-text { display: grid; gap: 2px; }
.promo-bee { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: color-mix(in srgb, var(--honey) 14%, transparent); }
@media (prefers-reduced-motion: reduce) { .bt-bee, .bt-bar i, .bt-q, .disc-card, .bt-progress span { animation: none !important; transition: none !important; } }
:root[data-reduce-motion="true"] .bt-bee, :root[data-reduce-motion="true"] .bt-bar i { animation: none !important; }
/* Puter: premium models on the person's own account */
.puter-card { display: grid; gap: 10px; padding: 16px; margin: 10px 0 14px; border-radius: 18px; border: 1px solid color-mix(in srgb, #3b82f6 45%, var(--hairline)); background: linear-gradient(135deg, color-mix(in srgb, #3b82f6 12%, var(--bg-1)), var(--bg-1) 60%); }
.puter-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; }
.puter-head p { margin: 4px 0 0; font-size: 13px; }
.puter-card .provider-mark { background: color-mix(in srgb, var(--hue) 22%, transparent); color: #93c5fd; }
.puter-card select { flex: 1 1 200px; width: auto; max-width: 100%; }
.switch-row { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
@media (max-width: 600px) { .puter-head { grid-template-columns: auto 1fr; } .puter-head .provider-state { grid-column: 1 / -1; justify-self: start; } }

/* ---------- Stage 28: Your AI team, the Council, Download, Pro ---------- */
.team-list { list-style: none; margin: var(--space-4) 0; padding: 0; display: grid; gap: 10px; counter-reset: team; }
.team-member { display: grid; grid-template-columns: auto auto 1fr auto; grid-template-areas: "rank mark name tools" ". . result result"; align-items: center; gap: 4px 12px; padding: 12px 14px; border-radius: var(--radius-m); border: 1px solid var(--hairline); background: linear-gradient(100deg, color-mix(in srgb, var(--hue) 10%, var(--bg-1)), var(--bg-1) 45%); transition: opacity var(--motion-fast) var(--ease), transform var(--motion-fast) var(--ease); }
.team-member.off { opacity: .55; }
.team-member:hover { transform: translateY(-1px); }
.team-member .provider-mark { grid-area: mark; width: 34px; height: 38px; font-size: 12px; }
.team-rank { grid-area: rank; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--font-ui); background: var(--bg-2); color: var(--text-2); }
.team-name { grid-area: name; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.team-name .faint { overflow-wrap: anywhere; font-size: .86em; }
.team-tools { grid-area: tools; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.team-result { grid-area: result; font-size: .86em; }
.team-result.ok { color: var(--pass); } .team-result.bad { color: var(--warn); }
.pill.paid { background: color-mix(in srgb, var(--honey) 22%, transparent); color: var(--amber-text); }
.team-empty { display: grid; gap: 4px; padding: 18px; margin: var(--space-4) 0; border: 1px dashed var(--hairline); border-radius: var(--radius-m); text-align: center; }
.team-add { border: 1px solid var(--hairline); border-radius: var(--radius-m); background: var(--bg-1); margin-bottom: var(--space-4); }
.team-add > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 650; }
.team-add > summary::-webkit-details-marker { display: none; }
.team-plus { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--honey); color: var(--ink-on-amber); font-weight: 800; transition: transform var(--motion-fast) var(--ease); }
.team-add[open] .team-plus { transform: rotate(45deg); }
.team-form { display: grid; gap: 10px; padding: 0 16px 16px; max-width: 640px; }
.team-form .field { margin: 0; }
.team-form [hidden] { display: none !important; }
.team-help { margin: -4px 0 0; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: .92em; }
.check-row input { margin-top: 3px; accent-color: var(--honey); }

.council-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; padding: 18px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--honey) 35%, var(--hairline)); background: radial-gradient(120% 140% at 0 0, color-mix(in srgb, var(--honey) 14%, var(--bg-1)), var(--bg-1) 60%); }
.council-text p { margin: 4px 0 10px; }
.council-art { position: relative; width: 74px; height: 74px; }
.council-art i, .council-art b { position: absolute; width: 26px; height: 30px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(150deg, #FFD36A, var(--honey)); animation: council-orbit 5.5s linear infinite; }
.council-art i:nth-child(2) { animation-delay: -1.83s; background: linear-gradient(150deg, #8FB8FF, #4C8DF6); }
.council-art i:nth-child(3) { animation-delay: -3.66s; background: linear-gradient(150deg, #F2A68B, #D97757); }
.council-art b { left: 24px; top: 22px; width: 26px; height: 30px; background: linear-gradient(150deg, #fff, var(--honey)); animation: honey-pulse 2.4s ease-in-out infinite; box-shadow: 0 0 18px var(--honey-glow); }
@keyframes council-orbit { from { transform: rotate(0deg) translateX(26px) rotate(0deg) translate(24px, 22px); } to { transform: rotate(360deg) translateX(26px) rotate(-360deg) translate(24px, 22px); } }
@keyframes honey-pulse { 50% { transform: scale(1.12); } }
.seg { display: inline-flex; border: 1px solid var(--hairline); border-radius: 999px; padding: 2px; background: var(--bg-2); }
.seg button { border: 0; background: none; color: var(--text-2); min-width: 34px; height: 28px; border-radius: 999px; font: 650 13px/1 var(--font-ui); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--honey); color: var(--ink-on-amber); }

.council-btn.on { background: color-mix(in srgb, var(--honey) 22%, transparent); color: var(--amber-text); border-color: color-mix(in srgb, var(--honey) 55%, transparent); }
.mode-pill.council { background: linear-gradient(90deg, #FFD36A, var(--honey)); color: var(--ink-on-amber); }
.council-live { margin: 6px 0 10px; padding: 12px 14px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--honey) 35%, var(--hairline)); background: color-mix(in srgb, var(--honey) 7%, var(--bg-1)); }
.council-head { display: flex; align-items: center; gap: 10px; }
.council-dots { display: inline-flex; gap: 3px; }
.council-dots i { width: 9px; height: 10px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--honey); }
.council-dots.spin i { animation: council-bob 1s ease-in-out infinite; }
.council-dots.spin i:nth-child(2) { animation-delay: .15s; } .council-dots.spin i:nth-child(3) { animation-delay: .3s; }
@keyframes council-bob { 50% { transform: translateY(-4px); opacity: .6; } }
.council-live.merging .council-head strong { background: linear-gradient(90deg, var(--text-1), var(--honey), var(--text-1)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.council-members { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.council-members li { display: grid; grid-template-columns: auto auto 1fr auto; gap: 8px; align-items: baseline; font-size: .92em; }
.cm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--honey); align-self: center; animation: council-bob 1.2s ease-in-out infinite; }
.council-members li.done .cm-dot { background: var(--pass); animation: none; }
.council-members li.failed .cm-dot { background: var(--warn); animation: none; }
.council-members li.failed { opacity: .7; }
.cm-state { color: var(--text-2); font-variant-numeric: tabular-nums; }
.council-members li.done .cm-state { color: var(--pass); }
.council-drafts { margin-top: 8px; }
.council-drafts > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .9em; }
.council-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: 10px; }
.council-draft { border: 1px solid var(--hairline); border-radius: 14px; padding: 12px; background: var(--bg-1); max-height: 360px; overflow: auto; font-size: .92em; }
.council-draft header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; position: sticky; top: -12px; background: var(--bg-1); padding-top: 2px; }
.council-draft.failed { opacity: .6; }

.download, .pro { max-width: 1180px; display: grid; gap: var(--space-6); }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .14em; font: 700 12px/1 var(--font-ui); color: var(--amber-text); }
.lead { font-size: 1.12rem; color: var(--text-2); max-width: 60ch; margin: 0; }
.dl-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-6); align-items: center; padding: clamp(20px, 4vw, 44px); border-radius: 28px; border: 1px solid var(--hairline); background: radial-gradient(140% 120% at 100% 0, color-mix(in srgb, var(--honey) 22%, var(--bg-1)), var(--bg-1) 58%); overflow: hidden; }
.dl-hero-text { display: grid; gap: 14px; }
.dl-hero h1 { margin: 0; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.08; }
.dl-this { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.btn.large { min-height: 50px; padding: 0 22px; font-size: 1.02rem; border-radius: 14px; }
.dl-devices { position: relative; height: 230px; }
.dl-laptop { position: absolute; left: 0; top: 18px; width: 82%; aspect-ratio: 16/10; border-radius: 14px 14px 6px 6px; padding: 9px; background: linear-gradient(160deg, #3a3326, #17140f); box-shadow: 0 30px 50px -28px rgba(0,0,0,.7); }
.dl-laptop::after { content: ""; position: absolute; left: -6%; right: -6%; bottom: -12px; height: 12px; border-radius: 0 0 14px 14px; background: linear-gradient(#2b261d, #0f0d0a); }
.dl-phone { position: absolute; right: 2%; top: 64px; width: 26%; aspect-ratio: 9/19; border-radius: 22px; padding: 7px; background: linear-gradient(160deg, #3a3326, #17140f); box-shadow: 0 26px 40px -22px rgba(0,0,0,.75); animation: float-y 5s ease-in-out infinite; }
.dl-screen { width: 100%; height: 100%; border-radius: 8px; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--honey) 40%, #1b160d), #120f0a 70%); }
.dl-phone .dl-screen { border-radius: 16px; }
@keyframes float-y { 50% { transform: translateY(-8px); } }
.dl-card { display: grid; gap: 12px; align-content: start; padding: 20px; border-radius: 20px; border: 1px solid var(--hairline); background: var(--bg-1); transition: transform var(--motion-fast) var(--ease), box-shadow var(--motion-fast) var(--ease); }
.dl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.dl-card.featured { border-color: color-mix(in srgb, var(--honey) 50%, var(--hairline)); background: linear-gradient(150deg, color-mix(in srgb, var(--honey) 10%, var(--bg-1)), var(--bg-1) 60%); max-width: 640px; }
.dl-card header { display: flex; gap: 12px; align-items: center; }
.dl-card h3 { margin: 0; }
.dl-glyph { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--bg-2); }
.dl-steps { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--text-2); }
.dl-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin-top: var(--space-3); }
.dl-phone-qr { display: flex; gap: var(--space-5); align-items: center; flex-wrap: wrap; }
.dl-qr { border-radius: 14px; background: #fff; padding: 8px; box-shadow: var(--shadow-1); }
.dl-why { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.dl-why-item { display: grid; gap: 4px; padding: 16px; border-left: 3px solid var(--honey); background: var(--bg-1); border-radius: 0 12px 12px 0; }

.pro-hero { position: relative; display: grid; gap: 14px; justify-items: center; text-align: center; padding: clamp(28px, 5vw, 56px) 20px; border-radius: 28px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--honey) 40%, var(--hairline));
  background: radial-gradient(90% 120% at 50% 0, color-mix(in srgb, var(--honey) 30%, var(--bg-1)), var(--bg-1) 62%); }
.pro-hero::before { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, color-mix(in srgb, var(--honey) 16%, transparent), transparent 30%); animation: spin-slow 14s linear infinite; pointer-events: none; }
.pro-hero > * { position: relative; }
.pro-hero h1 { margin: 0; font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.06; }
.pro-hero .lead { text-align: center; }
.pro-bee { animation: float-y 4s ease-in-out infinite; filter: drop-shadow(0 10px 18px var(--honey-glow)); }
.pro-price { margin: 4px 0; font-size: 1.15rem; }
.pro-price strong { font: 700 2rem/1 var(--font-display); }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.pill.pro { background: linear-gradient(90deg, #FFD36A, var(--honey)); color: var(--ink-on-amber); }
.pro-table-card { padding: 0; overflow: auto; }
.pro-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.pro-table th, .pro-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.pro-table thead th { font: 700 .82rem/1 var(--font-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); }
.pro-table tbody th { font-weight: 600; }
.pro-table .pro-col { background: color-mix(in srgb, var(--honey) 8%, transparent); color: var(--text-1); }
.pro-table thead .pro-col { color: var(--amber-text); }
.pro-faq { display: grid; gap: 8px; max-width: 760px; }
.faq { border: 1px solid var(--hairline); border-radius: 14px; padding: 12px 16px; background: var(--bg-1); }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { margin: 8px 0 0; }

@media (max-width: 760px) {
  .dl-hero { grid-template-columns: 1fr; }
  .dl-hero-art { display: none; }
  .team-member { grid-template-columns: auto 1fr; grid-template-areas: "mark name" "tools tools" "result result"; }
  .team-rank { display: none; }
  .team-tools { justify-content: flex-start; }
  .council-card { grid-template-columns: 1fr; }
  .council-art { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .council-art i, .council-art b, .council-dots.spin i, .cm-dot, .dl-phone, .pro-bee, .pro-hero::before, .council-live.merging .council-head strong { animation: none; }
}
:root[data-screen="download"] .command, :root[data-screen="download"] .drawer, :root[data-screen="download"] #drawer-toggle,
:root[data-screen="pro"] .command, :root[data-screen="pro"] .drawer, :root[data-screen="pro"] #drawer-toggle { display: none !important; }
@media (min-width: 961px) { :root[data-screen="download"] .shell, :root[data-screen="pro"] .shell { grid-template-columns: 232px 1fr; } }
.dl-this .install-slot { display: flex; }
.dl-this .install-how { text-align: left; max-width: 46ch; }
@media (max-width: 600px) {
  .pro-table { min-width: 0; font-size: .9rem; }
  .pro-table th, .pro-table td { padding: 10px 10px; }
}

/* Edit cards: a small change to a big file (Stage 29) */
.edit-card { border: 1px solid var(--hairline); border-radius: 14px; background: var(--bg-1); padding: 8px 12px; animation: card-in .35s cubic-bezier(.2,.9,.3,1.25) both; transition: border-color .2s; }
.edit-card + .edit-card { margin-top: 6px; }
.edit-card:hover { border-color: color-mix(in srgb, var(--honey) 45%, transparent); }
.edit-head { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.edit-ico { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-weight: 700; color: var(--ink-on-amber); background: linear-gradient(160deg, var(--honey), color-mix(in srgb, var(--honey) 65%, #000)); flex: none; }
.edit-name { display: grid; min-width: 0; line-height: 1.25; } .edit-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.edit-name .faint { font-size: 12px; font-variant-numeric: tabular-nums; }
.edit-card.failed { border-color: color-mix(in srgb, #e5484d 55%, var(--hairline)); }
.edit-card.failed .edit-ico { background: #e5484d; color: #fff; }
.edit-diff { margin-top: 8px; display: grid; gap: 4px; }
.edit-diff pre { margin: 0; padding: 8px 10px; border-radius: 8px; font: 12px/1.5 var(--mono, ui-monospace, monospace); white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; }
.edit-diff .del { background: color-mix(in srgb, #e5484d 13%, var(--bg-2)); box-shadow: inset 3px 0 0 #e5484d; text-decoration: line-through; text-decoration-color: color-mix(in srgb, #e5484d 50%, transparent); }
.edit-diff .add { background: color-mix(in srgb, #30a46c 14%, var(--bg-2)); box-shadow: inset 3px 0 0 #30a46c; }

/* Votes and what Hive learned (Stage 29) */
.votes { display: inline-flex; gap: 2px; }
.vote { min-width: 32px; padding-inline: 6px; filter: grayscale(.85); opacity: .7; transition: filter .2s, opacity .2s, transform .2s var(--ease); }
.vote:hover { filter: none; opacity: 1; transform: translateY(-1px); }
.vote.on { filter: none; opacity: 1; background: color-mix(in srgb, var(--honey) 18%, transparent); border-color: color-mix(in srgb, var(--honey) 55%, transparent); animation: vote-pop .35s cubic-bezier(.2,.9,.3,1.4); }
@keyframes vote-pop { 0% { transform: scale(.8); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.learn-card { display: grid; gap: 14px; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.learn-col h3 { font-size: 14px; margin: 0 0 8px; color: var(--text-2); }
.learn-col ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: l; }
.learn-col li { display: grid; grid-template-columns: 1fr 110px; gap: 10px; align-items: center; counter-increment: l; }
.learn-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.learn-name::before { content: counter(l) "."; color: var(--text-3, var(--text-2)); margin-right: 6px; font-variant-numeric: tabular-nums; }
.learn-bar { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.learn-bar i { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--honey) 60%, #000), var(--honey)); transition: width .6s var(--ease); }
.switch-row { display: inline-flex; gap: 10px; align-items: center; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .vote.on { animation: none; } }

/* Your machines (Stage 29) */
.machine-list { display: grid; gap: 14px; }
.machine { border: 1px solid var(--hairline); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; background: linear-gradient(180deg, var(--bg-1), color-mix(in srgb, var(--bg-2) 60%, var(--bg-1))); transition: border-color .25s, box-shadow .25s; }
.machine.on { border-color: color-mix(in srgb, var(--honey) 40%, var(--hairline)); box-shadow: 0 14px 34px -26px color-mix(in srgb, var(--honey) 80%, transparent); }
.m-head { display: flex; align-items: center; gap: 12px; }
.m-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--honey) 18%, var(--bg-2)); color: var(--honey); flex: none; }
.m-title { display: grid; min-width: 0; flex: 1; } .m-title .mono { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.m-live { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; min-height: 22px; }
.m-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3, #777); flex: none; }
.m-dot.ok { background: #30a46c; box-shadow: 0 0 0 0 #30a46c80; animation: m-pulse 2.4s ease-out infinite; }
@keyframes m-pulse { 0% { box-shadow: 0 0 0 0 #30a46c80; } 70% { box-shadow: 0 0 0 7px #30a46c00; } 100% { box-shadow: 0 0 0 0 #30a46c00; } }
.m-loaded { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.m-loaded li { display: grid; grid-template-columns: minmax(120px, 1fr) 140px auto; gap: 10px; align-items: center; font-size: 12.5px; }
.m-meter { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.m-meter i { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, #30a46c, var(--honey) 70%, #e5484d); background-size: 300% 100%; background-position: calc(100% - var(--p)) 0; transition: width .6s var(--ease); }
.m-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.m-label { min-width: 84px; font-size: 13px; color: var(--text-2); }
.m-row select.input { width: auto; min-width: 180px; max-width: 100%; }
.small-select { width: auto !important; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.m-limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.m-field { display: grid; gap: 4px; font-size: 13px; }
.m-cmd summary { cursor: pointer; font-size: 13px; color: var(--text-2); }
.m-cmd pre { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--hairline); font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.m-cmd-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.m-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.machine-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.segmented.small button { padding: 5px 10px; font-size: 12.5px; min-height: 30px; }
@media (max-width: 600px) { .m-loaded li { grid-template-columns: 1fr; gap: 2px; } .m-label { min-width: 100%; } }
@media (prefers-reduced-motion: reduce) { .m-dot.ok { animation: none; } }

/* Stage 29 polish: Puter mark placement, sharper and bigger bee previews */
.puter-head .provider-mark { grid-area: auto; }
.puter-head .provider-state { align-self: start; white-space: nowrap; }
.skin-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.skin-bee { height: 68px; }
.skin-bee svg { width: 64px; height: 64px; shape-rendering: geometricPrecision; filter: drop-shadow(0 3px 4px rgba(0,0,0,.28)); }
.skin-card { padding: 12px 8px 10px; }

/* Video Lab (Stage 29) */
.lab { display: grid; gap: 18px; max-width: 980px; }
.lab-hero .chips { margin-top: 10px; }
.lab-card { display: grid; gap: 12px; }
.lab-head { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.lab-head h2 { margin: 0 0 4px; }
.lab-head p { margin: 0; }
.lab-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--ink-on-amber); background: linear-gradient(150deg, color-mix(in srgb, var(--honey) 80%, #fff), var(--honey)); box-shadow: 0 10px 22px -14px var(--honey); }
.lab-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.lab-row > select.input { width: auto; min-width: 150px; }
.lab-row .m-field input { width: 110px; }
.lab-preview { width: 100%; max-height: 360px; border-radius: 14px; background: #000; }
.lab-video { margin: 0; display: grid; gap: 8px; justify-items: start; }
.lab-video video { width: 100%; max-height: 560px; border-radius: 16px; background: #000; box-shadow: 0 20px 50px -30px #000; animation: card-in .4s cubic-bezier(.2,.9,.3,1.2) both; }
.lab-progress { height: 10px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.lab-progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--honey) 60%, #000), var(--honey)); transition: width .3s var(--ease); }
.cue-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; max-height: 340px; overflow: auto; }
.cue-list li { display: grid; grid-template-columns: 96px 1fr auto; gap: 8px; align-items: center; }
.scene-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.scene { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--hairline); border-radius: 14px; background: var(--bg-1); animation: card-in .35s cubic-bezier(.2,.9,.3,1.2) both; }
.scene-pic { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg-2); display: grid; place-items: center; font: 700 28px/1 var(--font-display, serif); }
.scene-pic img { width: 100%; height: 100%; object-fit: cover; animation: develop .8s ease both; }
@keyframes develop { from { filter: blur(12px) saturate(.3); opacity: .4; } to { filter: none; opacity: 1; } }
.prompter ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }
@media (max-width: 600px) { .cue-list li { grid-template-columns: 1fr auto; } .cue-list li .mono { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .scene, .scene-pic img, .lab-video video { animation: none; } }
/* Video Lab is a full page of its own: no brief bar, no plan drawer */
:root[data-screen="videolab"] .command, :root[data-screen="videolab"] .drawer, :root[data-screen="videolab"] #drawer-toggle { display: none !important; }
@media (min-width: 961px) { :root[data-screen="videolab"] .shell { grid-template-columns: 232px 1fr; } }
.lab-hero .chip { text-decoration: none; }
.lab-card input[type="file"] { padding: 14px; border: 1.5px dashed color-mix(in srgb, var(--honey) 45%, var(--hairline)); border-radius: 14px; background: color-mix(in srgb, var(--honey) 5%, var(--bg-1)); cursor: pointer; transition: border-color .2s, background .2s; }
.lab-card input[type="file"]:hover { border-color: var(--honey); background: color-mix(in srgb, var(--honey) 10%, var(--bg-1)); }
.lab-card input[type="file"]::file-selector-button { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 8px 14px; margin-right: 12px; background: var(--honey); color: var(--ink-on-amber); cursor: pointer; }

/* ===== Stage 30: type and motion layer (one place, last word) ===== */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1); }
html { scroll-behavior: smooth; }
body { font-optical-sizing: auto; font-feature-settings: "cv05" 1, "cv08" 1; text-rendering: optimizeLegibility; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, .page, .display { letter-spacing: -0.012em; text-wrap: balance; }
p, li, .muted { text-wrap: pretty; }
code, pre, kbd, samp, .mono, textarea.code, .code-view, .md pre { font-family: var(--font-mono); font-variant-ligatures: contextual; font-feature-settings: "zero" 1; }
kbd { font-size: .85em; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--hairline); border-bottom-width: 2px; background: var(--bg-2); }
.btn { transition: transform .22s var(--ease-spring), box-shadow .25s var(--ease-out), background-color .2s, border-color .2s, color .2s, opacity .2s; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .btn:hover:not(:disabled):not([aria-disabled="true"]) { transform: translateY(-1px); } }
.btn:active:not(:disabled) { transform: translateY(0) scale(.97); transition-duration: .08s; }
.btn.primary:hover:not(:disabled) { box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 12px 26px -12px var(--honey); }
.btn:disabled, .btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:focus-visible { outline-offset: 2px; }
.icon-btn { transition: transform .2s var(--ease-spring), background-color .2s, color .2s; }
.icon-btn:active { transform: scale(.9); }
input.input, textarea.input, select.input { transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out), background-color .2s; }
input.input:focus-visible, textarea.input:focus-visible, select.input:focus-visible { border-color: color-mix(in srgb, var(--honey) 70%, var(--hairline)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--honey) 28%, transparent); }
svg { shape-rendering: geometricPrecision; }
img { image-rendering: auto; }
.card { transition: border-color .25s var(--ease-out), box-shadow .3s var(--ease-out), transform .3s var(--ease-out); }
.segmented button, .chip, .tab { transition: background-color .2s var(--ease-out), color .2s, box-shadow .2s, transform .2s var(--ease-spring); }
.chip:active, .segmented button:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn:hover, .btn:active, .icon-btn, .chip, .segmented button { transform: none !important; transition: none !important; }
}
