/* AutoFaber · Strata.
   AutoFaber is a geode: many crystals (every mind you can reach) in one stone, growing in layers. The page is a core log: a depth
   rail, a strip coloured by the mind that laid each layer down, and the layer. You write at the surface; what is said settles
   beneath it, newest nearest the top; earlier sessions are the bedrock, under an unconformity.
   Rules: colour means a mind (each family is a mineral, and the page takes the mineral of the mind you are talking to).
   Everything else is stone and ink. No cards, no bubbles, no rounded boxes, no glow: hairline contacts between layers, flat
   cuts, crystals. One typeface, Hive Strata (assets/fonts/hive-strata.py), drawn for AutoFaber and used nowhere else; Azeret Mono
   for code. */
@font-face { font-family: "Hive Strata"; src: url("../fonts/HiveStrata-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Hive Strata"; src: url("../fonts/HiveStrata-Regular.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Hive Strata"; src: url("../fonts/HiveStrata-SemiBold.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Azeret Mono"; src: url("../fonts/AzeretMono-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* basalt */
  --bg: #0d1012; --bed: #12161a; --bed2: #0f1315; --well: #0a0d0f; --ink: #e9ebe5; --ink2: #c3c8c1; --dim: #8b938e; --faint: #7b827e;
  --line: #20272a; --line2: #313a3d; --veil: rgba(9, 11, 13, .74);
  --ok: #84c26b; --warn: #e0b23c; --bad: #ec5f4f;
  /* minerals: one per family of minds */
  --m-copper: #e08a58; --m-malachite: #43b98c; --m-azurite: #6a9ff0; --m-citrine: #e6c24a; --m-jasper: #e86a52; --m-lapis: #8b9cf2;
  --m-rhodo: #e886ad; --m-hematite: #a9b1b9; --m-peridot: #b3d156; --m-selenite: #efe8d2; --m-tiger: #d2a252; --m-flint: #b9c3c9;
  --m: var(--m-flint);
  --gold: #d9ad55; --gold-hi: #f3d68f;
  --ui: "Hive Strata", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --code: "Azeret Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* the core log */
  --rail: 112px; --sw: 5px; --gut: 30px; --bedw: 740px; --notes: 250px; --pad: 28px;
  --crown: 58px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  /* limestone */
  --bg: #e9eae4; --bed: #f2f3ee; --bed2: #e1e3dc; --well: #f8f9f5; --ink: #121618; --ink2: #30373a; --dim: #56605c; --faint: #5d6563;
  --line: #ced2ca; --line2: #b6bcb3; --veil: rgba(233, 234, 228, .8);
  --ok: #2f7a1e; --warn: #8d6400; --bad: #b42a1c;
  --m-copper: #a4501f; --m-malachite: #157a55; --m-azurite: #2459b0; --m-citrine: #8c6d00; --m-jasper: #b0361f; --m-lapis: #3a4cc0;
  --m-rhodo: #ad3c6a; --m-hematite: #59636c; --m-peridot: #5d7a0c; --m-selenite: #6f6650; --m-tiger: #835a17; --m-flint: #4b565d;
  --gold: #8a6414; --gold-hi: #a87b1c;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--ui); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
::selection { background: color-mix(in srgb, var(--m) 38%, transparent); }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--m) 70%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--m); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--m); outline-offset: 2px; }
.hidden { display: none !important; }
.flex { flex: 1 1 auto; }
.dim { color: var(--dim); }
.sm { font-size: 13px; }
.mt { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mono, code, kbd, pre { font-family: var(--code); }
kbd { font-size: 11px; letter-spacing: .02em; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -.005em; }
small { font-size: .82em; }

/* ── the controls: ink on stone ── */
.q, .ghost { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 12px; border: 1px solid var(--line2); color: var(--ink); font-size: 14px; background: transparent; transition: border-color .15s, background .15s; white-space: nowrap; }
.q:hover:not(:disabled), .ghost:hover:not(:disabled) { border-color: var(--ink); }
.q.sm, .ghost.sm { min-height: 28px; padding: 3px 9px; font-size: 13px; }
.q.danger:hover { border-color: var(--bad); color: var(--bad); }
.q.ico { width: 36px; height: 36px; min-height: 0; padding: 0; justify-content: center; border-color: transparent; color: var(--dim); }
.q.ico:hover { color: var(--ink); border-color: var(--line2); }
.q svg, .inst svg { width: 18px; height: 18px; display: block; }
.pri { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 18px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14.5px; border: 1px solid var(--ink); white-space: nowrap; }
.pri:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 84%, var(--m)); }
.pri.sm { min-height: 28px; padding: 3px 11px; font-size: 13px; }
.inst { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; color: var(--dim); border: 1px solid transparent; }
.inst:hover { color: var(--ink); border-color: var(--line2); }
input, select, textarea { background: var(--well); border: 1px solid var(--line2); border-radius: 0; padding: 8px 10px; min-height: 36px; outline: none; font-size: 15px; }
input:focus, select:focus, textarea:focus { border-color: var(--m); }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
select { padding-right: 26px; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(-45deg, transparent 50%, var(--dim) 50%);
  background-position: right 13px top 52%, right 8px top 52%; background-size: 5px 5px; background-repeat: no-repeat; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+ "; color: var(--faint); }
details[open] > summary::before { content: "− "; }
/* switches: a crystal that slides along a rule */
input.tg { appearance: none; -webkit-appearance: none; width: 40px; height: 20px; min-height: 0; padding: 0; border: 1px solid var(--line2); background: var(--well); position: relative; cursor: pointer; flex: none; }
input.tg::after { content: ""; position: absolute; top: 3px; left: 4px; width: 10px; height: 12px; background: var(--faint); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); transition: left .18s, background .18s; }
input.tg:checked { border-color: var(--ink); }
input.tg:checked::after { left: 24px; background: var(--ink); }
.mtg { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--dim); cursor: pointer; }
.led { display: inline-block; width: 7px; height: 9px; background: var(--faint); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); flex: none; }
.led.ok { background: var(--ok); } .led.warn { background: var(--warn); } .led.bad { background: var(--bad); }
.gem, .pollen { display: inline-block; width: 9px; height: 12px; background: var(--pc, var(--m)); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); flex: none; }

/* ── the crown ── */
#crown { flex: none; height: var(--crown); display: flex; align-items: center; gap: 6px; padding: 0 max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 20; }
#brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: 22px; flex: none; }
#brand .geo { width: 32px; height: 32px; display: block; flex: none; }
#brand .geo { border-radius: 50%; filter: drop-shadow(0 0 6px rgba(214, 166, 71, .28)); }
#brand .word { font-weight: 600; font-size: 21px; letter-spacing: .01em; }
#realms { display: flex; align-items: stretch; height: 100%; }
#realms a { display: flex; align-items: center; padding: 0 13px; text-decoration: none; color: var(--dim); font-size: 15.5px; position: relative; white-space: nowrap; }
#realms a:hover { color: var(--ink); }
#realms a.on { color: var(--ink); }
#realms a.on::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px; height: 2px; background: var(--m); }
.state { display: flex; gap: 16px; font-size: 12.5px; color: var(--faint); margin-right: 10px; white-space: nowrap; }
.state span { display: inline-flex; align-items: center; gap: 6px; }
.state b { font-weight: 400; color: var(--dim); }

/* ── views ── */
#main { flex: 1 1 auto; min-height: 0; position: relative; }
.view { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; }
#v-studio { overflow: hidden; }
#scroll { height: 100%; overflow: auto; overscroll-behavior: contain; padding-bottom: 70px; }
.pane { padding-bottom: 90px; }

