/* Crush That Pitch: calm, warm, mobile-first. One token set, two themes. */
:root {
  --bg: #f4f3ef; --surface: #ffffff; --sunken: #ecebe6; --line: #e4e2dc; --line-strong: #c4c1b8;
  --t1: #151514; --t2: #57564f; --t3: #6f6d66;
  --ink: #151514; --ink-fg: #ffffff;
  --accent: #ff5b2e; --accent-text: #b8321a; --accent-quiet: #ffe9e1;
  --ok: #26703f; --warn: #8f5200; --bad: #b8321a;
  --type-talk: #ffe6d5; --type-talk-ink: #8a3a12;
  --type-presentation: #e7e3ff; --type-presentation-ink: #4b3aa8;
  --type-meeting: #daf0e2; --type-meeting-ink: #23633d;
  --mark-f: #ffe3b3; --mark-f-line: #b06f00;
  --mark-r: #d9e8ff; --mark-r-line: #2f62b8;
  --shadow: 0 1px 2px rgb(20 20 18 / 0.04), 0 8px 24px rgb(20 20 18 / 0.05);
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --r-card: 24px; --r-field: 16px; --pill: 999px;
  --h: 52px; --h-s: 44px;
  --col: 600px; --pad: 20px;
  --fast: 140ms; --curve: cubic-bezier(0.2, 0, 0, 1);
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0f0f0e; --surface: #1a1a18; --sunken: #242421; --line: #2e2e2a; --line-strong: #4d4d47;
  --t1: #f4f3ef; --t2: #bdbbb3; --t3: #a3a098;
  --ink: #f4f3ef; --ink-fg: #151514;
  --accent: #ff6a3f; --accent-text: #ffa284; --accent-quiet: #3a1d14;
  --ok: #86d9a6; --warn: #f2bd66; --bad: #ffa284;
  --type-talk: #3a2418; --type-talk-ink: #ffc7a3;
  --type-presentation: #27233f; --type-presentation-ink: #ccc4ff;
  --type-meeting: #18301f; --type-meeting-ink: #a9e5bf;
  --mark-f: #4a3410; --mark-f-line: #f2bd66;
  --mark-r: #1b2c48; --mark-r-line: #92baff;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--t1); font: 400 16px/24px var(--font); -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
p, li, blockquote { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1:focus { outline: none; }
svg { flex: none; }

/* screen and bar */
.screen { min-height: 100dvh; max-width: var(--col); margin: 0 auto; padding: 0 var(--pad) calc(132px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding-top: env(safe-area-inset-top); position: sticky; top: 0; background: var(--bg); z-index: 5; }
.bar-title { font: 600 15px/20px var(--font); text-align: center; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-actions { display: flex; gap: 8px; align-items: center; }
.bar-gap { width: var(--h-s); flex: none; }
.wordmark { font: 700 21px/1 var(--font); letter-spacing: -0.04em; }
.wordmark span { font-weight: 400; color: var(--accent-text); }
.round { width: var(--h-s); height: var(--h-s); border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--t1); flex: none; text-decoration: none; }
.langcode { font: 600 13px/1 var(--mono); letter-spacing: 0.02em; }
.pillbtn { border: 0; display: inline-flex; align-items: center; gap: 8px; min-height: var(--h-s); padding: 0 16px 0 14px; border-radius: var(--pill); background: var(--surface); box-shadow: var(--shadow); color: var(--t1); text-decoration: none; font: 500 15px/1 var(--font); white-space: nowrap; }
:root[data-theme='dark'] :is(.round, .pillbtn) { background: var(--sunken); }

/* type scale */
.hello { font: 500 17px/24px var(--font); color: var(--t2); margin: 24px 0 0; }
.h1 { font: 650 34px/38px var(--font); letter-spacing: -0.03em; margin: 4px 0 10px; }
.h2 { font: 650 26px/31px var(--font); letter-spacing: -0.02em; margin: 0 0 8px; }
.h3 { font: 600 17px/22px var(--font); letter-spacing: -0.01em; }
.top-gap { margin-top: 20px; }
.lead { font: 400 17px/25px var(--font); color: var(--t2); margin: 0 0 24px; }
.small { font: 400 14px/20px var(--font); color: var(--t2); margin: 0; }
.muted { color: var(--t2); }
.sec { font: 600 13px/18px var(--font); color: var(--t3); margin: 32px 0 10px; }
.eyebrow { font: 500 12px/16px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 10px; }
.note { font: 500 14px/20px var(--font); color: var(--t2); background: var(--sunken); border-radius: 14px; padding: 10px 14px; margin: 0 0 16px; }

/* steps */
.steps-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; list-style: none; padding: 0; margin: 4px 0 28px; }
.steps-nav li { border-top: 3px solid var(--line); padding-top: 8px; font: 500 13px/16px var(--font); color: var(--t3); }
.steps-nav li.done, .steps-nav li.on { border-color: var(--ink); color: var(--t1); }
.steps-nav li.on { font-weight: 600; }

/* surfaces */
.card { background: var(--surface); border-radius: var(--r-card); padding: 20px; box-shadow: var(--shadow); }
.stack { display: grid; gap: 14px; }

/* type tiles */
.types { display: grid; gap: 12px; }
.type { display: flex; align-items: center; gap: 16px; border-radius: var(--r-card); padding: 18px; background: var(--surface); box-shadow: var(--shadow); color: var(--t1); min-height: 92px; text-decoration: none; transition: transform var(--fast) var(--curve); }
.type:active { transform: scale(0.985); }
.type .ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; flex: none; background: var(--tint); color: var(--tint-ink); }
.type b { display: block; font: 600 18px/23px var(--font); letter-spacing: -0.01em; }
.type small { display: block; font: 400 14px/19px var(--font); color: var(--t2); margin-top: 2px; }
.type .chev { margin-left: auto; color: var(--t3); }

/* list rows */
.list { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; }
.list.empty { padding: 28px 20px; text-align: center; display: grid; gap: 16px; justify-items: center; }
.list.empty p { margin: 0; color: var(--t2); font: 400 15px/22px var(--font); max-width: 320px; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: var(--t1); min-height: 72px; }
.row + .row { border-top: 1px solid var(--line); }
.row .dot { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--tint); color: var(--tint-ink); }
.row .txt { min-width: 0; flex: 1; }
.row b { display: block; font: 500 16px/21px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row small { display: block; font: 400 13px/18px var(--font); color: var(--t3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .side { font: 500 14px/18px var(--mono); color: var(--t2); flex: none; white-space: nowrap; }
.row > svg:last-child { color: var(--t3); }

/* fields */
.field { display: grid; gap: 8px; }
.label { font: 500 14px/18px var(--font); color: var(--t2); margin: 0; }
.input, .area { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-field); padding: 13px 16px; font: 400 16px/24px var(--font); resize: none; min-height: var(--h); box-shadow: var(--shadow); transition: border-color var(--fast); }
:root[data-theme='dark'] :is(.input, .area) { background: var(--sunken); }
.area { overflow: hidden; }
.area.tall { min-height: 160px; overflow-y: auto; }
.input::placeholder, .area::placeholder { color: var(--t3); }
.input:focus, .area:focus { outline: none; border-color: var(--ink); }
.key .area { border-color: var(--line-strong); }
.more { display: none; gap: 14px; }
.more.open { display: grid; }
.link { border: 0; background: none; padding: 0 2px; min-height: var(--h-s); display: inline-flex; align-items: center; gap: 6px; justify-self: start; font: 500 15px/20px var(--font); color: var(--t1); text-decoration: none; }
.link.danger { color: var(--bad); margin: 32px auto 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: var(--h-s); padding: 0 16px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--surface); font: 500 15px/1 var(--font); display: inline-flex; align-items: center; color: var(--t1); }
:root[data-theme='dark'] .chip { background: var(--sunken); }
:root .chip[aria-pressed='true'], :root[data-theme='dark'] .chip[aria-pressed='true'] { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.seg { justify-self: start; display: inline-flex; padding: 4px; gap: 4px; background: var(--sunken); border-radius: var(--pill); }
.seg button { min-height: var(--h-s); padding: 0 18px; border: 0; border-radius: var(--pill); background: none; font: 500 15px/1 var(--font); color: var(--t2); }
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--t1); box-shadow: var(--shadow); }
:root[data-theme='dark'] .seg button[aria-pressed='true'] { background: var(--line-strong); }

