/* Doko app: the Refract language (a near-black field ruled by hairlines, one beam split into four
   bands of light) made into a workspace for talking to Doko. */

:root {
  --bg: #07090D;
  --rail: #0A0D12;
  --raise: #10151C;
  --raise-2: #151B24;
  --hover: rgba(237, 241, 244, 0.05);
  --line: #1A222C;
  --line-strong: #2A3441;
  --ink: #EDF1F4;
  --ink-2: #C9D1D9;
  --muted: #8E99A6;
  --faint: #5E6875;
  --accent: #86E5F2;
  --on-accent: #061015;
  --ice: #86E5F2;
  --violet: #9A8CFF;
  --orchid: #EE7FD6;
  --amber: #FFC07A;
  --danger: #FF8C8C;
  --on-danger: #160606;
  --ok: #7EE2A8;
  --split: linear-gradient(90deg, var(--ice), var(--violet) 36%, var(--orchid) 68%, var(--amber));
  --split-v: linear-gradient(180deg, var(--ice), var(--violet) 36%, var(--orchid) 68%, var(--amber));
  --code-bg: #0B0F15;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --font-ui: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --font-turn: "Instrument Serif", Georgia, serif;
  --rail-w: 280px;
  --read: 760px;
  --radius: 12px;
  --radius-lg: 20px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F6F7F9;
  --rail: #EEF1F4;
  --raise: #FFFFFF;
  --raise-2: #F1F3F6;
  --hover: rgba(11, 16, 22, 0.05);
  --line: #E0E5EB;
  --line-strong: #C9D1DA;
  --ink: #0B1016;
  --ink-2: #26303B;
  --muted: #5A6573;
  --faint: #8A95A2;
  --accent: #0B7686;
  --on-accent: #FFFFFF;
  --ice: #12A3B6;
  --violet: #6D5CF0;
  --orchid: #C9479F;
  --amber: #D9821C;
  --danger: #C93838;
  /* Light red takes white words: dark ones fell under 4.5:1. */
  --on-danger: #FFFFFF;
  --ok: #1E8E55;
  --code-bg: #F2F4F7;
  --shadow: 0 1px 2px rgba(11, 16, 22, 0.06), 0 18px 48px -26px rgba(11, 16, 22, 0.28);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.sprite { display: none; }
.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; }
[hidden] { display: none !important; }
kbd, .hint { font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.02em; color: var(--faint); }

/* ------------------------------------------------------------------ shell */

.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr) 0; height: 100dvh; transition: grid-template-columns 0.34s cubic-bezier(0.2, 0.8, 0.2, 1); }
.shell[data-rail="closed"] { grid-template-columns: 0 minmax(0, 1fr) 0; }
/* The workspace: the sidebar steps aside, the chat becomes a column, and the page it builds fills the rest. */
.shell[data-workspace="open"], .shell[data-workspace="open"][data-rail="closed"] { grid-template-columns: 0 minmax(340px, 32vw) minmax(0, 1fr); }
.shell[data-workspace="open"] .rail { visibility: hidden; transform: translateX(-12px); opacity: 0; }
.shell[data-workspace="open"] .topbar__rail { display: none; }
.shell[data-rail="closed"] .rail { visibility: hidden; transform: translateX(-12px); opacity: 0; }

.rail {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--rail); border-right: 1px solid var(--line);
  transition: opacity 0.2s, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.28s;
}
.rail__top { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 10px 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 8px; box-shadow: 0 0 0 1px var(--line-strong); }
.brand__word { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }

.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--muted); transition: background 0.15s, color 0.15s; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }

.rail__actions { display: grid; gap: 2px; padding: 4px 8px 10px; }
.rail__action { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 10px; font-size: 14px; color: var(--ink-2); text-align: left; transition: background 0.15s, color 0.15s; }
.rail__action svg { width: 17px; height: 17px; }
.rail__action span { flex: 1; }
.rail__action:hover { background: var(--hover); color: var(--ink); }
.rail__action .hint { opacity: 0; transition: opacity 0.15s; }
.rail__action:hover .hint { opacity: 1; }

.rail__scroll { flex: 1; overflow-y: auto; padding: 4px 8px 16px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.rail__group { margin-top: 14px; }
.rail__label { margin: 0 0 4px; padding: 0 10px; font: 500 12.5px/1.6 var(--font-ui); color: var(--muted); }
/* A heading that folds its list away (Plugins). */
.rail__fold { display: flex; align-items: center; gap: 6px; padding: 2px 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.rail__fold svg { width: 12px; height: 12px; stroke-width: 2; transition: transform 160ms ease; }
.rail__fold[aria-expanded="false"] svg { transform: rotate(-90deg); }
.rail__fold:hover { color: var(--muted); }
.rail__fold:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.rail__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.rail__empty { margin: 18px 10px; color: var(--faint); font-size: 13px; }

.item { position: relative; display: flex; align-items: center; border-radius: 9px; }
.item__link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 34px 0 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.item__link span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.item__link svg { width: 16px; height: 16px; color: var(--faint); }
.item:hover .item__link, .item:focus-within .item__link { background: var(--hover); color: var(--ink); }
.item[aria-current="page"] .item__link { background: var(--raise-2); color: var(--ink); }
/* The chat Doko is answering in: its name shimmers in the app's colours, with a small light beside it. */
.item--working .item__link span { background: linear-gradient(90deg, var(--ink-2) 0%, var(--ink-2) 30%, var(--ice) 42%, var(--violet) 50%, var(--orchid) 58%, var(--ink-2) 70%, var(--ink-2) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: item-shimmer 2.2s linear infinite; }
.item--working .item__link::after { content: ""; flex: none; width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: var(--split); background-size: 300% 100%; animation: item-light 1.6s ease-in-out infinite, travel 3s linear infinite; }
.item--working:hover .item__link::after, .item--working:focus-within .item__link::after { opacity: 0; }
@keyframes item-shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes item-light { 50% { transform: scale(0.7); opacity: 0.55; } }
.item[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--split-v); }
.item__more { position: absolute; right: 4px; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: var(--muted); opacity: 0; transition: opacity 0.12s, background 0.12s; }
.item:hover .item__more, .item:focus-within .item__more, .item__more[aria-expanded="true"] { opacity: 1; }
.item__more:hover { background: var(--hover); color: var(--ink); }
.item__more svg { width: 16px; height: 16px; }
.item__rename { flex: 1; height: 32px; margin: 1px 0; padding: 0 10px; border-radius: 8px; border: 1px solid var(--accent); background: var(--raise); outline: none; font-size: 14px; }

.rail__foot { padding: 10px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
/* The Android app, small, above the account. Not shown inside the app itself, or on an iPhone. */
/* A project being uploaded: what is happening, and how far it is, above the message box. */
.upload { display: grid; gap: 6px; margin: 0 4px 8px; font-size: 12.5px; color: var(--ink-2); }
.upload__bar { height: 3px; border-radius: 3px; background: var(--hover); overflow: hidden; }
/* The script sets the bar's width as the upload goes; it steps rather than animating a layout property. */
.upload__bar i { display: block; height: 100%; width: 0; background: var(--accent); }

/* A project folder the person uploaded: a card in the chat that opens it beside the chat. */
.msg--import { margin: 4px 0 14px; }
.import-card { display: flex; align-items: center; gap: 12px; max-width: 520px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--hover); }
.import-card > svg { width: 22px; height: 22px; color: var(--ink-2); flex: none; }
.import-card__text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.import-card__text strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-card__text small { font-size: 12px; color: var(--faint); }
.app-get { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 9px; font-size: 12.5px; color: var(--faint); text-decoration: none; transition: background 0.15s, color 0.15s; }
.app-get:hover { background: var(--hover); color: var(--ink-2); }
.app-get svg { width: 15px; height: 15px; }
.app-get small { margin-left: auto; font: 500 9.5px/1 var(--font-mono); letter-spacing: 0.1em; padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line); }
.upgrade-nudge { position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; text-align: left; background: var(--raise); border: 1px solid var(--line); overflow: hidden; transition: border-color 0.15s; }
.upgrade-nudge::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 1px; background: var(--split); opacity: 0.8; }
.upgrade-nudge:hover { border-color: var(--line-strong); }
.upgrade-nudge svg { color: var(--accent); }
.upgrade-nudge span { display: grid; line-height: 1.3; }
.upgrade-nudge strong { font-weight: 500; font-size: 13.5px; }
.upgrade-nudge small { color: var(--muted); font-size: 12px; }
.account { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 12px; text-align: left; transition: background 0.15s; }
.account:hover, .account[aria-expanded="true"] { background: var(--hover); }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 500; font-size: 13px; color: var(--ink); background: var(--raise-2); box-shadow: 0 0 0 1px var(--line-strong); position: relative; }
.avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; padding: 1px; background: var(--split); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.75; }
.account__text { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.account__name { font-size: 14px; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account__plan { font: 400 12px/1.4 var(--font-ui); color: var(--muted); }
.account__chev { color: var(--faint); transform: rotate(180deg); width: 16px; height: 16px; }

.scrim { display: none; }

.workspace { display: flex; flex-direction: column; min-width: 0; height: 100dvh; overflow: hidden; background: var(--raise); border-left: 0; visibility: hidden; opacity: 0; transition: opacity 0.34s ease, visibility 0s 0.34s; }
/* Its border only while it is open: closed, it is no width at all, and a border would stick out past the window. */
.shell[data-workspace="open"] .workspace { visibility: visible; opacity: 1; border-left: 1px solid var(--line); transition: opacity 0.34s ease 0.08s; }
.workspace__bar { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 10px 0 12px; border-bottom: 1px solid var(--line); flex: none; }
.workspace__tabs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--raise-2); }
.workspace__tabs button { height: 28px; padding: 0 12px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.workspace__tabs button[aria-selected="true"] { color: var(--ink); background: var(--bg); box-shadow: 0 0 0 1px var(--line-strong); }
/* While Doko works on this chat: what it is doing in place of the title, and a moving bar under the bar. */
.workspace__bar { position: relative; }
.workspace__status, .workspace__progress { display: none; }
.workspace[data-busy] .workspace__title { display: none; }
/* The step/action/time status is not shown in the workspace, even during a build — the chat shows the
   steps, and a long generic line only reads as stuck (owner, 2026-10-30). */
.workspace[data-busy] .workspace__status { display: none; }
.workspace__status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; vertical-align: 0; border-radius: 50%; background: var(--ok); animation: ws-light 1.4s ease-in-out infinite; }
.workspace[data-busy] .workspace__progress { display: block; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; }
/* The light runs from just off the left edge to just off the right: by translate, in its own widths (35% of the bar each). */
.workspace__progress::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 35%; border-radius: 2px; background: var(--split); transform: translateX(-100%); animation: ws-progress 1.4s cubic-bezier(0.45, 0, 0.25, 1) infinite; }
@keyframes ws-progress { to { transform: translateX(285.714%); } }
.workspace__title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.workspace__tools { display: flex; align-items: center; gap: 2px; }
.workspace__tools .icon-btn[aria-pressed="true"] { color: var(--ink); background: var(--hover); }
.workspace__back { margin-left: 6px; height: 32px; }
.workspace__unity { margin-left: 6px; height: 32px; display: inline-flex; align-items: center; gap: 6px; }
.workspace__unity[hidden] { display: none; }
.workspace__unity svg { width: 16px; height: 16px; flex: none; }
.workspace__keep { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; flex: none; margin: 0; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.workspace__keep .btn { height: 28px; flex: none; }
.workspace__body { position: relative; flex: 1; min-height: 0; }
.workspace__frame { position: absolute; inset: 0; display: grid; background: #FFFFFF; }
/* The preview, the page as it is written, and the building veil all sit in the same place. */
.workspace__frame > iframe, .workspace__frame > .ws-building { grid-area: 1 / 1; }
.workspace__frame.is-building #ws-iframe { visibility: hidden; }
.workspace__frame iframe { width: 100%; height: 100%; border: 0; background: #FFFFFF; }
.workspace__frame[data-width="mobile"] { justify-items: center; padding: 18px 0; background: var(--raise-2); }
.workspace__frame[data-width="mobile"] iframe { width: 390px; max-width: calc(100% - 24px); border-radius: 22px; box-shadow: 0 0 0 1px var(--line-strong), var(--shadow); }
/* The Code tab, like an editor: the files on the left, the picked one's code on the right. */
.workspace__code { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); background: var(--raise); }
.workspace__code[hidden] { display: none; }
.ws-tree { display: flex; flex-direction: column; gap: 1px; min-height: 0; overflow: auto; padding: 12px 8px; border-right: 1px solid var(--line); background: var(--bg); }
.ws-tree__head { margin: 2px 8px 8px; font: 500 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.ws-tree__file { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border-radius: 7px; color: var(--ink-2); font: 500 12.5px/1.2 var(--font-mono); text-align: left; }
.ws-tree__file:hover { background: var(--hover); color: var(--ink); }
.ws-tree__file[aria-current="true"] { background: var(--raise-2); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
.ws-tree__file svg { width: 14px; height: 14px; flex: none; color: var(--faint); }
.ws-tree__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-tree__meta { color: var(--faint); font-size: 11px; white-space: nowrap; }
.ws-tree__file.is-writing .ws-tree__name, .ws-tree__file.is-writing svg { color: var(--ok); }
/* The file Doko is writing: a green light that breathes. */
.ws-tree__light { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); animation: ws-light 1.4s ease-in-out infinite; }
@keyframes ws-light { 50% { opacity: 0.4; box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 10%, transparent); } }
.ws-editor { min-width: 0; min-height: 0; overflow: auto; padding: 14px 18px; }
.ws-editor .code { margin: 0; }
.ws-editor__tab { margin: 2px 0 10px; font: 500 12px/1 var(--font-mono); letter-spacing: 0.04em; color: var(--muted); }
.ws-editor__empty { display: grid; place-content: center; justify-items: center; gap: 8px; height: 100%; color: var(--muted); font-size: 13.5px; text-align: center; }
.ws-editor__empty svg { width: 22px; height: 22px; color: var(--faint); }
.ws-editor__empty p { margin: 0; }
.ws-editor__hint { color: var(--faint); font: 500 12px var(--font-mono); }
/* While Doko writes a page: the page so far behind frosted glass, two frames taking turns so it never
   flashes, with a light sweeping over it; before any of it exists, a sketch of a page. */
.workspace__frame .ws-draft { pointer-events: none; opacity: 0; filter: blur(14px) saturate(1.2); transform: scale(1.03); transition: opacity 0.7s ease; }
.workspace__frame .ws-draft.is-front { opacity: 0.85; }
.ws-building { position: relative; display: grid; place-items: center; overflow: hidden; pointer-events: none; }
/* Before any page exists: a dark stage with a slow aurora of the brand light, so the build has presence.
   Once a page-so-far exists ([data-draft]) this clears, and the frosted real page shows instead. */
.ws-building:not([data-draft]) { background: radial-gradient(130% 120% at 50% 0%, #121823, #080B10 72%); }
.ws-building:not([data-draft])::before {
  content: ""; position: absolute; inset: -45%;
  background:
    radial-gradient(38% 46% at 24% 30%, color-mix(in srgb, var(--violet) 62%, transparent), transparent 70%),
    radial-gradient(34% 42% at 76% 32%, color-mix(in srgb, var(--ice) 50%, transparent), transparent 70%),
    radial-gradient(42% 52% at 62% 74%, color-mix(in srgb, var(--orchid) 54%, transparent), transparent 70%),
    radial-gradient(34% 44% at 28% 78%, color-mix(in srgb, var(--amber) 36%, transparent), transparent 70%);
  filter: blur(46px) saturate(1.35); opacity: 0.6;
  animation: ws-aurora 15s ease-in-out infinite alternate;
}
@keyframes ws-aurora {
  0%   { transform: translate(-4%, -3%) rotate(0deg) scale(1.05); }
  50%  { transform: translate(5%, 4%) rotate(7deg) scale(1.16); }
  100% { transform: translate(-3%, 6%) rotate(-6deg) scale(1.1); }
}
.ws-building::after { content: ""; position: absolute; inset: -20%; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.16) 50%, transparent 60%); transform: translateX(-60%); animation: ws-sweep 2.8s cubic-bezier(0.45, 0, 0.25, 1) infinite; }
@keyframes ws-sweep { to { transform: translateX(60%); } }
.ws-building__sketch { position: absolute; inset: 0; display: grid; align-content: start; gap: 18px; padding: 6% 9%; filter: blur(5px); opacity: 0.8; transition: opacity 0.6s ease; }
.ws-building[data-draft] .ws-building__sketch { opacity: 0; }
.ws-building__sketch i, .ws-building__cards i { display: block; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)); background-size: 200% 100%; animation: travel 1.8s linear infinite; }
.ws-building__nav { height: 22px; width: 100%; margin-bottom: 4vh; }
.ws-building__title { height: clamp(30px, 6vh, 56px); width: 62%; }
.ws-building__title--short { width: 44%; }
.ws-building__line { height: 14px; width: 54%; }
.ws-building__line--short { width: 38%; }
.ws-building__button { height: 40px; width: 150px; border-radius: 999px !important; margin-bottom: 4vh; }
.ws-building__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ws-building__cards i { height: 18vh; }
.ws-building__note { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; padding: 22px 30px 20px; border-radius: 18px; background: color-mix(in srgb, var(--raise) 82%, transparent); border: 1px solid var(--line-strong); box-shadow: var(--shadow); color: var(--ink); text-align: center; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); animation: ws-float 3.2s ease-in-out infinite; }
.ws-building__note .mind { width: 64px; height: 52px; }
.ws-building__note strong { font-weight: 500; font-size: 15px; }
.ws-building__note small { color: var(--muted); font: 500 11.5px/1.4 var(--font-mono); letter-spacing: 0.04em; }
/* On the dark stage the card reads light, whatever the theme. */
.ws-building:not([data-draft]) .ws-building__note { background: color-mix(in srgb, #0B1016 68%, transparent); border-color: rgba(255, 255, 255, 0.14); color: #fff; }
/* The building card shows just "Building your site", not a generic detail line. */
.ws-building__note small { display: none; }
@keyframes ws-float { 50% { transform: translateY(-6px); } }
/* The finished page comes into focus. */
.workspace__frame.is-revealing #ws-iframe { animation: ws-reveal 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes ws-reveal { from { opacity: 0.35; filter: blur(16px) saturate(1.2); transform: scale(1.015); } to { opacity: 1; filter: none; transform: none; } }
.workspace__busy { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--raise); color: var(--muted); font-size: 13.5px; }
.workspace__busy .mind { width: 72px; height: 58px; }
.act--preview { width: auto; gap: 6px; padding: 0 9px; font-size: 12.5px; }
/* A page's file in a reply, one line each, like a terminal agent's. */
.file-step { display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; margin: 6px 0; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--raise); color: var(--ink-2); font: 500 12.5px/1.2 var(--font-mono); text-align: left; }
.file-step:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong)); }
.file-step svg { width: 14px; height: 14px; flex: none; }
.file-step svg:last-child { color: var(--ok); }
.file-step__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-step__meta { color: var(--faint); white-space: nowrap; }
/* Code with no page to run: no Preview tab or preview tools. */
.workspace--code [data-ws-tab="preview"], .workspace--code [data-ws="desktop"], .workspace--code [data-ws="mobile"], .workspace--code [data-ws="reload"], .workspace--code [data-ws="open"] { display: none; }

