:root {
  --bg: #f3f1eb;
  --bg-2: #ebe8df;
  --surface: #fdfcf9;
  --surface-2: #f2efe7;
  --surface-3: #e6e2d6;
  --ink: #131210;
  --ink-2: #3b3932;
  --muted: #77735f;
  --line: #e1ddd0;
  --line-2: #d3cebf;
  --accent: #f0541a;
  --accent-2: #ff8a4c;
  --accent-ink: #ffffff;
  --accent-soft: rgba(240, 84, 26, .1);
  --accent-line: rgba(240, 84, 26, .35);
  --ok: #1f9d63;
  --danger: #d6342c;
  --wave: rgba(19, 18, 16, .2);
  --wave-lit: #f0541a;
  --shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 1px 2px rgba(20, 18, 10, .05), 0 12px 32px -12px rgba(20, 18, 10, .12);
  --radius: 20px;
  --ui: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --read: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --m-applause: #e0a106;
  --m-laughter: #1f9d63;
  --m-raised_voice: #e5383b;
  --m-interruption: #7b5cff;
  --m-heated: #ef6c00;
  --m-emotional: #e0457b;
  --m-announcement: #2f7bf6;
  --m-reaction: #f08c00;
  --m-music: #0aa5b5;
  --m-key_point: #8a8676;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --surface: #141416;
  --surface-2: #1b1b1e;
  --surface-3: #25252a;
  --ink: #f0efe9;
  --ink-2: #c9c7bd;
  --muted: #8b897f;
  --line: #232326;
  --line-2: #303035;
  --accent: #ff6a2b;
  --accent-2: #ffa06b;
  --accent-ink: #160903;
  --accent-soft: rgba(255, 106, 43, .12);
  --accent-line: rgba(255, 106, 43, .4);
  --wave: rgba(240, 239, 233, .17);
  --wave-lit: #ff6a2b;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 40px -20px rgba(0, 0, 0, .6);
  --m-key_point: #a7a497;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: radial-gradient(1200px 600px at 85% -10%, var(--accent-soft), transparent 60%), var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
[data-icon] { display: inline-flex; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 28px; padding: calc(12px + env(safe-area-inset-top, 0px)) clamp(16px, 3vw, 36px) 12px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.5) blur(16px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.04em; }
.brand-name b { font-weight: 800; color: var(--accent); }
.brand-mark { display: inline-flex; align-items: center; gap: 2px; height: 22px; }
.brand-mark i { display: block; width: 3px; border-radius: 2px; background: var(--ink); animation: mark 2.4s ease-in-out infinite; }
.brand-mark i:nth-child(1) { height: 8px; animation-delay: -.2s; }
.brand-mark i:nth-child(2) { height: 18px; background: var(--accent); animation-delay: -.5s; }
.brand-mark i:nth-child(3) { height: 12px; animation-delay: -.8s; }
.brand-mark i:nth-child(4) { height: 6px; animation-delay: -1.1s; }
@keyframes mark { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.55); } }
.nav { display: flex; gap: 4px; }
.nav a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; padding: 7px 13px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; transition: color .15s, background .15s; }
.nav a .ic { width: 16px; height: 16px; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 13px; transition: background .15s, border-color .15s; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.icon-btn.sm { min-width: 30px; height: 30px; border-radius: 9px; }
.icon-btn.sm .ic { width: 15px; height: 15px; }
:root[data-theme="dark"] .i-sun, :root:not([data-theme="dark"]) .i-moon { display: none; }
.credit { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 12px; font-family: var(--mono); transition: border-color .15s; }
.credit::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.credit:hover { border-color: var(--accent-line); }
.credit.low::before { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 20%, transparent); }
.account { position: relative; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 0; background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800; font-size: 13px; }
.menu { position: absolute; right: 0; top: 46px; min-width: 240px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); animation: pop .16s ease; }
.menu-head { display: flex; flex-direction: column; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head span { color: var(--muted); font-size: 13px; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 9px; background: none; text-decoration: none; font-size: 14px; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu .ic { width: 16px; height: 16px; color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

.view { position: relative; z-index: 1; padding: clamp(22px, 3vw, 40px) clamp(16px, 3vw, 36px) 72px; max-width: 1520px; margin: 0 auto; animation: enter .35s ease; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 var(--accent-line); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap; transition: transform .08s, background .15s, border-color .15s, box-shadow .2s; text-decoration: none; }
.btn .ic { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.lg { height: 52px; padding: 0 24px; font-size: 15px; border-radius: 14px; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 8px 24px -10px var(--accent); }
.btn.primary:hover { box-shadow: 0 10px 30px -8px var(--accent); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { width: 100%; height: 42px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.sm { height: 34px; font-size: 13px; padding: 0 10px; width: auto; border-radius: 9px; }
select.field { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-position: right 11px center; background-repeat: no-repeat; }
.lbl { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.toggle input { accent-color: var(--accent); }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); flex: 1; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); font: inherit; font-size: 14px; }
.search:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }

.compose-head { max-width: 820px; margin: 6px 0 30px; }
.compose-head h1 { font-size: clamp(36px, 5.2vw, 68px); line-height: .98; font-weight: 800; letter-spacing: -0.05em; }
.compose-head h1 em { font-family: var(--read); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--accent); }
.lede { margin: 18px 0 0; font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 620px; }
.compose-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 22px; align-items: start; }
.setup { padding: 10px; display: flex; flex-direction: column; }
.source { display: flex; flex-direction: column; gap: 10px; padding: 8px 8px 18px; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 300px; padding: 32px; text-align: center; cursor: pointer; overflow: hidden; border-radius: 16px; border: 1px dashed var(--line-2); background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 28px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 28px 100%, var(--bg-2); transition: border-color .2s, transform .2s; }
.drop::after { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 220px at 50% 60%, var(--accent-soft), transparent 70%); opacity: 0; transition: opacity .25s; }
.drop:hover, .drop.over { border-color: var(--accent-line); }
.drop:hover::after, .drop.over::after { opacity: 1; }
.drop.over { transform: scale(.995); }
.drop > * { position: relative; z-index: 1; }
.drop-art { display: flex; align-items: center; gap: 5px; height: 64px; margin-bottom: 8px; }
.drop-art i { width: 5px; border-radius: 3px; background: var(--ink); opacity: .85; animation: breathe 1.8s ease-in-out infinite; }
.drop-art i:nth-child(odd) { background: var(--accent); }
.drop-art i:nth-child(1) { height: 14px; } .drop-art i:nth-child(2) { height: 30px; animation-delay: -.2s; } .drop-art i:nth-child(3) { height: 48px; animation-delay: -.4s; }
.drop-art i:nth-child(4) { height: 22px; animation-delay: -.6s; } .drop-art i:nth-child(5) { height: 60px; animation-delay: -.8s; } .drop-art i:nth-child(6) { height: 34px; animation-delay: -1s; }
.drop-art i:nth-child(7) { height: 44px; animation-delay: -1.2s; } .drop-art i:nth-child(8) { height: 18px; animation-delay: -1.4s; } .drop-art i:nth-child(9) { height: 10px; animation-delay: -1.6s; }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }
.drop-title { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.drop-sub { max-width: 380px; color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.picked { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); animation: enter .25s ease; }
.picked-icon { display: grid !important; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--ink); color: var(--bg); flex: none; }
.picked-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.picked-meta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.picked-meta span { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.link-row { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); transition: border-color .15s, box-shadow .15s; }
.link-row:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.link-row input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--ink); font: inherit; font-size: 14px; }
.link-result { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; animation: enter .2s ease; }
.link-result img { width: 72px; height: 46px; object-fit: cover; border-radius: 9px; margin-left: auto; }
.link-result b { display: block; font-size: 14px; color: var(--ink); }
.link-result span { color: var(--muted); }
.link-result.err b { color: var(--danger); }
.block { padding: 18px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.block-label { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.block-label b { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--accent); padding: 2px 6px; border-radius: 6px; background: var(--accent-soft); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode { position: relative; cursor: pointer; }
.mode input { position: absolute; opacity: 0; }
.mode-body { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); transition: border-color .15s, background .15s, box-shadow .2s; }
.mode-icon { width: 34px; height: 34px; border-radius: 10px; display: grid !important; place-items: center; background: var(--surface); border: 1px solid var(--line); margin-bottom: 6px; color: var(--muted); transition: color .15s, background .15s; }
.mode-body strong { font-size: 15px; }
.mode-body > span:last-child { color: var(--muted); font-size: 13px; line-height: 1.4; }
.mode input:checked + .mode-body { border-color: var(--accent-line); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.mode input:checked + .mode-body .mode-icon { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.tier { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); text-align: left; transition: border-color .15s, background .15s; }
.tier b { font-size: 14px; }
.tier .est { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.tier .rate { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tier.on { border-color: var(--accent-line); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.tier.on b { color: var(--accent); }
.est-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); font-weight: 600; font-size: 13px; transition: all .15s; }
.chip:hover { border-color: var(--line-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chips.small .chip { height: 30px; padding: 0 11px; font-size: 12px; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip .n { font-family: var(--mono); font-size: 11px; opacity: .65; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.setup:not(.is-publish) .publish-only { display: none; }
.advanced summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); list-style: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced[open] summary { margin-bottom: 12px; color: var(--ink-2); }
.advanced output { font-family: var(--mono); color: var(--accent); }
input[type="range"] { accent-color: var(--accent); width: 100%; }
.go { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px; padding: 16px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.go-est { display: flex; flex-direction: column; min-width: 0; }
.go-est strong { font-family: var(--mono); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.go-est small { color: var(--muted); font-size: 12px; }

.live { position: sticky; top: 84px; padding: 18px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; min-height: 520px; }
.live::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 40px; opacity: .35; -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.live > * { position: relative; }
.live-head { display: flex; align-items: center; justify-content: space-between; }
.live-tag { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.live-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.live-tag.on { color: var(--accent); border-color: var(--accent-line); }
.live-tag.on i { background: var(--accent); animation: ping 1.6s infinite; }
.live-tag.ok { color: var(--ok); } .live-tag.ok i { background: var(--ok); }
.live-tag.err { color: var(--danger); } .live-tag.err i { background: var(--danger); }
.live-clock { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.live-state { display: flex; flex-direction: column; gap: 18px; animation: enter .3s ease; }
.ribbon { display: flex; align-items: center; justify-content: center; gap: 3px; height: 150px; }
.ribbon i { width: 4px; border-radius: 3px; background: var(--wave); animation: breathe 2.2s ease-in-out infinite; }
.ribbon i.hot { background: var(--accent); }
.ribbon.small { height: 90px; }
.promise { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.promise li { display: flex; gap: 14px; padding: 12px; border-radius: 14px; transition: background .15s; }
.promise li:hover { background: var(--bg-2); }
.promise li > span { width: 36px; height: 36px; border-radius: 11px; display: grid !important; place-items: center; background: var(--bg-2); border: 1px solid var(--line); color: var(--accent); flex: none; }
.promise b { display: block; font-size: 14px; }
.promise li div span { color: var(--muted); font-size: 13px; }
.preview { position: relative; border-radius: 14px; overflow: hidden; background: #050505; aspect-ratio: 16 / 9; }
.preview video { width: 100%; height: 100%; object-fit: contain; display: block; }
.preview-audio { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(80% 90% at 50% 100%, rgba(255, 106, 43, .25), transparent 70%), #050505; }
.preview-audio .ribbon i, .screen-audio .ribbon i { background: rgba(255, 255, 255, .18); }
.preview-audio .ribbon i.hot, .screen-audio .ribbon i.hot { background: #ff6a2b; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; border-radius: 14px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.facts div { padding: 12px 14px; background: var(--surface); min-width: 0; }
.facts dt { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-family: var(--mono); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scope { position: relative; height: 120px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.scope canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.beam { position: absolute; top: 0; bottom: 0; width: 120px; margin-left: -120px; left: 0; background: linear-gradient(90deg, transparent, var(--accent-soft) 70%, var(--accent-line)); border-right: 2px solid var(--accent); opacity: 0; pointer-events: none; }
.run-scope.scanning .beam { opacity: 1; animation: scan 3.4s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes scan { from { left: 0; } to { left: calc(100% + 120px); } }
.run-head h3 { font-size: 22px; font-weight: 700; }
.run-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.pipeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pipeline li { position: relative; display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; padding: 9px 0; color: var(--muted); transition: color .2s; }
.pipeline li::before { content: ""; position: absolute; left: 17px; top: 42px; bottom: -10px; width: 2px; background: var(--line); }
.pipeline li:last-child::before { display: none; }
.pipeline li.done::before { background: var(--ok); }
.pipeline .node { width: 36px; height: 36px; border-radius: 11px; display: grid !important; place-items: center; background: var(--bg-2); border: 1px solid var(--line); transition: all .25s; }
.pipeline .node .ic { width: 16px; height: 16px; }
.pipeline b { display: block; font-size: 14px; color: var(--ink-2); }
.pipeline li div span { font-size: 12px; }
.pipeline time { font-family: var(--mono); font-size: 11px; }
.pipeline li.now, .pipeline li.now b { color: var(--ink); }
.pipeline li.now .node { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 0 0 6px var(--accent-soft); animation: nodepulse 1.6s ease-in-out infinite; }
.pipeline li.done .node { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.pipeline li.skip { opacity: .4; }
.pipeline li.fail .node { background: var(--danger); color: #fff; border-color: transparent; }
@keyframes nodepulse { 50% { box-shadow: 0 0 0 10px transparent; } }
.run-error { padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); font-size: 14px; display: flex; flex-direction: column; gap: 10px; }
.run-error .code { font-family: var(--mono); font-weight: 600; }
.run-error .row { display: flex; gap: 8px; flex-wrap: wrap; }
.summary { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.summary h2 { font-size: 22px; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; }
.summary dt { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding-top: 2px; }
.summary dd { margin: 0; }

.lib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.lib-head h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.045em; }
.lib-head .search { max-width: 340px; }
.lib-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.lib-item { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; text-decoration: none; transition: transform .18s, border-color .18s; animation: enter .3s ease both; }
.lib-item:hover { transform: translateY(-3px); border-color: var(--accent-line); }
.lib-top { display: flex; align-items: center; gap: 12px; padding-right: 30px; }
.lib-top > span { width: 40px; height: 40px; border-radius: 12px; display: grid !important; place-items: center; background: var(--bg-2); border: 1px solid var(--line); color: var(--accent); flex: none; }
.lib-item strong { font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-item p { margin: 0; color: var(--muted); font-family: var(--read); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--line); font-weight: 600; font-size: 11px; color: var(--ink-2); font-family: var(--mono); }
.tag.accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.tag.err { color: var(--danger); }
.lib-usage { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.lib-del { position: absolute; top: 14px; right: 14px; opacity: 0; transition: opacity .15s; }
.lib-item:hover .lib-del { opacity: 1; }
.lib-del:hover { color: var(--danger); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); grid-column: 1 / -1; }

.rec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.rec-title { min-width: 0; flex: 1; }
.rec-title h1 { font-size: clamp(24px, 2.8vw, 36px); font-weight: 800; line-height: 1.1; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.rec-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.rec-actions { display: flex; gap: 8px; align-items: center; }
.cost-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-family: var(--mono); font-size: 12px; font-weight: 600; }
.cost-pill .ic { width: 15px; height: 15px; color: var(--accent); }
.cost-pill:hover, .cost-pill[aria-expanded="true"] { border-color: var(--accent-line); }
.cost-sheet { margin: -6px 0 18px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 22px; animation: enter .2s ease; }
.cost-sheet div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cost-sheet span { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cost-sheet b { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.cost-sheet small { color: var(--muted); font-size: 11px; font-family: var(--mono); overflow-wrap: anywhere; }
.dl { position: relative; }
.dl summary { list-style: none; }
.dl summary::-webkit-details-marker { display: none; }
.dl-menu { position: absolute; right: 0; top: 42px; z-index: 15; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: pop .16s ease; }
.dl-menu span { padding: 8px 10px 4px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dl-menu button { text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font-size: 13px; }
.dl-menu button:hover { background: var(--surface-2); }

.ws { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(380px, .95fr); gap: 20px; align-items: start; }
.ws-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.player { overflow: hidden; }
.screen { position: relative; background: #050505; aspect-ratio: 16 / 9; }
.screen video { width: 100%; height: 100%; object-fit: contain; display: block; }
.screen-audio { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #f0efe9; background: radial-gradient(90% 80% at 50% 110%, rgba(255, 106, 43, .3), transparent 65%), #050505; }
.screen-audio span { font-weight: 600; max-width: 80%; text-align: center; opacity: .8; }
.connect { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; color: #f0efe9; background: radial-gradient(70% 70% at 50% 50%, rgba(255, 106, 43, .14), transparent 70%), rgba(5, 5, 5, .92); }
.connect-icon { width: 52px; height: 52px; border-radius: 16px; display: grid !important; place-items: center; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: #ff6a2b; }
.connect p { margin: 0; font-weight: 700; font-size: 16px; max-width: 420px; overflow-wrap: anywhere; }
.connect small { color: #8b897f; max-width: 380px; }
.connect-actions { display: flex; gap: 8px; }
.scope-bar { padding: 12px 14px 0; }
.timeline { position: relative; height: 64px; cursor: pointer; touch-action: none; }
.timeline canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tl-marks { position: absolute; inset: 0; pointer-events: none; }
.tl-bands { position: absolute; inset: 0; }
.tl-mark { position: absolute; bottom: -3px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.tl-band { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.tl-band.on { background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: var(--accent); z-index: 2; }
.tl-band .h { position: absolute; top: 0; bottom: 0; width: 14px; cursor: ew-resize; }
.tl-band .h::after { content: ""; position: absolute; left: 5px; top: 14px; bottom: 14px; width: 4px; border-radius: 2px; background: var(--accent); }
.tl-band .h.l { left: -7px; } .tl-band .h.r { right: -7px; }
.tl-band:not(.on) .h { display: none; }
.tl-head { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; pointer-events: none; z-index: 3; }
.tl-head::before { content: ""; position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; border-radius: 3px; background: var(--ink); }
.transport { display: flex; align-items: center; gap: 10px; padding: 10px 14px 12px; }
.play { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); transition: transform .1s; flex: none; }
.play:active { transform: scale(.95); }
.play .ic { fill: currentColor; stroke: none; width: 18px; height: 18px; }
.play .i-pause, .play.on .i-play { display: none; }
.play.on .i-pause { display: inline-flex; }
.tc { font-family: var(--mono); font-size: 12px; }
.now-speaker { margin-left: 8px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.now-speaker i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.now-speaker em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.transport .icon-btn { margin-left: auto; }
.ranges { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); background: var(--bg-2); animation: enter .2s ease; }
.ranges-top { display: flex; align-items: center; gap: 6px; }
.range-chips { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding: 2px; }
.range-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 600; max-width: 280px; }
.range-chip b { font-family: var(--mono); font-weight: 500; color: var(--muted); }
.range-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.range-chip.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.range-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.edge { display: inline-flex; align-items: center; gap: 4px; }
.edge span { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.edge button { height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-family: var(--mono); font-size: 11px; }
.edge button:hover { border-color: var(--accent-line); color: var(--accent); }
.tc-input { width: 92px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: center; font-family: var(--mono); font-size: 12px; }
.range-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; flex-wrap: wrap; }
.card-head h2, .notes h2 { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; }
.card-head h2 .ic, .notes h2 .ic { color: var(--accent); width: 17px; height: 17px; }
.card-head small { color: var(--muted); font-size: 12px; }
.lanes { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.lane { display: grid; grid-template-columns: 180px 1fr; gap: 12px; align-items: center; }
.lane-name { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; border: 1px solid transparent; border-radius: 9px; background: none; text-align: left; font-size: 13px; font-weight: 600; }
.lane-name:hover { border-color: var(--line); background: var(--bg-2); }
.lane-name i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.lane-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-name small { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 500; }
.lane-track { position: relative; height: 22px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.lane-track span { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; min-width: 2px; opacity: .8; cursor: pointer; transition: opacity .1s; }
.lane-track span:hover { opacity: 1; }
.lane-track .lane-head { position: absolute; top: 0; bottom: 0; width: 1px; left: var(--p, 0%); background: var(--ink); opacity: .55; pointer-events: none; }
.lane.reactions .lane-track span { top: 6px; bottom: auto; height: 10px; width: 10px; margin-left: -5px; border-radius: 50%; opacity: .95; }
.moments .chips { padding: 0 18px 12px; }
.moment-list { max-height: 320px; overflow: auto; border-top: 1px solid var(--line); }
.moment { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 18px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; transition: background .12s; }
.moment:hover { background: var(--bg-2); }
.moment:last-child { border-bottom: 0; }
.moment .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line); }
.moment .label { flex: 1; min-width: 0; font-size: 14px; }
.moment .label small { display: block; color: var(--muted); font-size: 12px; }
.moment time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.moment-foot { padding: 10px 18px; border-top: 1px solid var(--line); }
.moments .empty { padding: 24px; }
.notes { padding: 16px 18px; }
.notes summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.notes summary::-webkit-details-marker { display: none; }
.notes .chev { color: var(--muted); transition: transform .2s; }
.notes[open] .chev { transform: rotate(180deg); }
.notes p { margin: 12px 0 0; font-family: var(--read); font-size: 18px; line-height: 1.6; color: var(--ink-2); white-space: pre-line; }

.ws-side { display: flex; flex-direction: column; min-width: 0; position: sticky; top: 84px; height: calc(100vh - 104px); min-height: 520px; overflow: hidden; }
.tabs { display: flex; gap: 2px; padding: 5px; margin: 8px; border-radius: 13px; background: var(--bg-2); border: 1px solid var(--line); }
.tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; border: 0; border-radius: 9px; background: none; font-weight: 600; font-size: 13px; color: var(--muted); transition: all .15s; }
.tabs button .ic { width: 15px; height: 15px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }
.count:not(:empty) { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-family: var(--mono); }
.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: enter .2s ease; }
.pane-tools { display: flex; align-items: center; gap: 12px; padding: 4px 14px 10px; }
.transcript { flex: 1; overflow: auto; padding: 4px 8px 60px; }
.seg { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 9px 10px; border-radius: 12px; transition: background .15s; }
.seg:hover { background: var(--bg-2); }
.seg.on { background: var(--accent-soft); }
.seg.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.seg.hide { display: none; }
.seg-time { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 3px; border: 0; background: none; text-align: left; }
.seg-time:hover { color: var(--accent); }
.seg-who { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; margin-bottom: 2px; flex-wrap: wrap; }
.seg-who .note { font-family: var(--read); font-style: italic; font-weight: 400; font-size: 13px; color: var(--muted); }
.seg-who .badge { font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); font-family: var(--mono); }
.seg-who .badge.ev { background: color-mix(in srgb, var(--m-applause) 22%, transparent); }
.seg-text { font-family: var(--read); font-size: 17.5px; line-height: 1.55; color: var(--ink); }
.seg-text w { cursor: pointer; border-radius: 3px; transition: color .12s, background .12s; }
.seg-text w:hover { background: var(--surface-3); }
.seg.on .seg-text w.past { color: var(--accent); }
.seg-tr { font-size: 13px; color: var(--muted); margin-top: 4px; }
.seg-clip { opacity: 0; justify-self: start; margin-top: 4px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.seg-clip .ic { width: 12px; height: 12px; }
.seg:hover .seg-clip { opacity: 1; }
.seg-clip:hover { color: var(--accent); }

.chat { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.chat-empty { margin: auto 0; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.chat-empty p { max-width: 340px; margin: 0; }
.chat-orb { position: relative; width: 64px; height: 64px; }
.chat-orb i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; animation: ripple 2.8s ease-out infinite; }
.chat-orb i:nth-child(2) { animation-delay: .9s; } .chat-orb i:nth-child(3) { animation-delay: 1.8s; }
.chat-orb::after { content: ""; position: absolute; inset: 22px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 24px var(--accent); }
@keyframes ripple { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
.suggest { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.suggest button { border: 1px solid var(--line); background: var(--bg-2); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; transition: border-color .15s, color .15s; }
.suggest button:hover { border-color: var(--accent-line); color: var(--accent); }
.msg { max-width: 92%; animation: enter .2s ease; }
.msg.q { align-self: flex-end; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 16px 16px 4px 16px; font-weight: 600; }
.msg.a { align-self: flex-start; background: var(--bg-2); border: 1px solid var(--line); padding: 12px 14px; border-radius: 16px 16px 16px 4px; }
.msg.a .md { font-family: var(--read); font-size: 16.5px; line-height: 1.55; }
.msg.a .md p { margin: 0 0 8px; } .msg.a .md p:last-child { margin: 0; }
.msg-ranges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.msg-ranges button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; font-family: var(--mono); }
.msg-ranges .ic { width: 11px; height: 11px; fill: currentColor; stroke: none; }
.thinking-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.thinking-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: dots 1.2s infinite; }
.thinking-dots i:nth-child(2) { animation-delay: .15s; } .thinking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ask-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.ask-form .btn { width: 48px; padding: 0; }

.write-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 14px 12px; border-bottom: 1px solid var(--line); }
.outputs { display: flex; gap: 6px; padding: 10px 14px 0; overflow-x: auto; }
.outputs button { flex: none; height: 30px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-2); font-size: 12px; font-weight: 600; }
.outputs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.doc { flex: 1; overflow: auto; padding: 12px 26px 36px; font-family: var(--read); font-size: 18.5px; line-height: 1.65; color: var(--ink); }
.doc h1, .doc h2, .doc h3 { font-family: var(--ui); letter-spacing: -0.03em; line-height: 1.15; margin: 24px 0 10px; }
.doc h1 { font-size: 30px; font-weight: 800; } .doc h2 { font-size: 22px; font-weight: 700; } .doc h3 { font-size: 17px; font-weight: 700; }
.doc table { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: 14px; margin: 14px 0; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg-2); }
.doc blockquote { margin: 16px 0; padding: 4px 18px; border-left: 3px solid var(--accent); color: var(--ink-2); font-style: italic; }
.doc .empty { font-family: var(--ui); font-size: 14px; padding: 32px 0; }
.writing { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; }
.writing i { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.writing i:nth-child(1) { width: 70%; height: 22px; } .writing i:nth-child(2) { width: 96%; } .writing i:nth-child(3) { width: 88%; } .writing i:nth-child(4) { width: 92%; } .writing i:nth-child(5) { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.cite { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; margin: 0 2px; border-radius: 6px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); font-family: var(--mono); font-size: 10.5px; font-weight: 500; vertical-align: 2px; cursor: pointer; transition: all .12s; }
.cite::before { content: ""; width: 0; height: 0; border-left: 5px solid currentColor; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; }
.cite:hover { background: var(--accent); color: var(--accent-ink); }
.doc-actions { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.hint { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 6px 18px 14px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }
.hint .ic { color: var(--accent); width: 16px; height: 16px; margin-top: 2px; }
.flags { flex: 1; overflow: auto; padding: 8px; }
.flag { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 14px 12px; border-radius: 14px; transition: background .12s; }
.flag:hover { background: var(--bg-2); }
.flag .cite { grid-row: span 2; align-self: start; margin-top: 4px; }
.flag strong { font-family: var(--read); font-size: 17px; font-weight: 500; line-height: 1.45; }
.flag span { color: var(--muted); font-size: 13px; }

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(5, 5, 5, .6); backdrop-filter: blur(6px); animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: min(560px, 100%); max-height: 88vh; overflow: auto; padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); animation: pop .2s ease; }
.modal-card h2 { font-size: 22px; font-weight: 800; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.plan-box { padding: 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.plan-box b { color: var(--ink); font-size: 16px; }
.section-label { margin: 22px 0 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.topups { display: flex; flex-wrap: wrap; gap: 8px; }
.custom-topup { display: flex; gap: 8px; margin-top: 12px; }
.notice { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--accent-soft); font-size: 13px; }
.ledger { display: flex; flex-direction: column; font-size: 13px; }
.ledger div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ledger div span:last-child { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.toasts { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 70; pointer-events: none; }
.toast { padding: 11px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); animation: enter .2s ease; max-width: 90vw; }
.toast.error { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 1100px) {
  .ws { grid-template-columns: 1fr; }
  .ws-side { position: static; height: 80vh; }
  .compose-grid { grid-template-columns: 1fr; }
  .live { position: static; min-height: 0; }
}
@media (max-width: 640px) {
  .bar { gap: 12px; }
  .nav a { padding: 7px 9px; }
  .modes, .grid-2 { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .lane { grid-template-columns: 110px 1fr; }
  .range-actions { margin-left: 0; }
  .go { flex-direction: column; align-items: stretch; }
  .drop { min-height: 230px; }
}

/* Questions and topics (19 Nov) */
.qa { display: grid; gap: 10px; }
.qa-card { border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 14px; padding: 12px 14px; background: var(--bg-1, transparent); }
.qa-card summary { display: flex; gap: 12px; cursor: pointer; list-style: none; }
.qa-card summary::-webkit-details-marker { display: none; }
.qa-head { display: flex; gap: 12px; }
.qa-head strong { display: block; font-family: var(--read); font-size: 17px; font-weight: 500; line-height: 1.4; }
.qa-head small { color: var(--muted); font-size: 13px; }
.qa-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); font-size: 13px; font-weight: 600; }
.qa-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px 40px; }
.qa-lines { margin-left: 40px; display: grid; gap: 6px; }
.qa-line { margin: 0; line-height: 1.55; font-family: var(--read); }
.qa-line b { display: inline-block; min-width: 22px; margin: 0 6px; }
.qa-line.is-q b { color: var(--accent, #c2410c); }
.qa-line.is-a b { color: var(--ok, #15803d); }
.qa-line.is-other { color: var(--muted); font-size: 14px; }
@media (max-width: 600px) { .qa-tools, .qa-lines { margin-left: 0; } }

/* Maths class and demo files (19 Nov) */
.steps { padding-left: 20px; }
.steps li { margin: 4px 0; line-height: 1.6; font-family: var(--read); }
.answer b { margin-right: 8px; color: var(--ok, #15803d); }
.katex { font-size: 1.05em; }
.demo-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 0 0 18px; }
.demo-files .eyebrow { grid-column: 1 / -1; margin: 0; }
.demo-file { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line, rgba(127,127,127,.25)); text-decoration: none; color: inherit; }
.demo-file:hover { background: var(--bg-2); }
.demo-file small { color: var(--muted); word-break: break-all; }
.setup:not(.is-class) .class-only { display: none; }
#pipeline .gem-reason { display: block; margin-top: 4px; font-style: normal; font-size: 12.5px; line-height: 1.4; color: var(--err, #b91c1c); word-break: break-word; }
.setup:not(.is-engine) .engine-only { display: none; }
.cost-sheet .compare { grid-column: 1 / -1; display: grid; gap: 6px; margin-top: 6px; }
.cost-sheet .compare table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cost-sheet .compare th, .cost-sheet .compare td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line, rgba(127,127,127,.2)); }
.cost-sheet .compare tr.us td { font-weight: 600; }
.cost-sheet .compare small { color: var(--muted); }

/* ===== Record page, 19 Nov: browse on the left, write/ask on the right ===== */
.ws-browse { display: flex; flex-direction: column; height: calc(100vh - 120px); min-height: 560px; overflow: hidden; }
.ws-browse .pane, .ws-side .pane { overflow: hidden; }
.ws-browse .pane > .qa, .ws-browse .pane > .flags, .ws-browse .pane > .transcript,
.ws-browse .pane.moments > .moment-list, .ws-side .pane > .chat { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.ws-side .pane[data-pane="write"] { overflow: auto; }
.ws-browse .qa, .ws-browse .flags { padding: 4px 12px 40px; }
.ws-browse .pane.moments .moment-list { max-height: none; }
.ws-browse .pane .hint { margin: 0 14px 10px; }
.tabs { flex-wrap: wrap; }
.tabs [data-tab] { font-weight: 650; }

/* clearer section titles: each card says what it is for */
.card-head h2, .notes h2 { font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; }
.card-head small { color: var(--muted); font-size: 12.5px; }
.notes summary { gap: 12px; flex-wrap: wrap; }
.notes .notes-sub { flex: 1; color: var(--muted); font-size: 12.5px; }
.notes p { font-size: 17px; color: var(--ink); border-left: 3px solid var(--accent); padding-left: 14px; }

/* speakers: name or role visible, rename button */
.lane { grid-template-columns: 200px 1fr; }
.lane-name span { font-weight: 700; }
.lane-edit { position: absolute; margin-left: 172px; width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px; line-height: 1; opacity: .55; }
.lane { position: relative; }
.lane-edit:hover { opacity: 1; color: var(--accent); border-color: var(--accent-line, var(--accent)); }

/* transcript: calmer, more premium reading */
.transcript { padding: 6px 12px 80px; }
.seg { grid-template-columns: 64px 1fr; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid transparent; }
.seg + .seg { margin-top: 2px; }
.seg:hover { background: var(--bg-2); border-color: var(--line); }
.seg.on { background: var(--accent-soft); border-color: var(--accent-line, transparent); box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 6px 18px -10px rgba(0,0,0,.18); }
.seg-time { align-self: start; justify-self: start; font-size: 11.5px; font-weight: 600; padding: 3px 8px; margin-top: 1px; border-radius: 8px; background: var(--surface-3); color: var(--ink-2); }
.seg-time:hover { background: var(--accent-soft); color: var(--accent); }
.seg-who { font-size: 12.5px; letter-spacing: .01em; margin-bottom: 4px; }
.seg-who .note { font-size: 13px; color: var(--ink-2); background: color-mix(in srgb, var(--accent) 8%, transparent); padding: 1px 8px; border-radius: 999px; font-style: italic; }
.seg-text { font-size: 17px; line-height: 1.65; letter-spacing: .002em; }

/* ask: play pills stay inside the message */
.msg-ranges { max-width: 100%; }
.msg-ranges button { max-width: 100%; height: auto; min-height: 28px; white-space: normal; text-align: left; }
.chat .md, .chat .msg { max-width: 100%; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .ws-browse { height: auto; max-height: none; }
  .ws-browse .pane > * { max-height: 70vh; }
  .lane { grid-template-columns: 130px 1fr; }
  .lane-edit { margin-left: 102px; }
}
.msg-ranges .mr { display: inline-flex; gap: 2px; }
.msg-ranges .mr-clip { border-color: var(--line) !important; background: var(--surface) !important; color: var(--ink-2) !important; font-family: var(--ui) !important; }
.msg-ranges .mr-clip:hover { color: var(--accent) !important; }
.suggest button { text-align: left; }

/* run screen: agent status with a sound-wave and live text */
.run-head h3 { display: flex; align-items: center; gap: 10px; }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; flex: none; }
.eq i { width: 3px; height: 30%; border-radius: 2px; background: var(--accent); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .15s; } .eq i:nth-child(3) { animation-delay: .3s; } .eq i:nth-child(4) { animation-delay: .45s; } .eq i:nth-child(5) { animation-delay: .6s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
@media (prefers-reduced-motion: reduce) { .eq i { animation: none; height: 60%; } }
.run-live { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--bg-2); }
.run-live-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.run-live-head small { color: var(--muted); font-size: 11.5px; }
.run-live-head .dot { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.run-live-text p { margin: 3px 0; font-family: var(--read); font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; transition: opacity .3s; }
.run-live-text time { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-right: 8px; }

/* ===== AVSense agent avatar: one face, a pose per step ===== */
.run-agent { display: flex; align-items: center; gap: 14px; }
.run-agent h3 { margin: 0; }
.agent { flex: none; width: 76px; height: 76px; }
.agent svg { overflow: visible; display: block; }
.agent .ag-waves path { fill: none; stroke: var(--accent, #e8590c); stroke-width: 3; stroke-linecap: round; opacity: 0; }
.agent .ag-watch, .agent .ag-links, .agent .ag-pen, .agent .ag-dots, .agent .ag-check, .agent .ag-sweat, .agent .ag-happy, .agent .ag-smile, .agent .ag-frown { opacity: 0; transition: opacity .3s; }
.agent .ag-body { transform-origin: 60px 62px; animation: ag-breathe 3.2s ease-in-out infinite; }
.agent .ag-eye { transform-box: fill-box; transform-origin: center; animation: ag-blink 4.2s infinite; }
.agent .ag-band, .agent .ag-cup { transition: opacity .4s, transform .4s; }
@keyframes ag-breathe { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-1.5px) scale(1.015); } }
@keyframes ag-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
/* preparing: headphones go on */
.agent[data-state="preparing"] .ag-band, .agent[data-state="preparing"] .ag-cup { animation: ag-puton 1.4s ease-in-out infinite alternate; }
@keyframes ag-puton { from { transform: translateY(-6px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
/* waiting in line: eyes drift, dots */
.agent[data-state="waiting"] .ag-eyes { animation: ag-look 3s ease-in-out infinite; }
.agent[data-state="waiting"] .ag-dots { opacity: 1; }
.agent[data-state="waiting"] .ag-dots circle { animation: ag-dot 1.2s infinite; }
.agent[data-state="waiting"] .ag-dots circle:nth-child(2) { animation-delay: .2s; } .agent[data-state="waiting"] .ag-dots circle:nth-child(3) { animation-delay: .4s; }
@keyframes ag-look { 0%,100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
@keyframes ag-dot { 0%,100% { opacity: .2; } 50% { opacity: 1; } }
/* listening: focused eyes, waves from both ears */
.agent[data-state="listening"] .ag-eye { animation: none; transform: scaleY(.45); }
.agent[data-state="listening"] .ag-waves path { animation: ag-wave 1.6s ease-out infinite; }
.agent[data-state="listening"] .ag-waves path:nth-child(2) { animation-delay: .4s; }
@keyframes ag-wave { 0% { opacity: 0; } 30% { opacity: .9; } 100% { opacity: 0; } }
/* exact word times: a stopwatch ticks */
.agent[data-state="timing"] .ag-watch { opacity: 1; }
.agent[data-state="timing"] .ag-hand { transform-origin: 60px 20px; animation: ag-tick 1.2s steps(8) infinite; }
.agent[data-state="timing"] .ag-eyes { transform: translateY(-2px); }
@keyframes ag-tick { to { transform: rotate(360deg); } }
/* matching: links pulse, eyes dart */
.agent[data-state="matching"] .ag-links { opacity: 1; animation: ag-dash 1s linear infinite; }
.agent[data-state="matching"] .ag-eyes { animation: ag-look .9s ease-in-out infinite; }
@keyframes ag-dash { to { stroke-dashoffset: -16; } }
/* writing: pen moves, eyes look down */
.agent[data-state="writing"] .ag-pen { opacity: 1; animation: ag-write 1s ease-in-out infinite; }
.agent[data-state="writing"] .ag-eyes { transform: translate(3px, 3px); }
.agent[data-state="writing"] .ag-ink { stroke-dasharray: 40; animation: ag-ink 1.6s linear infinite; }
@keyframes ag-write { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-6px, 3px); } }
@keyframes ag-ink { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
/* busy: sweat, wobble */
.agent[data-state="busy"] .ag-sweat { opacity: 1; }
.agent[data-state="busy"] .ag-body { animation: ag-wobble .5s ease-in-out infinite; }
@keyframes ag-wobble { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
/* done: happy */
.agent[data-state="done"] .ag-eyes, .agent[data-state="done"] .ag-mouth { opacity: 0; }
.agent[data-state="done"] .ag-happy, .agent[data-state="done"] .ag-smile, .agent[data-state="done"] .ag-check { opacity: 1; }
.agent[data-state="done"] .ag-body { animation: ag-hop .6s ease-out 2; }
@keyframes ag-hop { 50% { transform: translateY(-6px); } }
/* failed */
.agent[data-state="sad"] .ag-mouth { opacity: 0; }
.agent[data-state="sad"] .ag-frown { opacity: 1; }
.agent[data-state="sad"] .ag-body { animation: none; }
@media (prefers-reduced-motion: reduce) { .agent *, .agent .ag-body { animation: none !important; } }
@media (max-width: 600px) { .agent { width: 60px; height: 60px; } .agent svg { width: 60px; height: 60px; } }

/* selected speaker */
#lanes .lane-name.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
#lanes .lane-name.on span { color: var(--accent); }
.range-speaker { font-size: 12.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.range-actions { flex-wrap: wrap; gap: 8px; }

/* ===== Ask: sample questions always on top, answers with video frames ===== */
.ask-suggest { padding: 10px 14px 8px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2), transparent); }
.ask-suggest-label { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.ask-suggest .suggest { flex-direction: row; flex-wrap: nowrap; align-items: stretch; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: thin; }
.ask-suggest .suggest button { flex: none; max-width: 260px; white-space: normal; text-align: left; line-height: 1.35; padding: 9px 13px; border-radius: 14px; font-size: 13px; font-weight: 600;
  border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--accent), #ffb37a 60%, #9b8cff) border-box;
  box-shadow: 0 4px 14px -8px color-mix(in srgb, var(--accent) 60%, transparent); transition: transform .15s, box-shadow .15s; }
.ask-suggest .suggest button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 70%, transparent); color: var(--accent); }
.msg-frames { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 12px; }
.frame { margin: 0; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 24px -16px rgba(0,0,0,.45); transition: transform .15s; }
.frame:hover { transform: translateY(-2px); }
.frame-img { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1d1d24, #3a2a22); overflow: hidden; }
.frame-img .frame-canvas { width: 100%; height: 100%; display: block; object-fit: cover; }
.frame-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55)); pointer-events: none; }
.frame-img.no-img::before { content: "♪"; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.5); font-size: 28px; }
.frame-time { position: absolute; left: 8px; bottom: 7px; z-index: 1; font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,.45); padding: 2px 7px; border-radius: 6px; }
.frame-play { position: absolute; right: 8px; bottom: 6px; z-index: 1; width: 30px; height: 30px; border-radius: 50% !important; border: 0 !important; display: grid !important; place-items: center; background: var(--accent) !important; color: #fff !important; padding: 0 !important; }
.frame-play .ic { width: 12px; height: 12px; fill: #fff; }
.frame figcaption { padding: 8px 10px 4px; font-family: var(--read); font-size: 13px; line-height: 1.4; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.frame figcaption b { display: block; font-family: var(--ui); font-size: 11.5px; color: var(--accent); margin-bottom: 2px; }
.frame-actions { display: flex; gap: 6px; padding: 4px 10px 10px; }
.frame-actions button { height: 26px !important; font-size: 11.5px !important; }

/* ===== pinned player: stays at the top of the left column while you scroll ===== */
.ws.pin-player .ws-main > .player { position: sticky; top: 76px; z-index: 6; box-shadow: 0 12px 30px -18px rgba(0,0,0,.55); }
.ws.pin-player .ws-main > .player .screen { aspect-ratio: auto; height: min(34vh, calc((100vw - 460px) * .3)); min-height: 180px; }
.ws.pin-player .ws-browse { height: calc(100vh - 76px - min(34vh, 320px) - 150px); min-height: 380px; }
.pin-btn { font-size: 15px; opacity: .55; }
.pin-btn[aria-pressed="true"] { opacity: 1; background: var(--accent-soft); }
@media (max-width: 900px) {
  .ws.pin-player .ws-main > .player { top: 60px; }
  .ws.pin-player .ws-main > .player .screen { height: 30vh; }
}

/* streaming caret */
.caret { display: inline-block; width: 8px; height: 1.05em; margin-left: 2px; vertical-align: -2px; border-radius: 2px; background: var(--accent); animation: caret .9s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* text that is still being written looks unfinished */
.streaming { opacity: .62; filter: saturate(.6); }
.streaming .cite { pointer-events: none; }
.stream-note { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: var(--accent); }
.stream-note .caret { margin: 0; }

/* ===== chat: question bubble + readable answer (frame cards unchanged) ===== */
.msg.q { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #9b5cff)); color: #fff; border-radius: 18px 18px 4px 18px; padding: 11px 16px; font-weight: 600; box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.msg.a .md { color: var(--ink); font-size: 16px; line-height: 1.65; font-weight: 450; }
.msg.a .md p, .msg.a .md li { color: var(--ink); }
.msg.a .md strong { color: var(--ink); font-weight: 750; }
.msg.a .md li { margin: 5px 0; }
.msg.a .md ol, .msg.a .md ul { padding-left: 20px; }

/* ===== brand: the AVSense agent face ===== */
.brand-agent { width: 34px; height: 34px; flex: none; display: block; filter: drop-shadow(0 3px 6px rgba(232,89,12,.25)); }

/* ===== speaker lanes: name + role, no overlap ===== */
.lane { grid-template-columns: minmax(0, 210px) 26px 1fr !important; gap: 8px !important; position: static !important; }
.lane-edit { position: static !important; margin: 0 !important; align-self: center; }
.lane-name { display: grid !important; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.lane-name .ln { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.lane-name .ln b { font-size: 13px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-name .ln em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-name small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
@media (max-width: 900px) { .lane { grid-template-columns: minmax(0, 140px) 24px 1fr !important; } }

/* ===== AI answer bubble: clearer card with the agent avatar ===== */
.msg.a { position: relative; padding: 14px 16px 14px 56px !important; border-radius: 18px 18px 18px 6px !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface)) !important;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)) !important; box-shadow: 0 12px 28px -22px rgba(0,0,0,.55); }
.msg.a::before { content: ""; position: absolute; left: 12px; top: 12px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface) url(/assets/avsense-agent.svg) center / 30px no-repeat; box-shadow: 0 2px 8px -2px rgba(232,89,12,.35); }
.msg.a .md { color: var(--ink) !important; }

/* "What AVSense heard" as clear points */
.notes .notes-body { margin-top: 12px; border-left: 3px solid var(--accent); padding-left: 14px; }
.notes .notes-body ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notes .notes-body li { position: relative; padding-left: 18px; font-family: var(--read); font-size: 16px; line-height: 1.55; color: var(--ink); }
.notes .notes-body li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.notes .notes-body li b, .notes .notes-body li strong { color: var(--accent); font-weight: 750; }

/* ===== Download: a real dropdown button ===== */
.dl summary { cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line) !important; background: var(--surface) !important; transition: border-color .15s, box-shadow .15s, background .15s; }
.dl summary::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; opacity: .7; }
.dl summary:hover { border-color: var(--accent) !important; color: var(--accent); box-shadow: 0 6px 16px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.dl[open] summary { border-color: var(--accent) !important; color: var(--accent); background: var(--accent-soft) !important; }
.dl[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.dl-menu { min-width: 240px; padding: 8px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.45); }
.dl-menu button { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dl-menu button::before { content: "↓"; width: 18px; color: var(--accent); font-weight: 800; }
.dl-menu button:hover { background: var(--accent-soft); color: var(--accent); }

/* ===== cost sheet: clear pills ===== */
.cost-sheet { gap: 12px !important; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important; background: var(--bg-2) !important; }
.cost-sheet .cs-pill { padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 16px -12px rgba(0,0,0,.35); gap: 4px !important; }
.cost-sheet .cs-pill span { font-size: 10.5px !important; font-weight: 700; color: var(--accent) !important; }
.cost-sheet .cs-pill b { font-family: var(--ui) !important; font-size: 18px !important; font-weight: 800 !important; color: var(--ink); letter-spacing: -.01em; }
.cost-sheet .cs-pill small { font-family: var(--ui) !important; font-size: 12px !important; color: var(--ink-2) !important; line-height: 1.4; }
.cost-sheet .cs-pill:first-child { background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

/* ===== long-recording note ===== */
.rec-notice { flex-basis: 100%; margin-top: 8px; padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: #8a4b00; background: #fff4e0; border: 1px solid #ffd59a; }
:root[data-theme="dark"] .rec-notice { color: #ffc46b; background: rgba(255,170,60,.12); border-color: rgba(255,170,60,.35); }

/* ===== frame cards: dark player style (image fills the card, caption and controls on glass) ===== */
.msg-frames .frame { position: relative; background: #0d0d12 !important; border: 1px solid rgba(255,255,255,.08) !important; border-radius: 16px !important; overflow: hidden; box-shadow: 0 16px 34px -20px rgba(0,0,0,.8) !important; }
.msg-frames .frame-img { aspect-ratio: 16 / 10 !important; }
.msg-frames .frame-img::after { background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.85)) !important; }
.msg-frames .frame-time { top: 8px; bottom: auto !important; left: 8px; background: rgba(0,0,0,.55) !important; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.15); }
.msg-frames .frame-play { right: 50% !important; bottom: 50% !important; transform: translate(50%, 50%); width: 44px !important; height: 44px !important; background: rgba(255,255,255,.18) !important; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.35) !important; transition: transform .15s, background .15s; }
.msg-frames .frame:hover .frame-play { background: var(--accent) !important; transform: translate(50%, 50%) scale(1.08); }
.msg-frames .frame-play .ic { width: 16px !important; height: 16px !important; }
.msg-frames .frame figcaption { position: absolute; left: 0; right: 0; bottom: 42px; padding: 0 12px !important; color: #f4f4f7 !important; font-size: 12.5px !important; text-shadow: 0 1px 3px rgba(0,0,0,.6); -webkit-line-clamp: 2 !important; z-index: 1; }
.msg-frames .frame figcaption b { color: #ffb37a !important; }
.msg-frames .frame-actions { position: relative; z-index: 1; background: #0d0d12; padding: 8px 10px 10px !important; gap: 6px; }
.msg-frames .frame-actions button { flex: 1; justify-content: center; height: 28px !important; border-radius: 999px !important; font-family: var(--ui) !important; font-size: 11.5px !important; font-weight: 700 !important; }
.msg-frames .frame-actions button[data-ri] { background: rgba(255,255,255,.1) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.18) !important; }
.msg-frames .frame-actions button[data-ri]:hover { background: var(--accent) !important; border-color: var(--accent) !important; }
.msg-frames .frame-actions button[data-ri] .ic { fill: #fff; }
.msg-frames .frame-actions .mr-clip { background: rgba(255,255,255,.1) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.18) !important; }
.msg-frames .frame-actions .mr-clip:hover { background: #fff !important; color: #111 !important; }

/* ===== live status line ===== */
#run-title { display: inline; }
#run-title::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.4s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
#run-title.typing { animation: type-in .7s cubic-bezier(.2,.7,.2,1); }
@keyframes type-in { from { clip-path: inset(0 100% 0 0); opacity: .4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
#run-sub.fade { animation: sub-in .6s ease .15s both; }
@keyframes sub-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.run-head h3 { background: linear-gradient(90deg, var(--ink) 40%, var(--accent) 50%, var(--ink) 60%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; }
.run-live-head .dot { box-shadow: 0 0 0 0 rgba(229,72,77,.6); animation: blink 1.2s ease-in-out infinite, ping 1.6s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(229,72,77,.55); } 100% { box-shadow: 0 0 0 8px rgba(229,72,77,0); } }

/* ===== avatar props per step ===== */
.agent .ag-film, .agent .ag-send, .agent .ag-notes, .agent .ag-spark { opacity: 0; transition: opacity .3s; }
/* preparing: a film strip slides to the ear and its sound wave flows in */
.agent[data-state="preparing"] .ag-film { opacity: 1; animation: film-in 1.8s ease-in-out infinite; }
.agent[data-state="preparing"] .ag-film-wave { stroke-dasharray: 14; animation: ink 1s linear infinite; }
@keyframes film-in { 0% { transform: translateX(-10px); opacity: 0; } 25% { opacity: 1; } 70% { transform: translateX(6px); opacity: 1; } 100% { transform: translateX(8px); opacity: 0; } }
@keyframes ink { from { stroke-dashoffset: 28; } to { stroke-dashoffset: 0; } }
/* sending: arrows rise one after another */
.agent[data-state="sending"] .ag-send { opacity: 1; }
.agent[data-state="sending"] .ag-send path { animation: rise 1.2s ease-in-out infinite; opacity: 0; }
.agent[data-state="sending"] .ag-send .s2 { animation-delay: .2s; } .agent[data-state="sending"] .ag-send .s3 { animation-delay: .4s; }
.agent[data-state="sending"] .ag-eyes { transform: translate(3px, -2px); }
.agent[data-state="sending"] .ag-band, .agent[data-state="sending"] .ag-cup { animation: none; }
@keyframes rise { 0% { opacity: 0; transform: translateY(10px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
/* listening: little notes float out of the ears */
.agent[data-state="listening"] .ag-notes { opacity: 1; }
.agent[data-state="listening"] .ag-notes text { animation: float-note 2.4s ease-in-out infinite; opacity: 0; }
.agent[data-state="listening"] .ag-notes .n2 { animation-delay: .8s; } .agent[data-state="listening"] .ag-notes .n3 { animation-delay: 1.6s; }
@keyframes float-note { 0% { opacity: 0; transform: translateY(8px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.agent[data-state="listening"] .ag-body { animation: ag-nod 2.6s ease-in-out infinite; }
@keyframes ag-nod { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-2.5deg); } 60% { transform: rotate(2.5deg); } }
/* timing: the head tilts as if counting */
.agent[data-state="timing"] .ag-body { animation: ag-nod 1.2s ease-in-out infinite; }
/* matching: notes too, eyes dart */
.agent[data-state="matching"] .ag-notes { opacity: .6; }
/* done: sparkles twinkle */
.agent[data-state="done"] .ag-spark { opacity: 1; }
.agent[data-state="done"] .ag-spark path { transform-box: fill-box; transform-origin: center; animation: twinkle 1.2s ease-in-out infinite; }
.agent[data-state="done"] .ag-spark .k2 { animation-delay: .3s; } .agent[data-state="done"] .ag-spark .k3 { animation-delay: .6s; }
@keyframes twinkle { 0%, 100% { transform: scale(.4); opacity: .3; } 50% { transform: scale(1.1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #run-title::after, #run-title.typing, .agent .ag-film, .agent .ag-send path, .agent .ag-notes text, .agent .ag-spark path { animation: none !important; } }
.notes .notes-md p { margin: 0 0 10px; font-family: var(--read); font-size: 17px; line-height: 1.65; color: var(--ink); }
.notes .notes-md strong { color: var(--accent); font-weight: 750; }

/* ===== floating player ===== */
.float-handle { display: none; }
.ws.float-player .ws-main > .player { position: fixed; z-index: 60; right: 20px; bottom: 20px; width: min(440px, 92vw); border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.6), 0 0 0 1px var(--line); }
.ws.float-player .ws-main > .player .float-handle { display: block; cursor: grab; user-select: none; touch-action: none; padding: 6px 12px; font-size: 11.5px; font-weight: 700; color: #fff; background: linear-gradient(90deg, var(--accent), #ff8a3d); }
.ws.float-player .ws-main > .player .float-handle:active { cursor: grabbing; }
.ws.float-player .ws-main > .player .screen { aspect-ratio: 16 / 9 !important; height: auto !important; }
.ws.float-player .ws-main > .player .ranges { max-height: 140px; overflow: auto; }
.ws.float-player .ws-browse { height: calc(100vh - 120px) !important; }

/* ===== live status: bar with shimmer, LIVE tag ===== */
.run-agent { flex-wrap: wrap; }
.live-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: #e5484d; padding: 3px 8px; border-radius: 999px; background: rgba(229,72,77,.1); animation: blink 1.4s ease-in-out infinite; }
.run-bar { position: relative; height: 10px; margin-top: 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.run-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; transition: width .8s cubic-bezier(.2,.7,.2,1);
  background: linear-gradient(90deg, var(--accent), #ff9f5a, #9b8cff) 0 0 / 200% 100%; animation: bar-flow 2.4s linear infinite; }
.run-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-100%); animation: bar-shine 1.6s ease-in-out infinite; }
.run-bar span { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 9px; font-weight: 700; color: var(--ink-2); }
@keyframes bar-flow { to { background-position: -200% 0; } }
@keyframes bar-shine { to { transform: translateX(100%); } }
.run-head #run-sub { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .run-bar i, .run-bar i::after, .live-tag { animation: none; } }

/* ===== REC indicator (replaces LIVE) ===== */
.live-tag { display: none !important; }
.rec-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: .12em; color: #e5484d; }
.rec-tag i { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 6px rgba(229,72,77,.7); animation: rec 1.1s steps(2, start) infinite; }
@keyframes rec { to { visibility: hidden; } }

/* ===== Highlights ===== */
.hl-star { color: #f5a524; font-size: 14px; margin-right: 2px; }
.hl-card { position: relative; padding: 16px 16px 14px; border-radius: 16px; background: linear-gradient(160deg, color-mix(in srgb, #f5a524 10%, var(--surface)), var(--surface) 55%); border: 1px solid color-mix(in srgb, #f5a524 30%, var(--line)); box-shadow: 0 10px 24px -18px rgba(0,0,0,.45); }
.hl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.hl-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #f5a524; color: #1a1205; font-weight: 800; font-size: 12px; }
.hl-time { font-family: var(--mono); color: var(--ink-2); background: var(--surface-3); padding: 2px 8px; border-radius: 6px; }
.hl-who { font-weight: 700; color: var(--accent); }
.hl-card h3 { margin: 10px 0 4px; font-size: 18px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.hl-why { margin: 0 0 8px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.hl-card blockquote { margin: 8px 0 10px; padding: 8px 12px; border-left: 3px solid #f5a524; background: var(--bg-2); border-radius: 0 10px 10px 0; font-family: var(--read); font-size: 15px; line-height: 1.55; color: var(--ink); }
.hl-card .qa-tools { margin: 0; }

/* film-strip prop removed (owner: looked odd next to the face) */
.agent .ag-film { display: none !important; }
.demo-file .demo-what { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }

/* ===== status pitch badges ===== */
.run-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rb { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.2; animation: sub-in .5s ease both; }
.rb-private { background: color-mix(in srgb, #2f9e44 14%, var(--surface)); color: #2b7a3b; border: 1px solid color-mix(in srgb, #2f9e44 35%, transparent); }
.rb-data { background: color-mix(in srgb, #1c7ed6 13%, var(--surface)); color: #1864ab; border: 1px solid color-mix(in srgb, #1c7ed6 35%, transparent); }
.rb-fast { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); animation-delay: .15s; }
:root[data-theme="dark"] .rb-private { color: #69db7c; } :root[data-theme="dark"] .rb-data { color: #74c0fc; }
.run-head #run-sub { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.rb-time, .rb-who, .rb-lang, .rb-star, .rb-news, .rb-listen { background: color-mix(in srgb, #7950f2 11%, var(--surface)); color: #5f3dc4; border: 1px solid color-mix(in srgb, #7950f2 30%, transparent); }
:root[data-theme="dark"] .rb-time, :root[data-theme="dark"] .rb-who, :root[data-theme="dark"] .rb-lang, :root[data-theme="dark"] .rb-star, :root[data-theme="dark"] .rb-news, :root[data-theme="dark"] .rb-listen { color: #b197fc; }
.rb + .rb { animation-delay: .12s; } .rb + .rb + .rb { animation-delay: .24s; }

/* ===== built by ===== */
.built-by { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px; color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); background: var(--surface); white-space: nowrap; transition: border-color .15s, color .15s; }
.built-by b { color: var(--ink); font-weight: 750; }
.built-by span { font-size: 11px; opacity: .6; }
.built-by:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 760px) { .built-by { font-size: 0; padding: 4px 8px; } .built-by b { font-size: 12px; } .built-by::before { content: "by "; font-size: 12px; } }

/* ===== done pills with animated icons ===== */
.rb-done { background: color-mix(in srgb, #2f9e44 12%, var(--surface)); color: #2b7a3b; border: 1px solid color-mix(in srgb, #2f9e44 35%, transparent); }
:root[data-theme="dark"] .rb-done { color: #69db7c; }
.di { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.di-search { animation: di-search 2s ease-in-out infinite; transform-origin: 10px 10px; }
@keyframes di-search { 0%,100% { transform: translate(0,0); } 25% { transform: translate(2px,-1px); } 50% { transform: translate(0,1px); } 75% { transform: translate(-2px,-1px); } }
.di-click path:first-child { fill: currentColor; stroke: none; animation: di-tap 1.4s ease-in-out infinite; transform-origin: 12px 12px; }
.di-click .di-ring { animation: di-ring 1.4s ease-out infinite; }
@keyframes di-tap { 0%,60%,100% { transform: scale(1); } 70% { transform: scale(.85); } }
@keyframes di-ring { 0%,60% { opacity: 0; } 70% { opacity: 1; } 100% { opacity: 0; } }
.di-quote { animation: di-pop 1.8s ease-in-out infinite; transform-origin: center; }
@keyframes di-pop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.di-ask circle { fill: currentColor; stroke: none; animation: di-dot 1.2s ease-in-out infinite; }
.di-ask .d2 { animation-delay: .2s; } .di-ask .d3 { animation-delay: .4s; }
@keyframes di-dot { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
.di-publish .di-up { animation: di-up 1.6s ease-in-out infinite; }
@keyframes di-up { 0% { transform: translateY(3px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-2px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .di, .di * { animation: none !important; } }

/* ===== credits ===== */
.credits { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 22px; margin: 28px auto 22px; padding: 14px 18px; max-width: 760px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink-2); }
.credits span { color: var(--muted); margin-right: 2px; }
.credits a { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--line-2, var(--line)); }
.credits a:hover { color: var(--accent); border-color: var(--accent); }
.credits b { color: var(--ink); font-weight: 750; }
.credits .team { font-weight: 800; letter-spacing: .04em; color: var(--accent); padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); }
.w-notes { flex-basis: 100%; min-height: 44px; resize: vertical; font-family: var(--ui); }

/* ===== header credits: all three names ===== */
.built-by { gap: 5px !important; padding: 5px 12px !important; font-size: 12px !important; flex-wrap: nowrap; }
.built-by span { color: var(--muted); font-size: 12px !important; opacity: 1 !important; }
.built-by a { color: inherit; text-decoration: none; }
.built-by a:hover b { color: var(--accent); }
.built-by i { font-style: normal; color: var(--muted); }
.built-by em { font-style: normal; font-weight: 800; color: var(--accent); }
@media (max-width: 1100px) { .built-by > span:first-child { display: none; } }
@media (max-width: 860px) { .built-by { display: none !important; } }

/* ===== hero: the pain, then AVSense, then one word each ===== */
.pain { margin: 0 0 6px; font-size: clamp(16px, 1.6vw, 20px); font-weight: 650; color: var(--ink-2); }
.hero-words { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 14px; }
.hero-words span { padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 800; letter-spacing: .01em; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); animation: sub-in .5s ease both; }
.hero-words span:nth-child(2) { animation-delay: .08s; } .hero-words span:nth-child(3) { animation-delay: .16s; } .hero-words span:nth-child(4) { animation-delay: .24s; } .hero-words span:nth-child(5) { animation-delay: .32s; } .hero-words span:nth-child(6) { animation-delay: .4s; }
.blog-link { align-self: center; font-size: 13px; font-weight: 700; color: var(--accent); }

/* ===== right panel fits the visible screen (taskbars, browser bars) ===== */
.ws-side { height: calc(100dvh - 108px) !important; min-height: 460px !important; }
.ws-side .pane { padding-bottom: 14px; }
.ws-side .ask-form { margin-bottom: 10px; }
.ws-side .pane[data-pane="write"] { padding-bottom: 24px; }
.ws-browse { height: calc(100dvh - 120px) !important; }

/* ===== moment cards: clean frame, play on the side, full caption below ===== */
.msg-frames .frame-img::after { background: linear-gradient(180deg, rgba(0,0,0,0) 70%, rgba(0,0,0,.45)) !important; }
.msg-frames .frame-play { right: 10px !important; bottom: 10px !important; left: auto !important; top: auto !important; transform: none !important; width: 34px !important; height: 34px !important; background: var(--accent) !important; border: 2px solid rgba(255,255,255,.85) !important; backdrop-filter: none; box-shadow: 0 4px 12px rgba(0,0,0,.45); }
.msg-frames .frame:hover .frame-play { transform: scale(1.08) !important; }
.msg-frames .frame-play .ic { width: 13px !important; height: 13px !important; margin-left: 2px; }
.msg-frames .frame figcaption { position: static !important; display: flex !important; flex-direction: column; gap: 3px; padding: 10px 12px 4px !important; text-shadow: none !important; -webkit-line-clamp: unset !important; overflow: visible !important; }
.msg-frames .fc-who { font-family: var(--mono); font-size: 11px; font-weight: 700; color: #ffb37a; letter-spacing: .02em; }
.msg-frames .fc-label { font-family: var(--ui); font-size: 13px; font-weight: 700; color: #fff; line-height: 1.35; }
.msg-frames .fc-line { font-family: var(--read); font-size: 12.5px; color: #c9c9d3; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.msg-frames .frame-actions { padding: 8px 12px 12px !important; }
.msg-frames .frame-actions button[data-ri] { background: var(--accent) !important; border-color: var(--accent) !important; }
.msg-frames .frame-actions button[data-ri]:hover { filter: brightness(1.08); }

/* ===== top bar: never wrap, never push the account button off ===== */
.bar { gap: 16px !important; flex-wrap: nowrap !important; min-width: 0; }
.nav { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; }
.nav a { white-space: nowrap; }
.bar-end { flex: none; flex-wrap: nowrap; }
.credit { white-space: nowrap; flex: none; }
.account, .avatar { flex: none; }
.built-by { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; }
/* top bar: drop the QA names first, keep "Designed & built by S.M. Abbas" and the Architecture text as long as possible */
@media (max-width: 1240px) { .built-by .qa { display: none; } }
@media (max-width: 1100px) { .built-by > span:first-child { display: inline !important; } }
@media (max-width: 1020px) { .built-by > span:first-child { display: none !important; } }
@media (max-width: 900px) { .built-by { display: none !important; } }
@media (max-width: 700px) { .nav a[href="/architecture/"] { font-size: 0; gap: 0; padding: 7px 10px; } .nav a[href="/architecture/"] .ic { width: 17px; height: 17px; } }


/* ===== Low cost tier: compose options and the simple record view ===== */
.lite-only { display: none !important; }
#compose-form.is-lite span.lite-only { display: inline !important; }
#compose-form.is-lite label.mode.lite-only { display: flex !important; }
#compose-form.is-lite .std-only { display: none !important; }
#compose-form.is-lite .modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { #compose-form.is-lite .modes { grid-template-columns: 1fr; } }
.tier[data-tier="lite"] .rate { color: var(--accent); font-weight: 700; }
body.rec-lite .lanes-card,
body.rec-lite .ws-browse .tabs [data-tab]:not([data-tab="transcript"]):not([data-tab="flags"]),
body.rec-lite label:has(> #follow),
body.rec-lite #range-save { display: none !important; }
body.rec-lite .dl-menu [data-fmt="srt"] { display: none !important; }
.lite-seg { grid-template-columns: 1fr !important; padding: 10px 4px; border-bottom: 1px dashed var(--line); }
.lite-seg .seg-text { cursor: text; }

#compose-form.is-lite small.lite-hint { display: block !important; font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; line-height: 1.35; }

/* ===== several files joined as one recording ===== */
.drop-multi { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.picked-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.picked-list li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; }
.picked-list .pl-n { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; font-size: 12px; }
.picked-list .pl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.picked-list .pl-dur { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.picked-list .pl-btn { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; padding: 0; }
.picked-list .pl-btn:disabled { opacity: .35; cursor: default; }
.part-divider { margin: 14px 0 6px; padding: 6px 10px; border-radius: 8px; background: var(--accent-soft, #fff0e8); color: var(--accent); font-weight: 700; font-size: 12.5px; }

.add-part { margin-top: 8px; }
.add-part small { color: var(--muted); font-weight: 500; margin-left: 4px; }

#compose-form .modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { #compose-form .modes { grid-template-columns: 1fr; } }

/* HEVC (iPhone) videos: offer a playable copy made on the device */
.playfix { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; gap: 8px; padding: 18px; text-align: center; background: rgba(10,10,14,.86); color: #fff; border-radius: inherit; }
.playfix b { font-size: 15px; }
.playfix span { font-size: 13px; color: #d6d6de; max-width: 460px; margin: 0 auto; line-height: 1.45; }
.playfix button { justify-self: center; }
.playfix small { font-size: 12px; color: #ffb37a; min-height: 14px; }

/* ===== Check facts / Tell me more ===== */
.fc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.fc-busy { font-size: 12.5px; color: var(--muted); }
.fc-note { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.fc-known h4, .fc-about h4 { margin: 12px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fc-review { display: grid; gap: 2px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-left: 4px solid #c92a2a; border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--surface); }
.fc-review:hover { border-color: var(--accent); }
.fc-rating { justify-self: start; font-weight: 800; font-size: 12px; color: #fff; background: #c92a2a; border-radius: 6px; padding: 1px 8px; }
.fc-claim { font-size: 13.5px; color: var(--ink-2); }
.fc-review small { color: var(--muted); font-size: 12px; }
.fc-about, .fc-item { padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.fc-q { font-family: var(--read); font-size: 14.5px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.fc-q small { font-family: var(--ui); font-weight: 600; color: var(--accent); font-size: 12px; }
.fc-say { margin-top: 6px; font-size: 14px; }
.fc-src { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fc-src a { font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); background: var(--bg); }
.fc-src a:hover { border-color: var(--accent); color: var(--accent); }
.fc-cost { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }

#compose-form .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1280px) { #compose-form .modes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { #compose-form .modes { grid-template-columns: 1fr; } }

/* fact-checker ratings: colour and icon by meaning (the words stay theirs) */
.fc-review { border-left-color: #868e96; }
.fc-review .fc-rating { background: #868e96; display: inline-flex; align-items: center; gap: 6px; }
.fc-ico { font-style: normal; font-weight: 900; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.25); font-size: 11px; }
.fc-review.fc-danger { border-left-color: #e03131; background: color-mix(in srgb, #e03131 7%, var(--surface)); }
.fc-review.fc-danger .fc-rating { background: #e03131; font-size: 13px; padding: 3px 10px; }
.fc-review.fc-danger .fc-ico { background: #fff; color: #e03131; width: 18px; height: 18px; font-size: 12px; }
.fc-review.fc-warn { border-left-color: #f08c00; }
.fc-review.fc-warn .fc-rating { background: #f08c00; }
.fc-review.fc-ok { border-left-color: #2f9e44; }
.fc-review.fc-ok .fc-rating { background: #2f9e44; }

.rec-fc { white-space: nowrap; }
@media (max-width: 760px) { .rec-actions { flex-wrap: wrap; } }

.link-result .link-fc { flex: 0 0 auto; margin-left: auto; white-space: nowrap; }

/* ===== Check tab: readable layout ===== */
.fc-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.fc-head h4 { margin: 0 !important; }
.fc-head small { color: var(--muted); font-size: 12px; }
.fc-badge { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft, var(--bg-2)); font-size: 18px; flex: 0 0 auto; }
.fc-about { border-left: 4px solid var(--accent); }
.fc-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.fc-points li { position: relative; padding: 8px 10px 8px 30px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-family: var(--read); font-size: 14px; line-height: 1.55; color: var(--ink); }
.fc-points li::before { content: "›"; position: absolute; left: 11px; top: 6px; font-weight: 900; font-size: 17px; color: var(--accent); }
.fc-points li b { color: var(--accent); font-weight: 700; }
.fc-sec { margin: 16px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fc-q { display: grid !important; grid-template-columns: auto 1fr; gap: 4px 10px !important; align-items: start !important; }
.fc-n { grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--ui); font-size: 13px; font-weight: 800; }
.fc-q blockquote { margin: 0; padding: 2px 0 0 10px; border-left: 3px solid var(--line); font-style: italic; }
.fc-qmeta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fc-say { margin-top: 10px !important; }
.fc-say-h { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.fc-src { align-items: center; }
.fc-src-h { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.fc-src a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px !important; }
.fc-src a i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; }
.fc-note { padding: 8px 12px; border-radius: 10px; background: var(--bg-2); }

/* image search */
.fc-img { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 10px; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.fc-img > img { width: 140px; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; background: #000; }
.fc-img-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fc-best { margin: 4px 0; font-size: 13.5px; }
.fc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0; }
.fc-tags span { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-2); }
.fc-pages { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.fc-pages li { display: flex; flex-direction: column; font-size: 13px; }
.fc-pages a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.fc-pages a:hover { color: var(--accent); }
.fc-pages small { color: var(--muted); font-size: 11.5px; padding-left: 22px; }
.fc-legend { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
@media (max-width: 560px) { .fc-img { grid-template-columns: 1fr; } .fc-img > img { width: 100%; } }