/* the core log: every layer on the same columns */
.core { display: grid; grid-template-columns: [rail] var(--rail) [strip] var(--sw) [gap] var(--gut) [main] minmax(0, var(--bedw)) [notes] minmax(0, var(--notes)) [end];
  max-width: calc(var(--rail) + var(--sw) + var(--gut) + var(--bedw) + var(--notes) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
.core > * { grid-column: main / end; min-width: 0; }
.core > .rail { grid-column: rail; }
.core > .strip { grid-column: strip; }
.rail { padding-right: 14px; color: var(--faint); font-size: 12.5px; letter-spacing: .04em; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.rail > span { display: block; }
.rail .q { font-size: 12.5px; min-height: 26px; padding: 2px 8px; letter-spacing: 0; }
.rail select { font-size: 12.5px; min-height: 28px; padding: 2px 22px 2px 6px; max-width: 100%; letter-spacing: 0; }

/* ── STUDIO ── */
#surface { position: sticky; top: 0; z-index: 6; background: var(--bg); padding-top: 34px; }
#surface > .lede { padding-bottom: 26px; }
#surface .rs { padding-top: 18px; }
.lede h1 { font-weight: 300; font-size: clamp(32px, 4.2vw, 50px); line-height: 1.08; letter-spacing: -.012em; max-width: 16em; }
.lede h1 em { font-style: normal; color: var(--m); }
.lede h1 em.gn { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
#brand .word { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede p { margin: 12px 0 0; color: var(--dim); font-size: 15px; }
#composer { grid-column: main; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); padding: 10px 0; position: relative; transition: border-color .2s, box-shadow .2s; }
#composer:focus-within { border-bottom-color: var(--m); box-shadow: 0 1px 0 var(--m); }
#composer.drag { border-color: var(--m); background: color-mix(in srgb, var(--m) 6%, transparent); }
.cmdrow { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.ask { color: var(--dim); font-size: 14.5px; flex: none; }
.pick { position: relative; min-width: 0; }
#mpick { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 2px; font-weight: 600; font-size: 15.5px; max-width: 100%; min-width: 0; }
#mpick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mpick small { color: var(--faint); font-weight: 400; font-size: 12.5px; white-space: nowrap; }
#mpick .chev { width: 7px; height: 7px; border-right: 1.5px solid var(--dim); border-bottom: 1.5px solid var(--dim); transform: translateY(-2px) rotate(45deg); flex: none; margin-left: 2px; }
#mpick:hover span { text-decoration: underline; text-decoration-color: var(--m); text-underline-offset: 4px; }
#mpop { position: absolute; left: -2px; top: calc(100% + 8px); width: min(460px, calc(100vw - 32px)); background: var(--bed); border: 1px solid var(--line2); z-index: 30; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
#mq { width: 100%; border: 0; border-bottom: 1px solid var(--line2); background: transparent; padding: 12px 14px; font-size: 15px; }
#mlist { max-height: min(52vh, 440px); overflow: auto; padding: 4px 0 8px; }
#mlist h6 { margin: 12px 14px 4px; font-weight: 400; font-size: 11.5px; letter-spacing: .05em; color: var(--faint); }
#mlist button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 14px; font-size: 14.5px; }
#mlist button:hover, #mlist button.on { background: color-mix(in srgb, var(--ink) 7%, transparent); }
#mlist button.on { font-weight: 600; }
#mlist .tg { margin-left: auto; font-size: 11px; color: var(--dim); border: 1px solid var(--line2); padding: 0 5px; }
#mcount { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.tele { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tele b { font-weight: 400; color: var(--dim); }
.cmdrow .q { min-height: 28px; padding: 2px 10px; font-size: 13px; border-color: transparent; color: var(--dim); flex: none; }
.cmdrow .q:hover { color: var(--ink); border-color: var(--line2); }
#inp { display: block; width: 100%; resize: none; border: 0; background: transparent; padding: 12px 0 10px; font-size: 21px; line-height: 1.42; min-height: 54px; max-height: 40vh; }
#inp:focus, #inp:focus-visible { border: 0; outline: none; }
.ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; row-gap: 2px; padding-bottom: 2px; }
.ctl #voice { margin-left: auto; } /* when the modes fill the line (a phone), voice, dictate and Ask go to the next line, on the right: Ask never runs off */
.plus { position: relative; }
.menu { position: absolute; left: 0; top: calc(100% + 6px); background: var(--bed); border: 1px solid var(--line2); z-index: 30; min-width: 220px; padding: 4px 0; box-shadow: 0 14px 30px rgba(0, 0, 0, .3); }
.menu button { display: block; width: 100%; text-align: left; padding: 9px 14px; font-size: 14.5px; }
.menu button small { color: var(--faint); }
.menu button:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.tog { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; font-size: 14px; color: var(--dim); min-height: 34px; white-space: nowrap; }
.tog i { width: 9px; height: 12px; background: currentColor; flex: none; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%, 50% 0, 50% 24%, 24% 50%, 50% 76%, 76% 50%, 50% 24%); }
.tog:hover { color: var(--ink); }
.tog[aria-pressed="true"] { color: var(--ink); }
.tog[aria-pressed="true"] i { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: var(--m); }
#sendb { min-height: 38px; padding: 6px 20px; margin-left: 6px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 15px; border: 1px solid var(--ink); }
#sendb:disabled { background: transparent; color: var(--faint); border-color: var(--line2); opacity: 1; }
#sendb.stop { background: transparent; color: var(--ink); border-color: var(--ink); }
#mic.rec { color: var(--bad); }
#mic.rec svg { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
#att { display: flex; gap: 8px; flex-wrap: wrap; }
#att:not(:empty) { padding-top: 10px; }
#att .chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line2); padding: 4px 6px 4px 4px; max-width: 260px; }
#att .chip img { width: 38px; height: 38px; object-fit: cover; display: block; }
#att .chip .t { display: flex; flex-direction: column; font-size: 13px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#att .chip .t small { color: var(--faint); }
#att .chip.fileonly { padding-left: 10px; }
#att .chip .x { color: var(--dim); padding: 0 6px; }
/* down in the layers, the surface thins to a line until you touch it */
#scroll.deep #surface { padding-top: 10px; }
#scroll.deep #surface .rs, #scroll.deep .cmdrow .tele { display: none; }
#scroll.deep #composer:not(:focus-within) .cmdrow, #scroll.deep #composer:not(:focus-within) .ctl, #scroll.deep #composer:not(:focus-within) #att { display: none; }
#scroll.deep #composer:not(:focus-within) #inp { font-size: 17px; min-height: 0; padding: 4px 0; max-height: 30px; overflow: hidden; }

/* the empty surface: the seams to start from, and the geode */
#empty { padding-block: 30px 40px; align-items: start; }
#empty > .rail { padding-top: 16px; }
.seams { grid-column: main; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.seams li { border-bottom: 1px solid var(--line); min-width: 0; }
.seams li:nth-child(odd) { border-right: 1px solid var(--line); }
.seams button { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; text-align: left; width: 100%; padding: 15px 16px 15px 0; }
.seams li:nth-child(even) button { padding-left: 18px; }
.seams button i { grid-row: span 2; width: 8px; height: 11px; background: var(--c, var(--m)); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); align-self: start; margin-top: 6px; }
.seams b { font-weight: 600; font-size: 15.5px; }
.seams span { color: var(--dim); font-size: 13.5px; }
.seams button:hover b { text-decoration: underline; text-decoration-color: var(--m); text-underline-offset: 4px; }
.geode-fig { grid-column: notes; margin: 0 0 0 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.geode { width: 100%; max-width: 210px; aspect-ratio: 1; }
.geode img { width: 100%; height: 100%; display: block; border-radius: 50%; animation: gglow 6s ease-in-out infinite; }
@keyframes gglow { 0%, 100% { filter: drop-shadow(0 0 10px rgba(214, 166, 71, .18)); } 50% { filter: drop-shadow(0 0 26px rgba(214, 166, 71, .42)); } }
.still .geode img { animation: none; }
.geode .cx { transform-box: view-box; animation: crystal 8s ease-in-out infinite; }
@keyframes crystal { 50% { transform: scale(.86); } }
.geode-fig figcaption { font-size: 12.5px; color: var(--faint); line-height: 1.5; }
.geode-fig figcaption b { font-weight: 400; color: var(--dim); }

/* the layers */
#log { display: flex; flex-direction: column; }
.ex { padding-block: 26px 30px; border-top: 1px solid var(--line); }
.ex.fresh { animation: settle .45s ease-out both; }
#log > .ex:first-child { border-top-color: transparent; }
@keyframes settle { from { opacity: 0; transform: translateY(-8px); } }
.ex > .rail { padding-top: 2px; }
.ex .lyr { font-weight: 300; font-size: 34px; line-height: 1; color: var(--dim); letter-spacing: -.01em; font-feature-settings: "tnum"; }
.ex .rail time { font-size: 12px; color: var(--faint); letter-spacing: .02em; }
.ex > .strip { background: var(--m); align-self: stretch; min-height: 40px; }
.ex.web > .strip { background: repeating-linear-gradient(180deg, var(--m) 0 7px, transparent 7px 10px); }
.ex.img > .strip { background: repeating-linear-gradient(180deg, var(--m) 0 2px, transparent 2px 4px); }
.ex.council > .strip { background: var(--strata, var(--m)); }
.ex.pending > .strip { background: linear-gradient(var(--m), var(--m)) top / 100% 0 no-repeat, color-mix(in srgb, var(--m) 16%, transparent); animation: grow 1.5s ease-in-out infinite; }
@keyframes grow { to { background-size: 100% 100%, auto; } }
.ex.failed > .strip { background: repeating-linear-gradient(135deg, var(--bad) 0 3px, transparent 3px 7px); }
.ex > .bed { grid-column: main; min-width: 0; }
.m.user { margin-bottom: 18px; position: relative; }
.m.user .b { font-size: 21px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 34em; }
.m.user.long .b { font-size: 16.5px; line-height: 1.6; max-height: 16em; overflow: auto; }
.m.user .thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.m.user .thumbs img { width: 92px; height: 92px; object-fit: cover; display: block; border: 1px solid var(--line2); }
.m.user .tools { margin-bottom: 8px; }
.uacts { display: flex; gap: 2px; margin-top: 6px; opacity: 0; transition: opacity .15s; }
.ex:hover .uacts, .uacts:focus-within { opacity: 1; }
.uacts button, .acts button { font-size: 12.5px; color: var(--faint); padding: 3px 0; margin-right: 14px; }
.uacts button:hover, .acts button:hover { color: var(--ink); }
.m.ai { position: relative; }
.who-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); margin-bottom: 10px; flex-wrap: wrap; }
.who-line b { font-weight: 600; color: var(--dim); }
.m.ai .b { font-size: 16.5px; line-height: 1.68; color: var(--ink); overflow-wrap: break-word; }
.err { color: var(--bad); }
.acts { display: flex; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.acts .rate.on { color: var(--m); }
.acts .meta { margin-left: auto; font-size: 12px; color: var(--faint); }
.caret { display: inline-block; width: 9px; height: 12px; margin-left: 3px; background: var(--m); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); animation: pulse .9s ease-in-out infinite; vertical-align: -1px; }
.tools { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tools span { font-size: 12px; color: var(--dim); border: 1px solid var(--line2); padding: 2px 8px; }
/* thinking: crystals in the mind's colour, lit in turn */
.dots { display: flex; gap: 7px; align-items: center; height: 26px; }
.dots i { width: 9px; height: 13px; background: var(--m); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); animation: facet 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .16s; } .dots i:nth-child(3) { animation-delay: .32s; } .dots i:nth-child(4) { animation-delay: .48s; } .dots i:nth-child(5) { animation-delay: .64s; }
@keyframes facet { 0%, 100% { opacity: .2; transform: scaleY(.6); } 40% { opacity: 1; transform: scaleY(1); } }
img.gen { display: block; max-width: min(100%, 560px); border: 1px solid var(--line2); }
.drafts { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.drafts summary { font-size: 13px; color: var(--dim); }
.grid-d { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: 10px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.grid-d .d { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 12px; font-size: 14px; position: relative; min-width: 0; }
.grid-d .d::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 3px; background: var(--dm, var(--m)); }
.grid-d .d.err { color: var(--dim); }
.grid-d .d.err::before { background: var(--bad); }
.grid-d h5 { font-weight: 600; font-size: 12.5px; color: var(--dim); margin-bottom: 6px; }
.grid-d .b { font-size: 14px; line-height: 1.55; max-height: 320px; overflow: auto; }
.srcs { display: flex; flex-direction: column; margin-top: 18px; border-top: 1px solid var(--line); }
.srcs a { display: grid; grid-template-columns: 22px 1fr; gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 13px; color: var(--dim); }
.srcs a b { font-weight: 600; color: var(--ink); font-feature-settings: "tnum"; }
.srcs a:hover span { color: var(--ink); }
.srcs a span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* on a wide page the sources stand in the margin beside the layer, like notes */
@media (min-width: 1241px) {
  .m.user .uacts { position: absolute; top: 4px; left: calc(100% + var(--gut)); margin: 0; }
  .m.ai .srcs { position: absolute; top: 0; left: calc(100% + var(--gut)); width: calc(var(--notes) - 6px); margin-top: 30px; }
  .m.ai .srcs::before { content: "sources"; font-size: 12px; color: var(--faint); letter-spacing: .04em; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
  .m.ai .srcs { border-top: 0; }
}
/* written-out answers */
.b > :first-child { margin-top: 0; }
.b p { margin: 0 0 .85em; }
.b h1, .b h2, .b h3, .b h4 { margin: 1.3em 0 .5em; line-height: 1.25; font-weight: 600; }
.b h1 { font-size: 1.5em; } .b h2 { font-size: 1.28em; } .b h3 { font-size: 1.1em; } .b h4 { font-size: 1em; }
.b ul, .b ol { margin: 0 0 .9em; padding-left: 1.3em; }
.b li { margin: .25em 0; }
.b ul { list-style: none; padding-left: 1.2em; }
.b ul > li { position: relative; }
.b ul > li::before { content: ""; position: absolute; left: -1.05em; top: .6em; width: 6px; height: 8px; background: var(--m); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.b ol li::marker { color: var(--dim); }
.b b, .b strong { font-weight: 600; }
.b i, .b em { font-style: italic; }
.b code { font-size: .84em; background: var(--well); border: 1px solid var(--line); padding: .05em .35em; }
.b blockquote { margin: 0 0 1em; padding: 2px 0 2px 16px; border-left: 3px solid var(--line2); color: var(--ink2); }
.b hr { border: 0; border-top: 1px solid var(--line2); margin: 1.4em 0; }
.b table { border-collapse: collapse; margin: 0 0 1em; font-size: .93em; display: block; overflow-x: auto; max-width: 100%; }
.b th, .b td { border-bottom: 1px solid var(--line); padding: 7px 22px 7px 0; text-align: left; vertical-align: top; }
.b th { font-weight: 600; color: var(--dim); border-bottom-color: var(--line2); }
.b td { font-feature-settings: "tnum"; }
.b a.cite { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin: 0 1px; font-size: 11px; font-weight: 600; text-decoration: none; color: var(--bg); background: var(--m); vertical-align: 2px; line-height: 1; }
.pre { margin: 0 0 1em; border: 1px solid var(--line2); background: var(--well); }
.pre header { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 4px 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.pre header button { font-size: 12px; color: var(--dim); padding: 3px 8px; }
.pre header button:hover { color: var(--ink); }
.pre pre { margin: 0; padding: 14px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.pre code, .b pre code { background: none; border: 0; padding: 0; font-size: inherit; }

/* bedrock: the sessions before this one, under an unconformity */
#bedrock { margin-top: 36px; padding-bottom: 20px; }
#bedrock .unconf { grid-column: rail / end; height: 12px; margin-bottom: 26px; background: var(--line2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='12'%3E%3Cpath d='M0 6 C 8 0, 16 0, 24 6 S 40 12, 48 6' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") repeat-x left center / 48px 12px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='12'%3E%3Cpath d='M0 6 C 8 0, 16 0, 24 6 S 40 12, 48 6' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") repeat-x left center / 48px 12px; }
#bedrock > .rail { padding-top: 8px; }
.bhead { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; }
.bhead h2 { font-weight: 300; font-size: 24px; }
#hsearch { margin-left: auto; width: min(260px, 100%); background: transparent; border: 0; border-bottom: 1px solid var(--line2); padding: 6px 2px; font-size: 14.5px; min-height: 0; }
#hsearch:focus { border-bottom-color: var(--m); }
#hist { grid-column: rail / end; display: grid; grid-template-columns: subgrid; }
#hist > p { grid-column: main; color: var(--faint); font-size: 14px; }
.sess { grid-column: rail / end; display: grid; grid-template-columns: subgrid; align-items: center; min-height: 46px; border-top: 1px solid var(--line); cursor: pointer; }
.sess:last-child { border-bottom: 1px solid var(--line); }
.sess > time { grid-column: rail; font-size: 12.5px; color: var(--faint); padding-right: 12px; }
.sess > .strip { grid-column: strip; align-self: stretch; background: var(--m); }
.sess > .t { grid-column: main; display: flex; align-items: baseline; gap: 12px; min-width: 0; padding: 10px 0; }
.sess > .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; }
.sess > .t small { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.sess > .sbtn { grid-column: notes; justify-self: start; display: inline-flex; opacity: 0; }
.sess:hover { background: color-mix(in srgb, var(--ink) 3.5%, transparent); }
.sess:hover > .sbtn, .sess > .sbtn:focus-within { opacity: 1; }
.sess > .sbtn button { color: var(--faint); padding: 6px 10px; font-size: 13px; }
.sess > .sbtn [data-del]:hover { color: var(--bad); } .sess > .sbtn [data-ren]:hover { color: var(--ink); }
.sess.on > .t span { font-weight: 600; }
.sess.on > time { color: var(--m); }
.fine { margin-top: 26px; font-size: 12.5px; color: var(--faint); }
.fine p { margin: 0; max-width: 60em; }

/* ── the other realms: a title at the surface, then beds on the rail ── */
.realm { padding-block: 38px 26px; }
.realm :is(h1, h2) { font-weight: 300; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.012em; }
.realm p { margin: 10px 0 0; font-size: 14.5px; }
.realm > .rail { padding-top: 12px; }
.bd { padding-block: 22px 26px; border-top: 1px solid var(--line); }
.bd > .rail { padding-top: 3px; }
.bc h3 { font-weight: 600; font-size: 19px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bc h3 small { font-weight: 400; font-size: 13px; color: var(--faint); }
.bc h4, .swgrid h4 { font-weight: 600; font-size: 14px; }
.bc h4 small { font-weight: 400; }
.bc p { max-width: 48em; }
.bc > p:first-child { margin-top: 0; }
.note { border-left: 3px solid var(--warn); padding: 6px 12px; font-size: 14px; color: var(--ink2); margin-top: 12px; }
.ptabs { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; background: var(--bg); }
.ptabs > .rail { padding-top: 15px; }
.tabrow { display: flex; align-items: center; gap: 2px 6px; flex-wrap: wrap; min-height: 50px; }
.tabrow button[data-pt], .mtabs button { position: relative; padding: 14px 14px; font-size: 15px; color: var(--dim); }
.tabrow button[data-pt]:first-child, .mtabs button:first-child { padding-left: 0; }
.tabrow button[data-pt].on, .mtabs button.on { color: var(--ink); }
.tabrow button[data-pt].on::after, .mtabs button.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--ink); }
.tabrow button[data-pt]:first-child.on::after, .mtabs button:first-child.on::after { left: 0; }
.tabrow button[data-pt]:disabled { opacity: .35; }
.tabrow .q { min-height: 30px; padding: 3px 10px; font-size: 13px; }
.tabrow select { min-height: 30px; font-size: 13px; padding: 3px 24px 3px 8px; }
.mtabs { display: flex; flex-wrap: wrap; }
.badge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 6px; padding: 0 4px; background: var(--m); color: var(--bg); font-size: 11px; font-weight: 600; font-style: normal; vertical-align: 1px; }
.msearch { width: min(300px, 100%); background: transparent; border: 0; border-bottom: 1px solid var(--line2); min-height: 32px; padding: 4px 2px; font-size: 14px; }

/* swarm: missions */
#brief { width: 100%; min-height: 128px; resize: vertical; background: transparent; border: 0; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); padding: 14px 0; font-size: 19px; line-height: 1.45; }
#brief:focus { border-bottom-color: var(--m); }
#caprow { display: inline-flex; align-items: center; gap: 8px; }
#caprow input { width: 86px; min-height: 30px; padding: 3px 8px; font-size: 14px; }
.plist { display: flex; flex-direction: column; }
.pl { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto auto auto; align-items: center; column-gap: 14px; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 56px; }
.pl:first-child { border-top: 1px solid var(--line); }
.pl::before { content: ""; align-self: stretch; background: var(--sc, var(--faint)); }
.pl:hover { background: color-mix(in srgb, var(--ink) 3.5%, transparent); }
.pl .pt { display: flex; flex-direction: column; min-width: 0; padding: 9px 0; }
.pl .pt b { font-weight: 600; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .pt > span { font-size: 12.5px; }
.pl .byg { font-style: normal; font-size: 11.5px; color: var(--dim); }
.pl .x { color: var(--faint); padding: 8px 10px; }
.pl .x:hover { color: var(--bad); }
.pl:has(.st.working), .pl:has(.st.planning), .pl:has(.st.integrating), .pl:has(.st.replanning) { --sc: var(--ink); }
.pl:has(.st.done) { --sc: var(--ok); } .pl:has(.st.failed) { --sc: var(--bad); } .pl:has(.st.paused) { --sc: var(--warn); }
.st { font-size: 12px; color: var(--dim); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.st::before { content: ""; width: 7px; height: 9px; background: currentColor; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.st.working, .st.planning, .st.integrating, .st.replanning { color: var(--ink); }
.st.working::before, .st.planning::before, .st.integrating::before, .st.replanning::before { animation: pulse 1.1s ease-in-out infinite; }
.st.done { color: var(--ok); } .st.failed { color: var(--bad); } .st.paused { color: var(--warn); }
.st.needs_human { color: var(--warn); } .pl:has(.st.needs_human) { --sc: var(--warn); }
#feed .k-needs_human .dim { color: var(--warn); }
/* one mission */
.phead .ttl { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.phead :is(h1, h2) { font-size: clamp(26px, 3vw, 38px); }
.phead > .rail .q { margin-left: -9px; border-color: transparent; color: var(--dim); }
.phead > .rail .q:hover { color: var(--ink); }
.pstats { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.ring { width: 52px; height: 52px; transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke-width: 5; }
.ring .bg { stroke: var(--line2); }
.ring .fg { stroke: var(--ink); stroke-dasharray: 170; stroke-dashoffset: 170; transition: stroke-dashoffset .6s; }
.ring .tick { fill: none; stroke: var(--ok); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .4s; }
.ring.done .fg { stroke: var(--ok); } .ring.done .tick { opacity: 1; }
.pnums { display: flex; flex-direction: column; gap: 3px; min-width: 180px; }
.pnums b { font-weight: 600; font-size: 15px; }
.pnums span { font-size: 12.5px; }
.bar { height: 4px; background: var(--line); position: relative; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); width: 0; transition: width .5s; }
#joinrow, #chatrow { margin-top: 14px; }
#joinrow .lbl { font-size: 12.5px; color: var(--faint); }
#join, #chat { flex: 1; min-width: 180px; }
.runbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line2); }
.seg button { padding: 5px 12px; font-size: 13px; color: var(--dim); }
.seg button + button { border-left: 1px solid var(--line2); }
.seg button.on { background: var(--ink); color: var(--bg); }
.stage { --w: 100%; border: 1px solid var(--line2); background: repeating-linear-gradient(180deg, transparent 0 23px, var(--line) 23px 24px); display: flex; justify-content: center; }
.stage iframe { width: var(--w); max-width: 100%; height: min(70vh, 640px); border: 0; background: #fff; display: block; }
.stage.log iframe { height: min(42vh, 360px); }
.norun { border: 1px dashed var(--line2); padding: 18px; }
.norun p { margin-top: 0; color: var(--dim); }
.console { margin-top: 14px; border: 1px solid var(--line2); background: var(--well); }
.console .ch { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.console .ch b { font-weight: 600; }
.cc { font-size: 12px; color: var(--faint); } .cc.bad { color: var(--bad); } .cc.good { color: var(--ok); }
.af { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); cursor: pointer; }
.af input { min-height: 0; accent-color: var(--ink); }
.clog { max-height: 220px; overflow: auto; padding: 8px 12px; font-family: var(--code); font-size: 12px; line-height: 1.6; }
.clog .l-error, .clog .l-exception { color: var(--bad); } .clog .l-warn { color: var(--warn); } .clog .l-info { color: var(--faint); }
.files { display: flex; flex-direction: column; gap: 18px; }
.file { border: 1px solid var(--line2); }
.file .fh { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.file .fh b { font-weight: 500; font-size: 13.5px; font-family: var(--code); }
.file pre { margin: 0; padding: 12px; max-height: 480px; overflow: auto; font-size: 12.5px; line-height: 1.6; background: var(--well); }
.swgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px 30px; }
.mapc { grid-row: span 2; }
.mapc .row { gap: 8px; }
#map { width: 100%; aspect-ratio: 1; max-height: 460px; display: block; margin-top: 8px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--dim); margin-top: 8px; }
.legend i { display: inline-block; width: 8px; height: 11px; margin-right: 6px; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); vertical-align: -1px; }
.legend .w { background: var(--ink); } .legend .v { background: var(--m-azurite); } .legend .i { background: var(--faint); } .legend .o { background: var(--bad); opacity: .6; }
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 10px; border-left: 1px solid var(--line); }
.board .col { border-right: 1px solid var(--line); padding: 0 8px 8px; min-height: 120px; min-width: 0; }
.board .col h3 { font-weight: 400; font-size: 11.5px; color: var(--faint); letter-spacing: .04em; padding: 2px 0 8px; display: block; }
.tk { border-top: 1px solid var(--line); padding: 7px 0; font-size: 13px; cursor: pointer; line-height: 1.4; overflow-wrap: anywhere; }
.tk:hover { color: var(--m); }
.tk .role { font-size: 11px; color: var(--faint); }
.tk .who { font-size: 11px; color: var(--dim); margin-top: 3px; }
.feed { max-height: 300px; overflow: auto; margin-top: 10px; font-size: 12.5px; line-height: 1.5; border-top: 1px solid var(--line); }
.feed > div { padding: 7px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.feed time { color: var(--faint); margin-right: 8px; }
.feed .who { font-weight: 600; }
.feed .k-error, .feed .k-fail { color: var(--bad); } .feed .k-done, .feed .k-approve { color: var(--ok); }
.agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.ag { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 12px 10px 14px; font-size: 13px; position: relative; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.ag::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 3px; background: var(--faint); }
.ag.working::before { background: var(--ink); } .ag.reviewing::before { background: var(--m-azurite); } .ag.offline::before { background: var(--bad); } .ag.retired { opacity: .5; }
.ag b { font-weight: 600; display: block; padding-right: 30px; }
.ag .r { font-size: 11.5px; color: var(--dim); }
.ag .er { display: block; font-size: 11.5px; color: var(--bad); }
.ag .sc { position: absolute; right: 10px; top: 9px; font-size: 11.5px; color: var(--dim); }
#finalmd { font-size: 16px; line-height: 1.66; max-width: var(--bedw); }
#final { white-space: pre-wrap; font-size: 12.5px; line-height: 1.6; background: var(--well); border: 1px solid var(--line2); padding: 14px; overflow: auto; max-height: 70vh; margin: 0; }

/* uplinks */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-top: 14px; max-width: var(--bedw); }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--dim); }
.form label.wide { grid-column: 1 / -1; }
.form input, .form select { color: var(--ink); width: 100%; }
#k-list { max-width: var(--bedw); }
.key { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; column-gap: 14px; row-gap: 4px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.key:first-child { border-top: 1px solid var(--line); }
.key.off { opacity: .55; }
.key .badge { grid-row: span 2; width: 34px; height: 34px; margin: 0; background: var(--line); color: var(--ink); font-size: 15px; font-weight: 600; text-transform: uppercase; }
.key .nm { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key .bt { display: flex; gap: 6px; align-items: center; }
.key .meta { grid-column: 2 / -1; font-size: 12.5px; color: var(--dim); }
.key .meta.err { color: var(--bad); }
.key details, .key > .row { grid-column: 2 / -1; font-size: 13px; }
.key details input { flex: 1; min-height: 30px; font-size: 13px; }
.key .mods { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; max-height: 160px; overflow: auto; }
.key .mods code { font-size: 11px; border: 1px solid var(--line); padding: 1px 6px; }
.sw { width: 40px; height: 20px; border: 1px solid var(--line2); background: var(--well); position: relative; flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 4px; width: 10px; height: 12px; background: var(--faint); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); transition: left .18s; }
.sw[aria-checked="true"] { border-color: var(--ink); }
.sw[aria-checked="true"]::after { left: 24px; background: var(--ink); }
.agentp .ah, .mindp .ah { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.agentp .ah h3, .mindp .ah h3 { flex: 1; min-width: 220px; }
.agentp .ah > .led { align-self: flex-start; margin-top: 9px; }
.agentp .ah h3 small, .mindp .ah h3 small { display: block; width: 100%; margin-top: 4px; }
.agentp .ab, .mindp .ab { margin-bottom: 14px; }
.agentp > p { font-size: 13.5px; }
.prog { margin: 12px 0; max-width: var(--bedw); }
.prog p { font-size: 12.5px; color: var(--dim); margin: 6px 0 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 14px; }
.facts > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 9px 12px 10px; font-size: 11.5px; color: var(--faint); letter-spacing: .02em; min-width: 0; }
.facts > div b { display: block; margin-top: 3px; font-weight: 400; font-size: 16px; color: var(--ink); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facts > .full { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--dim); letter-spacing: 0; }
.facts > .full small { flex: 1; min-width: 200px; font-size: 13px; }
.ab { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.own { display: flex; gap: 8px; margin-top: 4px; max-width: var(--bedw); }
.own input { flex: 1; min-width: 0; }
.health { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); column-gap: 20px; border-top: 1px solid var(--line); margin-bottom: 14px; }
.health > div { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.health > div b { width: 16px; flex: none; }
.health .ok b { color: var(--ok); } .health .no b { color: var(--bad); } .health .wait b { color: var(--warn); }
.health small { display: block; color: var(--faint); font-size: 12px; }

/* mind lists */
.mlist { display: flex; flex-direction: column; max-width: var(--bedw); }
.mi { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mi:first-child { border-top: 1px solid var(--line); }
.mi p { flex: 1; margin: 0; font-size: 15px; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; }
.mi p small { display: block; font-size: 12px; color: var(--faint); margin-bottom: 3px; }
.mi p small select { font-size: 12px; min-height: 0; padding: 0 18px 0 4px; border: 0; background-color: transparent; color: var(--dim); background-position: right 9px top 55%, right 4px top 55%; }
.mi > button { color: var(--faint); padding: 2px 6px; flex: none; }
.mi > button:hover { color: var(--bad); }
.mi.th { align-items: center; padding: 9px 0; }
.mi.th p { font-size: 14.5px; }
.mi .ic { display: flex; gap: 4px; flex: none; }
.mi .ic button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line2); color: var(--dim); font-size: 15px; border-radius: 50%; padding: 0; }
.mi .ic button:first-child:hover { color: var(--ok, #7fcf8f); border-color: currentColor; }
.mi .ic button:last-child:hover { color: var(--bad); border-color: currentColor; }
.mi p small .src { font-style: normal; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line2); color: var(--dim); }
.mi p small .src.you { border-color: var(--m); color: var(--ink); }
.tsugg { margin-top: 18px; padding: 10px 14px 4px; border: 1px dashed var(--line2); border-radius: 12px; }
.tsugg .mi:first-of-type { border-top: 0; }
.th-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 6px; font-size: 12.5px; color: var(--faint); }
.th-h b { color: var(--ink); font-weight: 600; }
.mi .ib { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.mi .ib button { border: 1px solid var(--line2); padding: 3px 10px; font-size: 13px; white-space: nowrap; }
.mi .ib button:hover { border-color: var(--ink); }
.mi .ib button:first-child { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mi.mem .pin { color: var(--faint); font-size: 16px; padding: 0 2px; }
.mi.mem .pin.on { color: var(--m); }
.mtx { cursor: text; }
.mtx:hover { text-decoration: underline dotted var(--faint); text-underline-offset: 4px; }
.medit { width: 100%; }
.mi.turn { cursor: pointer; }
mark { background: color-mix(in srgb, var(--m) 35%, transparent); color: inherit; padding: 0 1px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips .chip { border: 1px solid var(--line2); padding: 4px 10px; font-size: 13px; color: var(--dim); }
.chips .chip i { font-style: normal; color: var(--faint); margin-left: 4px; }
.chips .chip.on { border-color: var(--ink); color: var(--ink); }
.review { border-top: 2px solid var(--m); }
.review .mi p { font-size: 15.5px; }
.cal { display: grid; grid-template-columns: repeat(var(--cols, 26), 1fr); grid-template-rows: repeat(7, 1fr); gap: 3px; max-width: 560px; }
.cal i { aspect-ratio: 1; background: var(--line); }
.cal .l1 { background: color-mix(in srgb, var(--m) 30%, var(--line)); } .cal .l2 { background: color-mix(in srgb, var(--m) 55%, var(--line)); }
.cal .l3 { background: color-mix(in srgb, var(--m) 78%, var(--line)); } .cal .l4 { background: var(--m); }
.wgrid { display: grid; grid-template-columns: 34px repeat(24, 1fr); gap: 2px; max-width: 640px; font-size: 10.5px; color: var(--faint); align-items: center; }
.wgrid i { aspect-ratio: 1; background: color-mix(in srgb, var(--m) calc(var(--a, 0) * 100%), var(--line)); }
.wgrid b { font-weight: 400; text-align: left; white-space: nowrap; }
.kbars { max-width: 640px; }
.kbars h4 { font-weight: 400; font-size: 12px; color: var(--faint); letter-spacing: .03em; margin-bottom: 8px; }
.kb { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 44px; gap: 10px; align-items: center; font-size: 13px; padding: 3px 0; }
.kb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); }
.kb i { height: 8px; background: var(--line); display: block; }
.kb u { display: block; height: 100%; background: var(--m); }
.kb b { font-weight: 400; text-align: right; }
.ig { margin-bottom: 18px; }
.ig h4 { font-weight: 400; font-size: 12px; color: var(--faint); letter-spacing: .03em; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ig h4 i { font-style: normal; color: var(--dim); }
.mi.idea p b { display: block; font-weight: 600; margin-bottom: 2px; }
.more { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--dim); font-size: 14px; cursor: pointer; }
.more.open { display: block; }
.mi.lesson p small b { color: var(--m); font-weight: 600; }
.journal { display: flex; flex-direction: column; max-width: var(--bedw); }
.je { padding: 14px 0 14px 16px; border-bottom: 1px solid var(--line); position: relative; }
.je::before { content: ""; position: absolute; left: 0; top: 16px; width: 3px; bottom: 16px; background: var(--line2); }
.je.milestone::before { background: var(--m); } .je.watch::before { background: var(--m-azurite); }
.je small { font-size: 12px; color: var(--faint); }
.je p { margin: 4px 0 0; font-size: 15px; line-height: 1.6; white-space: pre-wrap; }
#m-results { margin-bottom: 10px; }
#m-results > .card { max-width: calc(var(--rail) + var(--sw) + var(--gut) + var(--bedw) + var(--notes) + 2 * var(--pad)); margin: 0 auto; padding: 20px var(--pad) 20px calc(var(--pad) + var(--rail) + var(--sw) + var(--gut)); }
#m-results > .card p { margin: 0; }
#m-results .sres { max-width: calc(var(--rail) + var(--sw) + var(--gut) + var(--bedw) + var(--notes) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad) 0 calc(var(--pad) + var(--rail) + var(--sw) + var(--gut)); }
#m-results .sres h3 { margin: 22px 0 10px; font-size: 15px; display: flex; gap: 10px; align-items: baseline; }
#m-results .sres h3 small { color: var(--faint); font-weight: 400; }

/* ── dialogs drop from the crown, like a core drawn from the ground ── */
dialog { border: 1px solid var(--line2); border-top: 0; background: var(--bed); color: var(--ink); padding: 0; margin: var(--crown) auto 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - var(--crown) - 24px); overflow: auto; box-shadow: 0 30px 60px rgba(0, 0, 0, .4); }
dialog::backdrop { background: var(--veil); }
dialog[open] { animation: drop .22s ease-out; }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } }
#cmdk { width: min(680px, calc(100vw - 24px)); }
#cq { width: 100%; border: 0; border-bottom: 1px solid var(--line2); background: transparent; padding: 18px 20px; font-size: 22px; font-weight: 300; min-height: 0; }
#clist { max-height: 56vh; overflow: auto; padding: 6px 0; }
#clist button { display: flex; align-items: baseline; gap: 12px; width: 100%; text-align: left; padding: 9px 20px; font-size: 15px; }
#clist button small { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
#clist button.on { background: color-mix(in srgb, var(--ink) 8%, transparent); box-shadow: inset 3px 0 0 var(--m); }
#cmdk > p { margin: 0; padding: 9px 20px; border-top: 1px solid var(--line); }
#dlg { padding: 18px 22px; }
#dlg h3 { font-size: 17px; }
#dout { white-space: pre-wrap; font-size: 12.5px; line-height: 1.6; background: var(--well); border: 1px solid var(--line); padding: 12px; max-height: 50vh; overflow: auto; }
.settings { padding: 18px 22px 20px; }
.settings > .row h3 { font-weight: 300; font-size: 26px; }
.settings section { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 16px; }
.settings section > * { grid-column: 2; }
.settings h4 { grid-column: 1; grid-row: 1 / span 20; font-weight: 400; font-size: 12.5px; color: var(--faint); letter-spacing: .04em; padding-top: 10px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.opt:last-of-type { border-bottom: 0; }
.opt > span { display: flex; flex-direction: column; min-width: 0; }
.opt small { color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.opt select { max-width: 52%; font-size: 14px; }
.opt input[type="range"] { accent-color: var(--ink); width: 160px; min-height: 0; padding: 0; border: 0; background: none; flex: none; }
#sys { width: 100%; resize: vertical; margin-top: 8px; font-size: 14.5px; }
.opt.say { align-items: flex-end; }
.opt.say > span { flex: 1; }
#s-say { width: 100%; margin-top: 8px; resize: vertical; font-size: 14.5px; min-height: 64px; }
.settings section p { margin: 4px 0 8px; }
.maker { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--dim); text-decoration: none; }
.maker:hover { color: var(--ink); }
.maker img { width: 24px; height: 24px; border-radius: 6px; display: block; }

/* ── the toast: a line of ink at the foot ── */
#toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px 10px 14px; font-size: 14px; z-index: 60; max-width: calc(100vw - 32px); width: max-content; display: flex; align-items: center; gap: 10px; }
#toast::before { content: ""; width: 8px; height: 11px; background: var(--m); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); flex: none; }

/* ── voice: the geode listens ── */
#voiceo { position: fixed; inset: 0; z-index: 50; background: var(--bg); }
#viz { position: absolute; inset: 0; width: 100%; height: 100%; }
.vtop { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; padding: max(14px, env(safe-area-inset-top)) 18px 0; }
.vchip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }
.vchip:empty { display: none; }
#vmodel { color: var(--ink); font-weight: 600; }
#cam { position: absolute; z-index: 1; right: 18px; top: 64px; width: min(34vw, 260px); border: 1px solid var(--line2); background: #000; }
#cam.mirror { transform: scaleX(-1); }
#orb { position: absolute; inset: 70px 0 240px; z-index: 1; cursor: pointer; }
.vcap { position: absolute; z-index: 2; left: 0; right: 0; bottom: calc(150px + env(safe-area-inset-bottom)); padding: 0 24px; text-align: center; pointer-events: none; }
#vstate { margin: 0; font-size: 13px; color: var(--dim); letter-spacing: .04em; }
#vtext { margin: 10px auto 0; font-weight: 300; font-size: clamp(20px, 2.6vw, 30px); line-height: 1.3; max-width: 26em; min-height: 1.3em; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.vhint { margin: 10px 0 0; font-size: 12.5px; color: var(--faint); }
.vdock { position: absolute; z-index: 2; bottom: calc(68px + env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 0 12px; }
.vbtn { min-height: 44px; min-width: 76px; padding: 8px 16px; border: 1px solid var(--line2); background: var(--bg); font-size: 14.5px; color: var(--ink); }
.vbtn:hover { border-color: var(--ink); }
.vbtn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.vbtn.big { min-width: 108px; font-weight: 600; }
.vbtn.end { border-color: var(--bad); color: var(--bad); }
.vbtn.held { background: var(--m); color: var(--bg); border-color: var(--m); }
.vvoice { position: absolute; z-index: 2; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: center; justify-content: center; }
.vvoice select { font-size: 13px; min-height: 32px; max-width: 60vw; }
.vvoice .q { min-height: 32px; padding: 3px 10px; font-size: 13px; }

/* the install pill (shared across the site) wears AutoFaber's stone here */
body #mf-inst { border-radius: 0; background: var(--ink); color: var(--bg); border: 0; box-shadow: 0 14px 30px rgba(0, 0, 0, .35); font-family: var(--ui); font-weight: 400; letter-spacing: 0; }
body #mf-inst .go { border-radius: 0; background: var(--bg); color: var(--ink); font-weight: 600; }
body #mf-inst .x { color: var(--faint); }
body #mf-inst .tip { color: var(--faint); }

/* ── still: no motion ── */
body.still *, body.still *::before, body.still *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; } }

/* ── narrower: the notes column folds into the layer ── */
@media (max-width: 1240px) {
  :root { --notes: 0px; --rail: 96px; }
  .geode-fig { grid-column: main; grid-row: 1; margin: 0 0 22px; flex-direction: row; align-items: center; gap: 18px; }
  .geode { max-width: 112px; }
  .seams { grid-row: 2; }
  #empty > .rail { grid-row: 2; }
  .state { display: none; }
  .swgrid { grid-template-columns: 1fr; }
  .mapc { grid-row: auto; }
  #map { max-height: 380px; }
  .sess > .sbtn { grid-column: main; grid-row: 1; justify-self: end; }
  .sess > .t { padding-right: 44px; }
}
@media (max-width: 900px) {
  .seams { grid-template-columns: 1fr; }
  .seams li:nth-child(odd) { border-right: 0; }
  .seams li:nth-child(even) button { padding-left: 0; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board .col:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cmdrow .tele { display: none; }
}
/* ── a phone: each rail lies down across the top of its layer; only the layers keep their strip ── */
@media (max-width: 760px) {
  :root { --pad: 16px; --crown: 52px; }
  .core { grid-template-columns: [rail main notes] minmax(0, 1fr) [end]; }
  .core > .rail { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 0 0 10px; }
  .ex, #bedrock { grid-template-columns: [strip] 4px [gap] 14px [rail main notes] minmax(0, 1fr) [end]; }
  #crown { padding: 0 8px 0 12px; gap: 0; }
  #brand { margin-right: 4px; }
  #brand .word { display: none; }
  #brand .geo { width: 30px; height: 30px; }
  #realms a { padding: 0 9px; font-size: 14.5px; }
  #realms a.on::after { left: 9px; right: 9px; }
  #theme { display: none; }
  .inst { min-width: 34px; padding: 0 5px; }
  #cmdk-btn kbd { font-size: 10px; }
  #surface { padding-top: 18px; }
  #surface .rs, #empty > .rail, .ptabs > .rail, #bedrock > .rail { display: none; }
  #surface > .lede { padding-bottom: 16px; }
  #composer { grid-column: main; padding: 6px 0 8px; }
  #inp { font-size: 18px; padding: 8px 0 6px; min-height: 44px; }
  .tog { padding: 6px 5px; font-size: 13px; gap: 5px; }
  .ctl { gap: 0; }
  .ctl .q.ico { width: 32px; }
  #sendb { padding: 6px 13px; margin-left: 4px; }
  #mpick { font-size: 15px; }
  #mpick small { display: none; }
  .cmdrow .q { padding: 2px 6px; }
  #export { display: none; }
  #empty { padding-top: 18px; }
  .geode-fig { margin-bottom: 16px; }
  .geode { max-width: 76px; }
  .ex { padding-block: 20px 24px; }
  .ex > .rail { align-items: baseline; padding: 0 0 8px; gap: 10px; }
  .ex .lyr { font-size: 15px; font-weight: 600; letter-spacing: 0; }
  .ex > .strip { grid-row: 1 / span 2; }
  .m.user .b { font-size: 18.5px; }
  .m.ai .b { font-size: 16px; }
  .uacts { opacity: 1; }
  #bedrock .unconf { grid-column: strip / end; }
  #hist, .sess { grid-column: strip / end; }
  .sess { grid-template-rows: auto auto; padding: 9px 0; }
  .sess > .strip { grid-row: 1 / span 2; }
  .sess > time { grid-column: main; grid-row: 2; padding: 0; font-size: 12px; }
  .sess > .t { grid-row: 1; padding: 0 44px 2px 0; }
  .sess > .t small { display: none; }
  .sess > .sbtn { grid-column: main; grid-row: 1 / span 2; justify-self: end; align-self: center; opacity: 1; }
  .bhead h2 { font-size: 20px; }
  #hsearch { margin-left: 0; width: 100%; }
  .realm { padding-block: 24px 18px; }
  .realm > .rail { padding-top: 0; }
  .bd { padding-block: 18px 22px; }
  .form { grid-template-columns: 1fr; }
  .pl { grid-template-columns: 4px minmax(0, 1fr) auto auto; }
  .pl .st { display: none; }
  .settings section { grid-template-columns: 1fr; }
  .settings section > * { grid-column: 1; }
  .settings h4 { grid-row: auto; padding-top: 0; }
  .opt select { max-width: 50%; }
  .tabrow button[data-pt], .mtabs button { padding: 13px 10px; font-size: 14.5px; }
  .tabrow button[data-pt].on::after, .mtabs button.on::after { left: 10px; right: 10px; }
  .key { grid-template-columns: 30px minmax(0, 1fr); }
  .key .badge { width: 30px; height: 30px; }
  .key .bt { grid-column: 2; }
  .tabrow { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-height: 46px; }
  .tabrow::-webkit-scrollbar { display: none; }
  .tabrow button[data-pt] { padding: 12px 11px; flex: none; }
  .tabrow .flex { flex: 1 0 8px; }
  .tabrow select { max-width: 132px; flex: none; }
  .tabrow .q { flex: none; }
  .ptabs > .rail { display: none; }
  .mtabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; }
  .mtabs::-webkit-scrollbar { display: none; }
  .mtabs button { flex: none; padding: 12px 11px; }
  .msearch { width: 100%; flex-basis: 100%; }
  .ptabs:not(.mhead) .tabrow { -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); padding-right: 28px; }
  .mhead .tabrow { flex-wrap: wrap; overflow: visible; }
  .mhead .tabrow .flex { display: none; }
  .mi { flex-wrap: wrap; }
  .mi.th { flex-wrap: nowrap; }
  .mi.th p { flex-basis: auto; }
  .own { flex-wrap: wrap; }
  .own input { flex-basis: 100%; }
  .own select { flex: 1; }
  .pick { position: static; }
  #composer { position: relative; }
  #mpop { left: 0; right: 0; width: auto; }
  .mi p { flex-basis: 70%; }
  .vdock { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .vbtn { min-width: 64px; padding: 8px 12px; }
  .vcap { bottom: calc(180px + env(safe-area-inset-bottom)); }
  #orb { inset: 64px 0 280px; }
}
@media (max-width: 380px) {
  #realms a { padding: 0 7px; font-size: 13.5px; }
  .tog { font-size: 12px; padding: 6px 4px; gap: 4px; }
  .tog i { width: 7px; height: 10px; }
  .ctl .q.ico { width: 28px; }
}
.acts button.more { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }

.runbar .q.gold, .runbar a.q { color: var(--gold); }
.runbar a.q { text-decoration: none; display: inline-flex; align-items: center; }
.trialf { position: fixed; left: -12000px; top: 0; width: 1024px; height: 720px; opacity: 0; pointer-events: none; border: 0; }
.auditp { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.auditp .ah { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; } .auditp .ah .dim { flex: 1; }
.auditp .ar { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid var(--line); cursor: pointer; }
.auditp .ar span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .auditp .ar span:last-child { flex: none; color: var(--dim); }
.auditp .ar.good span:last-child { color: #7ccf8a; } .auditp .ar.bad span:last-child { color: #ff7b72; } .auditp .ar.wait span:last-child { color: var(--gold); }
.perf { overflow-x: auto; } .perf table { width: 100%; border-collapse: collapse; font-size: 13px; }
.perf th, .perf td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line); white-space: nowrap; } .perf th { color: var(--dim); font-weight: 500; }
.perf td:first-child { white-space: normal; word-break: break-word; } .perf td.bad { color: #ff7b72; }
.m.ai .tools span.did::before { content: "✓ "; color: var(--gold); } .m.ai .tools span.now { color: var(--gold); animation: stepglow 1.4s ease-in-out infinite; }
@keyframes stepglow { 50% { opacity: .55; } } @media (prefers-reduced-motion: reduce) { .m.ai .tools span.now { animation: none; } }
.filebtn { cursor: pointer; display: inline-flex; align-items: center; } #l-hits .mi.hit .tx span { display: block; margin-top: 3px; font-size: 13px; }
#mt-lib .mi .tx small { display: block; margin-top: 2px; }
.pre .ck { font-size: 11.5px; padding: 3px 10px; border-top: 1px solid var(--line); } .pre .ck.ok { color: #7ccf8a; } .pre .ck.bad { color: #ff9b72; }
.cknote { font-size: 12px; color: #ff9b72; margin: 0 0 6px; }
.pre .ck button { font: inherit; font-size: 11px; margin-left: 8px; padding: 1px 8px; color: var(--gold); background: none; border: 1px solid var(--line2); cursor: pointer; }
.tabrow > .tl { display: contents; }

/* first light: the quick start a new person sees once, with a place to give their name */
#welcome { padding-block: 26px 6px; }
#welcome > .rail { padding-top: 10px; }
#welcome .wc { border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line2)); background: color-mix(in srgb, var(--gold) 5%, var(--bed)); padding: 20px 22px 18px; }
#welcome .wh { display: flex; align-items: center; gap: 12px; }
#welcome h2 { margin: 0; flex: 1; font-size: 24px; font-weight: 500; }
#welcome h2 em { font-style: normal; color: var(--gold-hi); }
#welcome .wsteps { margin: 14px 0 16px; padding-left: 22px; display: grid; gap: 7px; color: var(--ink2); font-size: 15px; }
#welcome .wsteps b { color: var(--ink); font-weight: 600; }
#welcome .wsteps i { font-style: normal; color: var(--gold-hi); }
#welcome kbd { font: 12px var(--mono, monospace); border: 1px solid var(--line2); padding: 0 5px; }
#welcome .wform { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px 16px; border-top: 1px solid var(--line); padding-top: 16px; }
#welcome .wform label { display: grid; gap: 5px; font-size: 13.5px; color: var(--ink2); }
#welcome .wform small { color: var(--faint); }
#welcome .wform input { min-height: 38px; padding: 7px 10px; background: var(--well); border: 1px solid var(--line2); color: var(--ink); font: inherit; font-size: 15px; }
#welcome .wform input:focus { outline: none; border-color: var(--gold); }
#welcome .wlen { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink2); }
#welcome .wlen span { margin-right: 4px; }
#welcome .wlen button { min-height: 32px; padding: 4px 12px; border: 1px solid var(--line2); background: transparent; color: var(--ink2); font-size: 13.5px; }
#welcome .wlen button.on { border-color: var(--gold); color: var(--ink); background: color-mix(in srgb, var(--gold) 14%, transparent); }
#welcome .wgo { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
@media (max-width: 720px) {
  #welcome .wform { grid-template-columns: 1fr; }
  #welcome .wc { padding: 16px 14px; }
  #welcome h2 { font-size: 21px; }
  #welcome .wgo { justify-content: space-between; }
}
#welcome .wc { grid-column: main; }

/* visual answers (assets/hive/visual.js): charts drawn from a reply's ```chart block, widgets run sandboxed */
.vchart { margin: 12px 0; } .vchart svg { width: 100%; height: auto; display: block; font-family: var(--ui); }
.vchart .ct { fill: var(--ink); font-size: 14px; font-weight: 600; } .vchart .cx, .vchart .cy { fill: var(--dim); font-size: 11px; } .vchart .cl { fill: #0d1012; font-size: 11px; font-weight: 600; }
.vchart .cg { stroke: var(--line); stroke-width: 1; } .vchart .ca { stroke: var(--line2); stroke-width: 1.2; }
.vchart .s0 { fill: var(--m-azurite); } .vchart .s1 { fill: var(--m-copper); } .vchart .s2 { fill: var(--m-malachite); } .vchart .s3 { fill: var(--m-citrine); } .vchart .s4 { fill: var(--m-rhodo); } .vchart .s5 { fill: var(--m-lapis); } .vchart .s6 { fill: var(--m-peridot); } .vchart .s7 { fill: var(--m-hematite); }
.vchart .l0 { stroke: var(--m-azurite); } .vchart .l1 { stroke: var(--m-copper); } .vchart .l2 { stroke: var(--m-malachite); } .vchart .l3 { stroke: var(--m-citrine); } .vchart .l4 { stroke: var(--m-rhodo); } .vchart .l5 { stroke: var(--m-lapis); } .vchart .l6 { stroke: var(--m-peridot); } .vchart .l7 { stroke: var(--m-hematite); }
.vchart [class^="l"] { fill: none; stroke-width: 2.2; stroke-linejoin: round; } .vchart [class^="a"] { opacity: .18; } .vchart .a0 { fill: var(--m-azurite); } .vchart .a1 { fill: var(--m-copper); } .vchart .a2 { fill: var(--m-malachite); } .vchart .a3 { fill: var(--m-citrine); }
.vchart path[class^="s"], .vchart circle[class^="s"] { stroke: var(--bed); stroke-width: 1; }
.clegend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink2); margin: 4px 0 0 56px; } .clegend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.clegend i.s0 { background: var(--m-azurite); } .clegend i.s1 { background: var(--m-copper); } .clegend i.s2 { background: var(--m-malachite); } .clegend i.s3 { background: var(--m-citrine); } .clegend i.s4 { background: var(--m-rhodo); } .clegend i.s5 { background: var(--m-lapis); } .clegend i.s6 { background: var(--m-peridot); } .clegend i.s7 { background: var(--m-hematite); }
.cdata { margin-top: 6px; font-size: 12px; } .cdata summary { cursor: pointer; color: var(--dim); }
.vwidget { margin: 12px 0; } .vwidget iframe { width: 100%; height: 220px; border: 1px solid var(--line2); border-radius: 6px; background: #fff; display: block; } .vwidget small { display: block; margin-top: 4px; font-size: 11px; }
.pyrun { border-top: 1px solid var(--line2); } .pyrun iframe { width: 100%; height: 240px; border: 0; display: block; resize: vertical; background: #0d0f12; } .pyrun header { display: flex; justify-content: space-between; padding: 4px 8px; font-size: 11px; color: var(--dim); }

/* skills (settings) */
.sklist { display: grid; gap: 8px; margin: 8px 0 12px; } .sk { border: 1px solid var(--line2); border-radius: 6px; padding: 8px 10px; } .sk b { font-family: var(--code); font-weight: 500; } .sk p { margin: 4px 0 6px; }
.skform { display: grid; gap: 8px; } .skform label { display: grid; gap: 4px; font-size: 13px; } .skform label.chk { display: inline-flex; gap: 6px; align-items: center; margin-right: 14px; } .skform textarea, .skform input:not([type]) { width: 100%; box-sizing: border-box; }

/* follow-ups: the next questions, under the newest answer */
.fups { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; } .fups button { font: inherit; font-size: 13px; text-align: left; padding: 6px 10px; border: 1px solid var(--line2); border-radius: 14px; background: transparent; color: var(--ink2); cursor: pointer; }
.fups button:hover, .fups button:focus-visible { border-color: var(--gold); color: var(--ink); } .fups button::before { content: "↳ "; color: var(--gold); }

/* a private session: the composer says so */
#composer.private { box-shadow: inset 0 0 0 1px var(--m-lapis); } #privchat[aria-pressed="true"] { color: var(--m-lapis); }

/* downloads menu under an answer */
.dlm { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; } .dlm button { font: inherit; font-size: 12px; padding: 5px 10px; border: 1px solid var(--line2); border-radius: 4px; background: var(--bed2); color: var(--ink2); cursor: pointer; } .dlm button:hover { color: var(--ink); border-color: var(--gold); }

/* Mind → Tasks */
.tkform { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; } .tkform label { display: grid; gap: 4px; font-size: 13px; } .tkform .wide { grid-column: 1 / -1; } .tkform textarea { width: 100%; box-sizing: border-box; }
.tktpl { gap: 6px; flex-wrap: wrap; margin-top: 8px; } .tk { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; } .tk.off { opacity: .6; } .tk p { margin: 4px 0; }
.tkr { border-top: 1px solid var(--line); padding: 8px 0; } .tkr summary { cursor: pointer; } .tkr.new summary b::after { content: " · new"; color: var(--gold); font-weight: 500; } .tkr .b { margin: 8px 0; }
.tkform select, .tkform input { width: 100%; min-width: 0; box-sizing: border-box; } .tkform label { min-width: 0; }
@media (max-width: 560px) { .tk { grid-template-columns: 1fr; } .tkform { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .tkform { grid-template-columns: 1fr; } }

/* fact check under an answer */
.fc { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 6px; font-size: 13px; } .fc ul { margin: 8px 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; } .fc a { margin-left: 4px; }
.fcsum { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; } .fc .v { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; border: 1px solid currentColor; text-transform: uppercase; letter-spacing: .04em; }
.fc .v.supported { color: var(--ok); } .fc .v.contradicted { color: var(--bad); } .fc .v.unclear { color: var(--warn); } .acts .chk { font-size: 12px; }

/* versions of an answer (‹ 2/3 ›), and the “Ask about this” chip over a selection */
.acts .vers { display: inline-flex; align-items: center; gap: 2px; margin-right: 14px; font-variant-numeric: tabular-nums; }
.acts .vers button { margin: 0; padding: 3px 6px; font-size: 15px; line-height: 1; }
.acts .vers button:disabled { opacity: .35; cursor: default; }
.acts .vers small { font-size: 12px; color: var(--faint); min-width: 2.4em; text-align: center; }
.quote { position: fixed; z-index: 60; padding: 7px 12px; border-radius: 999px; font-size: 13px; background: var(--ink); color: var(--bg); box-shadow: 0 6px 20px rgba(0,0,0,.25); white-space: nowrap; }
.quote.hidden { display: none; }

/* projects: chips over the sessions (All · each project · + Project); the active one files new chats into it */
.projs { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.projs button { font-size: 13px; padding: 5px 11px; border: 1px solid var(--line2); border-radius: 999px; color: var(--faint); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projs button.on { color: var(--ink); border-color: var(--ink); }
.projs button[data-pedit] { border-style: dashed; }
.pfiles { display: grid; gap: 4px; margin: 6px 0 8px; }
.pfiles div { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; } .pfiles span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pfiles button { color: var(--faint); padding: 2px 6px; } .pfiles button:hover { color: var(--bad); }
.sess .ptag { font-size: 11px; border: 1px solid var(--line2); border-radius: 999px; padding: 0 6px; margin-left: 6px; }
.projtag { display: inline-block; font-size: 12px; color: var(--faint); margin-bottom: 6px; }
.skform label.filebtn { display: inline-flex; }

/* the canvas: an answer as a document; edit it, or select a passage and ask for a change */
.canvas { position: fixed; z-index: 55; top: 0; right: 0; height: 100vh; height: 100dvh; width: min(780px, 58vw); display: flex; flex-direction: column; background: var(--bed); border-left: 1px solid var(--line2); box-shadow: -14px 0 44px rgba(0,0,0,.35); }
.canvas.hidden { display: none; }
.canvas header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.canvas header b { font-weight: 400; font-size: 15px; flex: 1 1 180px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.canvas header button:not(.pri) { font-size: 13px; color: var(--faint); padding: 4px 4px; } .canvas header button:not(.pri):hover { color: var(--ink); }
.canvas button:disabled { opacity: .35; cursor: default; }
.cv-tabs { display: inline-flex; gap: 2px; border: 1px solid var(--line2); border-radius: 999px; padding: 1px 4px; } .cv-tabs button.on { color: var(--ink) !important; }
#cv-text { flex: 1; min-height: 0; resize: none; border: 0; padding: 18px 22px; background: transparent; color: var(--ink); font: inherit; font-size: 15.5px; line-height: 1.65; outline: none; }
#cv-text::selection { background: color-mix(in srgb, var(--m, #d9a441) 35%, transparent); }
.cv-prev { flex: 1; min-height: 0; overflow: auto; padding: 18px 22px; } .cv-prev.hidden, #cv-text.hidden { display: none; }
.canvas footer { border-top: 1px solid var(--line2); padding: 10px 16px 14px; display: grid; gap: 8px; }
.cv-presets { display: flex; flex-wrap: wrap; gap: 6px; } .cv-presets button { font-size: 12.5px; padding: 4px 10px; border: 1px solid var(--line2); border-radius: 999px; color: var(--faint); } .cv-presets button:hover { color: var(--ink); border-color: var(--ink); }
.cv-ask { display: flex; gap: 8px; } .cv-ask input { flex: 1; min-width: 0; background: transparent; border: 0; border-bottom: 1px solid var(--line2); padding: 6px 2px; font-size: 14.5px; color: var(--ink); } .cv-ask input:focus { outline: none; border-bottom-color: var(--m, var(--ink)); }
.canvas.busy #cv-text { opacity: .55; } .canvas.busy footer button, .canvas.busy footer input { pointer-events: none; opacity: .5; }
@media (max-width: 820px) { .canvas { width: 100%; border-left: 0; box-shadow: none; } }