/* ------------------------------------------------------------------ stage */

.stage { position: relative; display: flex; flex-direction: column; min-width: 0; height: 100dvh; }
.topbar { display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 14px; flex: none; }
.topbar__rail { display: none; }
.shell[data-rail="closed"] .topbar__rail { display: inline-grid; }
.topbar__title { flex: 1; min-width: 0; text-align: center; color: var(--muted); font-size: 13.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 12px; }
.topbar__end { display: flex; align-items: center; gap: 2px; }
/* The escalating nudge, and the balance beside it. A balance is a reading, not a button, so it is set in the mono face
   with tabular figures: it falls a digit at a time and must not shuffle sideways as it does. The action is the lit part.
   It arrives at 80%, so it is a warning that stays quiet until it matters rather than a banner always on. */
.usage-pill { display: inline-flex; align-items: center; gap: 9px; height: 30px; padding: 0 4px 0 10px; margin-right: 6px; border-radius: 999px; white-space: nowrap; }
.usage-pill[hidden] { display: none; }
.usage-pill__balance { font: 500 12px var(--font-mono); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; color: var(--muted); }
.usage-pill__go { display: inline-flex; align-items: center; height: 24px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--on-accent); background: var(--accent); }
.usage-pill:hover .usage-pill__go { background: color-mix(in srgb, var(--accent) 86%, #fff); }
/* Used up: the same pill, in the colour that means stop, because there is nothing left to spend. */
.usage-pill.is-urgent .usage-pill__go { background: var(--amber); }
.topbar__new { display: none; }
.shell[data-rail="closed"] .topbar__new { display: inline-grid; }
.model-pick { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 12px; border-radius: 10px; font-weight: 500; font-size: 14.5px; letter-spacing: -0.005em; color: var(--ink); transition: background 0.15s; }
.model-pick:hover, .model-pick[aria-expanded="true"] { background: var(--hover); }
.model-pick svg { width: 16px; height: 16px; color: var(--muted); }

/* The admin's message to everyone, under the top bar, until dismissed. */
.view { flex: 1; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.view__inner { width: min(var(--read), 100% - 40px); margin: 0 auto; padding: 12px 0 36px; }

/* ------------------------------------------------------------------ the empty state */

.hello { min-height: 100%; display: grid; align-content: center; justify-items: center; gap: 0; padding: 24px 20px calc(18vh); }
.hello__mark { width: 36px; height: 36px; border-radius: 10px; margin-bottom: 18px; box-shadow: 0 0 0 1px var(--line-strong), 0 18px 40px -16px rgba(134, 229, 242, 0.35); }
.hello h1 { margin: 0; text-align: center; font-weight: 400; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.3; letter-spacing: -0.015em; }
.hello h1 .turn { font-family: var(--font-turn); font-style: italic; font-weight: 400; letter-spacing: -0.01em; text-shadow: -1.5px 0 rgba(154, 140, 255, 0.55), 1.5px 0 rgba(238, 127, 214, 0.45); }
:root[data-theme="light"] .hello h1 .turn { text-shadow: -1px 0 rgba(109, 92, 240, 0.35), 1px 0 rgba(201, 71, 159, 0.3); }
.hello__sub { margin: 12px 0 0; color: var(--muted); font-size: 15px; text-align: center; }
.slips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: min(var(--read), 100%); margin-top: 28px; }
.slip { position: relative; display: grid; gap: 6px; padding: 14px 14px 16px; border-radius: 14px; text-align: left; background: var(--raise); border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; line-height: 1.4; overflow: hidden; transition: border-color 0.15s, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.slip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--split); transform: scaleX(0); transform-origin: left; transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.slip:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.slip:hover::after { transform: scaleX(1); }
.slip__tag { font: 500 12px/1 var(--font-ui); color: var(--muted); }

/* ------------------------------------------------------------------ messages */

.thread { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; }
.msg { position: relative; min-width: 0; }
.msg--user { display: grid; justify-items: end; }
.bubble { max-width: min(85%, 620px); padding: 11px 16px; border-radius: 18px 18px 6px 18px; background: var(--raise-2); border: 1px solid var(--line); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.files { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-bottom: 8px; }
.file-chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border-radius: 9px; background: var(--raise); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); max-width: 260px; }
.file-chip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-chip small { color: var(--faint); font-family: var(--font-mono); font-size: 10.5px; }
.file-chip svg { width: 15px; height: 15px; color: var(--muted); }
.file-chip button { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: -4px; border-radius: 6px; color: var(--muted); }
.file-chip button:hover { background: var(--hover); color: var(--ink); }

.msg__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font: 500 13px/1 var(--font-ui); color: var(--muted); }
.msg__head img { width: 22px; height: 22px; border-radius: 6px; box-shadow: 0 0 0 1px var(--line-strong); }
.msg__head b { color: var(--ink-2); font-weight: 500; }
/* How long a film takes, said the moment it is asked for. */
/* What Doko adds about a piece it wrote (slots to fill, what it needs, an offer): apart from the piece, which "Copy" takes alone (owner, 2026-11-16). */
.msg__followup { margin: 14px 0 0; max-width: 68ch; padding: 10px 14px; border-left: 2px solid var(--muted); border-radius: 0 10px 10px 0; background: color-mix(in oklch, var(--muted) 8%, transparent); color: var(--muted); font-size: 0.95em; }
.msg__followup-label { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.msg__followup .prose > :last-child { margin-bottom: 0; }
.msg__notice { margin: 0 0 10px; max-width: 68ch; padding: 10px 14px; border-left: 2px solid var(--accent); border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--accent) 7%, transparent); color: var(--ink-2); font: 400 14px/1.55 var(--font-ui); }

.prose { color: var(--ink); font-size: 15.5px; line-height: 1.72; overflow-wrap: anywhere; }
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }
.prose p { margin: 0 0 14px; }
.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { margin: 26px 0 10px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.3; }
.prose h2 { font-size: 21px; }
.prose h3 { font-size: 18px; }
.prose h4, .prose h5, .prose h6 { font-size: 16px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 24px; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--faint); }
.prose li.task { list-style: none; margin-left: -20px; display: flex; gap: 9px; align-items: baseline; }
.task__box { flex: none; width: 13px; height: 13px; border-radius: 4px; border: 1.5px solid var(--line-strong); transform: translateY(2px); }
.task__box--done { background: var(--accent); border-color: var(--accent); }
.prose blockquote { margin: 0 0 14px; padding: 2px 0 2px 16px; border-left: 2px solid var(--line-strong); color: var(--ink-2); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 24px 0; }
.math { font-variant-numeric: tabular-nums; white-space: nowrap; }
.math--block { display: block; margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); text-align: center; font-size: 16.5px; white-space: pre-wrap; overflow-x: auto; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose code { font: 13.5px/1.5 var(--font-mono); padding: 1.5px 6px; border-radius: 6px; background: var(--raise-2); border: 1px solid var(--line); }
.prose strong { font-weight: 600; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: break-word; }
.prose th { font-weight: 500; color: var(--ink-2); background: var(--raise); }
.prose tr:last-child td { border-bottom: 0; }

.code { margin: 0 0 16px; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--line); overflow: hidden; }
.code__bar { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--line); }
.code__lang { font: 500 11px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.code__copy { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 7px; color: var(--muted); font-size: 12.5px; }
.code__copy:hover { background: var(--hover); color: var(--ink); }
.code__copy svg { width: 14px; height: 14px; }
.code pre { margin: 0; padding: 14px 16px 16px; overflow-x: auto; }
.code pre code { font: 13.5px/1.62 var(--font-mono); padding: 0; border: 0; background: none; white-space: pre; }
.code--open { border-color: var(--line-strong); }
/* Prose in a block (a prompt, a message, plain text) wraps; code keeps its lines and scrolls. */
.code--wrap pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-k { color: var(--violet); }
.tk-s { color: var(--ok); }
.tk-n { color: var(--amber); }
.tk-c { color: var(--faint); font-style: italic; }
.tk-f { color: var(--ice); }

.msg__foot { display: flex; align-items: center; gap: 2px; margin-top: 10px; min-height: 30px; }
.act { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--faint); transition: background 0.12s, color 0.12s; }
.act:hover { background: var(--hover); color: var(--ink); }
.act svg { width: 16px; height: 16px; }
.act--listen.is-playing { color: var(--accent); }
.act--listen.is-loading { opacity: 0.55; cursor: progress; }
.msg__said { display: inline-grid; place-items: center; width: 30px; height: 30px; color: var(--faint); }
.msg__said svg { width: 14px; height: 14px; }
.msg--user .msg__foot { justify-content: flex-end; opacity: 0; transition: opacity 0.15s; }
.msg--user:hover .msg__foot, .msg--user:focus-within .msg__foot { opacity: 1; }
.msg__meta { margin-left: 8px; font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.06em; color: var(--faint); }
.note { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--muted); }
.note--error { color: var(--danger); }
.note .link-btn { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.edit-box { width: min(85%, 620px); display: grid; gap: 8px; }
.edit-box textarea { width: 100%; min-height: 90px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--accent); background: var(--raise); resize: vertical; outline: none; }
.edit-box div { display: flex; justify-content: flex-end; gap: 8px; }

/* Thinking: the Doko mark, cut from the logo, with a band of split light passing through it and a
   soft halo that follows the light. When the model reasons, the mark takes on a violet tint. */
.mind {
  --mind-band: linear-gradient(115deg, transparent 38%, var(--ice) 44%, var(--violet) 49%, var(--orchid) 54%, var(--amber) 59%, transparent 65%);
  --mind-base: color-mix(in srgb, var(--muted) 34%, transparent);
  position: relative; width: 48px; height: 38px; margin: 4px 0 2px;
  animation: mind-breathe 2.8s ease-in-out infinite;
}
.mind__glow, .mind__mark, .mind__glow::before { position: absolute; inset: 0; }
.mind__glow { filter: blur(7px); opacity: 0.65; transition: opacity 0.6s; }
.mind__glow::before, .mind__mark {
  content: "";
  -webkit-mask: url(/assets/logo-mark.png) center / contain no-repeat;
  mask: url(/assets/logo-mark.png) center / contain no-repeat;
  background-image: var(--mind-band);
  background-size: 300% 100%;
  background-repeat: no-repeat;
  animation: mind-light 1.9s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
.mind__mark { background-color: var(--mind-base); transition: background-color 0.6s; }
.mind--deep { --mind-base: color-mix(in srgb, var(--violet) 30%, color-mix(in srgb, var(--muted) 30%, transparent)); }
.mind--deep .mind__glow { opacity: 0.9; }
/* In a reply it is the logo beside the model's name, in the same tile, until the first words arrive. */
.msg__head .mind { flex: none; width: 22px; height: 22px; margin: 0; border-radius: 6px; box-shadow: 0 0 0 1px var(--line-strong); }
.msg__head .mind .mind__mark, .msg__head .mind .mind__glow { inset: 4px 3px; }
.msg__head .mind .mind__glow { filter: blur(3px); }
@keyframes mind-light { from { background-position: 100% 0; } to { background-position: 0% 0; } }
@keyframes mind-breathe { 0%, 100% { transform: scale(0.96); } 50% { transform: scale(1); } }
/* While Doko works on a reply, a log like a terminal's: steps done with a tick, the one now with a green light. */
.work { display: grid; gap: 6px; margin: 10px 0 2px; font: 400 13.5px/1.35 var(--font-ui); color: var(--muted); }
.work__line { display: flex; align-items: center; gap: 9px; min-width: 0; max-width: 100%; }
.work__line svg { width: 13px; height: 13px; flex: none; }
.work__line.is-done svg { color: var(--ok); }
.work__line.is-failed svg, .work__line.is-failed .work__text { color: var(--danger); }
.work__light { width: 7px; height: 7px; margin: 0 3px; flex: none; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); animation: ws-light 1.4s ease-in-out infinite; }
.work__text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.work__line.is-now .work__text { background: linear-gradient(90deg, var(--muted) 0%, var(--ink) 25%, var(--muted) 50%, var(--muted) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: travel 2.4s linear infinite; }
.work__time { flex: none; color: var(--faint); font-variant-numeric: tabular-nums; }
/* A phrase that moves on rises into place, the shimmer carrying on over it. */
@keyframes work-turn { from { opacity: 0; transform: translateY(5px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.work__line.is-now .work__text.is-turning { animation: work-turn 420ms cubic-bezier(0.22, 1, 0.36, 1) both, travel 2.4s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .work__line.is-now .work__text.is-turning { animation: travel 2.4s linear infinite; }
}

/* An app Doko built, to download; and the button to connect GitHub when the work needs it. */
.app-card, .connect-card { display: flex; align-items: center; gap: 12px; max-width: 600px; margin: 8px 0 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--raise); }
.app-card__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--raise-2); color: var(--accent); }
.app-card__icon svg { width: 20px; height: 20px; }
/* Where the card is narrow (beside the workspace, on a phone), its buttons go on a row of their own. */
.app-card, .connect-card { flex-wrap: wrap; }
.app-card__text, .connect-card__text { display: grid; gap: 3px; min-width: 0; flex: 1 1 250px; }
.app-card__text strong, .connect-card__text strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-card__text small { color: var(--muted); font: 500 12px var(--font-mono); }
.connect-card__text small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.app-card__acts { display: flex; justify-content: flex-end; gap: 8px; flex: 1 0 auto; }
.app-card__acts .btn, .connect-card .btn { height: 34px; gap: 6px; text-decoration: none; }
.app-card__acts svg { width: 15px; height: 15px; }
.connect-card__logo { width: 32px; height: 32px; flex: none; border-radius: 8px; }
/* A site Doko put online: the app card, with Vercel's mark and the live link. */
.site-card__logo { width: 40px; height: 40px; flex: none; border-radius: 10px; }
.site-card small a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.connect-card .btn { flex: none; margin-left: auto; }
.connect-card__acts { display: flex; gap: 8px; margin-left: auto; }
.connect-card__acts .btn { margin-left: 0; }
@media (max-width: 560px) {
  .app-card__acts { width: 100%; }
  .app-card__acts .btn, .connect-card .btn { flex: 1; justify-content: center; }
}

/* The plan for a task with several steps: done, the one being worked on, what is next, what failed. */
.task-plan { max-width: 560px; margin: 2px 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--raise); }
.task-plan__head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; font: 500 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.task-plan__steps { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.4; }
.task-plan__step { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); }
.task-plan__step > svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.task-plan__mark { width: 12px; height: 12px; flex: none; margin: 3px 1px 0; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.task-plan__mark--now { width: 8px; height: 8px; margin: 5px 3px 0; border: 0; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); animation: ws-light 1.4s ease-in-out infinite; }
.task-plan__mark--open { border-color: var(--accent); }
.task-plan__step--running { color: var(--ink); font-weight: 500; }
.task-plan__step--done { color: var(--muted); }
.task-plan__step--done svg { color: var(--ok); }
.task-plan__step--failed > svg, .task-plan__step--failed .task-plan__text small { color: var(--danger); }
.task-plan__step--skipped .task-plan__text { color: var(--faint); text-decoration: line-through; }
.task-plan__text { min-width: 0; }
.task-plan__text small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 400; }
/* The working mark that trails the words as Doko writes: the Doko logo, inline, with the band of light
   sweeping through it — the thinking light, small. */
.mind--line { display: inline-block; width: 20px; height: 14px; margin: 0 1px -2px 5px; vertical-align: baseline; }
.mind--line .mind__glow, .mind--line .mind__mark { inset: 0; }
.mind--line .mind__glow { filter: blur(3px); opacity: 0.7; }
/* The last word and the working mark travel together, so the mark never drops onto a line by itself. */
.mind-tail { white-space: nowrap; }