.coachcta { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; text-align: left; padding: 16px; border-radius: var(--r-card); background: var(--ink); color: var(--ink-fg); margin-bottom: 14px; }
.coachcta .ico { width: 44px; height: 44px; border-radius: 14px; background: rgb(255 255 255 / 0.14); display: grid; place-items: center; flex: none; }
:root[data-theme='dark'] .coachcta .ico { background: rgb(0 0 0 / 0.08); }
.coachcta > span:nth-child(2) { flex: 1; }
.coachcta b { display: block; font: 600 16px/21px var(--font); }
.coachcta small { display: block; font: 400 14px/19px var(--font); opacity: 0.75; }

/* criteria */
.crit { display: flex; align-items: flex-start; gap: 14px; padding: 16px; }
.crit + .crit { border-top: 1px solid var(--line); }
.crit .txt { flex: 1; min-width: 0; }
.crit b { display: block; font: 500 16px/21px var(--font); }
.crit small { display: block; font: 400 14px/20px var(--font); color: var(--t2); margin-top: 2px; }
.crit .info { border: 0; background: none; color: var(--t3); min-height: var(--h-s); padding: 0; margin: -4px 0 -12px; font: 500 13px/18px var(--font); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.crit .how { font: 400 14px/21px var(--font); color: var(--t2); margin: 14px 0 0; padding: 12px 14px; background: var(--sunken); border-radius: 14px; }
.switch { position: relative; width: 52px; height: 32px; flex: none; margin-top: 2px; }
.switch input { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--line-strong); transition: background var(--fast); }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.2); transition: transform var(--fast) var(--curve); }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(20px); }
:root[data-theme='dark'] .switch input:checked + span::after { background: var(--ink-fg); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* input options */
.opt { display: flex; align-items: center; gap: 16px; width: 100%; padding: 18px; border: 0; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow); text-align: left; color: var(--t1); position: relative; min-height: 84px; transition: transform var(--fast) var(--curve); }
.opt:active { transform: scale(0.985); }
.opt:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt .ico { width: 48px; height: 48px; border-radius: 16px; background: var(--sunken); display: grid; place-items: center; flex: none; }
.opt.live .ico { background: var(--accent); color: #fff; }
.opt.is-done .ico { background: var(--ink); color: var(--ink-fg); }
.opt b { display: block; font: 600 17px/22px var(--font); }
.opt small { display: block; font: 400 14px/19px var(--font); color: var(--t2); margin-top: 1px; }
.opt input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.privacy { display: flex; gap: 10px; align-items: flex-start; font: 400 13px/19px var(--font); color: var(--t3); margin: 28px 0 0; }
.privacy svg { margin-top: 1px; }

/* dock */
.dock { position: fixed; left: 0; right: 0; bottom: 0; padding: 20px var(--pad) calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 72%, transparent); z-index: 6; pointer-events: none; }
.dock-in { max-width: calc(var(--col) - 2 * var(--pad)); margin: 0 auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; pointer-events: auto; }
.dock-note { flex: 1 0 100%; text-align: center; font: 500 14px/20px var(--font); color: var(--t2); margin: 0; }
.btn { text-decoration: none; min-height: var(--h); padding: 0 24px; border-radius: var(--pill); border: 0; font: 600 16px/1 var(--font); display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap; transition: transform var(--fast) var(--curve), opacity var(--fast); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--ink); color: var(--ink-fg); flex: 1; }
.btn.secondary { background: var(--surface); color: var(--t1); box-shadow: var(--shadow); border: 1px solid var(--line); }
:root[data-theme='dark'] .btn.secondary { background: var(--sunken); }
.btn.danger { background: var(--bad); color: #fff; flex: 1; }
:root[data-theme='dark'] .btn.danger { color: #1a0d09; }
.btn.is-off { opacity: 0.35; pointer-events: none; }

/* recorder */
.rec { position: fixed; inset: 0; z-index: 20; background: var(--bg); display: flex; flex-direction: column; align-items: center; padding: calc(16px + env(safe-area-inset-top)) var(--pad) calc(28px + env(safe-area-inset-bottom)); }
.rec-top { width: 100%; max-width: var(--col); display: flex; justify-content: space-between; align-items: center; }
.rec-live { display: inline-flex; align-items: center; gap: 8px; font: 500 14px/1 var(--font); padding: 10px 14px; border-radius: var(--pill); background: var(--accent-quiet); color: var(--accent-text); }
.rec-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.rec-mid { flex: 1; width: 100%; max-width: var(--col); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 28px; }
.rec-time { font: 500 64px/1 var(--mono); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.rec canvas { width: 100%; height: 140px; }
.rec-hint { font: 400 16px/24px var(--font); color: var(--t2); text-align: center; max-width: 360px; margin: 0; }
.rec-bottom { display: grid; justify-items: center; gap: 10px; }
.stop { width: 84px; height: 84px; border-radius: 50%; border: 6px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.stop i { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); }
.rec-stop-label { font: 500 14px/18px var(--font); color: var(--t2); }

/* analysis */
.progress-steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.progress-steps li { display: flex; align-items: center; gap: 14px; padding: 14px 0; font: 500 16px/22px var(--font); color: var(--t3); }
.progress-steps .s { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); flex: none; }
.progress-steps li.on, .progress-steps li.done { color: var(--t1); }
.progress-steps li.on .s { border-color: var(--ink); border-top-color: transparent; animation: spin 0.9s linear infinite; }
.progress-steps li.done .s { background: var(--ink); border-color: var(--ink); color: var(--ink-fg); }
.progress-steps li.failed { color: var(--bad); }
.progress-steps li.failed .s { border-color: var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }
.fail { display: grid; gap: 16px; margin-top: 12px; justify-items: start; }

/* report */
.report-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.report-speaker { font: 500 13px/18px var(--font); color: var(--t2); }
.pill { display: inline-flex; align-items: center; font: 500 13px/18px var(--font); padding: 5px 12px; border-radius: var(--pill); background: var(--tint); color: var(--tint-ink); }
.meta { margin: 0 0 24px; }
.change { display: grid; gap: 16px; background: var(--surface); color: var(--t1); border: 1px solid var(--line); border-inline-start: 4px solid var(--tint-ink); border-radius: var(--r-card); padding: clamp(20px, 3vw, 30px); box-shadow: var(--shadow); }
.change > .eyebrow { margin: 0; color: var(--tint-ink); }
.change h2 { font: 650 24px/30px var(--font); letter-spacing: -0.02em; }
.change p:not(.eyebrow) { margin: 0; font: 400 16px/26px var(--font); }
.change > p:not(.eyebrow) { color: var(--t2); }
.change .frag { font: 400 15px/24px var(--font); padding: 12px 16px; border-radius: 14px; background: var(--sunken); margin: 0; }
.change .try { display: grid; gap: 4px; }
.change .try b { font: 650 14px/20px var(--font); color: var(--tint-ink); }
.quotes { display: grid; gap: 12px; margin-top: 12px; }
.quote .label { display: block; margin-bottom: 8px; font: 500 14px/18px var(--font); color: var(--t2); }
.quote > p:not(.small) { margin: 0; font: 500 18px/26px var(--font); letter-spacing: -0.01em; }
.quote .first { margin-top: 12px; }
.match { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font: 600 14px/18px var(--font); }
.match i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.match.tak { color: var(--ok); } .match.tak i { background: currentColor; }
.match.czesciowo { color: var(--warn); } .match.czesciowo i { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.match.nie { color: var(--bad); }
.good { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.good li { display: flex; gap: 10px; font: 400 15px/22px var(--font); color: var(--t2); }
.good li svg { color: var(--ok); margin-top: 2px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--sunken); border-radius: var(--pill); margin: 32px 0 16px; position: sticky; top: 68px; z-index: 4; box-shadow: 0 0 0 6px var(--bg); }
.tabs button { flex: 1; min-height: var(--h-s); border: 0; border-radius: var(--pill); background: none; font: 500 15px/1 var(--font); color: var(--t2); padding: 0 8px; }
.tabs button[aria-selected='true'] { background: var(--surface); color: var(--t1); box-shadow: var(--shadow); }
:root[data-theme='dark'] .tabs button[aria-selected='true'] { background: var(--line-strong); }
.crit-card { padding: 18px 20px; }
.crit-card + .crit-card { border-top: 1px solid var(--line); }
.crit-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.crit-card .score { font: 500 14px/18px var(--mono); color: var(--t2); white-space: nowrap; }
.bar5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 10px 0 12px; }
.bar5 i { height: 6px; border-radius: 3px; background: var(--line); }
.bar5 i.f { background: var(--ink); }
.crit-card p { margin: 0 0 10px; font: 400 15px/23px var(--font); color: var(--t2); }
.crit-card blockquote { margin: 0 0 10px; font: 400 15px/22px var(--font); color: var(--t1); padding-left: 12px; border-left: 2px solid var(--line-strong); quotes: '„' '”'; }
.crit-card blockquote::before { content: open-quote; } .crit-card blockquote::after { content: close-quote; }
.crit-card .tip { color: var(--t1); font-weight: 500; margin: 0; }
.crit-card.off .top b { color: var(--t3); font-weight: 400; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.delivery-scope { margin: 0 0 12px; }
.tile { background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); text-align: center; }
.tile .v { font: 600 32px/36px var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile .l { font: 500 15px/20px var(--font); margin-top: 4px; }
.tile .d { font: 400 13px/18px var(--font); color: var(--t3); margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font: 500 14px/18px var(--font); padding: 7px 12px; border-radius: var(--pill); background: var(--surface); box-shadow: var(--shadow); }
.tag b { font: 500 13px/18px var(--mono); color: var(--t3); margin-left: 8px; }
:root[data-theme='dark'] .tag { background: var(--sunken); }
.share { display: grid; gap: 16px; }
.share .who { display: flex; justify-content: space-between; font: 500 15px/20px var(--font); margin-bottom: 6px; }
.share .who span { font-family: var(--mono); color: var(--t2); }
.share .track { height: 10px; border-radius: 5px; background: var(--sunken); overflow: hidden; }
.share .track i { display: block; height: 100%; background: var(--ink); border-radius: 5px; }
.share .meta { font: 400 13px/18px var(--font); color: var(--t3); margin: 6px 0 0; }
.transcript { font: 400 17px/30px var(--font); }
.transcript > p { margin: 0; }
.transcript mark { color: inherit; border-radius: 4px; padding: 0 3px; }
.transcript mark.f { background: var(--mark-f); border-bottom: 2px solid var(--mark-f-line); }
.transcript mark.r { background: var(--mark-r); border-bottom: 2px dotted var(--mark-r-line); }
.transcript .p { font: 500 12px/1 var(--mono); color: var(--t3); border: 1px solid var(--line-strong); border-radius: 6px; padding: 3px 5px; margin: 0 2px; vertical-align: 2px; white-space: nowrap; }
.turns .turn + .turn { margin-top: 16px; }
.turns .turn b { display: block; font: 600 13px/18px var(--font); color: var(--t3); }
.turns .turn.me b { color: var(--t1); }
.turns .turn p { margin: 2px 0 0; font: 400 16px/27px var(--font); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font: 400 13px/18px var(--font); color: var(--t3); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 10px; border-radius: 3px; }
.legend .lf { background: var(--mark-f); border-bottom: 2px solid var(--mark-f-line); }
.legend .lr { background: var(--mark-r); border-bottom: 2px dotted var(--mark-r-line); }

:root:lang(en) .crit-card blockquote { quotes: '“' '”'; }

/* sheet */
.sheet { position: fixed; inset: 0; z-index: 30; background: rgb(15 15 14 / 0.4); display: flex; align-items: flex-end; justify-content: center; animation: fade var(--fast); }
.sheet-in { width: 100%; max-width: var(--col); max-height: 92dvh; background: var(--bg); border-radius: 28px 28px 0 0; display: flex; flex-direction: column; overflow: hidden; animation: up 240ms var(--curve); }
.chat-sheet .sheet-in { height: min(92dvh, 820px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--pad); border-bottom: 1px solid var(--line); }
.sheet-body { flex: 1; overflow-y: auto; padding: 20px var(--pad); }
.sheet-text { margin: 0; font: 400 16px/24px var(--font); color: var(--t2); }
.sheet-foot { display: flex; gap: 10px; padding: 12px var(--pad) calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet-foot .btn.secondary { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 86%; padding: 12px 16px; border-radius: 20px; font: 400 16px/23px var(--font); }
.msg.ai { background: var(--surface); align-self: flex-start; border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
:root[data-theme='dark'] .msg.ai { background: var(--sunken); }
.msg.me { background: var(--ink); color: var(--ink-fg); align-self: flex-end; border-bottom-right-radius: 6px; }
.chat-done { align-self: center; flex: 0 0 auto; margin-top: 8px; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--t3); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; } .typing i:nth-child(3) { animation-delay: 0.4s; }
.composer { display: flex; gap: 8px; align-items: flex-end; width: 100%; }
.composer .area { min-height: var(--h); max-height: 140px; overflow-y: auto; }
.send { width: var(--h); height: var(--h); border-radius: 50%; border: 0; background: var(--ink); color: var(--ink-fg); display: grid; place-items: center; flex: none; }

/* bank */
.addrow { display: flex; gap: 8px; }
.addrow .input { flex: 1; }
.termchips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.term { display: inline-flex; align-items: center; padding-left: 16px; min-height: var(--h-s); border-radius: var(--pill); background: var(--surface); box-shadow: var(--shadow); font: 500 15px/1 var(--font); }
:root[data-theme='dark'] .term { background: var(--sunken); }
.term button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; color: var(--t3); display: grid; place-items: center; }

#toast { position: fixed; left: 50%; bottom: calc(108px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(16px); background: var(--ink); color: var(--ink-fg); padding: 12px 18px; border-radius: var(--pill); font: 500 14px/20px var(--font); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s var(--curve); z-index: 40; max-width: calc(100% - 40px); text-align: center; }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.err { color: var(--bad); font: 500 15px/22px var(--font); margin: 4px 0 0; }

@media (min-width: 720px) {
  :root { --pad: 32px; --col: 760px; }
  .h1 { font-size: 44px; line-height: 48px; }
  .types { grid-template-columns: repeat(3, 1fr); }
  .type { flex-direction: column; align-items: flex-start; min-height: 208px; padding: 22px; }
  .type .chev { display: none; }
  .type .ico { margin-bottom: auto; }
  .type-txt { min-height: 62px; }
  .quotes { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .dock-in { justify-content: flex-end; }
  .dock .btn.primary { flex: 0 0 auto; min-width: 220px; }
  .sheet { align-items: center; }
  .sheet-in { border-radius: 28px; max-height: 84dvh; }
  .chat-sheet .sheet-in { height: min(84dvh, 760px); }
  .expert-sheet .sheet-in { --pad: 24px; max-width: 460px; }
  .expert-sheet .sheet-foot { justify-content: flex-end; }
  .expert-sheet .sheet-foot .btn { flex: 0 0 auto; min-width: 110px; }
}
@media (pointer: fine) and (min-width: 720px) { :root { --h: 48px; --h-s: 40px; } }
@media (hover: hover) {
  .type:hover, .opt:hover { box-shadow: 0 1px 2px rgb(20 20 18 / 0.05), 0 12px 32px rgb(20 20 18 / 0.09); }
  .row:hover { background: var(--sunken); }
  .btn.primary:hover { opacity: 0.88; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 439px) {
  .bar-actions .pillbtn { width: var(--h-s); padding: 0; justify-content: center; }
  .bar-actions .pillbtn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* audit fixes */
.row .badge { font: 500 12px/16px var(--font); padding: 3px 8px; border-radius: var(--pill); background: var(--sunken); color: var(--t2); flex: none; }
.row .side small { display: inline; font-size: 11px; color: var(--t3); margin-left: 1px; }
.rec-bottom { border: 0; background: none; color: inherit; padding: 4px 12px; border-radius: 20px; }
.focus { background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r-card); padding: 18px 20px; margin: 0 0 8px; border-left: 4px solid var(--accent); }
.focus .eyebrow { color: var(--accent-text); margin-bottom: 8px; }
.focus blockquote { margin: 0 0 8px; font: 500 16px/24px var(--font); quotes: '„' '”'; }
:root:lang(en) .focus blockquote { quotes: '“' '”'; }
.focus blockquote::before { content: open-quote; } .focus blockquote::after { content: close-quote; }
.focus p { margin: 0; font: 400 15px/22px var(--font); color: var(--t2); }
.pillbtn .soon { font: 500 11px/1 var(--font); font-style: normal; padding: 3px 6px; border-radius: var(--pill); background: var(--sunken); color: var(--t3); }
:root[data-theme='dark'] .pillbtn .soon { background: var(--line); }
.quotes.one { grid-template-columns: 1fr !important; }
.center { text-align: center; margin: 24px auto 0; max-width: 420px; }
.term { max-width: 100%; }
.term-txt { overflow-wrap: anywhere; padding: 10px 0; line-height: 20px; }
#anCancel { margin-top: 20px; color: var(--t2); }
@media (max-width: 439px) { .pillbtn .soon { display: none; } }

/* desktop: one frame width for every screen, main column plus sticky rail; side navigation from 1200px */
.appnav, .rail { display: none; }
.rail-box { background: var(--surface); border-radius: var(--r-card); padding: 20px; box-shadow: var(--shadow); }
:root[data-theme='dark'] .rail-box { border: 1px solid var(--line); }
.rail-h { font: 600 13px/18px var(--font); color: var(--t3); margin: 0 0 12px; }
.facts { margin: 0; display: grid; gap: 10px; }
.facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font: 400 14px/20px var(--font); }
.facts dt { color: var(--t2); flex: none; }
.facts dd { margin: 0; font-weight: 500; text-align: right; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.rail-quote { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font: 500 15px/22px var(--font); quotes: '„' '”'; }
:root:lang(en) .rail-quote { quotes: '“' '”'; }
.rail-quote::before { content: open-quote; } .rail-quote::after { content: close-quote; }
.rail-actions { display: grid; gap: 10px; }
.rail-actions .btn { width: 100%; }
.rail-actions .dock-note { text-align: left; }
.pillbtn.wide { width: 100%; justify-content: center; box-shadow: none; border: 1px solid var(--line); }

@media (min-width: 1024px) {
  :root { --pad: 40px; --col: 1120px; --rail: 300px; }
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail); gap: 40px; align-items: start; }
  .layout.solo { display: block; }
  .rail { display: grid; gap: 16px; position: sticky; top: 84px; }
  .dock { display: none; }
  .fb-over-dock { --fb-bottom: calc(12px + env(safe-area-inset-bottom)); }
  #toast { bottom: 32px; }
  .bar { min-height: 76px; }
  .tabs { top: 76px; }
  .screen { padding-bottom: 72px; }
  .h1 { font-size: 46px; line-height: 50px; }
  .hello { margin-top: 32px; }
  .link.danger { margin: 40px 0 0; }
  .center { margin-left: 0; text-align: left; }
}
@media (min-width: 1200px) {
  :root { --side: 236px; --rail: 320px; }
  body { padding-left: var(--side); }
  .appnav { display: flex; flex-direction: column; position: fixed; z-index: 7; inset: 0 auto 0 0; width: var(--side); padding: 22px 14px 16px; border-right: 1px solid var(--line); background: var(--bg); overflow-y: auto; }
  .appnav .wordmark { padding: 6px 12px 26px; text-decoration: none; color: var(--t1); }
  .side-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .side-link { min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 12px; color: var(--t2); text-decoration: none; font: 500 15px/20px var(--font); }
  .side-link:hover { background: var(--sunken); color: var(--t1); }
  .side-link[aria-current='page'] { background: var(--surface); color: var(--t1); box-shadow: var(--shadow); }
  :root[data-theme='dark'] .side-link[aria-current='page'] { background: var(--sunken); }
  .side-link .dot { width: 26px; height: 26px; margin-left: -3px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--tint); color: var(--tint-ink); }
  .side-h { font: 600 12px/16px var(--font); color: var(--t3); margin: 26px 12px 8px; }
  .side-recent .side-link { font-size: 14px; min-height: 36px; }
  .side-recent .sw { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--tint-ink); margin: 0 5px 0 6px; }
  .side-recent .tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-foot { margin-top: auto; display: flex; gap: 8px; padding: 20px 4px 0; }
  .home-bar, .bar-actions, .bar-gap { display: none; }
  .bar { justify-content: flex-start; gap: 16px; }
  .bar-title { text-align: left; font-size: 16px; }
  .bar:not(:has(.round)) .bar-title { padding-left: 0; }
  #toast { left: calc(50% + var(--side) / 2); }
}