/* Raised by the chat notice's height (--notice-h, set by the app) while one shows, so it never sits on the notice. */
.jump { position: absolute; left: 50%; bottom: calc(150px + var(--notice-h, 0px)); transform: translateX(-50%); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--raise); border: 1px solid var(--line-strong); color: var(--ink); box-shadow: var(--shadow); z-index: 3; }

/* ------------------------------------------------------------------ composer */

.dock { position: relative; flex: none; width: min(var(--read), 100% - 32px); margin: 0 auto; padding: 0 0 12px; }
/* The admin's notice to everyone (owner, 2026-11-15: "Yellow Color ... modern and stylish ... a close icon"): a yellow
   card just above the message box, as wide as it, in the dock's flow so it covers nothing. Dark: a yellow-tinted glass
   with light warm words; light: a soft solid yellow with dark words. The admin panel's preview uses the light look
   with .chat-notice--light. */
.chat-notice {
  --cn-ink: #FFF3CC;
  --cn-link: #FFE07A;
  --cn-muted: rgba(255, 236, 184, 0.72);
  --cn-hover: rgba(255, 214, 92, 0.14);
  --cn-badge: #FFD23F;
  --cn-on-badge: #2A1E00;
  position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 0 0 10px; padding: 9px 8px 9px 10px;
  border-radius: var(--radius-lg); border: 1px solid rgba(255, 210, 63, 0.4);
  background: radial-gradient(120% 160% at 0% 0%, rgba(255, 210, 63, 0.2), transparent 55%), linear-gradient(100deg, rgba(255, 210, 63, 0.13), rgba(255, 186, 48, 0.07)), var(--raise);
  box-shadow: 0 1px 0 rgba(255, 244, 200, 0.06) inset, 0 14px 34px -22px rgba(255, 196, 36, 0.55);
  animation: chat-notice-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* The light along the top edge, as the message box has, in the notice's own yellow. */
.chat-notice::before { content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, #FFD23F 30%, #FFB547 70%, transparent); opacity: 0.85; pointer-events: none; }
.chat-notice[hidden] { display: none; }
:root[data-theme="light"] .chat-notice, .chat-notice--light {
  --cn-ink: #3A2B00;
  --cn-link: #3A2B00;
  --cn-muted: #6E5610;
  --cn-hover: rgba(150, 104, 0, 0.12);
  --cn-badge: #F5B800;
  --cn-on-badge: #2A1E00;
  border-color: #EDC547;
  background: radial-gradient(120% 160% at 0% 0%, #FFF9DC, transparent 60%), linear-gradient(100deg, #FFF3C4, #FFE99A);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 14px 30px -22px rgba(176, 124, 0, 0.6);
}
:root[data-theme="light"] .chat-notice::before, .chat-notice--light::before { opacity: 0; }
.chat-notice__icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--cn-badge); color: var(--cn-on-badge); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cn-badge) 18%, transparent); }
.chat-notice__icon svg { width: 16px; height: 16px; stroke-width: 2; }
.chat-notice__text { flex: 1; min-width: 0; margin: 0; padding: 4px 0; color: var(--cn-ink); font-size: 14px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.chat-notice__text a { color: var(--cn-link); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.chat-notice__text a:hover { text-decoration-thickness: 2px; }
.chat-notice__text a:focus-visible, .chat-notice__close:focus-visible { outline-color: var(--cn-badge); }
.chat-notice__close { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--cn-muted); transition: background 0.15s, color 0.15s; }
.chat-notice__close:hover { background: var(--cn-hover); color: var(--cn-ink); }
.chat-notice__close svg { width: 15px; height: 15px; pointer-events: none; }
.chat-notice.is-leaving { animation: chat-notice-out 0.22s ease forwards; pointer-events: none; }
@keyframes chat-notice-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes chat-notice-out { to { opacity: 0; transform: translateY(6px); } }
@media (max-width: 560px) {
  .chat-notice { gap: 10px; margin-bottom: 8px; padding: 8px 6px 8px 8px; }
  .chat-notice__text { font-size: 13.5px; }
  .chat-notice__close { width: 34px; height: 34px; margin: -2px -2px -2px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-notice, .chat-notice.is-leaving { animation: none; }
}
/* Sits in the gap above the message box after a finished task, and again only now and then. */
.feedback-pop { display: flex; align-items: center; gap: 10px; margin: 0 8px 10px; padding: 8px 8px 8px 14px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--raise); box-shadow: var(--shadow); animation: feedback-in 0.22s ease; }
.feedback-pop[hidden] { display: none; }
.feedback-pop.is-leaving { animation: feedback-out 0.28s ease forwards; }
.feedback-pop.is-thanks .feedback-pop__ask { color: var(--ink); }
.feedback-pop__ask { margin: 0; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.feedback-pop__picks { display: flex; flex-wrap: wrap; gap: 6px; }
.feedback-pop__picks button { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font-size: 13px; }
.feedback-pop__picks button:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong)); background: var(--hover); }
.feedback-pop__picks button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--bg)); }
.feedback-pop__close { display: grid; place-items: center; margin-left: auto; width: 28px; height: 28px; border-radius: 50%; color: var(--muted); }
.feedback-pop__close:hover { background: var(--hover); color: var(--ink); }
.feedback-pop svg { width: 14px; height: 14px; pointer-events: none; }
@keyframes feedback-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes feedback-out { to { opacity: 0; transform: translateY(8px); } }
.composer { position: relative; display: grid; gap: 4px; padding: 10px 10px 8px 14px; border-radius: var(--radius-lg); background: var(--raise); border: 1px solid var(--line-strong); box-shadow: var(--shadow); transition: border-color 0.15s; }
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); }
/* A light along the top edge: it fades in from one corner and out toward the other, so it reads as a
   glow on the border, not a line cut short. Brighter while typing; it travels while Doko works. */
.composer::before { content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 1px; background: var(--split); opacity: 0.55; border-radius: 1px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24%, #000 76%, transparent); mask-image: linear-gradient(90deg, transparent, #000 24%, #000 76%, transparent); transition: opacity 0.25s ease; }
.composer:focus-within::before { opacity: 0.95; }
/* While Doko works the light comes alive: a bright spark runs along the edge again and again, over
   the colours flowing beneath it, and the box breathes a soft glow from its top. */
.composer.is-busy { animation: composer-breathe 2.6s ease-in-out infinite; }
.composer.is-busy::before {
  top: -1px;
  height: 2px;
  opacity: 1;
  background-image: linear-gradient(90deg, transparent 0 40%, rgba(255, 255, 255, 0.95) 50%, transparent 60% 100%), linear-gradient(90deg, var(--ice), var(--violet), var(--orchid), var(--amber), var(--ice));
  background-size: 250% 100%, 200% 100%;
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--ice) 75%, transparent));
  animation: composer-working 1.9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
/* The spark (the first layer) crosses from left to right; the colours (the second) flow one way. */
@keyframes composer-working {
  from { background-position: 90% 0, 0 0; }
  to { background-position: 10% 0, -200% 0; }
}
@keyframes composer-breathe {
  0%, 100% { box-shadow: var(--shadow); }
  50% { box-shadow: var(--shadow), 0 -8px 30px -14px color-mix(in srgb, var(--accent) 75%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .composer.is-busy, .composer.is-busy::before { animation: none; }
}
@keyframes travel { to { background-position: -200% 0; } }
.composer textarea { width: 100%; min-height: 28px; max-height: 40vh; padding: 6px 4px 4px 0; border: 0; outline: none; resize: none; background: none; font-size: 15.5px; line-height: 1.55; color: var(--ink); }
.composer textarea::placeholder { color: var(--faint); }
.composer__files { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 4px; }
.composer__bar { display: flex; align-items: center; gap: 6px; }
.composer__spacer { flex: 1; }
.composer__count { font: 500 10.5px/1 var(--font-mono); color: var(--faint); }
.chip-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--ink-2); transition: background 0.15s, color 0.15s; }
.chip-btn:hover { background: var(--hover); color: var(--ink); }
.toggle { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 13.5px; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.toggle svg { width: 16px; height: 16px; }
.toggle:hover { color: var(--ink); background: var(--hover); }
.toggle[aria-pressed="true"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.send { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg); transition: opacity 0.15s, transform 0.15s; }
.send svg { width: 18px; height: 18px; stroke-width: 2.1; }
.send:disabled { opacity: 0.25; cursor: not-allowed; }
.send:not(:disabled):hover { transform: translateY(-1px); }
.send.is-stop { background: var(--ink); }
/* Doko Voice, live: a conversation panel in place of the message box. The circle moves with whoever is
   talking (--level, 0 to 1): the person while Doko listens, Doko while it speaks. Its colours and the
   line beside it say what is happening; the caption shows the words as they are said. */
.dock.is-talking .composer { display: none; }
.talk { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 12px 12px 14px; border-radius: var(--radius-lg); background: var(--raise); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.talk[hidden] { display: none; }
.talk__orb { --level: 0; position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; cursor: pointer; }
.talk__orb:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.talk__glow { position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(from 0deg, var(--ice), var(--violet), var(--orchid), var(--amber), var(--ice)); filter: blur(9px); opacity: calc(0.28 + var(--level) * 0.6); transform: scale(calc(0.86 + var(--level) * 0.34)); transition: opacity 0.12s, transform 0.12s, filter 0.3s; animation: talk-turn 7s linear infinite; }
.talk__core { position: relative; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #FFFFFF 0, color-mix(in srgb, var(--ice) 72%, #FFFFFF) 20%, var(--violet) 62%, var(--orchid) 100%); box-shadow: inset 0 -6px 14px rgba(7, 9, 13, 0.22); transform: scale(calc(0.92 + var(--level) * 0.2)); transition: transform 0.08s, filter 0.3s; }
.talk[data-mode="connecting"] .talk__core { animation: talk-breathe 1.2s ease-in-out infinite; filter: saturate(0.5); }
.talk[data-mode="thinking"] .talk__glow { animation-duration: 1.6s; opacity: 0.55; }
.talk[data-mode="thinking"] .talk__core { animation: talk-breathe 1.6s ease-in-out infinite; }
.talk[data-mode="working"] .talk__glow { animation-duration: 2.4s; opacity: 0.55; }
.talk[data-mode="working"] .talk__core { background: radial-gradient(circle at 34% 30%, #FFFFFF 0, color-mix(in srgb, var(--amber) 70%, #FFFFFF) 22%, var(--orchid) 70%, var(--violet) 100%); animation: talk-breathe 2.4s ease-in-out infinite; }
.talk[data-mode="speaking"] .talk__glow { opacity: calc(0.45 + var(--level) * 0.55); }
.talk[data-mode="paused"] .talk__orb, .talk[data-mode="muted"] .talk__orb { filter: grayscale(1); opacity: 0.55; }
.talk[data-mode="paused"] .talk__glow, .talk[data-mode="muted"] .talk__glow { animation: none; }
@keyframes talk-turn { to { rotate: 1turn; } }
@keyframes talk-breathe { 50% { scale: 0.9; } }
.talk__words { min-width: 0; }
.talk__state { margin: 0; overflow: hidden; font: 500 11px/1.5 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); white-space: nowrap; text-overflow: ellipsis; }
.talk[data-mode="paused"] .talk__state, .talk[data-mode="muted"] .talk__state, .talk[data-mode="connecting"] .talk__state { color: var(--muted); }
.talk[data-mode="working"] .talk__state { color: var(--amber); }
.talk__caption { display: -webkit-box; min-height: 1.45em; margin: 2px 0 0; overflow: hidden; font-size: 15px; line-height: 1.45; color: var(--ink); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.talk__caption[data-who="doko"] { color: var(--muted); }
.talk__caption[data-who="trouble"] { color: var(--danger); }
.talk[data-mode="listening"] .talk__caption:empty::before { content: "Say what you need, in any language."; color: var(--faint); }
.talk__tools { display: flex; align-items: center; gap: 8px; }
.talk__mute[aria-pressed="true"] { color: var(--danger); }
.talk__end { gap: 6px; }
.talk__end svg { width: 15px; height: 15px; }
@media (max-width: 600px) {
  .talk { gap: 10px; padding: 10px; }
  .talk__orb { width: 48px; height: 48px; }
  .talk__core { width: 38px; height: 38px; }
  .talk__caption { font-size: 14px; }
  .talk__end span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .talk__glow, .talk__core { animation: none !important; transition: none; }
}
.dock__note { margin: 8px 0 0; text-align: center; font-size: 11.5px; color: var(--faint); }
/* A follow-up typed or spoken while Doko works, held until the reply finishes. */
.queued { display: flex; align-items: center; gap: 8px; margin: 0 4px 8px; padding: 8px 10px 8px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--raise); }
.queued[hidden] { display: none; }
.queued__tag { flex: none; font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.queued__text { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13.5px; color: var(--muted); }
.queued__cancel { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--muted); }
.queued__cancel:hover { color: var(--ink); background: var(--hover); }
.queued__cancel svg { width: 14px; height: 14px; }
/* The same follow-up, shown faintly in the thread where it will land. */
.msg--pending { opacity: 0.65; }
.msg--pending .bubble { border: 1px dashed var(--line-strong); background: transparent; }
.msg--pending .msg__pending { font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }

/* ------------------------------------------------------------------ project page */

.project { padding-top: 28px; }
.project__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.project__eyebrow { font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.project h1 { margin: 8px 0 0; font-weight: 300; font-size: 34px; letter-spacing: -0.03em; }
.project__card { margin-top: 22px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--raise); }
.project__card h2 { margin: 0 0 6px; font: 500 11px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.project__card p { margin: 0; color: var(--ink-2); white-space: pre-wrap; font-size: 14px; }
.project__chats { list-style: none; padding: 0; margin: 24px 0 0; border-top: 1px solid var(--line); }
.project__chats a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.project__chats a:hover { color: var(--accent); }
.project__chats small { font: 500 11px/1.8 var(--font-mono); color: var(--faint); white-space: nowrap; }

/* ------------------------------------------------------------------ menus, dialogs, toasts */

.layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.layer > * { pointer-events: auto; }
.menu { position: fixed; min-width: 220px; max-width: min(340px, calc(100vw - 16px)); padding: 6px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line-strong); box-shadow: var(--shadow); animation: pop 0.14s cubic-bezier(0.2, 0.8, 0.2, 1); z-index: 50; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.menu__item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border-radius: 9px; text-align: left; font-size: 14px; color: var(--ink-2); }
.menu__item:hover, .menu__item:focus-visible { background: var(--hover); color: var(--ink); outline: none; }
.menu__item svg { width: 16px; height: 16px; color: var(--muted); }
.menu__item--danger, .menu__item--danger svg { color: var(--danger); }
.menu__item[aria-disabled="true"] { opacity: 0.55; }
.menu__sep { height: 1px; margin: 6px 4px; background: var(--line); }
.menu__head { padding: 8px 10px 6px; font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.menu__text { display: grid; flex: 1; line-height: 1.3; }
.menu__text small { color: var(--faint); font-size: 12px; }
.badge { font: 500 10px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); }
.badge--lit { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.meter { display: grid; gap: 6px; padding: 8px 10px 10px; }
.meter__row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.meter__bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter__bar span { display: block; height: 100%; background: var(--split); border-radius: 4px; }
.meter__bar--high span { background: var(--danger); }
.meter__note { font-size: 11.5px; color: var(--faint); }
/* What is left of a top-up: a figure, so it is set as one — mono and tabular, a shade brighter than the note above it,
   because it is the number people open this menu to read. */
.meter__note--balance { color: var(--muted); font: 500 11.5px var(--font-mono); font-variant-numeric: tabular-nums; }

.dialog-wrap { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(3, 5, 8, 0.62); backdrop-filter: blur(6px); animation: fade 0.16s ease-out; }
:root[data-theme="light"] .dialog-wrap { background: rgba(20, 26, 34, 0.32); }
@keyframes fade { from { opacity: 0; } }
.dialog { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; border-radius: 20px; background: var(--raise); border: 1px solid var(--line-strong); box-shadow: var(--shadow); animation: rise 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.dialog--wide { width: min(980px, 100%); }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 6px 22px; }
.dialog__head h2 { margin: 0; font-weight: 500; font-size: 19px; letter-spacing: -0.02em; }
.dialog__body { padding: 8px 22px 22px; }
.dialog__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 22px 20px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field .field__label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.field small { color: var(--faint); font-size: 12px; }
.input, .field textarea, .field select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); outline: none; transition: border-color 0.15s; }
.field__hint { display: block; margin: 0; font-size: 12px; line-height: 1.45; color: var(--faint); }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
/* Focus is an outline laid over the border (inset), shown at once; the border colour change stays with it. */
.input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); outline: 1px solid var(--accent); outline-offset: -1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 500; border: 1px solid var(--line-strong); color: var(--ink); transition: background 0.15s, border-color 0.15s, opacity 0.15s; }
.btn:hover { background: var(--hover); }
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid:hover { background: var(--ink); opacity: 0.9; }
.btn--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.tabs { display: flex; gap: 2px; padding: 4px 22px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { position: relative; height: 40px; padding: 0 12px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--split); border-radius: 2px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row__text { display: grid; gap: 2px; }
.row__text strong { font-weight: 500; font-size: 14px; }
.row__text small { color: var(--muted); font-size: 12.5px; }
/* A button beside a setting keeps to one line; the words beside it wrap instead. */
.row > .btn { flex: none; white-space: nowrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; border: 1px solid var(--line-strong); }
.seg button { height: 30px; padding: 0 12px; border-radius: 7px; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--raise-2); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong); }
/* A pick-one button that opens the app's own menu, sized like the segmented controls beside it. */
.picker { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 168px; height: 38px; padding: 0 12px 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font-size: 13.5px; transition: border-color 0.15s, background 0.15s; }
.picker:hover { background: var(--hover); border-color: color-mix(in srgb, var(--accent) 40%, var(--line-strong)); }
.picker[aria-expanded="true"] { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong)); }
.picker svg { width: 14px; height: 14px; color: var(--muted); }

.search { width: min(640px, 100%); align-self: start; margin-top: 12vh; }
.search__input { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.search__input svg { color: var(--muted); }
.search__input input { flex: 1; border: 0; outline: none; background: none; font-size: 16px; }
.search__list { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow-y: auto; }
.search__hit { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border-radius: 10px; text-align: left; }
.search__hit strong { font-weight: 500; font-size: 14px; }
.search__hit small { color: var(--muted); font-size: 12.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.search__hit[aria-selected="true"], .search__hit:hover { background: var(--hover); }
.search__empty { padding: 26px 16px; text-align: center; color: var(--faint); font-size: 14px; }
mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px 18px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); }
.plan--lit { border-color: color-mix(in srgb, var(--accent) 40%, var(--line-strong)); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--bg)), var(--bg) 60%); }
.plan--lit::before { content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 2px; background: var(--split); border-radius: 2px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.plan__name { display: flex; justify-content: space-between; align-items: center; min-height: 20px; font: 500 11px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.plan__price { margin: 4px 0 0; font-weight: 300; font-size: 40px; letter-spacing: -0.04em; line-height: 1; }
.plan__price small { margin-left: 6px; font: 400 13px var(--font-ui); letter-spacing: 0; color: var(--muted); }
/* The same price in Nepali rupees, at Nepal Rastra Bank's rate. It is a price, not a footnote: the figure is set in the
   reading colour rather than the muted one, so an eye landing on $16 lands on what Fonepay would take as well. Only the
   "a month" stays quiet, since the dollar line already said the term. */
.plan__npr { display: flex; align-items: baseline; gap: 6px; margin: 7px 0 0; font: 500 13.5px var(--font-mono); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; color: var(--ink); }
.plan__npr-mark { color: var(--muted); font-size: 12px; }
.plan__npr strong { font-weight: 500; color: inherit; }
.plan__npr small { font: 400 12.5px var(--font-ui); letter-spacing: 0; color: var(--muted); }
.plans__rate { margin: 14px 0 0; color: var(--faint); font-size: 12px; line-height: 1.5; }
/* The rupee figure under a top-up amount is the money Fonepay takes, so it reads as money: brighter than a caption,
   quieter than the dollar amount above it. */
.topup__amount .topup__npr { color: var(--ink-2); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.plan__tag { margin: 0; color: var(--muted); font-size: 13.5px; }
.plan ul { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 7px; font-size: 13.5px; color: var(--ink-2); }
.plan li { display: flex; gap: 8px; align-items: baseline; }
.plan li svg { width: 14px; height: 14px; color: var(--accent); transform: translateY(2px); }
.plan .btn { margin-top: auto; }
/* Monthly or yearly, above the plans: a lit pill slides to the choice, and the prices rise into place.
   The two choices are the same width, so the pill only moves (transform) and never resizes. */
.period { position: relative; isolation: isolate; display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 14px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.period[hidden] { display: none; }
.period__thumb { position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 0; width: var(--thumb-w, 0px); transform: translateX(var(--thumb-x, 0px)); border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); box-shadow: inset 0 0 0 1px var(--line-strong), 0 8px 20px -12px color-mix(in srgb, var(--accent) 80%, transparent); transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1); }
.period:not(.is-placed) .period__thumb { opacity: 0; transition: none; }
.period button { position: relative; display: inline-flex; align-items: baseline; justify-content: center; gap: 8px; padding: 7px 14px; border: 0; border-radius: 999px; background: none; font: 500 13px var(--font-ui); color: var(--muted); cursor: pointer; transition: color 320ms ease; }
.period button:hover, .period button[aria-pressed="true"] { color: var(--ink); }
.period button small { font: 500 11px var(--font-mono); letter-spacing: 0.04em; color: var(--accent); }
@keyframes plan-in {
  from { opacity: 0; transform: translateY(10px); filter: blur(5px); }
  to { opacity: 1; transform: none; filter: none; }
}
.plan .is-entering { animation: plan-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: var(--delay, 0ms); }
@media (prefers-reduced-motion: reduce) {
  .period__thumb, .period button { transition: none; }
  .plan .is-entering { animation: none; }
}
/* The yearly price as a month's share of it. */
.plan__save { margin: 6px 0 0; font-size: 12.5px; color: var(--accent); }
.test-banner { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--amber) 55%, transparent); color: var(--ink-2); font-size: 13px; background: color-mix(in srgb, var(--amber) 6%, transparent); }
.test-banner svg { color: var(--amber); width: 16px; height: 16px; transform: translateY(2px); }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; pointer-events: none; }
.toast { justify-self: center; width: max-content; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 13.5px; box-shadow: var(--shadow); animation: rise 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); max-width: min(560px, calc(100vw - 32px)); }
.toast--error { background: var(--danger); color: var(--on-danger); }

/* ------------------------------------------------------------------ phones and narrow windows */

@media (max-width: 900px) {
  .shell, .shell[data-rail="closed"], .shell[data-workspace="open"] { grid-template-columns: minmax(0, 1fr); }
  /* On a phone the preview covers the chat, and Back to chat returns to it. */
  .workspace, .shell[data-workspace="open"] .workspace { position: fixed; inset: 0; z-index: 30; border-left: 0; }
  /* On a phone the files are a strip above the code. */
  .workspace__code { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .ws-tree { flex-direction: row; gap: 4px; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ws-tree__head { display: none; }
  .ws-tree__file { width: auto; flex: none; }
  .ws-editor { padding: 12px; }
  .workspace__title, .workspace__tools [data-ws="desktop"], .workspace__tools [data-ws="mobile"] { display: none; }
  .workspace[data-busy] .workspace__status { font-size: 10px; letter-spacing: 0.04em; }
  .rail { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: min(86vw, 320px); box-shadow: var(--shadow); }
  .shell[data-rail="open"] .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(3, 5, 8, 0.55); }
  .topbar__rail, .topbar__new { display: inline-grid; }
  .slips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .view__inner { width: calc(100% - 28px); }
  .dock { width: calc(100% - 20px); padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .topbar { padding: 0 6px; }
  .topbar__title { display: none; }
  .bubble { max-width: 92%; }
  .hello { padding-bottom: 8vh; }
  .slip:nth-child(n + 3) { display: none; }
  .dialog-wrap { padding: 0; align-items: end; }
  .dialog { border-radius: 20px 20px 0 0; max-height: 92dvh; }
  .search { margin-top: 0; }
  .dock__note { display: none; }
  /* No room for a reading and a button on a phone: the action stays, and the balance is still in the account menu. */
  .usage-pill__balance { display: none; }
  .usage-pill { padding: 0 2px 0 4px; margin-right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  /* The mark holds still with the light resting in its middle. */
  .mind, .mind__mark, .mind__glow::before { animation: none; }
  .mind__mark, .mind__glow::before { background-position: 50% 0; }
}
.toggle__chev { width: 14px !important; height: 14px !important; margin-left: -2px; color: var(--faint); }
.toggle[data-effort="high"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.msg__auto { padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-strong); font-size: 9.5px; letter-spacing: 0.12em; }

/* Plugins: the rail entry, the plugin window, the steps a reply takes, and asking to allow a change. */
.plugin-link { width: 100%; padding-right: 12px; text-align: left; }
.plugin-link__icon { width: 18px; height: 18px; object-fit: contain; flex: none; }
/* A one-colour brand mark (Unity's black logo): white on the dark sidebar, as it is on the light one. */
.plugin-link__icon--mono { filter: invert(1); }
:root[data-theme="light"] .plugin-link__icon--mono { filter: none; }
.plugin-link span { flex: 1; }
/* Whose GitHub or Vercel is connected, beside the name: dim, short, and truncated rather than pushing the dot out. */
.plugin-link__who { flex: 0 1 auto; min-width: 0; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: 10.5px; }
.plugin-link__dot { width: 7px; height: 7px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--line-strong); }
.plugin-link__dot.is-on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.plugin-link__dot.is-paused { background: var(--faint); box-shadow: none; }
.plugin__head { display: flex; align-items: center; gap: 16px; padding: 6px 0 16px; border-bottom: 1px solid var(--line); }
.plugin__icon { width: 60px; height: 60px; padding: 8px; border-radius: 16px; background: #FFFFFF; box-shadow: 0 0 0 1px var(--line-strong); object-fit: contain; flex: none; }
.plugin__title { display: flex; align-items: center; gap: 10px; }
.plugin__title strong { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.plugin__blurb { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.plugin__can { list-style: none; margin: 14px 0 4px; padding: 0; display: grid; gap: 9px; }
.plugin__can li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.plugin__can svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
/* Doko Agent: Computer: which system this computer is, and the line to run in Terminal on macOS and Linux. */
.plugin__systems { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.plugin__systems .chip { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.plugin__systems .chip:hover { border-color: var(--line-strong); background: var(--hover); }
.plugin__systems .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.plugin__again { margin: 10px 0 0; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.plugin__again[hidden] { display: none; }
.plugin__terminal { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.plugin__terminal[hidden] { display: none; }
.plugin__command { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 12.5px; }
.plugin__note { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--raise-2); color: var(--muted); font-size: 13px; line-height: 1.55; }
.plugin .row { border-bottom: 0; padding-bottom: 0; }

/* The Servers dialog: the list of connected servers, then the add-a-server form. */
.servers__list { margin: 14px 0 4px; }
.servers__empty { margin: 10px 0; color: var(--muted); font-size: 13.5px; }
.servers__add { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.servers__add-title { margin: 0; font-size: 14px; font-weight: 600; }
.servers__grid { display: grid; grid-template-columns: 1fr 140px 90px; gap: 12px; }
.servers__port .input { width: 100%; }
.servers__key { font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; resize: vertical; }
@media (max-width: 560px) { .servers__grid { grid-template-columns: 1fr; } }

.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch__track { width: 40px; height: 24px; border-radius: 12px; background: var(--line-strong); transition: background 0.2s; position: relative; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform 0.2s; }
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(16px); background: var(--bg); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The report at the end of a task: each part a row, one short line each (js/app/main.js fillProse). */
.report { display: grid; margin: 14px 0 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--raise); overflow: hidden; }
.report__row { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; padding: 11px 14px; }
.report__row + .report__row { border-top: 1px solid var(--line); }
.report__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); }
.report__icon svg { width: 14px; height: 14px; }
.report__row--done .report__icon { color: var(--ok); }
.report__row--needs-you .report__icon { color: var(--accent); }
.report__row--next .report__icon svg { transform: rotate(-90deg); }
.report__body { min-width: 0; }
.report__label { display: block; margin: 0 0 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.prose .report__text { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.prose ul.report__text { padding-left: 18px; }
.prose ul.report__text li { margin: 0; }
.report__after { margin-top: 10px; }
/* The lines Doko said while it worked, folded once the task is done. */
.worklog { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.worklog summary { display: inline-flex; align-items: center; gap: 6px; width: fit-content; cursor: pointer; list-style: none; }
.worklog summary::-webkit-details-marker { display: none; }
.worklog summary svg { width: 12px; height: 12px; transform: rotate(-90deg); transition: transform 0.15s ease; }
.worklog[open] summary svg { transform: none; }
.worklog summary:hover { color: var(--ink-2); }
.prose .worklog ul { margin: 6px 0 0; padding-left: 18px; }
.prose .worklog li { margin: 2px 0; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
/* A step's pill holds its words: a long label ("Finding a photo of folded stacks of cotton clothing on wooden shelves
   in a fashion store") takes a second line inside the pill. At a fixed height its lines stood outside it (owner,
   2026-11-28). */
.step { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; max-width: 100%; padding: 4px 10px 4px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--raise); color: var(--muted); font-size: 12.5px; line-height: 1.35; text-align: left; }
.step > span { min-width: 0; overflow-wrap: anywhere; }
.step > img, .step > svg, .step > .step__spin { flex: none; }
.step img { width: 16px; height: 16px; object-fit: contain; }
.step svg { width: 13px; height: 13px; }
.step--done svg { color: var(--ok); }
.step--failed svg, .step--declined svg { color: var(--danger); }
.step--running, .step--asking { color: var(--ink-2); border-color: var(--line-strong); }
.step__spin { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--line-strong); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* What the helper agents found for a reply, each opened on demand: their words, not the reply's. */
.agents { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--raise); }
.agents > summary { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; list-style: none; color: var(--muted); font-size: 12.5px; }
.agents > summary::-webkit-details-marker { display: none; }
.agents > summary:hover { color: var(--ink-2); }
.agents > summary svg { width: 14px; height: 14px; }
.agents__list { display: grid; gap: 12px; padding: 0 12px 12px; }
.agents__one h3 { display: flex; flex-direction: column; gap: 2px; margin: 0 0 6px; font-size: 13px; font-weight: 500; }
.agents__one h3 span { font-size: 12px; font-weight: 400; color: var(--faint); }
.agents__one pre { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); font: 400 12.5px/1.55 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; }
/* The agent map: every helper agent working in this reply, at once, with what it is doing this second. */
.agent-map { margin: 0 0 12px; padding: 10px 12px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); }
.agent-map--live { border-color: color-mix(in srgb, var(--accent) 38%, var(--line-strong)); }
.agent-map__head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.agent-map__head b { font-weight: 500; }
.agent-map__note { color: var(--faint); font-size: 12px; }
.agent-map__clock { margin-left: auto; font: 500 11.5px var(--font-mono); color: var(--faint); }
/* A green tick for an agent that has reported, and in the head once all have. */
.agent-map__tick { display: inline-flex; flex: none; width: 14px; height: 14px; color: var(--ok); }
.agent-map__tick svg { width: 14px; height: 14px; stroke-width: 2.4; }
.agent-map__dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--line-strong); }
.agent-map--live .agent-map__head .agent-map__dot { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); animation: agent-pulse 1.8s ease-in-out infinite; }
.agent-map__one--running .agent-map__dot { background: var(--accent); animation: agent-pulse 1.8s ease-in-out infinite; }
.agent-map__one--done .agent-map__dot { background: var(--ok); }
.agent-map__one--stopped .agent-map__dot, .agent-map__one--failed .agent-map__dot { background: var(--danger); }
@keyframes agent-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.agent-map__list { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.agent-map__one { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 0.9fr) auto; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); }
.agent-map__one b { font-size: 12.5px; font-weight: 500; }
.agent-map__one small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--faint); }
.agent-map__one small.agent-map__line { color: var(--ink-2); }
.agent-map__doing { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--muted); }
.agent-map__doing-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.agent-map__meta { font: 500 11.5px var(--font-mono); color: var(--faint); white-space: nowrap; }
/* The Agent Swarm at work (owner, 2026-11-09: it should feel like several agents working, non stop): Doko's core and a
   lane to each agent, work pulsing out and back; each busy row has its own light sweeping under it and busy dots. */
.agent-swarm { display: block; width: 100%; height: auto; aspect-ratio: 8 / 1; max-height: 96px; margin: -2px 0 6px; overflow: visible; }
.agent-swarm__line { fill: none; stroke: color-mix(in srgb, var(--accent) 34%, var(--line)); stroke-width: 1.2; stroke-dasharray: 3 5; }
.agent-swarm.is-live .agent-swarm__line { animation: swarm-flow 0.9s linear infinite; animation-delay: var(--flow, 0s); }
.agent-swarm__lane[data-state="done"] .agent-swarm__line { stroke: color-mix(in srgb, var(--ok) 45%, var(--line)); stroke-dasharray: none; animation: none; }
.agent-swarm__packet { fill: var(--accent); filter: drop-shadow(0 0 3px var(--accent)); }
.agent-swarm__packet--back { fill: color-mix(in srgb, var(--accent) 55%, #fff); }
.agent-swarm:not(.is-live) .agent-swarm__packet, .agent-swarm__lane[data-state="done"] .agent-swarm__packet, .agent-swarm__lane[data-state="stopped"] .agent-swarm__packet { display: none; }
/* At rest, all reported: the core glows green, and the agents go round it on their wires (orbitSwarm). */
.agent-swarm.is-done .agent-swarm__heart { fill: var(--ok); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--ok) 60%, transparent)); }
.agent-swarm.is-done .agent-swarm__ring { stroke: color-mix(in srgb, var(--ok) 50%, transparent); animation: swarm-turn 9s linear infinite; }
.agent-swarm.is-done .agent-swarm__agent .agent-swarm__halo { fill: color-mix(in srgb, var(--ok) 14%, transparent); }
.agent-swarm__halo { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.agent-swarm__body { fill: var(--accent); stroke: var(--bg); stroke-width: 1.5; }
.agent-swarm.is-live .agent-swarm__agent { animation: swarm-breathe 1.6s ease-in-out infinite; animation-delay: var(--breathe, 0s); transform-box: fill-box; transform-origin: center; }
.agent-swarm__agent[data-state="done"] .agent-swarm__body { fill: var(--ok); }
.agent-swarm__agent[data-state="done"] .agent-swarm__halo, .agent-swarm__agent[data-state="stopped"] .agent-swarm__halo { fill: transparent; }
.agent-swarm__agent[data-state="done"], .agent-swarm__agent[data-state="stopped"] { animation: none; }
.agent-swarm__ring { fill: none; stroke: color-mix(in srgb, var(--accent) 55%, transparent); stroke-width: 1.5; stroke-dasharray: 6 4; transform-box: fill-box; transform-origin: center; }
.agent-swarm.is-live .agent-swarm__ring { animation: swarm-turn 4s linear infinite; }
.agent-swarm__heart { fill: var(--accent); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 70%, transparent)); }
.agent-swarm.is-live .agent-swarm__heart { animation: agent-pulse 1.2s ease-in-out infinite; }
/* Ripples out of the core and a ring round each working agent: the swarm visibly busy, on a loop. */
.agent-swarm__ripple { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.agent-swarm.is-live .agent-swarm__ripple { animation: swarm-ripple 2.4s ease-out infinite; }
.agent-swarm__orbit { fill: none; stroke: color-mix(in srgb, var(--accent) 60%, transparent); stroke-width: 1.2; stroke-dasharray: 4 7; opacity: 0; transform-box: fill-box; transform-origin: center; }
.agent-swarm.is-live .agent-swarm__agent:not([data-state="done"]):not([data-state="stopped"]) .agent-swarm__orbit { opacity: 1; animation: swarm-turn 2.4s linear infinite; }
@keyframes swarm-ripple { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(3.4); opacity: 0; } }
/* Switching on, then at work, with no hard cut between (owner, 2026-11-09: "more smoother ... smooth in between").
   A glowing wire is drawn over each lane, one after another on a soft ease, and its agent fades and scales in as it
   arrives; in the start-up's last moments the title and bar drift out; then the heading and rows come in one after
   another, each wire fades into its flowing lane, and the work pulses fade in. */
.agent-swarm__wire { fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 0;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 80%, transparent)); opacity: 0; transition: opacity 1.1s cubic-bezier(.4, 0, .2, 1); pointer-events: none; }
.agent-map--booting .agent-swarm.is-live .agent-swarm__wire { opacity: 1; stroke-dashoffset: 600; animation: swarm-wire 0.75s cubic-bezier(.65, 0, .35, 1) forwards; animation-delay: calc(var(--i) * 0.4s + 0.25s); }
.agent-swarm__line { transition: opacity 1.1s cubic-bezier(.4, 0, .2, 1) 0.15s; }
.agent-map--booting .agent-swarm__line { opacity: 0; }
.agent-map--booting .agent-swarm.is-live .agent-swarm__agent { animation: swarm-agent-in 0.65s cubic-bezier(.22, 1.2, .36, 1) both; animation-delay: calc(var(--i) * 0.4s + 0.75s); transform-box: fill-box; transform-origin: center; }
.agent-map--booting .agent-swarm.is-live .agent-swarm__heart { animation: swarm-core-on 1.2s cubic-bezier(.22, 1, .36, 1) both; transform-box: fill-box; transform-origin: center; }
.agent-map--booting .agent-swarm__packet { display: none; }
.agent-swarm.is-live .agent-swarm__packet { animation: swarm-fade 1.2s ease-out both; }
@keyframes swarm-wire { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
@keyframes swarm-fade { from { opacity: 0; } to { opacity: 1; } }
.agent-boot-head { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin: 2px 0 0; }
.agent-boot-head__title { font: 700 21px/1.2 var(--font-ui); letter-spacing: -0.01em; color: var(--ink);
  background: linear-gradient(100deg, var(--ink) 30%, var(--accent) 50%, var(--ink) 70%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: swarm-title 2.6s linear infinite; }
.agent-boot-head__count { font: 500 12.5px var(--font-mono); color: var(--faint); }
@keyframes swarm-title { from { background-position: 100% 0; } to { background-position: -150% 0; } }
/* The title and bar come in softly, and drift out in the start-up's last half-second. */
.agent-map--booting .agent-boot-head, .agent-map--booting .agent-boot {
  animation: swarm-boot-in 0.6s cubic-bezier(.22, 1, .36, 1) both, swarm-boot-out 0.5s cubic-bezier(.55, 0, 1, .45) forwards;
  animation-delay: var(--boot-delay, 0s), calc(var(--boot-time, 2.2s) - 0.5s + var(--boot-delay, 0s)); }
@keyframes swarm-boot-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes swarm-boot-out { from { opacity: 1; transform: none; filter: blur(0); } to { opacity: 0; transform: translateY(-6px) scale(0.98); filter: blur(3px); } }
/* At work: the heading, then each row, rising in from a soft blur, one after another. */
.agent-map__head.is-entering, .agent-map__one.is-entering { animation: swarm-enter 0.6s cubic-bezier(.22, 1, .36, 1) both; animation-delay: var(--enter, 0s); }
.agent-map__one--running.is-entering::after { animation-delay: var(--sweep, 0s); }
@keyframes swarm-enter { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: blur(0); } }
.agent-map--booting .agent-boot { height: 5px; margin: 10px 0 4px; }
@keyframes swarm-agent-in { from { opacity: 0; transform: scale(0.55); } to { opacity: 1; transform: scale(1); } }
@keyframes swarm-core-on { 0% { transform: scale(0.6); opacity: 0.25; } 55% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.agent-boot { position: relative; height: 4px; margin: 8px 0 2px; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--accent) 12%, var(--line)); }
.agent-boot i { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: 4px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, transparent), var(--accent)); box-shadow: 0 0 10px var(--accent);
  animation: swarm-boot var(--boot-time, 2.2s) cubic-bezier(.45, 0, .2, 1) both; animation-delay: var(--boot-delay, 0s); }
.agent-boot::after { content: ""; position: absolute; inset: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent); animation: swarm-sweep 0.9s linear infinite; }
@keyframes swarm-boot { from { width: 2%; } to { width: 100%; } }
@keyframes swarm-flow { to { stroke-dashoffset: -16; } }
@keyframes swarm-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes swarm-turn { to { transform: rotate(360deg); } }
.agent-map__one { position: relative; overflow: hidden; }
.agent-map__one--running::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: swarm-sweep var(--sweep-time, 1.6s) linear infinite; animation-delay: var(--sweep, 0s); }
.agent-map__one--running { border-color: color-mix(in srgb, var(--accent) 26%, var(--line)); }
@keyframes swarm-sweep { from { transform: translateX(-100%); } to { transform: translateX(265%); } }
.agent-map__busy { display: inline-flex; gap: 3px; flex: none; }
.agent-map__busy i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); animation: swarm-dot 1s ease-in-out infinite; }
.agent-map__busy i:nth-child(2) { animation-delay: 0.15s; }
.agent-map__busy i:nth-child(3) { animation-delay: 0.3s; }
@keyframes swarm-dot { 0%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) {
  .agent-swarm *, .agent-map__one--running::after, .agent-map__busy i, .agent-boot i, .agent-boot::after, .agent-boot-head__title,
  .agent-boot-head, .agent-boot, .agent-map__head.is-entering, .agent-map__one.is-entering { animation: none !important; }
  .agent-swarm__packet, .agent-swarm__ripple { display: none; }
  .agent-swarm__wire, .agent-swarm__line { transition: none; }
  /* Still, the wires are shown drawn and the bar full: nothing waits on a motion that does not play. */
  .agent-map--booting .agent-swarm.is-live .agent-swarm__wire { stroke-dashoffset: 0; }
  .agent-boot i { width: 100%; }
  .agent-boot-head__title { color: var(--ink); background: none; }
}
/* The count of agents at the composer: live while any works, opening the map of what each is doing. */
.agent-count { gap: 7px; }
.agent-count__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.agent-count--live .agent-count__dot { background: var(--accent); animation: agent-pulse 1.8s ease-in-out infinite; }
.agent-count--live { color: var(--ink-2); border-color: color-mix(in srgb, var(--accent) 40%, var(--line-strong)); }
.agent-map__dialog { display: grid; gap: 8px; min-width: min(560px, 78vw); }
.agent-map__dialog .agent-map__one { background: var(--bg); }
/* Doko Motions: Content Factory's second maker, under the composer, in place of the free films. It wears the
   composer's own panel, rows and buttons (.studio__composer); only its head and its status line are its own. */
.motions__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 2px 2px 10px; }
.motions__title { display: grid; gap: 4px; min-width: 0; }
.motions__kicker { font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.motions__note { font-size: 12.5px; color: var(--faint); }
.motions__count { font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }
/* Content Automation: its switch beside the day's count, and its settings. */
.motions__right { display: flex; align-items: center; gap: 18px; }
.motions__auto { display: flex; align-items: center; gap: 10px; }
.motions__autotext { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.motions__autoname { font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.motions__autoline { padding: 0; font-size: 12px; color: var(--muted); }
.motions__autoline:hover { color: var(--ink); }
/* On and alive: a live dot that pings beside the line (faster while a video is made or posted), and a switch whose knob
   breathes with light. Still for anyone who asks for less motion. */
.motions__autostate { display: inline-flex; align-items: center; gap: 7px; }
.motions__pulse { display: none; position: relative; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.motions__pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: motionsPing 2.2s cubic-bezier(0, 0, 0.2, 1) infinite; }
.motions__auto.is-on .motions__pulse, .motions__auto.is-busy .motions__pulse { display: inline-block; }
.motions__auto.is-busy .motions__pulse::after { animation-duration: 1s; }
.motions__auto.is-on .motions__autoline { color: var(--ink-2); }
.motions__auto.is-on .switch input:checked + .switch__track::after { animation: motionsBreath 2.6s ease-in-out infinite; }
@keyframes motionsPing { 0% { transform: scale(1); opacity: 0.75; } 80%, 100% { transform: scale(3); opacity: 0; } }
@keyframes motionsBreath {
  0%, 100% { filter: drop-shadow(0 0 2px color-mix(in srgb, var(--accent) 30%, transparent)); }
  50% { filter: drop-shadow(0 0 9px color-mix(in srgb, var(--accent) 85%, transparent)); }
}
@media (prefers-reduced-motion: reduce) {
  .motions__pulse::after, .motions__auto.is-on .switch input:checked + .switch__track::after { animation: none; }
}
.automation { display: grid; gap: 16px; }
.automation__intro { margin: 0; color: var(--ink-2); line-height: 1.5; }
.automation__hint { margin: 6px 0 2px; color: var(--ink-3, var(--ink-2)); font-size: 12.5px; line-height: 1.45; }
.automation__note, .automation__stopped { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--hover); color: var(--ink-2); }
.automation__stopped { color: var(--danger, #E5544B); }
.automation__field { display: grid; gap: 8px; }
.automation__row { display: flex; flex-wrap: wrap; gap: 20px; }
.automation__when { margin: -6px 0 0; font-size: 13px; color: var(--accent); }
.automation__accounts { display: flex; flex-wrap: wrap; gap: 8px; }
.automation__account { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.automation__account:has(input:checked) { border-color: var(--accent); }
.automation__account small { color: var(--muted); text-transform: capitalize; }
.automation__today { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.automation__today li { display: grid; grid-template-columns: 4.5em 1fr; gap: 2px 10px; font-size: 13px; }
.automation__today small { grid-column: 2; color: var(--muted); }
@media (max-width: 640px) { .motions__right { width: 100%; justify-content: space-between; } .motions__autotext { align-items: flex-start; } }
.motions__count.is-spent { color: var(--danger, #E5544B); }
.motions__status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; min-height: 1.4em; }
.motions__kinds { margin-bottom: 10px; }
.motions__story { margin: -2px 0 10px; display: flex; flex-wrap: wrap; gap: 10px 16px; }
.motions__story[hidden] { display: none; }
.motions__pick { display: grid; gap: 6px; }
/* A product promo's own logo and screens. */
.motions__uploads { margin: -2px 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.motions__uploads[hidden] { display: none; }
.motions__upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.motions__add { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; font-size: 13px; }
.motions__add svg { width: 15px; height: 15px; }
.motions__thumb { position: relative; display: inline-grid; place-items: center; width: 58px; height: 40px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--bg); }
.motions__thumb img { width: 100%; height: 100%; object-fit: cover; }
.motions__thumb--logo img { object-fit: contain; padding: 4px; }
.motions__remove { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.62); color: #FFFFFF; cursor: pointer; }
.motions__remove svg { width: 10px; height: 10px; }
.motions__upnote { font-size: 12px; opacity: 0.72; }
.motions__select { min-width: 150px; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--bg); font-size: 13px; }
.motions__select:focus { border-color: var(--accent); outline: 1px solid var(--accent); outline-offset: -1px; }
/* While the film is being written or filmed, a band of light travels across the sentence and loops, so the line looks
   alive instead of like text that stopped. The same gradient-and-clip the reply's step log uses (`travel`), on a
   slower curve so it reads as a sweep rather than a flicker. */
.motions__label.is-working {
  background: linear-gradient(90deg, var(--muted) 0%, var(--muted) 28%, var(--ink) 42%, var(--ice) 50%, var(--ink) 58%, var(--muted) 72%, var(--muted) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: travel 3.2s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
/* Asked for no motion: the sentence stays readable and still. */
@media (prefers-reduced-motion: reduce) {
  .motions__label.is-working { animation: none; background: none; -webkit-text-fill-color: currentColor; color: var(--muted); }
}
@media (max-width: 780px) {
  .motions__note { display: none; }
}

/* The style library, read only when opened: a shelf rail on the left, a search, and one visual card per
   look, so the person sees the look rather than reading a list of names. Select, then Make: no render
   starts from a stray click. Two panes scroll on their own, never sideways. */
.styles { display: grid; gap: 14px; width: 100%; box-sizing: border-box; }
.styles__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.styles__find { position: relative; display: flex; align-items: center; gap: 8px; flex: 1 1 240px; max-width: 340px; height: 34px; padding: 0 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise-2); color: var(--faint); transition: border-color 0.15s, color 0.15s; }
.styles__find:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong)); color: var(--accent); }
.styles__find svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.styles__search { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font: 400 13px/1 var(--font); }
.styles__search::placeholder { color: var(--faint); }
.styles__kicker { font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.styles__body { display: grid; grid-template-columns: 188px minmax(0, 1fr); gap: 16px; height: min(56vh, 468px); min-height: 290px; }

/* The shelves. */
.styles__rail { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 6px; border-right: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.styles__shelf { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 9px; border-radius: 9px; color: var(--muted); font-size: 13px; text-align: left; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.styles__shelf:hover { background: var(--hover); color: var(--ink-2); }
.styles__shelf[aria-current="true"] { background: var(--raise-2); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
.styles__shelf-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.styles__shelf-count { font: 500 10.5px/1 var(--font-mono); color: var(--faint); }
.styles__shelf[aria-current="true"] .styles__shelf-count { color: var(--accent); }

/* The pane: its own head, then the cards. */
.styles__pane { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; }
.styles__pane-head { flex: none; display: grid; gap: 3px; }
.styles__pane-title { display: flex; align-items: baseline; gap: 8px; }
.styles__pane-title b { font: 500 11px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.styles__pane-count { font: 500 10.5px/1 var(--font-mono); color: var(--faint); }
.styles__pane-blurb { margin: 0; font-size: 12px; color: var(--faint); }
.styles__grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 146px), 1fr)); gap: 12px 10px; align-content: start; overflow-y: auto; overflow-x: hidden; padding: 1px 6px 4px 1px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.styles__empty { margin: 0; padding: 26px 2px; font-size: 13px; color: var(--faint); }

/* One look: its own little frame, the shape it is made in, and its name. */
.look { display: grid; gap: 7px; padding: 0; border: 0; background: none; text-align: left; color: var(--ink-2); cursor: pointer; min-width: 0; }
.look__frame { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 11px; overflow: hidden; background: linear-gradient(152deg, var(--look-a), var(--look-b)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s, filter 0.2s; }
.look:hover .look__frame, .look:focus-visible .look__frame { transform: translateY(-2px); filter: saturate(1.12) brightness(1.08); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent), 0 12px 26px -16px rgba(0, 0, 0, 0.9); }
.look[aria-pressed="true"] .look__frame { box-shadow: inset 0 0 0 2px var(--accent), 0 12px 26px -16px rgba(0, 0, 0, 0.9); }
.look:focus-visible { outline: none; }
.look__motif { position: absolute; inset: 0; opacity: 0.85; }
.look__frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 34%), radial-gradient(120% 80% at 50% 118%, rgba(0, 0, 0, 0.5), transparent 70%); }
/* The mark is a different simple shape on each look, so the gallery reads as many looks rather than one
   repeated blob. It is drawn flat, like the motion graphics these presets make. */
.look__shape { position: absolute; left: 50%; top: 44%; width: 30px; height: 30px; margin: -15px 0 0 -15px; background: rgba(255, 255, 255, 0.86); border-radius: 50%; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), border-radius 0.5s; }
.look__frame[data-shape="1"] .look__shape { border-radius: 6px; transform: rotate(11deg); }
.look__frame[data-shape="2"] .look__shape { width: 46px; height: 9px; margin: -4.5px 0 0 -23px; border-radius: 5px; }
.look__frame[data-shape="3"] .look__shape { width: 32px; height: 32px; margin: -16px 0 0 -16px; background: none; border: 6px solid rgba(255, 255, 255, 0.86); }
.look__frame[data-shape="4"] .look__shape { width: 34px; height: 8px; margin: -15px 0 0 -17px; border-radius: 4px; box-shadow: 0 14px 0 0 rgba(255, 255, 255, 0.5); }
.look__frame[data-shape="5"] .look__shape { width: 32px; height: 28px; margin: -14px 0 0 -16px; border-radius: 3px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.look:hover .look__frame[data-shape] .look__shape { transform: translateY(-3px) scale(1.08); }
.look:hover .look__frame[data-shape="1"] .look__shape { transform: translateY(-3px) rotate(-7deg) scale(1.08); }
.look:hover .look__frame[data-shape="2"] .look__shape { transform: translateY(-3px) scaleX(1.12); }
.look__play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 0.2s; }
.look__play svg { width: 26px; height: 26px; padding: 7px; border-radius: 50%; fill: currentColor; stroke: none; color: var(--ink); background: color-mix(in srgb, var(--accent) 88%, white); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.8); }
.look:hover .look__play, .look[aria-pressed="true"] .look__play { opacity: 1; }
.look__badges { position: absolute; left: 7px; right: 7px; bottom: 7px; display: flex; align-items: center; gap: 5px; }
.look__badges em { font: 500 9.5px/1 var(--font-mono); font-style: normal; letter-spacing: 0.03em; padding: 3px 5px; border-radius: 5px; color: rgba(255, 255, 255, 0.92); background: rgba(6, 9, 13, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.look__ratio { display: block; width: 9px; height: 16px; margin-right: 1px; border: 1px solid rgba(255, 255, 255, 0.75); border-radius: 2px; }
.look__ratio[data-ratio="1:1"] { width: 12px; height: 12px; }
.look__ratio[data-ratio="4:3"] { width: 15px; height: 11px; }
.look__ratio[data-ratio="3:4"] { width: 11px; height: 15px; }
.look__ratio[data-ratio="16:9"] { width: 17px; height: 9.5px; }
.look__ratio[data-ratio="9:16"] { width: 9.5px; height: 17px; }
.look__ratio[data-ratio="2:1"] { width: 17px; height: 8.5px; }
.look__ratio[data-ratio="1:2"] { width: 8.5px; height: 17px; }
.look__ratio[data-ratio="21:9"] { width: 19px; height: 8px; }
.look__name { font-size: 12.5px; line-height: 1.3; color: var(--ink-2); overflow-wrap: anywhere; }
.look[aria-pressed="true"] .look__name { color: var(--ink); }

/* A hint of each shelf's own craft inside its frames, so the shelves are told apart at a glance. */
.look__frame[data-look="minimal"] .look__motif { background: radial-gradient(circle at 26% 26%, rgba(255, 255, 255, 0.26), transparent 44%); }
.look__frame[data-look="stick"] .look__motif { background-image: repeating-linear-gradient(58deg, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px 9px); }
.look__frame[data-look="breakdown"] .look__motif { background-image: linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px); background-size: 17px 17px; }
.look__frame[data-look="map"] .look__motif { background-image: repeating-linear-gradient(38deg, rgba(255, 255, 255, 0.24) 0 7px, transparent 7px 14px); background-size: 100% 3px; background-position: 0 68%; background-repeat: repeat-x; }
.look__frame[data-look="motion"] .look__motif { background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 12px); background-size: 68% 100%; }
.look__frame[data-look="motivation"] .look__motif { background: radial-gradient(ellipse at 50% 122%, rgba(255, 255, 255, 0.28), transparent 62%); }
.look__frame[data-look="cinematic"] .look__motif { background: linear-gradient(rgba(0, 0, 0, 0.62) 0 12%, transparent 12% 88%, rgba(0, 0, 0, 0.62) 88%); }

/* The footer: what is chosen, then Make. */
.styles__pick { display: flex; align-items: center; gap: 8px; min-width: 0; margin-right: auto; font-size: 12.5px; }
.styles__pick-label { font: 500 10px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.styles__chosen { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--faint); }
.styles__chosen.is-set { color: var(--ink); }

@media (max-width: 780px) {
  .styles__body { grid-template-columns: minmax(0, 1fr); height: min(62vh, 460px); gap: 12px; }
  .styles__rail { flex-direction: row; flex-wrap: wrap; gap: 6px; overflow: visible; padding: 0 0 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .styles__shelf { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; }
  .styles__shelf[aria-current="true"] { box-shadow: none; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--raise)); }
  .styles__shelf-count { display: none; }
  .styles__kicker { display: none; }
  .styles__grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); }
  .styles__pick-label { display: none; }
}
@media (max-width: 720px) {
  .agent-map__one { grid-template-columns: auto minmax(0, 1fr) auto; }
  .agent-map__doing { display: none; }
}

.allow { margin: 0 0 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line-strong)); background: var(--raise); display: grid; gap: 8px; max-width: 560px; }
.allow__head { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.allow__head img { width: 18px; height: 18px; object-fit: contain; }
.allow__label { font-size: 15px; font-weight: 500; }
.allow__detail { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 2px 0 0; font-size: 13px; }
.allow__detail dt { color: var(--faint); text-transform: capitalize; }
.allow__detail dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; white-space: pre-wrap; }
.allow__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.allow__done { margin: 0; color: var(--muted); font-size: 13px; }
/* The secure box for a project's secrets: the values go straight to Vercel, never into the chat. */
.secrets__note { margin: 0; color: var(--muted); font-size: 13px; }
.secrets__fields { display: grid; gap: 10px; margin-top: 2px; }
.secrets__field { display: grid; gap: 4px; }
.secrets__name { font: 500 12.5px/1.3 var(--font-mono); color: var(--ink); overflow-wrap: anywhere; }
.secrets__why { color: var(--faint); font-size: 12px; }
.secrets__input { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: 13px/1.4 var(--font-mono); }
.secrets__input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }
.secrets__error { margin: 0; color: var(--danger); font-size: 13px; }

.prose .md-img { display: block; max-width: min(100%, 440px); height: auto; margin: 6px 0 14px; border-radius: 12px; border: 1px solid var(--line); }

/* Doko Video: photos in the composer and in messages, the video card in a reply, and the studio. */
.rail__action[aria-current="page"] { background: var(--raise-2); color: var(--ink); }
.file-chip--photo { position: relative; height: 44px; padding: 3px; gap: 0; }
.file-chip--photo img { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; }
.file-chip--photo button { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; margin: 0; border-radius: 50%; background: var(--raise-2); border: 1px solid var(--line-strong); color: var(--ink-2); }
.file-chip--photo button svg { width: 11px; height: 11px; }
.photo-thumb { width: 132px; height: 132px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: var(--raise); }
/* Five photos or more on one message: smaller, so ten sit in a few rows. */
.files--many .photo-thumb { width: 84px; height: 84px; border-radius: 11px; }
.toast--action { display: flex; align-items: center; gap: 14px; }
.toast--action button { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: inherit; }

.media-list { display: grid; gap: 12px; margin: 0 0 14px; }
.video-card { justify-self: start; margin: 0; width: min(100%, 520px, calc(58vh * var(--shape, 1.7778))); max-width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--raise); }
.video-card video { display: block; width: 100%; height: auto; aspect-ratio: var(--shape, 1.7778); max-height: 70vh; object-fit: contain; background: #000; }
.video-card figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.06em; color: var(--muted); }
.video-card__save { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-family: var(--font-ui); font-size: 12.5px; letter-spacing: 0; }
.video-card__save:hover { color: var(--accent); }
.video-card__actions { display: inline-flex; align-items: center; gap: 14px; }
.video-card__delete { display: inline-flex; padding: 0; border: 0; background: none; color: var(--faint); cursor: pointer; }
.video-card__delete:hover { color: var(--danger); }
.video-card__delete svg { width: 15px; height: 15px; }
.video-card__save svg { width: 15px; height: 15px; }
.video-card__stage { position: relative; display: grid; place-items: center; align-content: center; gap: 10px; width: 100%; aspect-ratio: var(--shape); padding: 18px; text-align: center; background:
  radial-gradient(120% 80% at 50% 110%, color-mix(in srgb, var(--violet) 14%, transparent), transparent 60%),
  repeating-linear-gradient(90deg, transparent 0 23px, color-mix(in srgb, var(--line) 70%, transparent) 23px 24px); }
.video-card__label { font-size: 14px; color: var(--ink-2); }
.video-card__time { max-width: 24ch; font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.06em; color: var(--faint); }
.video-card__error { margin: 0; padding: 16px; color: var(--danger); font-size: 13.5px; }
/* The film's storyboard, once the server has one, at the top of the card being filmed (in the reply or in the rail), as
   wide as the card, then how far the filming has got under it. The finished card has none. */
.video-card__board { display: block; width: 100%; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #000; cursor: zoom-in; }
.video-card__board:focus-visible { outline-offset: -2px; border-radius: 15px 15px 0 0; }
.video-card__board img { display: block; width: 100%; height: auto; max-height: max(240px, calc(100dvh - 380px)); object-fit: contain; }
.video-card--board .video-card__stage { aspect-ratio: auto; gap: 8px; padding: 14px 16px 16px; }
/* A motion video being filmed, beside its reply (owner, 2026-11-15: "It is good to use the space which is empty"). On a
   screen with room, the latest reply's film card leaves the words for a rail on the right, in the empty side of the chat,
   and stays in view while the steps run down. The reply becomes two columns: its words and steps (never wider than the
   reading column, never under 500px) and the card, as wide as it is in the reply, 340px at most. Once the film is made or
   fails the card is back in the reply as it always was; a phone or a narrow window keeps it in the reply. */
@media (min-width: 1180px) {
  .shell { --side-now: var(--rail-w); }
  .shell[data-rail="closed"] { --side-now: 0px; }
  .shell:not([data-workspace="open"]) .msg--filming {
    /* How far the reply reaches into the empty side: the room right of the reading column, less the view's scrollbar and
       an edge kept clear. */
    --film-gap: 28px;
    --film-out: clamp(0px, calc((100vw - var(--side-now) - 12px - var(--read)) / 2 - 20px), 400px);
    --film-w: min(340px, calc(var(--read) + var(--film-out) - var(--film-gap) - 500px));
    display: grid;
    grid-template-columns: minmax(0, var(--read)) auto;
    /* The card spans every row, and only the last row grows when it is taller than the steps, so they never spread out. */
    grid-template-rows: repeat(24, auto) 1fr;
    justify-content: start;
    column-gap: var(--film-gap);
    margin-right: calc(-1 * var(--film-out));
  }
  .shell:not([data-workspace="open"]) .msg--filming > *, .shell:not([data-workspace="open"]) .msg--filming > .media-list > * { grid-column: 1; }
  .shell:not([data-workspace="open"]) .msg--filming > .media-list { display: contents; }
  .shell:not([data-workspace="open"]) .msg--filming > .media-list > :not(.video-card--filming) { margin-bottom: 14px; }
  .shell:not([data-workspace="open"]) .msg--filming > .media-list > .video-card--filming {
    grid-column: 2; grid-row: 1 / -1; align-self: start; position: sticky; top: 16px;
    width: min(var(--film-w), calc(58vh * var(--shape, 1.7778)));
  }
  /* With its storyboard the card is no longer the film's tall shape, so it takes the rail's whole width. */
  .shell:not([data-workspace="open"]) .msg--filming > .media-list > .video-card--board { width: var(--film-w); }
}
/* A picture in a reply: the same card as a video, the picture opening full size. */
/* The card takes the picture's own shape, so the card, the drawing stage and the finished picture are
   one size: as wide as 480px allows, narrower for a tall picture, never taller than 62% of the window.
   A max-height on the inner parts would narrow them inside the card (aspect-ratio carries it across). */
/* A picture at a size that sits in the conversation, not over it: no frame, just the picture with
   rounded corners, and what to do with it under it. */
.image-card { width: min(100%, 400px, calc(52vh * var(--shape))); max-width: none; border: 0; background: none; overflow: visible; }
.image-card .image-card__open { border-radius: 16px; overflow: hidden; }
.image-card figcaption { padding: 8px 2px 0; }
.image-card .video-card__next { padding: 8px 0 0; }
/* Being made: what is being done, over a canvas of fine dots in the picture's own shape with Doko's
   light drifting across them, and how far along it is. */
.image-card__doing { width: max-content; max-width: 100%; margin: 0 0 10px; font-size: 14px; background: linear-gradient(90deg, var(--muted) 0%, var(--ink) 25%, var(--muted) 50%, var(--muted) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: travel 2.4s linear infinite; }
.image-card__canvas { position: relative; width: 100%; aspect-ratio: var(--shape); max-height: 60vh; border-radius: 16px; overflow: hidden; background: radial-gradient(circle, color-mix(in srgb, var(--ink) 16%, transparent) 1.1px, transparent 1.5px) 0 0 / 14px 14px; }
.image-card__canvas::before { content: ""; position: absolute; inset: 0; background: radial-gradient(38% 42% at 30% 35%, var(--ice), transparent 70%), radial-gradient(42% 38% at 70% 68%, var(--violet), transparent 70%), radial-gradient(30% 30% at 62% 22%, var(--orchid), transparent 70%); background-size: 170% 170%; -webkit-mask: radial-gradient(circle, #000 1.3px, transparent 1.8px) 0 0 / 14px 14px; mask: radial-gradient(circle, #000 1.3px, transparent 1.8px) 0 0 / 14px 14px; opacity: 0.9; animation: canvas-drift 7s ease-in-out infinite alternate; }
@keyframes canvas-drift {
  0% { background-position: 0% 0%; }
  50% { background-position: 90% 35%; }
  100% { background-position: 25% 100%; }
}
.image-card__percent { position: absolute; right: 12px; bottom: 12px; z-index: 1; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--raise-2) 92%, transparent); box-shadow: inset 0 0 0 1px var(--line); font: 500 12.5px/1 var(--font-ui); font-variant-numeric: tabular-nums; color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .image-card__canvas::before, .image-card__doing { animation: none; }
}
/* A cut-out on a checkerboard, so its transparent background shows, and whole, not cropped. */
.image-card--cutout .image-card__open, .picture-viewer--cutout img { background: repeating-conic-gradient(color-mix(in srgb, var(--ink) 12%, transparent) 0 25%, color-mix(in srgb, var(--ink) 4%, transparent) 0 50%) 0 0 / 16px 16px; }
.image-card--cutout .image-card__open img { object-fit: contain; }
.image-card .video-card__stage { width: 100%; max-height: none; }
.image-card__open { display: block; width: 100%; padding: 0; border: 0; background: var(--raise); cursor: zoom-in; }
.image-card__open img { display: block; width: 100%; height: auto; aspect-ratio: var(--shape); object-fit: cover; }
/* A film's storyboard waiting for the go: a wide board of panels, so the reply's whole width, and shown whole (its own
   shape, never cropped to a named one). */
.image-card--storyboard { width: 100%; }
.image-card--storyboard .image-card__open img { aspect-ratio: auto; max-height: 80vh; object-fit: contain; }
.picture-viewer { display: grid; place-items: center; }
.picture-viewer img { display: block; max-width: 100%; max-height: 74vh; border-radius: 14px; object-fit: contain; }

.stage.is-studio .dock, .stage.is-studio .jump { display: none; }

/* The Humanizer: a text to edit, then the reading and the rewrite as documents. */
.hz { width: min(1180px, 100% - 32px); }
.hz--pair { width: min(1240px, 100% - 32px); }
.hz-editor { margin: 18px 0 8px; padding: 8px 8px 14px; border-radius: 20px; background: var(--raise); border: 1px solid var(--line-strong); }
.hz-editor__head { display: flex; align-items: center; padding: 10px 12px 0; }
.hz-editor__head h2 { margin: 0; font-weight: 500; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.hz .hz__input { display: block; min-height: 280px; max-height: none; margin: 0; padding: 14px 16px 8px; border: 0; border-radius: 14px; background: transparent; font-size: 16.5px; line-height: 1.7; white-space: pre-wrap; }
.hz__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 12px 0; flex-wrap: wrap; }
.hz-status { display: flex; align-items: center; gap: 8px; margin: 10px 12px 0; font-size: 13px; color: var(--muted); }
.hz-status__time { margin-left: auto; font: 500 12px/1 var(--font-mono); color: var(--faint); }
.hz__count { font: 500 11px/1 var(--font-mono); color: var(--faint); }
.hz__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hz-compare { display: grid; gap: 16px; margin-top: 18px; }
.hz-compare--pair { grid-template-columns: 1fr; }
@media (min-width: 980px) {
  .hz-compare--pair { grid-template-columns: 1fr 1fr; align-items: start; }
}
.hz-pane { display: grid; gap: 14px; padding: 18px; border-radius: var(--radius-lg); background: var(--raise); border: 1px solid var(--line-strong); }
.hz-pane__title { margin: 0; font-weight: 500; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.hz-score { display: flex; align-items: center; gap: 16px; }
.hz-score__dial { --c: var(--ok); flex: none; display: grid; place-content: center; width: 84px; height: 84px; border-radius: 50%; text-align: center; background: radial-gradient(closest-side, var(--raise) 79%, transparent 80%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--line-strong) 0); }
.hz-score--mid .hz-score__dial { --c: #E8B04B; }
.hz-score--high .hz-score__dial { --c: var(--danger); }
.hz-score__dial b { font-size: 20px; font-weight: 500; line-height: 1.1; }
.hz-score__dial small { font: 500 9.5px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.hz-score__text { display: grid; gap: 4px; }
.hz-score__label { font: 500 10.5px/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.hz-score__text strong { font-size: 16px; font-weight: 500; }
.hz-score__text p { margin: 0; font-size: 13px; color: var(--muted); }
.hz-signals { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hz-signals li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12.5px; color: var(--ink-2); }
.hz-signals b { font: 500 11px/1 var(--font-mono); color: var(--muted); }
.hz-reasons { display: grid; gap: 4px; margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.hz-doc { display: grid; gap: 0.9em; padding: 18px 18px 8px; border-radius: 14px; background: var(--raise-2); color: var(--ink); font-size: 16.5px; line-height: 1.75; }
.hz-doc p { margin: 0; white-space: pre-wrap; }
.hz-doc mark { padding: 0 2px; border-radius: 3px; background: color-mix(in srgb, var(--danger) 24%, transparent); color: inherit; }
.hz__none { margin: 0; font-size: 13px; color: var(--muted); }
.studio { width: min(1120px, 100% - 40px); margin: 0 auto; padding: 18px 0 56px; }
.studio.hz { width: min(1180px, 100% - 32px); }
.studio.hz.hz--pair { width: min(1280px, 100% - 24px); }
.studio--loading { display: grid; place-items: center; min-height: 60vh; }
.studio__head { position: relative; min-height: 72px; padding-right: 160px; }
.studio__head h1, .studio__intro h1 { margin: 0; font-weight: 300; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.03em; }
.studio .turn { font-family: var(--font-turn); font-style: italic; font-weight: 400; letter-spacing: -0.01em; text-shadow: -1.5px 0 rgba(154, 140, 255, 0.55), 1.5px 0 rgba(238, 127, 214, 0.45); }
.studio__head .hello__sub { text-align: left; margin-top: 6px; }
.slate { position: absolute; top: 2px; right: 0; width: 148px; height: 70px; pointer-events: none; }
.slate__stick { position: absolute; left: 4px; top: 2px; display: flex; gap: 3px; width: 86px; height: 16px; padding: 3px; transform-origin: 6px 16px; border-radius: 3px 3px 0 0; background: color-mix(in srgb, var(--ink) 10%, transparent); animation: slate-clap 4.8s linear infinite; }
.slate__stick span { flex: 1; border-radius: 1px; background: color-mix(in srgb, var(--ink) 55%, transparent); }
.slate__stick span:nth-child(odd) { background: color-mix(in srgb, #9a8cff 80%, transparent); }
.slate__board { position: absolute; left: 4px; top: 20px; width: 86px; height: 46px; border-radius: 0 0 6px 6px; border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.slate__rec { position: absolute; left: 10px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: #ee7fd6; animation: slate-rec 2.4s linear infinite; }
.slate__lens { position: absolute; right: 0; top: 8px; width: 52px; height: 52px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--ink) 28%, transparent); }
.slate__iris { position: absolute; inset: 8px; border-radius: 50%; border: 7px solid transparent; border-top-color: #9a8cff; border-right-color: color-mix(in srgb, #ee7fd6 80%, transparent); animation: slate-iris 9s linear infinite; }
@keyframes slate-clap {
  0% { transform: rotate(-16deg); animation-timing-function: linear; }
  38% { transform: rotate(-16deg); animation-timing-function: ease-in-out; }
  46% { transform: rotate(0deg); animation-timing-function: linear; }
  58% { transform: rotate(0deg); animation-timing-function: ease-in-out; }
  68% { transform: rotate(-16deg); animation-timing-function: linear; }
  100% { transform: rotate(-16deg); }
}
@keyframes slate-rec {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}
@keyframes slate-iris {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.finder { position: absolute; z-index: 2; width: 16px; height: 16px; border: 1.5px solid color-mix(in srgb, #9a8cff 70%, transparent); pointer-events: none; animation: finder-breathe 3.6s linear infinite; }
.finder--tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.finder--tr { top: 8px; right: 22px; border-left: 0; border-bottom: 0; animation-delay: -0.9s; }
.finder--bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; animation-delay: -1.8s; }
.finder--br { bottom: 8px; right: 22px; border-left: 0; border-top: 0; animation-delay: -2.7s; }
.reel-rail { position: absolute; z-index: 2; top: 36px; bottom: 36px; left: -18px; width: 10px; overflow: hidden; pointer-events: none; mask-image: linear-gradient(transparent, #000 10%, #000 90%, transparent); }
.reel-rail__track { display: flex; flex-direction: column; gap: 12px; animation: reel-fall 6s linear infinite; }
.reel-rail__track span { width: 8px; height: 10px; flex: none; border-radius: 2px; background: color-mix(in srgb, var(--ink) 28%, transparent); }
.leader { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; background: #07080c; }
.leader__perf { position: absolute; top: 0; bottom: 0; width: 46px; background: repeating-linear-gradient(to bottom, #07080c 0 16px, #f4f1ea 16px 30px, #07080c 30px 42px); animation: leader-roll 0.28s linear infinite; }
.leader__perf--l { left: 0; }
.leader__perf--r { right: 0; }
@keyframes leader-roll { to { background-position: 0 42px; } }
.leader__gate { position: relative; width: min(78vmin, 640px); height: min(78vmin, 640px); }
.leader__mark { position: absolute; width: 54px; height: 54px; border: 0 solid #f4f1ea; }
.leader__mark--a { top: 8%; left: 8%; border-top-width: 4px; border-left-width: 4px; }
.leader__mark--b { top: 8%; right: 8%; border-top-width: 4px; border-right-width: 4px; }
.leader__mark--c { bottom: 8%; left: 8%; border-bottom-width: 4px; border-left-width: 4px; }
.leader__mark--d { bottom: 8%; right: 8%; border-bottom-width: 4px; border-right-width: 4px; }
.leader__cross { position: absolute; inset: 14%; }
.leader__cross::before, .leader__cross::after { content: ""; position: absolute; background: #f4f1ea; }
.leader__cross::before { left: 0; right: 0; top: 50%; height: 3px; }
.leader__cross::after { top: 0; bottom: 0; left: 50%; width: 3px; }
.leader__ring { position: absolute; inset: 18%; border-radius: 50%; border: 12px solid #f4f1ea; box-shadow: inset 0 0 0 3px #07080c, 0 0 0 3px #07080c; animation: leader-iris 2s linear forwards; }
@keyframes leader-iris { 0% { transform: scale(1.08); } 100% { transform: scale(0.18); opacity: 0; } }
.leader__num { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font: 600 22vmin/1 system-ui, sans-serif; letter-spacing: -0.06em; color: #f4f1ea; }
.leader__num--a { animation: leader-a 2s linear forwards; }
.leader__num--b { animation: leader-b 2s linear forwards; opacity: 0; }
@keyframes leader-a { 0% { opacity: 0; transform: scale(1.4); } 10% { opacity: 1; transform: none; } 46% { opacity: 1; } 52% { opacity: 0; } 100% { opacity: 0; } }
@keyframes leader-b { 0%, 48% { opacity: 0; transform: scale(1.4); } 56% { opacity: 1; transform: none; } 90% { opacity: 1; } 100% { opacity: 0; transform: scale(0.86); } }
.leader__flash { position: absolute; inset: 0; background: #fff; opacity: 0; animation: leader-flash 2s linear forwards; }
@keyframes leader-flash { 0%, 86% { opacity: 0; } 92% { opacity: 0.9; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .leader__perf, .leader__ring, .leader__num, .leader__flash { animation: none; }
  .leader__num--b, .leader__flash { opacity: 0; }
}
.shutter { position: relative; width: 36px; height: 36px; margin: 8px 28px 28px auto; pointer-events: none; }
.shutter__blade { position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, #ee7fd6 65%, transparent); border-left-color: transparent; animation: slate-iris 7s linear infinite; }
.shutter__blade--b { inset: 6px; border-color: color-mix(in srgb, #9a8cff 75%, transparent); border-right-color: transparent; animation-duration: 11s; animation-direction: reverse; }
.shutter__blade--c { inset: 12px; border-color: color-mix(in srgb, var(--ink) 45%, transparent); border-bottom-color: transparent; animation-duration: 5s; }
@keyframes finder-breathe { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes reel-fall { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .slate__stick, .slate__rec, .slate__iris, .finder, .reel-rail__track, .shutter__blade { animation: none; }
}
@media (max-width: 720px) {
  .studio__head { padding-right: 0; min-height: 0; }
  .slate { position: relative; top: auto; right: auto; margin-bottom: 10px; }
}
.studio__intro { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 12vh 0; }
.studio__intro .mind { width: 72px; height: 58px; }
.studio__intro .hello__sub { max-width: 520px; }

.studio__composer { position: relative; margin: 20px 0 30px; padding: 14px; border-radius: 18px; background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 7%, var(--bg)), var(--bg)); border: 1px solid color-mix(in srgb, #000 55%, var(--line)); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ink) 14%, transparent), 0 18px 36px rgba(0, 0, 0, 0.28); }
.studio__composer::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px; background: var(--split); opacity: 0.8; }
.studio__prompt { width: 100%; min-height: 84px; max-height: 40vh; resize: vertical; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.55; }
.studio__prompt::placeholder { color: var(--faint); }
.studio__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 8px; margin-top: 8px; padding: 14px 12px 18px; border: 1px solid color-mix(in srgb, #000 50%, var(--line)); border-bottom: 0; border-radius: 12px 12px 0 0; background: color-mix(in srgb, #000 22%, var(--raise)); box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.28); }
.studio__setting { display: grid; gap: 6px; min-width: 0; max-width: 100%; }
.studio__label { display: inline-flex; align-items: center; gap: 6px; font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.studio__label svg { width: 13px; height: 13px; flex: none; }
.studio__select, .keymenu { height: 38px; max-width: 100%; padding: 0 32px 0 12px; color: var(--ink); font: 600 13px/1 var(--font); text-align: left; position: relative; }
.keymenu { display: inline-flex; align-items: center; min-width: 108px; }
.keymenu__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keymenu__chev { position: absolute; right: 12px; top: 15px; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.keymenu__list { position: fixed; z-index: 200; display: grid; gap: 6px; max-height: 280px; overflow: auto; padding: 8px; border-radius: 12px; border: 1px solid color-mix(in srgb, #000 55%, var(--line)); background: color-mix(in srgb, #000 18%, var(--raise)); box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.28), 0 16px 32px rgba(0, 0, 0, 0.4); pointer-events: auto; }
.keymenu__option { display: block; width: 100%; height: 36px; margin: 0; padding: 0 12px; border-radius: 6px; border: 1px solid color-mix(in srgb, #000 55%, var(--ink)); background: radial-gradient(130% 90% at 50% -20%, color-mix(in srgb, var(--ink) 26%, transparent), transparent 48%), linear-gradient(180deg, color-mix(in srgb, var(--ink) 16%, var(--raise)), color-mix(in srgb, #000 35%, var(--bg))); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ink) 36%, transparent), 0 4px 0 color-mix(in srgb, #000 70%, var(--bg)); color: var(--ink); font: 600 13px/36px var(--font); text-align: left; transition: transform 40ms linear, box-shadow 40ms linear; }
.keymenu__option[aria-selected="true"] { transform: translateY(2px); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ink) 20%, transparent), 0 2px 0 color-mix(in srgb, #000 70%, var(--bg)); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 46%, var(--raise)), color-mix(in srgb, var(--accent) 16%, var(--bg))); }
.keymenu__option:active { transform: translateY(4px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35); }
.studio__composer .seg { gap: 6px; padding: 0; border: 0; background: transparent; }
.studio__composer .seg button,
.studio__composer .studio__add-photo,
.studio__composer .studio__actions .btn,
.studio__composer .keymenu,
.studio__composer .studio__setting .input {
  border-radius: 7px;
  border: 1px solid color-mix(in srgb, #000 62%, var(--ink));
  background:
    radial-gradient(140% 80% at 50% -15%, color-mix(in srgb, var(--ink) 30%, transparent), transparent 48%),
    linear-gradient(180deg, color-mix(in srgb, var(--ink) 18%, var(--raise)) 0%, color-mix(in srgb, var(--ink) 6%, var(--bg)) 58%, color-mix(in srgb, #000 40%, var(--bg)) 100%);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--ink) 45%, transparent),
    inset 0 -7px 8px color-mix(in srgb, #000 22%, transparent),
    0 5px 0 color-mix(in srgb, #000 74%, var(--bg)),
    0 6px 0 #000;
  color: var(--ink);
  transform: translateY(0);
  transition: transform 40ms linear, box-shadow 40ms linear;
}
.studio__composer .seg button { height: 38px; padding: 0 12px; font-weight: 600; }
.studio__composer .seg button:hover,
.studio__composer .studio__add-photo:hover,
.studio__composer .studio__actions .btn:hover,
.studio__composer .keymenu:hover { opacity: 1; }
.studio__row, .studio__actions { position: relative; z-index: 3; }
.studio__composer .seg button[aria-pressed="true"] {
  transform: translateY(3px);
  background: var(--accent);
  color: #071016;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 50%, transparent), 0 2px 0 color-mix(in srgb, #000 45%, var(--accent));
}
.studio__composer .studio__make {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 78%, #fff), var(--accent));
  color: #071016;
}
.studio__composer .seg button:active,
.studio__composer .studio__add-photo:active,
.studio__composer .studio__actions .btn:active {
  transform: translateY(5px);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4);
}
.studio__composer .switch__track { width: 48px; height: 32px; border-radius: 7px; background: color-mix(in srgb, #000 35%, var(--bg)); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.55), 0 5px 0 color-mix(in srgb, #000 74%, var(--bg)); }
.studio__composer .switch input:checked + .switch__track { background: color-mix(in srgb, #000 35%, var(--bg)); }
.studio__composer .switch__track::after { top: 5px; left: 5px; width: 16px; height: 18px; border-radius: 4px; background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 80%, #fff), color-mix(in srgb, var(--ink) 35%, var(--bg))); box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 50%, transparent), 0 3px 0 #090a0d; transition: transform 40ms linear; }
.studio__composer .switch input:checked + .switch__track::after { transform: translateX(22px); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent)); }
.seg { flex-wrap: wrap; max-width: 100%; }
.seg button { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; line-height: 1; }
.seg--small button { height: 32px; padding: 0 10px; font-size: 13px; }
.studio__add-photo { height: 36px; }
.studio__add-photo svg { width: 16px; height: 16px; }
.studio__photo { display: flex; align-items: center; gap: 8px; height: 40px; padding: 4px; border-radius: 12px; border: 1px solid var(--line-strong); font-size: 12.5px; color: var(--ink-2); }
.studio__photo img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.studio__assets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.studio__actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 4px 12px 14px; border: 1px solid color-mix(in srgb, #000 50%, var(--line)); border-top: 0; border-radius: 0 0 12px 12px; background: color-mix(in srgb, #000 22%, var(--raise)); box-shadow: inset 0 -2px 8px rgba(0, 0, 0, 0.18); }
.studio__left { margin-right: auto; max-width: min(520px, 100%); font: 500 12px/1.4 var(--font); letter-spacing: 0; color: var(--muted); }
.studio__direct svg, .studio__make svg { width: 16px; height: 16px; }
.studio__direct.is-busy svg { animation: spin 1.2s linear infinite; }

.timeline { display: grid; gap: 10px; margin: 0 0 26px; }
.timeline__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.timeline__head h2 { margin: 0; font-weight: 500; font-size: 15px; }
.timeline__strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.timeline__clip { position: relative; flex: none; width: 180px; display: grid; gap: 6px; cursor: grab; }
.timeline__clip.is-dragging { opacity: 0.4; }
.timeline__clip.is-before { box-shadow: -3px 0 0 var(--accent); }
.timeline__clip.is-after { box-shadow: 3px 0 0 var(--accent); }
.timeline__clip video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #000; border: 0; pointer-events: none; }
.timeline__clip p { margin: 0; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline__delete { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, 0.62); color: #fff; }
.timeline__delete svg { width: 14px; height: 14px; }
.timeline__moves { display: flex; flex-wrap: wrap; gap: 4px; }
.timeline__moves .btn { height: 28px; padding: 0 10px; font-size: 12.5px; line-height: 1; }
.timeline__empty { margin: 0; color: var(--muted); font-size: 13.5px; }
.whole-video { display: grid; gap: 10px; }
.whole-video video { width: 100%; max-height: 70vh; border-radius: 14px; background: #000; }
.whole-video__rail { display: flex; gap: 4px; min-height: 42px; }
.whole-video__mark { flex: 1; min-width: 0; height: 42px; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 8px; background: var(--raise-2); color: var(--muted); font-size: 12px; }
.whole-video__mark.is-on { background: color-mix(in srgb, var(--accent) 28%, var(--raise-2)); color: var(--ink); }

.studio__tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.gallery { columns: 3 260px; column-gap: 14px; }
.tile { position: relative; break-inside: avoid; margin: 0 0 14px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--raise); }
.tile__open { display: block; width: 100%; padding: 0; background: #000; cursor: zoom-in; }
.tile video, .tile img { display: block; width: 100%; aspect-ratio: var(--shape); object-fit: cover; }
.tile__stage { display: grid; place-items: center; align-content: center; gap: 10px; aspect-ratio: var(--shape); padding: 14px; text-align: center; background: repeating-linear-gradient(90deg, transparent 0 23px, color-mix(in srgb, var(--line) 70%, transparent) 23px 24px); }
.tile__stage small { font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; color: var(--faint); }
.tile__error { margin: 0; color: var(--danger); font-size: 13px; }
.tile__meta { padding: 10px 12px 12px; display: grid; gap: 4px; }
.tile__meta p { margin: 0; font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile__meta small { font: 500 10.5px/1.4 var(--font-mono); letter-spacing: 0.06em; color: var(--faint); }
.tile__meta--photo { display: flex; align-items: center; justify-content: space-between; }
.tile__fav { position: absolute; top: 8px; right: 8px; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(7, 9, 13, 0.55); color: #EDF1F4; opacity: 0; transition: opacity 0.15s; }
.tile:hover .tile__fav, .tile__fav:focus-visible, .tile__fav.is-on { opacity: 1; }
.tile__fav svg { width: 16px; height: 16px; }
.tile__fav.is-on svg { fill: var(--orchid); stroke: var(--orchid); }
.gallery__empty { padding: 24px 0; color: var(--muted); }
.gallery__empty p { margin: 0 0 14px; }
.gallery__starters { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }

.viewer { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.viewer__video { width: 100%; max-height: 70vh; border-radius: 14px; background: #000; }
.viewer__side { display: grid; gap: 10px; }
.viewer__prompt { display: flex; gap: 8px; align-items: flex-start; }
.viewer__prompt p { margin: 0; flex: 1; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.viewer__meta { margin: 0; font: 500 11px/1.5 var(--font-mono); letter-spacing: 0.05em; color: var(--faint); }

@media (max-width: 720px) {
  .viewer { grid-template-columns: 1fr; }
  .studio__actions { flex-wrap: wrap; }
  .studio__left { width: 100%; }
}

.video-card__next { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
/* A storyboard's first draft: a line saying Doko is still fixing the film, where Film it will be. */
.video-card__note { font-size: 13px; line-height: 1.45; color: var(--muted); padding: 2px 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
/* A new game's questions (Doko Games). */
.brief { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--raise); display: grid; gap: 14px; }
.brief__intro { margin: 0; font-weight: 600; }
.brief__item { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.brief__q { padding: 0; font-weight: 600; font-size: 0.95rem; }
.brief__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.brief__chip { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.9rem; cursor: pointer; text-align: left; }
.brief__chip:hover { border-color: var(--line-strong); background: var(--hover); }
.brief__chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.brief__more { justify-self: start; border: 0; background: none; padding: 2px 0; font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.brief__all { display: grid; gap: 8px; max-height: 340px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overscroll-behavior: contain; }
.brief__all[hidden] { display: none; }
.brief__group { margin: 4px 0 0; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.brief__own { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 10px; padding: 7px 10px; font: inherit; font-size: 0.9rem; max-width: 420px; }
.brief__actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; flex-wrap: wrap; }
.brief__go:disabled { opacity: 0.5; cursor: default; }
.next-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 15px; border: 1px solid var(--line-strong); color: var(--ink-2); font-size: 12.5px; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.next-btn:hover:not(:disabled) { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong)); background: var(--hover); }
.next-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.next-btn svg { width: 14px; height: 14px; }

.media-list + .prose--after, .prose + .media-list { margin-top: 4px; }

a.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
a.btn svg { width: 15px; height: 15px; }

/* The length slider, in the studio and on a video's setup card. */
.length__row { display: flex; align-items: center; gap: 10px; height: 36px; }
.length__range { width: 180px; accent-color: var(--accent); cursor: pointer; }
.length__value { min-width: 38px; font: 500 13px/1 var(--font-mono); color: var(--ink); }

/* A directed shot waiting for its length and a press of Make video. */
.video-setup { max-width: 640px; padding: 14px 16px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line-strong)); background: var(--raise); position: relative; }
.video-setup::before { content: ""; position: absolute; left: 20px; right: 20px; top: -1px; height: 1px; background: var(--split); }
.video-setup__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.video-setup__head img { width: 20px; height: 20px; border-radius: 5px; }
.video-setup__head strong { color: var(--ink); font-weight: 500; }
.video-setup__shot { width: 100%; min-height: 84px; resize: vertical; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); font-size: 14px; line-height: 1.55; outline: none; }
.video-setup__shot:focus { border-color: var(--accent); }
.video-setup__row { border-top: 0; padding-top: 12px; }
.video-setup__uses { margin-right: auto; font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.05em; color: var(--faint); }
.video-setup__done { margin: 0; color: var(--muted); font-size: 13.5px; }
@media (max-width: 560px) {
  .length__range { width: 140px; }
}

/* Billing: the Stripe note under the plans, the balance in the account menu, and topping up. */
.unlock { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle at center, transparent 0%, rgba(3, 5, 8, 0.28) 72%); }
.unlock__burst { position: relative; width: 320px; height: 320px; }
.unlock__core, .unlock__ring { position: absolute; left: 50%; top: 50%; border-radius: 50%; }
.unlock__core { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: radial-gradient(circle, #fff 0%, var(--accent) 42%, transparent 72%); animation: unlock-core 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.unlock__ring { width: 120px; height: 120px; margin: -60px 0 0 -60px; border: 1px solid color-mix(in srgb, var(--accent) 75%, #fff); animation: unlock-ring 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.unlock__ring--late { animation-delay: 280ms; }
.unlock__bit { position: absolute; left: 50%; top: 50%; width: var(--s, 5px); height: var(--s, 5px); margin: calc(var(--s, 5px) / -2) 0 0 calc(var(--s, 5px) / -2); border-radius: 50%; background: var(--c, var(--accent)); opacity: 0; animation: unlock-bit 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: var(--d, 0ms); }
.unlock__bit--soft { filter: blur(1.5px); box-shadow: 0 0 12px var(--c, var(--accent)); }
.unlock__word { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 4px; animation: unlock-word 2.8s ease forwards; }
.unlock__word strong { font-weight: 500; font-size: 22px; letter-spacing: -0.03em; }
.unlock__word span { color: var(--muted); font: 500 12px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }
@keyframes unlock-core { 0% { transform: scale(0.15); opacity: 0; filter: blur(10px); } 22% { opacity: 1; filter: blur(0); } 100% { transform: scale(2.6); opacity: 0; filter: blur(16px); } }
@keyframes unlock-ring { 0% { transform: scale(0.2); opacity: 0; } 24% { opacity: 0.85; } 100% { transform: scale(3.1); opacity: 0; } }
@keyframes unlock-bit { 0% { opacity: 0; transform: translate(0, 0) scale(0.3); } 16% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.55); } }
@keyframes unlock-word { 0% { opacity: 0; transform: translateY(10px); filter: blur(8px); } 28% { opacity: 1; transform: none; filter: none; } 76% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .unlock__core, .unlock__ring, .unlock__bit { animation: none; opacity: 0; }
  .unlock__word { animation: unlock-word 0.5s ease forwards; }
}
.plans__coupon { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.plans__coupon span { color: var(--muted); font-size: 12px; }
.plans__coupon .input { width: 148px; height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12px; }
.plans__coupon .btn { height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12px; }
.plans__note { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.plans__note svg { width: 14px; height: 14px; }

/* The accepted payment methods, with their marks: shown beside the note so the page says how it takes money before
   anyone reaches the button. The marks are drawn at the size the assets need — a lock-up stays wide, a wordmark stays
   square — and never recoloured or squashed to match each other. */
.plans__payrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.plans__payrow .plans__note { margin-top: 14px; }
.plans__marks { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
/* A mark is drawn at a size that reads: Fonepay's guidelines set 30px as the minimum height for their logo, and a
   wordmark below about 24px is a smudge rather than a name. No background is drawn behind a mark — both assets carry
   their own — and nothing is recoloured to suit the page. */
/* The same rule as a price row: a shared height, each mark's own width. Smaller here, because these sit under a line
   of small print rather than beside a name. */
.plans__mark { display: flex; align-items: center; justify-content: center; height: 26px; }
.plans__mark img { display: block; height: 100%; width: auto; max-width: 118px; object-fit: contain; border-radius: 6px; }
.plans__manage { margin-top: 6px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

/* How you pay: one clear choice per method, with the promise each one makes underneath it. */
.pay { display: grid; gap: 8px; margin: 16px 0 0; }
.pay--compact { margin: 0 0 14px; }
.pay__option { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--raise); text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.pay__option:hover { border-color: var(--accent-soft, var(--accent)); }
.pay__option.is-on { border-color: var(--accent); background: var(--accent-wash, rgba(255, 255, 255, 0.04)); }
/* A price row is a mark and two lines of words, and the marks are different shapes: Fonepay is a wide lock-up, Stripe
   a squarer badge. Height is the one dimension they can share, so it is the one that is set; the width follows each
   asset's own proportions. Pinning a width instead would squash one of them, which is how Stripe came out smaller than
   Fonepay. The height is kept small because the row is read as a line of text, not as an advertisement. */
.pay__logo { flex: 0 0 auto; height: 32px; display: flex; align-items: center; }
.pay__logo img { display: block; height: 100%; width: auto; max-width: 118px; object-fit: contain; border-radius: 8px; }
/* Fonepay's lock-up and Stripe's wordmark each carry their own background, so nothing is drawn behind them: a plate
   behind a plate reads as a box inside a box. */
.pay__logo--none { width: 32px; border-radius: 8px; border: 1.5px dashed var(--line-strong); }
/* The selected method is marked by the row's own lit border and a tick at the far end. Nothing is drawn around the
   mark itself: a ring there reads as a frame round someone else's logo. */
.pay__option.is-on::after { content: '✓'; margin-left: auto; align-self: center; color: var(--accent); font-size: 15px; font-weight: 700; }
.pay__dot { position: relative; flex: 0 0 auto; width: 15px; height: 15px; margin-top: 2px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.pay__option.is-on .pay__dot { border-color: var(--accent); }
.pay__option.is-on .pay__dot::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.pay__text { display: grid; gap: 2px; }
.pay__text strong { font-size: 13px; font-weight: 500; color: var(--ink); }
.pay__text small { font-size: 12px; color: var(--muted); line-height: 1.35; }

/* The payment step: the plan and its price at the top, the methods under it, one obvious way to continue. */
.paypick__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.paypick__head > div { flex: 0 0 auto; }
.paypick__plan { display: block; font: 500 17px/1.2 var(--font-ui); color: var(--ink); }
.paypick__term { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; }
/* The total is set in tabular figures so switching method does not make the price jump about as its digits change.
   On a narrow screen it wraps under the plan (the head wraps) rather than squeezing the plan into single words. */
.paypick__sum { flex: 1 1 auto; min-width: 0; text-align: right; font-weight: 300; font-size: 34px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.paypick__sum small { display: inline-block; margin-left: 6px; font: 400 12px var(--font-ui); color: var(--muted); }
/* No price to show: a sentence in the muted voice, never a headline. */
.paypick__sum.is-none { font: 400 14px/1.4 var(--font-ui); color: var(--muted); }
@media (max-width: 560px) {
  .paypick__head { flex-direction: column; align-items: stretch; gap: 8px; }
  .paypick__sum { text-align: left; font-size: 28px; }
}
.pay--pick { margin: 0 0 12px; }
.paypick__hint { margin: 0 0 14px; font-size: 12px; color: var(--muted); line-height: 1.45; min-height: 17px; }
.paypick__go { width: 100%; }
.paypick__fine { margin: 12px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
/* The figure a method will charge, stated under its name. */
.pay__figure { display: block; margin-top: 2px; font: 500 12px var(--font-mono); color: var(--accent); letter-spacing: .02em; }

/* The Fonepay QR: a code big enough to scan from a phone, and the wait for it to be paid. */
.payqr { text-align: center; }
.payqr__lead { margin: 0 0 14px; color: var(--ink); font-size: 14px; line-height: 1.5; }
/* The code sits on a white rounded plate of its own, because a QR needs its quiet zone to be plain light: the plate is
   the quiet zone, and its corners are rounded so the card does not read as a pasted screenshot. The hairline around the
   plate is the brand's beam, one pixel wide — decoration only, outside the code, where nothing can slow a scanner. */
.payqr__code { display: inline-flex; padding: 16px; border-radius: 18px; border: 1px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--split) border-box; box-shadow: 0 10px 34px rgba(0, 0, 0, .45); transition: box-shadow .3s, opacity .3s; }
.payqr__code svg { display: block; width: 240px; height: 240px; }
.payqr__code.is-paid { box-shadow: 0 0 0 3px var(--ok, #3ddc84), 0 6px 24px rgba(0, 0, 0, .35); }
.payqr__status { margin: 14px 0 6px; font: 500 13px/1.4 var(--font-mono); letter-spacing: .04em; color: var(--muted); }
.payqr__note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
/* The remark the payer will see on their banking statement, so the two can be matched without guessing. */
.payqr__ref { margin: 0 0 6px; font: 500 12px var(--font-mono); color: var(--ink); letter-spacing: .02em; opacity: .8; }
.meter__row--balance { display: flex; justify-content: space-between; padding: 2px 12px 8px; font-size: 13px; color: var(--muted); }
.meter__row--balance strong { color: var(--ink); font-weight: 500; font-family: var(--font-mono); }
.topup__now { margin: 0 0 14px; font: 500 13px/1 var(--font-mono); letter-spacing: 0.04em; color: var(--muted); }
.topup__amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.topup__amount { display: grid; gap: 4px; padding: 16px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--raise); text-align: left; transition: border-color 0.15s, transform 0.15s; }
.topup__amount:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-1px); }
.topup__amount strong { font-size: 24px; font-weight: 300; letter-spacing: -0.02em; }
.topup__amount small { color: var(--faint); font-size: 12px; }
.topup__amount[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--raise)); box-shadow: inset 0 0 0 1px var(--accent); }
.topup__rates { margin: 14px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.topup__other { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--raise); }
.topup__other-label { margin-right: auto; font-size: 14px; color: var(--ink-2); }
.topup__other-field { display: inline-flex; align-items: center; gap: 6px; }
.topup__other-sign { font-size: 18px; color: var(--muted); }
.topup__other-input { width: 132px; font-size: 16px; appearance: textfield; -moz-appearance: textfield; }
.topup__other-input::-webkit-outer-spin-button, .topup__other-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.topup__other .topup__npr { color: var(--ink-2); font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; }

.row__note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

.upd { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; overflow: hidden; background: #07090d; color: #edf1f4; font: 500 16px/1.5 var(--font); }
.upd__stage, .upd__wash, .upd__grain, .upd__vignette { position: absolute; inset: 0; }
.upd__wash { background: radial-gradient(900px 520px at 18% 20%, rgba(134, 229, 242, 0.28), transparent 60%), radial-gradient(760px 480px at 82% 18%, rgba(154, 140, 255, 0.32), transparent 62%), radial-gradient(820px 560px at 70% 86%, rgba(238, 127, 214, 0.22), transparent 64%), #07090d; filter: blur(18px); transform: scale(1.12); }
.upd__orbit { position: absolute; left: -25%; top: -25%; width: 150%; height: 150%; animation: upd-spin 42s linear infinite; }
.upd__orbit--b { animation-duration: 58s; animation-name: upd-spin-back; }
.upd__orbit--c { animation-duration: 33s; }
.upd__orb { position: absolute; border-radius: 50%; filter: blur(42px); mix-blend-mode: screen; }
.upd__orb--a { width: 38vw; height: 38vw; left: 8%; top: 10%; background: #86e5f2; opacity: 0.38; }
.upd__orb--b { width: 32vw; height: 32vw; right: 6%; bottom: 8%; background: #9a8cff; opacity: 0.42; }
.upd__orb--c { width: 24vw; height: 24vw; left: 46%; top: 42%; background: #ee7fd6; opacity: 0.3; }
.upd__grain { opacity: 0.18; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>"); mix-blend-mode: overlay; }
.upd__vignette { background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.72) 100%); }
.upd__card { position: relative; z-index: 1; display: grid; justify-items: center; gap: 18px; width: min(440px, calc(100% - 40px)); padding: 36px 28px 32px; text-align: center; border-radius: 28px; background: rgba(7, 9, 13, 0.46); border: 1px solid rgba(237, 241, 244, 0.12); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); backdrop-filter: blur(22px); }
.upd__iris { position: relative; width: 84px; height: 84px; }
.upd__iris span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; border-top-color: #86e5f2; border-right-color: rgba(154, 140, 255, 0.85); animation: upd-spin 8s linear infinite; }
.upd__iris span:nth-child(2) { inset: 12px; border-top-color: #ee7fd6; border-right-color: transparent; animation: upd-spin-back 13s linear infinite; }
.upd__iris span:nth-child(3) { inset: 24px; border-top-color: #edf1f4; animation-duration: 5s; }
.upd h1 { margin: 0; font-weight: 500; font-size: clamp(26px, 6vw, 40px); letter-spacing: -0.04em; }
.upd p { margin: 0; max-width: 32ch; color: #a7b0ba; }
@keyframes upd-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes upd-spin-back { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@media (max-width: 560px) {
  .upd__card { width: calc(100% - 28px); padding: 28px 18px 24px; gap: 14px; border-radius: 22px; }
  .upd__iris { width: 68px; height: 68px; }
  .upd__orb--a { width: 58vw; height: 58vw; }
  .upd__orb--b { width: 48vw; height: 48vw; }
  .upd__orb--c { width: 36vw; height: 36vw; }
}
@media (prefers-reduced-motion: reduce) {
  .upd__orbit, .upd__iris span { animation: none; }
}

/* An edit's step opens its changes (see openDiff in js/app/main.js). */
button.step { font: inherit; font-size: 12.5px; line-height: 1.35; cursor: pointer; }
button.step--diff:hover, button.step--diff:focus-visible { color: var(--ink-2); border-color: var(--line-strong); }
.step-diff { max-height: 70vh; overflow: auto; }
.step-diff pre { margin: 0; }
