:root {
/* TopicTeller (ADR 0047): cream, warm graphite, orange; variant "a" from docs/brand/topicteller/strony */
  --background: #f5efe4; --pow: #fffaf1; --side: #efe7da; --ink: #1a1714; --gray: #6f675d; --light: #8d8478; --line: #e5dccd;
  --accent: #e4572e; --accent-t: #fdece6; --ok: #1f8a5b; --ok-t: #e2f3ea; --yellow: #9a6700; --yellow-t: #fdf2d6; --red: #c4452a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 500 14px/1.5 'Figtree', system-ui, sans-serif; color: var(--ink); background: var(--background); }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 26px; line-height: 1.15; } h2 { font-size: 20px; } h3 { font-size: 14px; font-weight: 600; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.pod { margin-top: 4px; color: var(--gray); }
input, textarea, select { font: 500 14px 'Figtree', sans-serif; color: var(--ink); background: var(--pow); border: 1px solid var(--line); border-radius: 8px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); }

/* login */
.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login form { display: grid; gap: 12px; width: 100%; max-width: 340px; padding: 28px; }
.login input { height: 40px; padding: 0 12px; }
.error-text { color: var(--red); font-size: 13px; }

/* layout */
.app { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.logo { display: flex; align-items: center; gap: 8px; padding: 4px 8px 14px; font: 700 17px 'Bricolage Grotesque', sans-serif; }
.logo img { width: 28px; height: 28px; flex: none; }
.logo b { color: var(--accent); font-weight: 700; margin-left: -8px; }
.logo i { display: grid; place-items: center; width: 24px; height: 24px; font-size: 10px; font-style: normal; color: #fff; background: var(--accent); border-radius: 7px; }
.new { display: block; margin-bottom: 14px; padding: 8px 10px; font-weight: 600; border: 1px solid var(--line); border-radius: 8px; }
.report { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; }
.report:hover, .report.active { background: var(--background); }
.report.active { font-weight: 600; }
.report span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report small { font-size: 12px; color: var(--light); white-space: nowrap; }
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--light); }
.dot.ready { background: var(--ok); } .dot.running { background: #f0a500; } .dot.waiting { background: var(--accent); } .dot.error { background: var(--red); }
.logout { margin-top: auto; padding: 8px 10px; text-align: left; font-size: 13px; color: var(--gray); }

.main { display: flex; flex-direction: column; min-width: 0; }
.top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 16px; min-height: 52px; padding: 0 24px; background: var(--pow); border-bottom: 1px solid var(--line); }
.okruszki { font-size: 13px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.okruszki b { color: var(--ink); font-weight: 600; }
.steps { display: flex; gap: 2px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 13px; color: var(--light); border-radius: 6px; }
.steps li i { display: grid; place-items: center; width: 18px; height: 18px; font: 600 10px 'IBM Plex Mono', monospace; font-style: normal; border: 1.5px solid currentColor; border-radius: 50%; }
.steps li.done { color: var(--ok); } .steps li.done i { color: #fff; background: var(--ok); border-color: var(--ok); }
.steps li.current { color: var(--ink); font-weight: 600; background: var(--background); } .steps li.current i { color: #fff; background: var(--accent); border-color: var(--accent); }
.screen { flex: 1; padding: 24px 28px 40px; }

/* common */
.card { background: var(--pow); border: 1px solid var(--line); border-radius: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; font-size: 13px; font-weight: 600; border-radius: 8px; white-space: nowrap; }
.btn.main { color: #fff; background: var(--ink); } .btn.accent { color: #fff; background: var(--accent); }
.btn.second { background: var(--pow); border: 1px solid var(--line); } .btn.cichy { color: var(--gray); }
.btn.wide { width: 100%; }
.heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-bottom: 14px; }
.badge { padding: 2px 8px; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-t); border-radius: 10px; }
.choice { display: flex; flex-wrap: wrap; gap: 6px; }
.choice button { min-height: 30px; padding: 0 12px; font-size: 13px; border: 1px solid var(--line); border-radius: 15px; background: var(--pow); }
.choice button.selected { color: #fff; background: var(--ink); border-color: var(--ink); }
.segment { display: inline-flex; flex-wrap: nowrap; gap: 0; padding: 3px; background: #efeee9; border-radius: 8px; }
.segment button { min-height: 28px; padding: 0 11px; font-size: 13px; white-space: nowrap; color: var(--gray); border-radius: 6px; }
.segment button.selected { color: var(--ink); background: var(--pow); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.pair { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
dl.lista { display: grid; grid-template-columns: 80px 1fr; gap: 6px 10px; margin: 0; font-size: 13px; }
dl.lista dt { color: var(--light); } dl.lista dd { margin: 0; font-weight: 600; }
.assumptions { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.assumptions li { padding: 6px 10px; font-size: 13px; background: var(--yellow-t); border-radius: 6px; }
.numbers { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; margin: 0; font-size: 13px; }
.numbers dt { color: var(--gray); } .numbers dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* topic */
#topic { display: block; width: 100%; margin-top: 18px; padding: 14px 16px; font-size: 15px; line-height: 1.5; resize: vertical; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--gray); }
.examples button { min-height: 28px; padding: 0 10px; font-size: 12px; color: var(--gray); border: 1px dashed #d6d3cc; border-radius: 14px; }
.settings { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-top: 22px; }
.settings label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--gray); }
.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--gray); }

.private-choice { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 12px 14px; font-size: 13px; background: var(--pow); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.private-choice input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.private-choice small { color: var(--gray); }
.badge-private { display: inline-block; padding: 1px 8px; font: 600 11px 'Figtree', sans-serif; letter-spacing: .02em; color: #7a4b00; background: #fdf2d6; border: 1px solid #f0d58e; border-radius: 10px; vertical-align: middle; }
.note-private { margin-top: 10px; padding: 8px 12px; font-size: 12px; color: #7a4b00; background: #fdf2d6; border-radius: 8px; }

/* questions */
.questions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.question { display: grid; align-content: start; gap: 10px; padding: 14px 16px; }
.question input[type=number], .question input[type=text] { height: 34px; padding: 0 10px; width: 100%; }
.question .jedn { display: flex; align-items: center; gap: 8px; }
.question .create { justify-self: start; font-size: 12px; font-weight: 600; color: var(--light); }
.question.not-know { opacity: .55; }
.question.not-know .create { color: var(--accent); }

/* plan */
.row { display: grid; grid-template-columns: 28px 1fr 52px; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.row:last-child { border: 0; }
.row .num { font: 600 12px/20px 'IBM Plex Mono', monospace; color: var(--accent); }
.row p { font-size: 13px; color: var(--gray); }
.row .time { text-align: right; font: 13px/20px 'IBM Plex Mono', monospace; }
textarea.notes { width: 100%; min-height: 60px; padding: 8px 10px; resize: vertical; }

/* work */
.stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.stage { display: grid; gap: 6px; font-size: 12px; color: var(--light); }
.stage::before { content: ''; height: 4px; background: var(--line); border-radius: 2px; }
.stage b { font-size: 13px; font-weight: 600; }
.stage.done { color: var(--ok); } .stage.done::before { background: var(--ok); }
.stage.running { color: var(--ink); } .stage.running::before { background: linear-gradient(90deg, var(--accent) var(--p, 40%), var(--line) var(--p, 40%)); }
.mole { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--accent-t); border-top-color: var(--accent); border-radius: 50%; animation: rotation 1s linear infinite; vertical-align: -3px; }
@keyframes rotation { to { transform: rotate(360deg); } }
.log { display: grid; gap: 6px; max-height: 420px; margin: 0; padding: 0; overflow-x: hidden; overflow-y: auto; list-style: none; font-size: 13px; }
.log li { display: grid; grid-template-columns: 52px 1fr; gap: 6px; }
.log li span { min-width: 0; overflow-wrap: anywhere; }
.log .icon-entry { display: inline-block; width: 22px; font-style: normal; }
.log li small { color: var(--light); }
.log li time { font: 12px 'IBM Plex Mono', monospace; color: var(--light); }
.log li.stage-work span { font-weight: 700; } .log li.agent span { color: var(--ink); } .log li.tool span { color: var(--gray); }
.log li.error span, .log li.note span { color: var(--red); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.frame { margin: 0; overflow: hidden; cursor: zoom-in; }
.frame img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #ddd; }
.frame figcaption { padding: 5px 8px; font-size: 12px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; padding: 14px 16px; border-color: #f2b9a7; background: #fff8f5; }
.gate p { flex: 1 1 280px; }
.notes-quality { margin: 8px 0 0; padding-left: 18px; font-size: 12px; color: var(--yellow); }
.summary { padding: 14px 16px; margin-bottom: 16px; white-space: pre-wrap; font-size: 13px; }
.error-card { padding: 18px; border-color: #f0b4a6; background: #fff6f4; }
.error-card pre { margin: 10px 0; white-space: pre-wrap; font: 12px 'IBM Plex Mono', monospace; color: var(--red); }
.zoom { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.85); cursor: zoom-out; }
.zoom img { max-width: 100%; max-height: 100%; }

/* video */
.film { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.film-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px; }
.film-top h1 { font-size: 22px; margin-right: auto; }
video { display: block; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 10px; }
.correction { display: flex; gap: 8px; margin-top: 12px; }
.correction input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; }
.bookmarks { display: flex; gap: 2px; padding: 3px; background: #efeee9; border-radius: 8px; }
.bookmarks button { flex: 1; min-height: 28px; font-size: 13px; color: var(--gray); border-radius: 6px; }
.bookmarks button.selected { color: var(--ink); font-weight: 600; background: var(--pow); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.panel-lista { display: grid; margin-top: 8px; }
.panel-lista > button, .panel-lista > a, .panel-lista > div:not(.quote-card):not(.cost-stages):not(.materials-block):not(.narrator) { display: grid; grid-template-columns: 52px 1fr; gap: 6px; padding: 7px 8px; text-align: left; font-size: 13px; border-radius: 6px; }
.panel-lista button:hover, .panel-lista a:hover { background: var(--pow); }
.panel-lista small { font: 12px 'IBM Plex Mono', monospace; color: var(--light); }
.panel-lista .source { grid-template-columns: 1fr; } .panel-lista .source small { word-break: break-all; }
.download { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.language-row { display: flex; gap: 6px; margin-top: 10px; } .language-row select { flex: 1; height: 36px; padding: 0 8px; }

/* report list */
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.okl { display: grid; overflow: hidden; }
.okl .image { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #2b2840, #6b4a8a) center / cover no-repeat; }
.okl .image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.okl .state { z-index: 1; }
/* waiting for the server: button dimmed, and a sliding bar at the top of the screen */
button.waiting, .btn.waiting { opacity: .6; cursor: progress; }
body.waiting::before { content: ''; position: fixed; z-index: 1000; top: 0; left: 0; width: 30%; height: 3px; background: var(--accent); animation: waiting 1.1s ease-in-out infinite; }
@keyframes waiting { from { left: -30%; } to { left: 100%; } }
.okl .state { position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 6px; padding: 2px 8px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.94); border-radius: 10px; }
.okl .description { display: grid; gap: 2px; padding: 10px 14px 12px; }
.okl .description p { font-size: 12px; color: var(--light); }
.okl.new { place-content: center; justify-items: center; gap: 6px; min-height: 200px; color: var(--gray); background: none; border: 1.5px dashed #d6d3cc; }
.empty { padding: 40px 0; text-align: center; color: var(--gray); }

/* phone */
@media (max-width: 900px) {
  .top { position: static; padding: 8px 16px; flex-wrap: wrap; }
  .steps { margin: 0; overflow-x: auto; }
  .screen { padding: 16px; }
  .pair, .film { grid-template-columns: 1fr; }
  .questions { grid-template-columns: 1fr; }
  .stages { grid-template-columns: repeat(5, minmax(56px, 1fr)); overflow-x: auto; }
}

.link-btn { padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* choices with description and quote */
.description-choice { display: block; margin-top: 4px; font-weight: 500; color: var(--gray); font-size: 12px; }
.dimmed { opacity: .45; }
.options-orders { display: grid; gap: 10px; }
.options-orders label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--gray); }
.options-orders .segment { flex-wrap: wrap; }
.quote-card { display: grid; gap: 8px; margin-top: 14px; padding: 12px 14px; background: var(--background); border: 1px solid var(--line); border-radius: 10px; }
.quote-card h3 { font-size: 13px; }
.quote-lista { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.quote-lista li { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: start; font-size: 13px; }
.quote-lista li i { font-style: normal; font-weight: 700; color: var(--gray); }
.quote-lista li.charged i { color: var(--ok); }
.quote-lista li.skipped { color: var(--light); }
.quote-lista li span { display: grid; } .quote-lista small { font-size: 12px; color: var(--light); }
.quote-lista em { font: 600 12px 'IBM Plex Mono', monospace; font-style: normal; white-space: nowrap; }
.quote-sum { display: flex; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--gray); }
.quote-total { font-size: 15px; } .quote-total b { font-size: 17px; color: var(--accent); } .quote-total small { color: var(--gray); }
.quote-note { font-size: 11px; color: var(--light); }
#quote-new .quote-card { margin-top: 18px; background: var(--pow); }
/* report preview in the panel */
.show { position: relative; overflow: hidden; width: 100%; background: #000; border-radius: 10px; }
.show iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; }
.show:fullscreen { display: grid; place-items: center; }
.sterowanie-report { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.sterowanie-report span { font: 13px 'IBM Plex Mono', monospace; color: var(--gray); }
audio { width: 100%; margin-top: 10px; }
.content-card { margin: 12px 0; padding: 12px 14px; font-size: 13px; }
.content-card ul { margin: 6px 0 0; padding-left: 18px; }
.content-card li { margin: 3px 0; }
.content-counter { display: flex; gap: 14px; font-weight: 700; margin: 6px 0; }
.content-counter .ok { color: #2f8a4c; } .content-counter .uncertain { color: #b7791f; } .content-counter .wrong { color: #c0392b; }
.content-counter { flex-wrap: wrap; align-items: baseline; }
/* points after the correction round (ADR 0046): state first, what was wrong collapsed */
.points-corrections { list-style: none; padding-left: 0 !important; margin: 6px 0 0; display: grid; gap: 8px; font-size: 13px; }
.point-corrections { display: grid; grid-template-columns: 22px 1fr; gap: 6px; align-items: start; color: var(--text, inherit); }
.point-corrections .state { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-weight: 700; font-size: 12px; background: #eef6f0; }
.point-corrections .state.ok { color: #2f8a4c; background: #e6f4ea; } .point-corrections .state.uncertain { color: #b7791f; background: #fbf1df; }
.point-corrections .state.wrong { color: #c0392b; background: #fbe9e7; } .point-corrections .state.cichy { color: var(--gray); background: #f0f0f0; }
.state-name { font-size: 12px; } .state-name.ok { color: #2f8a4c; } .state-name.uncertain { color: #b7791f; } .state-name.wrong { color: #c0392b; } .state-name.cichy { color: var(--gray); }
.point-corrections details { margin-top: 2px; color: var(--gray); } .point-corrections summary { cursor: pointer; font-size: 12px; }
.rating-before { color: var(--gray); text-decoration: line-through; } .rating-after { font-weight: 700; color: #2f8a4c; }
.review .left li { margin: 3px 0; }
.text-agent { white-space: pre-wrap; font-size: 13px; overflow-wrap: anywhere; margin-top: 4px; }
.review, .content-card { min-width: 0; overflow-wrap: anywhere; }
.reading-report-card { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; padding: 12px 14px; }
.reading-report-card p { font-size: 13px; margin: 0; }
.reading-report-card .pod { font-size: 12.5px; }
.improve { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; }
.improve p { flex: 1 1 260px; font-size: 13px; }
.cost-stages { display: grid; gap: 4px; margin-top: 10px; font-size: 12px; }
.cost-stages div { display: grid; grid-template-columns: 90px 1fr; gap: 6px; } .cost-stages small { color: var(--light); }

/* materials from the client */
.materials-new { display: grid; gap: 8px; margin-top: 14px; }
.small { font-size: 12px; }
.zone { display: grid; gap: 4px; padding: 16px; text-align: center; cursor: pointer; background: var(--pow); border: 1.5px dashed #d6d3cc; border-radius: 10px; transition: border-color .15s, background .15s; }
.zone b { font-size: 14px; }
.zone small { font-size: 12px; color: var(--gray); line-height: 1.5; }
.zone:hover, .zone:focus-visible, .zone.above { border-color: var(--accent); background: var(--accent-t); outline: none; }
.zone.short { padding: 10px; }
.zone.short b { font-size: 13px; }
.zone .folder-btn { justify-self: center; margin-top: 4px; padding: 4px 12px; font-size: 12px; }
.zone.short .folder-btn { margin-top: 2px; padding: 2px 10px; }
.zone.reads { opacity: .6; cursor: progress; }
.materials-block { display: grid; gap: 8px; }
.materials-block h3 { margin: 0; }
.materials-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.materials-lista:empty { display: none; }
.panel-lista .materials-lista { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.material { position: relative; display: grid; grid-template-rows: 84px auto; overflow: hidden; background: var(--pow); border: 1px solid var(--line); border-radius: 8px; }
.material img { width: 100%; height: 84px; object-fit: cover; background: var(--background); }
.material .type { display: grid; place-items: center; height: 84px; font: 600 15px 'IBM Plex Mono', monospace; color: var(--gray); background: var(--background); }
.material > div { display: grid; gap: 1px; padding: 5px 7px 6px; min-width: 0; }
.material b { overflow: hidden; font-size: 12px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.material small { font-size: 11px; color: var(--light); }
.material.from-error { border-color: var(--red); }
.remove-material { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; font-size: 16px; line-height: 1; color: #fff; background: rgba(29, 27, 38, .65); border-radius: 50%; }
.remove-material:hover { background: var(--red); }

/* profiles */
.profiles-screen { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; }
.profiles-center { display: grid; justify-items: center; gap: 6px; width: 100%; max-width: 860px; text-align: center; }
.profiles-center .logo { padding-bottom: 22px; }
.profiles-center h1 { font-size: 30px; }
.profiles-lista { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; margin-top: 30px; }
.profile-card { width: 168px; display: grid; justify-items: center; align-content: start; gap: 8px; padding: 18px 10px 14px; border-radius: 16px; transition: background .15s, box-shadow .15s; }
.profile-card:hover, .profile-card:focus-within { background: var(--pow); box-shadow: 0 1px 3px rgba(29, 27, 38, .08), 0 6px 20px rgba(29, 27, 38, .06); }
.profile-choice { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 0; border-radius: 12px; }
.profile-choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.profile-choice .avatar { margin-bottom: 8px; }
.profile-choice b { font-size: 15px; overflow-wrap: anywhere; } .profile-choice small { font-size: 12px; color: var(--light); }
.profile-card.last .avatar { box-shadow: 0 0 0 3px var(--background), 0 0 0 5px var(--accent); }
.profile-card.last small { color: var(--accent); font-weight: 600; }
.profile-choice:hover .avatar { transform: scale(1.05); }
.profile-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: 12px; }
.profile-actions button { color: var(--gray); text-decoration: underline; } .profile-actions button[data-remove] { color: var(--red); }
.avatar { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; font-size: 11px; font-style: normal; font-weight: 700; color: #fff; border-radius: 50%; transition: transform .15s; }
.avatar.large { width: 88px; height: 88px; font-size: 32px; border-radius: 50%; }
.avatar.plus { color: var(--gray); background: var(--pow); border: 1.5px dashed var(--line); font-weight: 400; }
.new-profile { background: var(--pow); box-shadow: 0 1px 3px rgba(29, 27, 38, .08), 0 6px 20px rgba(29, 27, 38, .06); }
.new-profile input { width: 100%; height: 34px; padding: 0 10px; text-align: center; }
.new-profile .btn { width: 100%; }
.profiles-bottom { display: flex; gap: 18px; margin-top: 26px; font-size: 13px; }
.profile-side { display: flex; align-items: center; gap: 8px; padding: 8px 10px; text-align: left; border-radius: 8px; }
.profile-side:hover { background: var(--background); }
.profile-side span { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-side small { font-size: 12px; color: var(--light); }
.profile-side + .logout { margin-top: 0; }
@media (max-width: 900px) {
  .profile-side { margin: 0 0 0 auto; padding: 4px 6px; } .profile-side span, .profile-side small { display: none; }
  .profile-side + .logout { margin: 0; }
}

/* art direction, shots in the plan and visual review */
.direction { display: grid; gap: 8px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.direction > p { font-size: 13px; color: var(--gray); }
.palette { display: flex; gap: 6px; } .palette i { width: 28px; height: 28px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.image-plan { margin-top: 6px; font-size: 13px; color: var(--gray); } .image-plan b { color: var(--ink); font-weight: 600; }
.shots { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--gray); } .shots li { margin: 2px 0; }
.review { display: grid; gap: 6px; margin-top: 12px; padding: 12px 14px; } .review ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--gray); }

/* look sample */
.change-climate { display: grid; gap: 10px; margin-top: 14px; padding: 16px; }
.change-climate .notes { min-height: 64px; }
.change-climate .btn { justify-self: start; }
.slate img { width: 100%; cursor: zoom-in; border-radius: 8px; }
.sterowanie-report { flex-wrap: wrap; }

/* narrator style */
.narrator { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 4px 0 8px; }
.panel-lista .narrator { border: 0; padding-top: 4px; }
.panel-lista .narrator small { font: 500 12px Inter, system-ui, sans-serif; color: var(--gray); }
.panel-lista .narrator + .music { border-top: 1px solid var(--line); margin-top: 0; padding-top: 14px; }
.style-narrator { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 5px; }
.style { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 8px; text-align: left; background: var(--pow); border: 1px solid var(--line); border-radius: 9px; transition: border-color .15s, background .15s; }
.style i { font-style: normal; font-size: 16px; line-height: 1; }
.style b { font-size: 12.5px; font-weight: 600; line-height: 1.15; }
.style:hover { border-color: var(--ink); }
.style.selected { background: var(--accent-t); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.description-style { font-size: 12.5px; color: var(--gray); } .description-style b { color: var(--ink); font-weight: 600; }
.narrator .tempo { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.narrator .tempo input { flex: 1; accent-color: var(--accent); border: 0; }
.narrator .tempo output { font: 12px 'IBM Plex Mono', monospace; min-width: 44px; }
.own-description { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.own-description small { font-weight: 500; color: var(--gray); }
.row-description { display: flex; gap: 6px; }
.row-description input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; }
.listen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.narrator audio { width: 100%; height: 36px; }
@media (max-width: 480px) { .profiles-center h1 { font-size: 24px; } .profile-card { width: 150px; } .avatar.large { width: 76px; height: 76px; font-size: 28px; } }
.heading .btn.stop { margin-left: auto; color: var(--red); background: var(--pow); border: 1px solid #f0c8bd; }
.heading .btn.stop:hover { background: #fdece6; border-color: var(--red); }
.heading .btn.stop small { font-weight: 500; opacity: .8; }
.from-report { display: grid; gap: 4px; margin-bottom: 18px; padding: 12px 14px; background: var(--accent-t); border-color: #f5cdbf; }

/* story style in the wizard */
.style-stories { display: grid; gap: 8px; margin: 16px 0 18px; }
.style-stories > label { font-size: 13px; font-weight: 600; } .style-stories > label small { margin-left: 6px; font-weight: 500; color: var(--gray); }
.style-stories .segment { display: flex; flex-wrap: wrap; gap: 2px; }
.style-stories #tone-own { height: 38px; padding: 0 12px; }
.music-choice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13px; margin-top: 4px; cursor: pointer; }
.music-choice[hidden] { display: none; }
.music-choice small { flex-basis: 100%; color: var(--gray); font-size: 12px; padding-left: 22px; }
.music { border-top: 0; margin-top: -8px; }
.music .switch { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.music textarea { width: 100%; font: inherit; font-size: 13px; padding: 8px 10px; resize: vertical; }
.music-sections summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.music-sections label { display: grid; gap: 2px; margin-top: 6px; font-size: 12px; color: var(--gray); }
.music-sections input { height: 30px; padding: 0 8px; font-size: 12.5px; }
.music audio { width: 100%; height: 36px; }
.narrator-hint { font-size: 12.5px; color: var(--gray); } .narrator-hint b { color: var(--ink); font-weight: 600; }

/* questions: own answer and extra information */
.question .other { width: 100%; height: 34px; margin-top: 8px; padding: 0 10px; font-size: 13px; }
.question.not-know .other { display: none; }
.additional { display: grid; gap: 6px; margin-top: 12px; padding: 16px; }
.additional textarea { width: 100%; padding: 10px 12px; resize: vertical; }
.assumptions-choice button { display: block; width: 100%; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.assumptions-choice li:has(button:hover) { outline: 1px solid var(--accent); }
.assumptions-choice button.rejected { text-decoration: line-through; opacity: .45; }
.assumptions-choice li:has(.rejected) { background: var(--background); }

/* step bar: steps with data are clickable */
.steps li.available { cursor: pointer; border-radius: 6px; }
.steps li.available:hover, .steps li.available:focus-visible { background: var(--accent-t); outline: none; }
.steps li.available span { text-decoration: underline; text-decoration-color: rgba(0, 0, 0, .2); text-underline-offset: 3px; }

/* look variants */
.templates { margin-top: 16px; padding: 12px 14px; }
.templates summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.templates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.template-card { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line, #e2e2e2); border-radius: 10px; overflow: hidden; background: var(--card, #fff); }
.template-card img, .template-empty { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #ddd; }
.template-description { display: flex; flex-direction: column; gap: 3px; padding: 0 10px; font-size: 12.5px; }
.template-description small { opacity: .75; }
.template-card .btn { margin: 4px 10px 10px; }
.template-card.added { outline: 2px solid var(--accent, #e05a2b); }
.variants-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.variant-card { display: grid; align-content: start; gap: 10px; padding: 10px; transition: border-color .15s, box-shadow .15s; }
.variant-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.variant-card.waiting { place-items: center; align-content: center; min-height: 260px; color: var(--gray); }
.variant-card.from-error { opacity: .7; }
.variant-preview { position: relative; overflow: hidden; width: 100%; background: #000; border-radius: 8px; }
.variant-preview iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; pointer-events: none; }
.variant-motion { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 50%; }
.variant-motion:hover { background: rgba(0, 0, 0, .8); }
.variant-description { display: grid; gap: 4px; padding: 0 4px; }
.variant-description > span { font-size: 13px; color: var(--gray); }
.variant-description small { font-size: 12px; color: var(--light); }
.variant-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 0 4px 4px; font-size: 13px; }
.add-variants { display: grid; gap: 10px; margin-top: 16px; padding: 16px; }
.row-add { display: flex; gap: 8px; }
.row-add input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; }
.row-add select { height: 36px; padding: 0 8px; }
.variant-large { display: grid; place-items: center; align-content: center; gap: 10px; }
.variant-large .variant-preview { width: min(90vw, 160vh); }
.variant-large p { color: #fff; font-size: 13px; cursor: pointer; }

/* Narrator and Music steps */
.steps li.skipped { opacity: .45; text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .25); }
.steps li.skipped i { border-style: dashed; }
.music-directions { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.music-direction { display: grid; gap: 8px; align-content: start; padding: 16px; }
.music-direction > b { font-size: 16px; }
.music-direction.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.music-direction .variant-actions { padding: 4px 0 0; }
.music-direction audio { width: 100%; height: 36px; }
.music-description-en { margin: 0; font: 12px/1.45 'IBM Plex Mono', monospace; color: var(--gray); }
.sound-summary { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sound-summary h3, .sound-summary p { margin: 0; }
.sound-summary .btn { justify-self: start; }
.music input, .music textarea { width: 100%; min-width: 0; box-sizing: border-box; }
.pair > * { min-width: 0; }
.music-directions { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.music-direction .variant-actions .btn { white-space: normal; }
@media (max-width: 600px) { .row-add { flex-wrap: wrap; } .row-add input { flex-basis: 100%; } .add-variants, .add-variants > * { min-width: 0; } }

/* panel language (PL / EN): login, profiles, sidebar */
.panel-language { display: inline-flex; gap: 2px; padding: 2px; background: var(--background); border: 1px solid var(--line); border-radius: 8px; }
.panel-language button { padding: 2px 8px; font-size: 12px; font-weight: 600; color: var(--gray); border-radius: 6px; }
.panel-language button.selected { color: var(--ink); background: var(--pow); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.login .place-language { justify-self: center; }

/* narrator voice: voice cards with a free sample */
.voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin-top: 10px; }
.voice { display: flex; align-items: flex-start; gap: 10px; padding: 10px; text-align: left; background: var(--pow); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.voice:hover, .voice:focus-visible { border-color: var(--ink); outline: none; }
.voice.selected { background: var(--accent-t); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); cursor: default; }
.voice.waiting { opacity: .6; }
.voice-listen { flex: none; display: grid; place-items: center; width: 32px; height: 32px; font-size: 12px; color: #fff; background: var(--ink); border-radius: 50%; }
.voice-listen:disabled { background: var(--light); }
.voice-description { display: grid; gap: 1px; min-width: 0; }
.voice-description b { font-size: 14px; }
.voice-description small { font-size: 12px; color: var(--gray); line-height: 1.35; }
.voice-description .badge { justify-self: start; }
.voices-others { margin-top: 12px; }
.voices-others summary { cursor: pointer; font-size: 13px; color: var(--gray); }

/* chapters of the ready video: scroll to a chapter and correct only that chapter (✎) */
.panel-lista > .chapter-correction:not([hidden]) { display: flex !important; grid-template-columns: none; margin: 2px 0 8px; padding: 0 0 0 8px !important; }
.chapter-correction input { height: 34px; font-size: 13px; }
.panel-lista > .chapters-send:not([hidden]) { display: grid !important; grid-template-columns: 1fr !important; gap: 6px; position: sticky; bottom: 0; margin-top: 6px; padding: 10px 8px !important; background: var(--background); border-top: 1px solid var(--line); border-radius: 0 !important; }
.chapters-send p { margin: 0; font-size: 12px; color: var(--gray); }
.panel-lista > .chapters-hint { display: block !important; padding: 0 8px 6px !important; font-size: 12px; color: var(--gray); }
.plan-recordings { margin-top: 8px; font-size: 13px; color: var(--gray); }
.plan-recordings b { color: var(--text); }

/* volume of video and music, mix preview, "Apply to video" (remix without re-recording the picture) */
.volume-block { display: grid; gap: 8px; margin: 12px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.panel-lista > .volume-block { display: grid !important; grid-template-columns: 1fr !important; padding: 12px 8px 0 !important; }
.volume-block h3 { margin: 0; font-size: 14px; }
.volume-block label { display: grid; gap: 4px; font-size: 13px; }
.volume-block select { height: 34px; }
.volume-block audio { width: 100%; height: 36px; }

/* streaming (ADR 0037): slots waiting for a question, chapter or variant, and a gentle entry of a ready card */
.skeleton { display: block; height: 12px; margin: 8px 0; border-radius: 6px; background: linear-gradient(90deg, var(--line) 0%, #f1efea 50%, var(--line) 100%); background-size: 200% 100%; animation: skeleton 1.4s ease-in-out infinite; }
.skeleton.skeleton-title { width: 70%; height: 16px; margin-bottom: 14px; }
.skeleton.short { width: 45%; }
.question-slot, .chapter-slot { padding: 16px 18px; min-height: 120px; }
.appears { animation: appears .35s ease-out backwards; } /* backwards, not both: a held transform blocked hover and press */
@keyframes skeleton { to { background-position: -200% 0; } }
@keyframes appears { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .appears { animation: none; } }

/* "Materials" step (ADR 0038): knowledge base to correct */
.section-foundation { padding: 14px 16px; margin-bottom: 12px; }
.section-foundation h3 { margin-bottom: 8px; }
.section-heading { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.section-title { flex: 1; font-weight: 700; font-size: 15px; padding: 6px 8px; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
/* fact: text with source labels (name and link), editing via ✎ with source choice from a list (ADR 0040) */
.fact { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; }
.fact:hover { background: var(--background); }
.fact-content { flex: 1 1 55%; min-width: 0; margin: 0; font-size: 14px; line-height: 1.45; }
.fact-sources { display: flex; flex-wrap: wrap; gap: 4px; }
.source-label { font: 500 11px/1.7 'IBM Plex Mono', monospace; padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--pow); color: var(--gray); text-decoration: none; white-space: nowrap; }
a.source-label:hover { color: var(--accent); border-color: var(--accent); }
.source-label.missing { color: #b42318; border-color: #f3c2b8; }
.fact-sources { order: 1; } .fact-actions { order: 2; } .fact-uw { order: 3; flex-basis: 100%; }
.fact-actions { margin-left: auto; display: flex; gap: 2px; opacity: .45; }
.fact:hover .fact-actions, .fact:focus-within .fact-actions { opacity: 1; }
.icon-btn { width: 28px; height: 28px; border: 0; background: none; color: var(--gray); font-size: 14px; border-radius: 6px; cursor: pointer; }
.icon-btn:hover { background: var(--line); color: var(--ink); }
.fact.edit { display: block; padding: 8px; background: var(--background); border: 1px solid var(--line); }
.fact.edit textarea, .fact.edit input { width: 100%; padding: 6px 8px; font-size: 13px; resize: vertical; }
.fact-choice-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 6px 0; }
.choice-sources { font: 500 11px/1.7 'IBM Plex Mono', monospace; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--pow); color: var(--gray); cursor: pointer; }
.choice-sources.selected { background: var(--accent-t); border-color: var(--accent); color: var(--ink); }
.fact-bottom { display: flex; align-items: center; gap: 6px; }
.fact-bottom input { flex: 1; min-width: 0; }
.remove-el { width: 24px; height: 28px; border: 0; background: none; color: var(--light); font-size: 18px; cursor: pointer; }
.remove-el:hover { color: #b42318; }
.add-fact { margin-top: 6px; }
.images-foundation { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.image-foundation { position: relative; margin: 0; background: var(--pow); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.image-foundation img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.image-foundation figcaption { padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.image-foundation figcaption textarea { width: 100%; font-size: 12px; padding: 4px 6px; }
.image-foundation .remove-el { position: absolute; top: 4px; right: 4px; background: rgba(255,255,255,.85); border-radius: 6px; }
.sources-foundation { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.source { display: grid; grid-template-columns: 34px 1fr 1.2fr 110px 24px; gap: 6px; align-items: center; font-size: 13px; }
.source input { padding: 5px 7px; font-size: 12px; min-width: 0; }
.source a { color: var(--gray); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#foundation-write { min-height: 18px; margin: 6px 0 0; }
#foundation-write.error { color: #b42318; }
@media (max-width: 760px) { .source { grid-template-columns: 30px 1fr 24px; } .source .src-url, .source .src-data { grid-column: 2 / 3; } }
.abstract-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.abstract-list textarea { width: 100%; padding: 6px 8px; font-size: 13px; resize: vertical; }

/* generation by chapters (ADR 0039): a tile per chapter, ready at once with a preview */

/* 10 steps (ADR 0040): every step has a name (owner: "I do not know what these steps are, there is only a number"); on a narrower screen
   the steps move to their own row under the path, tighter but still with labels; the bar does not stretch the page */
.steps { min-width: 0; max-width: 100%; overflow-x: auto; }
@media (max-width: 1320px) {
  .top { padding-block: 6px; row-gap: 2px; }
  .top .steps { flex-basis: 100%; margin: 0; gap: 0; }
  .steps li { padding: 4px 7px; gap: 5px; font-size: 12px; white-space: nowrap; }
}

/* step bar (ADR 0040): cost so far, next step and the main button always visible */
.top { flex-wrap: wrap; }
.bar-step { position: relative; flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 0 8px; border-top: 1px solid var(--line); }
.bar-cost { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; padding: 4px 8px; margin-left: -8px; border: 0; background: none; font-size: 13px; color: var(--gray); text-align: left; border-radius: 8px; cursor: pointer; }
.bar-cost:hover { background: var(--background); }
.bar-cost b { color: var(--ink); } .pk-following b { color: var(--accent); } .bar-cost i { font-style: normal; font-size: 11px; }
.bar-state { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray); }
.bar-action { margin-left: auto; }
.bar-details { position: absolute; top: 100%; left: 0; z-index: 5; width: min(460px, 100%); padding: 12px 14px; box-shadow: 0 10px 28px rgba(0, 0, 0, .14); }
@media (max-width: 900px) {
  .bar-step { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--pow); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0, 0, 0, .08); }
  .screen { padding-bottom: 130px; }
  .pk-total { display: none; }
  .bar-action { flex: 1 1 100%; } .bar-next { width: 100%; }
  .bar-details { top: auto; bottom: 100%; }
}

/* plan chapter by chapter (ADR 0040) */
.plan-lista .row { border-bottom: 0; }
.chapter-plan { grid-template-columns: 28px 1fr 52px auto; }
.actions-chapter { display: flex; gap: 2px; align-self: start; opacity: .5; }
.chapter-plan:hover .actions-chapter, .chapter-plan:focus-within .actions-chapter { opacity: 1; }
.edit-chapter { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.edit-chapter textarea, .r-manually input, .r-manually textarea { width: 100%; padding: 6px 8px; font-size: 13px; resize: vertical; }
.r-manually { font-size: 13px; } .r-manually summary { color: var(--gray); cursor: pointer; }
.r-manually label { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 12px; color: var(--gray); }
.r-manually .r-sec input { width: 110px; } .r-manually .r-save { margin-top: 8px; }
.add-chapter { padding: 0 14px 6px 52px; border-bottom: 1px solid var(--line); }
.add-chapter:last-child { border-bottom: 0; }
.r-add { font-size: 12px; color: var(--light); text-decoration: none; } .r-add:hover { color: var(--accent); }
.add-chapter textarea { display: block; width: 100%; margin-top: 4px; padding: 6px 8px; font-size: 13px; }
.changes-plan { position: sticky; bottom: 12px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 10px; padding: 10px 14px; color: #fff; background: var(--ink); border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); font-size: 13px; }
.changes-plan .btn.main { background: var(--accent); }
.rewritten { background: var(--background); } .rewritten h3 { display: flex; align-items: center; gap: 6px; }
.whole-plan { margin-top: 16px; padding: 10px 14px; } .whole-plan summary { cursor: pointer; } .whole-plan[open] summary { margin-bottom: 8px; }
@media (max-width: 900px) { .changes-plan { bottom: 140px; } .add-chapter { padding-left: 14px; } }

/* sources slide to choose (ADR 0044) */
.sources-choice { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 4px; font-size: 13px; cursor: pointer; }
.sources-choice input { margin-top: 3px; }
.sources-choice span { display: flex; flex-direction: column; gap: 2px; }
.sources-choice small { color: var(--gray); font-size: 12px; line-height: 1.35; }

/* credits (ADR 0043) */
.credits-side { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; padding: 8px 10px; border-radius: 8px; color: var(--gray); font-size: 13px; }
.credits-side:hover { background: var(--pow); } .credits-side b { color: var(--ink); font-weight: 700; } .credits-side b.little { color: var(--red); }
.credits-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 14px 0 10px; }
.credits-numbers .card { display: grid; gap: 2px; padding: 14px 16px; } .credits-numbers span { color: var(--gray); font-size: 13px; }
.credits-numbers b { font: 700 26px/1.1 'Bricolage Grotesque', sans-serif; } .credits-numbers small { color: var(--light); }
.credits-deposit { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin-top: 16px; padding: 14px 16px; }
.credits-deposit h3 { flex-basis: 100%; } .credits-deposit label { display: grid; gap: 4px; font-size: 12px; color: var(--gray); }
.credits-deposit input, .credits-deposit select { height: 36px; padding: 0 10px; }
.table-credits { overflow-x: auto; } .table-credits table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--pow); border-radius: 10px; overflow: hidden; }
.table-credits th, .table-credits td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); } .table-credits th { color: var(--gray); font-weight: 600; }
.table-credits .number { font-variant-numeric: tabular-nums; white-space: nowrap; } .entry-deposit .number { color: var(--ok); } .entry-hold, .entry-release { color: var(--gray); }
.credits-side[hidden] + .profile-side { margin-top: auto; }
/* the screen main button is in the step bar (ADR 0040): the original is hidden on the page, the copy clicks it */
#view [data-main].in-bar { display: none !important; }
/* credit purchase (ADR 0048) */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pack { display: grid; gap: 4px; padding: 16px; } .pack b { font: 700 16px 'Bricolage Grotesque', sans-serif; }
.pack-credits { font: 700 24px/1.1 'Bricolage Grotesque', sans-serif; } .pack-credits small, .pack-price small { font: 500 12px 'Figtree', sans-serif; color: var(--gray); }
.pack-price { color: var(--gray); margin-bottom: 8px; }
.payment-ok, .payment-canceled { padding: 12px 16px; margin: 12px 0; } .payment-ok { background: var(--ok-t); } .payment-canceled { background: var(--yellow-t); }
.purchase-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 8px; }
/* KSeF invoices (ADR 0049) */
.state-invoices.sent { color: var(--ok); } .state-invoices.rejected { color: var(--red); } .state-invoices.waiting, .state-invoices.manual { color: var(--yellow); }

/* partner modules and administration in the sidebar (ADR 0052): at the bottom, above credits */
.modules-side { display: grid; gap: 2px; margin-top: 14px; } .modules-side:not([hidden]) { margin-top: auto; padding-top: 14px; }
.module-link .dot { background: var(--accent); }
.admin-side { padding: 7px 10px; font-size: 13px; font-weight: 600; color: var(--gray); border-radius: 7px; }
.admin-side:hover { background: var(--pow); color: var(--ink); }
.modules-side[hidden] + .admin-side:not([hidden]) { margin-top: auto; }
.modules-side:not([hidden]) ~ .credits-side, .admin-side:not([hidden]) ~ .credits-side { margin-top: 0; }
.card.unlimited { margin: 14px 0 0; padding: 12px 16px; background: var(--ok-t); border-color: transparent; }
.card.unlimited b { color: var(--ok); }

/* administrator panel (ADR 0052) */
.admin-intro { max-width: 72ch; margin: 4px 0 14px; }
.admin-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.admin-bar input { width: min(320px, 100%); height: 36px; padding: 0 12px; }
.admin-table td { vertical-align: middle; }
.admin-table .who { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.admin-table .who small { display: block; color: var(--light); font-size: 12px; }
.admin-table .modules { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.admin-table b.little { color: var(--red); }
.admin-table tr.opened td { background: var(--background); }
.admin-table tr.details > td { padding: 4px 14px 16px; background: var(--background); }
.switch { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; }
.switch input { width: 16px; height: 16px; accent-color: var(--accent); }
.badge.unlimited { color: var(--ok); background: var(--ok-t); }
.admin-details .credits-numbers { margin-top: 8px; }
.admin-details .quick { display: flex; gap: 6px; flex-basis: 100%; }
.admin-details .quick .btn { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); background: var(--pow); }
.admin-details table { width: 100%; border-collapse: collapse; }
@media (max-width: 760px) { .admin-table .who { min-width: 160px; } }

/* link sharing and QR code (ADR 0053) */
.share { margin-top: 14px; padding: 14px 16px; display: grid; gap: 10px; }
.share-row { display: flex; flex-direction: column; gap: 10px; }
.share-row .qr { align-self: center; width: 156px; height: 156px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.share-row .qr img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.share-description { display: grid; gap: 8px; min-width: 0; }
.share-link { display: flex; gap: 6px; } .share-link input { flex: 1; min-width: 0; height: 34px; padding: 0 8px; font-size: 12px; }
.share-buttons, .share-bottom { display: flex; flex-wrap: wrap; gap: 6px; } .share-buttons .btn { min-height: 30px; padding: 0 10px; font-size: 13px; }
.share-note { margin: 0; padding: 8px 10px; color: var(--yellow); background: var(--yellow-t); border-radius: 8px; }
.share-card summary { cursor: pointer; font-weight: 600; } .share-card[open] { display: grid; gap: 8px; }
.share-card label { display: grid; gap: 4px; font-size: 12px; color: var(--gray); } .share-card input, .share-card textarea { padding: 7px 9px; }

/* cards with codes from the pool (ADR 0054) */
.share-code { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); } .share-code label { display: grid; gap: 2px; font-size: 13px; font-weight: 600; }
.share-codes:empty { display: none; } .share-codes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.share-card-code { display: inline-flex; gap: 6px; align-items: baseline; padding: 3px 8px; background: var(--background); border-radius: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.admin-codes { margin-top: 28px; } .admin-codes h2 { margin: 0 0 4px; }
.pool-actions { display: flex; flex-wrap: wrap; gap: 6px; } .pool-actions .btn { min-height: 30px; padding: 0 10px; font-size: 13px; }

/* debug panel of one order (ADR 0061): dense, technical, administrator only */
.debug-link { margin-left: 8px; padding: 1px 7px; font: 600 11px 'IBM Plex Mono', monospace; color: var(--gray); border: 1px solid var(--line); border-radius: 5px; }
.debug-link:hover { color: var(--ink); border-color: var(--ink); }
.dbg { display: grid; gap: 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
.dbg h3 { font-size: 13px; letter-spacing: .02em; } .dbg h4 { margin: 4px 0 6px; font-size: 12px; color: var(--gray); }
.dbg-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dbg-title { min-width: 0; } .dbg-title h1 { font-size: 22px; } .dbg-title .pod { font-size: 12px; overflow-wrap: anywhere; }
.dbg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dbg-state { padding: 4px 10px; font-weight: 600; border-radius: 999px; background: var(--side); }
.dbg-state.ok { color: var(--ok); background: var(--ok-t); } .dbg-state.error { color: var(--red); background: var(--accent-t); } .dbg-state.running { color: #1d5fae; background: #e3eefb; }
.dbg-tabs { position: sticky; top: 52px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px; background: var(--pow); border: 1px solid var(--line); border-radius: 10px; }
.dbg-tabs button { padding: 6px 12px; font-weight: 600; color: var(--gray); border-radius: 7px; }
.dbg-tabs button.selected { color: var(--ink); background: var(--background); } .dbg-tabs button:hover { color: var(--ink); }
.dbg-generated { margin: 0 8px 0 auto; font-size: 12px; }
.dbg-count { display: inline-block; min-width: 18px; padding: 0 5px; font: 600 11px/18px 'IBM Plex Mono', monospace; font-style: normal; text-align: center; color: #fff; background: var(--red); border-radius: 9px; }
.dbg-body { display: grid; gap: 12px; min-width: 0; }
.dbg-card { min-width: 0; padding: 14px 16px; background: var(--pow); border: 1px solid var(--line); border-radius: 10px; }
.dbg-card > h3 { margin-bottom: 8px; }
.dbg-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dbg-card-head .pod { margin: 0; font-size: 12px; }
.dbg-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 12px; }
.dbg-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.dbg-tiles.small { margin: 8px 0 12px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.dbg-tile { display: grid; gap: 1px; align-content: start; padding: 10px 12px; background: var(--pow); border: 1px solid var(--line); border-radius: 10px; }
.dbg-tiles.small .dbg-tile { background: var(--background); }
.dbg-tile span { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--light); }
.dbg-tile b { font: 600 20px 'IBM Plex Mono', monospace; letter-spacing: -.02em; }
.dbg-tile small { font-size: 12px; color: var(--gray); }
.dbg-tile.warn b { color: var(--yellow); } .dbg-tile.bad { border-color: #f0c8bd; } .dbg-tile.bad b { color: var(--red); }
.dbg-alert { border-color: #f0c8bd; background: #fff6f2; } .dbg-alert pre { margin: 6px 0; white-space: pre-wrap; color: var(--red); font: 12.5px 'IBM Plex Mono', monospace; }
.dbg-alert p { margin: 6px 0 0; }
.dbg-errors { margin: 8px 0 0; padding-left: 18px; color: var(--gray); }
.dbg-err { color: var(--red); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dbg-svg { display: block; width: 100%; overflow: visible; }
.dbg-axis { font: 10.5px 'IBM Plex Mono', monospace; fill: var(--gray); paint-order: stroke; stroke: var(--pow); stroke-width: 3px; stroke-linejoin: round; } .dbg-axis.group { font-weight: 600; fill: var(--light); text-transform: uppercase; } .dbg-axis.bad { fill: var(--red); }
.dbg-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dbg-seg { fill: #9fc3ee; } .dbg-seg.queue { fill: #e6ddcf; } .dbg-seg.prepare { fill: #f3d9a0; }
.dbg-seg.work, .dbg-seg.run, .dbg-seg.ok { fill: #2a78d6; } .dbg-seg.error { fill: var(--red); } .dbg-seg.stopped { fill: #9a6700; } .dbg-seg.running { fill: #7fb0ea; }
.dbg-seg.stage { fill: #1baf7a; } .dbg-seg.stage.approx { fill: #a7dcc6; }
.dbg-seg[data-zoom], .dbg-seg[data-run], .dbg-click { cursor: pointer; }
.dbg-seg:hover { stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.dbg-mark { stroke-width: 1.5; vector-effect: non-scaling-stroke; } .dbg-mark.error { stroke: var(--red); } .dbg-mark.note { stroke: #c98500; stroke-dasharray: 3 3; }
.dbg-p95 { stroke: var(--ink); stroke-dasharray: 4 3; stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .6; }
.dbg-clipped { opacity: .75; }
.dbg-gantt-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 12px; }
.dbg-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0; font-size: 12px; color: var(--gray); }
.dbg-legend span { display: inline-flex; align-items: center; gap: 5px; } .dbg-legend b { color: var(--ink); font-family: 'IBM Plex Mono', monospace; }
.dbg-legend i, .dbg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.dbg-dot { margin-right: 5px; }
.dbg-gantt-bar .dbg-legend i { margin-left: 8px; } .dbg-legend i.queue { background: #e6ddcf; } .dbg-legend i.prepare { background: #f3d9a0; } .dbg-legend i.work { background: #2a78d6; } .dbg-legend i.error { background: var(--red); } .dbg-legend i.stage { background: #1baf7a; }
.dbg-stack, .dbg-mini-stack { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; } .dbg-stack i, .dbg-mini-stack i { display: block; min-width: 2px; }
.dbg-mini-stack { width: 110px; height: 10px; }
.dbg-bars { display: grid; gap: 4px; margin-top: 8px; }
.dbg-bar-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 110px; align-items: center; gap: 10px; font-size: 12.5px; }
.dbg-bar-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .dbg-bar-label small { color: var(--light); }
.dbg-bar-track { position: relative; height: 12px; background: var(--background); border-radius: 4px; }
.dbg-bar-track i { position: absolute; top: 0; bottom: 0; left: 0; display: block; border-radius: 0 4px 4px 0; background: #2a78d6; } .dbg-bar-track i.bad { background: var(--red); }
.dbg-est { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); }
.dbg-bar-value { text-align: right; font-family: 'IBM Plex Mono', monospace; font-size: 12px; }
.dbg-big { font: 600 22px 'IBM Plex Mono', monospace; } .dbg-big small { font: 500 12px 'Figtree', sans-serif; color: var(--gray); }
.dbg-table { overflow-x: auto; } .dbg-table table, .dbg-events { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dbg-table th, .dbg-table td, .dbg-events td { padding: 5px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.dbg-table th { font-size: 11.5px; font-weight: 600; color: var(--gray); background: var(--pow); white-space: nowrap; }
.dbg-table tfoot td { font-weight: 600; border-bottom: 0; }
.dbg .num { text-align: right; white-space: nowrap; font-family: 'IBM Plex Mono', monospace; font-size: 12px; }
.dbg th.num { font: 600 11.5px 'Figtree', sans-serif; } .dbg td.mono { white-space: nowrap; font-size: 12px; }
.dbg td.bad, .dbg tr.bad td { color: var(--red); } .dbg tr.bad td { background: #fff6f2; }
.dbg tr.selected td { background: #e3eefb; } .dbg tr.dbg-click:hover td { background: var(--background); }
.dbg-chip { display: inline-block; padding: 1px 8px; font-size: 11.5px; font-weight: 600; border-radius: 999px; background: var(--side); color: var(--gray); }
.dbg-chip.ok { color: var(--ok); background: var(--ok-t); } .dbg-chip.error, .dbg-chip.failed { color: var(--red); background: var(--accent-t); } .dbg-chip.stopped { color: var(--yellow); background: var(--yellow-t); } .dbg-chip.running { color: #1d5fae; background: #e3eefb; }
.dbg-spark { display: block; width: 120px; height: 22px; }
.dbg-strip { display: flex; gap: 2px; height: 26px; } .dbg-strip i { position: relative; display: block; min-width: 2px; background: #e6ddcf; border-radius: 3px; overflow: hidden; }
.dbg-strip i b { position: absolute; top: 0; bottom: 0; left: 0; background: #2a78d6; opacity: .75; }
.dbg-strip i:hover { outline: 1.5px solid var(--ink); }
.dbg-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; font-size: 12.5px; } .dbg-links a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.dbg-table a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.dbg-hist { display: flex; align-items: flex-end; gap: 4px; height: 110px; padding-bottom: 18px; }
.dbg-hist div { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
.dbg-hist i { display: block; width: 100%; min-height: 1px; border-radius: 3px 3px 0 0; }
.dbg-hist span { position: absolute; bottom: -17px; left: 0; right: 0; text-align: center; font: 10px 'IBM Plex Mono', monospace; color: var(--gray); }
.dbg-run-stages { display: grid; gap: 4px; margin: 10px 0; } .dbg-run-stages > div { display: grid; grid-template-columns: 140px 1fr 90px; align-items: center; gap: 10px; font-size: 12.5px; }
.dbg-run-stages i { border-radius: 4px; }
.dbg-scroll { max-height: 420px; overflow: auto; }
.dbg-events td { font-size: 12px; } .dbg-events tr.warn td { background: var(--yellow-t); }
.dbg-stderr { margin: 6px 0 0; padding: 10px; font: 11.5px/1.45 'IBM Plex Mono', monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: #e9e4da; background: #1f1c19; border-radius: 8px; }
.dbg input[type="search"], .dbg select { height: 32px; padding: 0 10px; font-size: 13px; }
.dbg-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 10px; } .dbg-filter input[type="search"] { width: min(280px, 100%); }
.dbg-kind-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; opacity: .5; }
.dbg-kind-chip.on { opacity: 1; background: var(--background); } .dbg-kind-chip input { display: none; } .dbg-kind-chip b { font-family: 'IBM Plex Mono', monospace; color: var(--gray); }
.dbg-kind-chip.error { color: var(--red); }
.dbg-kind { display: inline-block; min-width: 46px; padding: 0 6px; font: 600 11px/18px 'IBM Plex Mono', monospace; text-align: center; border-radius: 4px; background: var(--side); color: var(--gray); }
.dbg-kind.error { color: #fff; background: var(--red); } .dbg-kind.stage { color: #fff; background: #168f63; } .dbg-kind.note { color: var(--yellow); background: var(--yellow-t); } .dbg-kind.agent { color: #1d5fae; background: #e3eefb; } .dbg-kind.tool { color: #4b3cb8; background: #ece9fb; }
.dbg-log tr.kind-error td { background: #fff6f2; } .dbg-log td:last-child { overflow-wrap: anywhere; }
.dbg-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; } .dbg-thumbs.wide { margin-top: 8px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.dbg-thumbs a { display: grid; gap: 3px; font-size: 11.5px; color: var(--gray); } .dbg-thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--side); border: 1px solid var(--line); border-radius: 6px; }
.dbg details summary { cursor: pointer; font-weight: 600; margin-top: 8px; }
.dbg-raw { display: grid; grid-template-columns: 300px 1fr; gap: 12px; align-items: start; }
.dbg-raw aside { position: sticky; top: 104px; max-height: calc(100vh - 120px); overflow: auto; } .dbg-raw aside input { width: 100%; }
.dbg-raw ul { margin: 8px 0 0; padding: 0; list-style: none; } .dbg-raw li button { width: 100%; padding: 4px 6px; text-align: left; font: 11.5px 'IBM Plex Mono', monospace; color: var(--gray); border-radius: 5px; overflow-wrap: anywhere; }
.dbg-raw li button.selected, .dbg-raw li button:hover { color: var(--ink); background: var(--background); }
.dbg-json { font: 12px/1.55 'IBM Plex Mono', monospace; overflow-x: auto; } .dbg-json details { padding-left: 14px; } .dbg-json details > summary { margin: 0 0 0 -14px; font-weight: 500; }
.dbg-json .leaf { padding-left: 14px; white-space: pre-wrap; overflow-wrap: anywhere; } .dbg-json .k { color: #4b3cb8; } .dbg-json .s { color: #00733f; } .dbg-json .d { color: #1d5fae; } .dbg-json .b, .dbg-json .n { color: #b4421f; }
.dbg-tip { position: fixed; z-index: 50; max-width: 380px; padding: 7px 10px; font: 12px/1.45 'Figtree', sans-serif; color: #f5efe4; background: #1f1c19; border-radius: 7px; box-shadow: 0 6px 20px rgba(0,0,0,.18); pointer-events: none; }
.dbg-tip b { color: #fff; }
@media (max-width: 900px) { .dbg-raw { grid-template-columns: 1fr; } .dbg-raw aside { position: static; max-height: 240px; } .dbg-bar-row { grid-template-columns: 110px 1fr 80px; } .dbg-grid-2 { grid-template-columns: 1fr; } .dbg-tabs { top: 0; } }

/* ---------- Studio (ADR 0066), stage 1: type scale, spacing, controls, collapsible sections, the three acts ----------
   A layer over the rules above: same selectors, no markup changes except the acts. Brand colours unchanged (ADR 0047). */
:root { --line-2: #d8ccb9; --r: 14px; --shadow: 0 1px 2px rgba(26, 23, 20, .05), 0 8px 24px -14px rgba(26, 23, 20, .22); --ease: cubic-bezier(.2, .7, .2, 1); }
body { font-size: 15px; }
h1 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.08; }
h2 { font-size: 22px; letter-spacing: -.015em; }
h3 { font: 700 15px/1.3 'Bricolage Grotesque', sans-serif; letter-spacing: -.005em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
@media (min-width: 901px) { .screen { padding: 28px 36px 48px; } } /* phones keep 16 px and the room under the fixed step bar */
.heading { margin-bottom: 18px; }
.card { border-radius: var(--r); box-shadow: var(--shadow); }
.pair, .film { gap: 28px; }
input, textarea, select { border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 4px rgba(26, 23, 20, .06); }
.badge { border-radius: 999px; padding: 2px 10px; }

/* buttons: pills, a little larger, a press and hover state */
.btn { min-height: 40px; padding: 0 18px; font-size: 14px; border-radius: 999px; transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn.accent { box-shadow: 0 6px 18px -8px rgba(228, 87, 46, .8); } .btn.accent:hover:not(:disabled) { background: #c9431d; }
.btn.main:hover:not(:disabled) { background: #000; }
.btn.second { border-color: var(--line-2); } .btn.second:hover:not(:disabled) { border-color: var(--ink); }
.btn.cichy:hover:not(:disabled) { color: var(--ink); background: var(--side); }

/* chips and segmented choices */
.choice { gap: 8px; }
.choice button { min-height: 34px; padding: 0 14px; font-size: 14px; font-weight: 600; color: #3a342e; border-radius: 999px; transition: border-color .15s, background .15s; }
.choice button:hover { border-color: var(--ink); }
.segment, .bookmarks { padding: 4px; background: var(--side); border-radius: 12px; }
.segment button, .bookmarks button { min-height: 32px; padding: 0 13px; font-size: 14px; font-weight: 600; border-radius: 9px; }
.examples button { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 999px; }

/* collapsible sections: one marker that turns, and the content fades in (not the JSON tree of the debug panel) */
.screen details:not(.dbg details) > summary { cursor: pointer; list-style: none; }
.screen details:not(.dbg details) > summary::-webkit-details-marker { display: none; }
.screen details:not(.dbg details) > summary::before { content: '›'; display: inline-block; width: 1em; font-weight: 700; color: var(--light); transition: transform .2s var(--ease); }
.screen details:not(.dbg details)[open] > summary::before { transform: rotate(90deg); }
.screen details:not(.dbg details)[open] > :not(summary) { animation: appears .25s var(--ease); }

/* top bar: the 10 steps as three acts; the act with the current step shows its step names, the others dots */
.top { min-height: 60px; gap: 18px; }
/* translucent only on wide screens: backdrop-filter makes .top the containing block of the fixed step bar on a phone */
@media (min-width: 901px) { .top { background: color-mix(in srgb, var(--background) 88%, transparent); backdrop-filter: blur(12px); } }
.okruszki { font-size: 14px; }
.steps.acts { align-items: center; gap: 4px; padding: 4px; background: var(--side); border-radius: 999px; }
.steps.acts .act { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px 0 5px; font-size: 14px; font-weight: 600; color: var(--gray); background: none; border-radius: 999px; white-space: nowrap; }
.act-n { display: grid; place-items: center; width: 24px; height: 24px; flex: none; font: 500 12px 'IBM Plex Mono', monospace; color: var(--gray); background: var(--pow); border-radius: 50%; }
.steps.acts .act.done { color: var(--ink); } .act.done .act-n { color: #fff; background: var(--ok); }
.steps.acts .act.now { color: var(--ink); background: var(--pow); box-shadow: 0 1px 3px rgba(26, 23, 20, .12); } .act.now .act-n { color: #fff; background: var(--accent); }
.act-steps { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.steps.acts .act-steps li { gap: 4px; padding: 0; font-size: 13px; color: var(--light); background: none; border-radius: 999px; }
.steps.acts .act-steps li i { display: none; }
.steps.acts .act:not(.now) .act-steps li { display: grid; place-items: center; width: 14px; height: 22px; }
.steps.acts .act:not(.now) .act-steps li > span { display: none; }
.steps.acts .act:not(.now) .act-steps li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: transform .15s; }
.steps.acts .act:not(.now) .act-steps li.done::before { background: var(--ok); }
.steps.acts .act:not(.now) .act-steps li.skipped::before { width: 5px; height: 5px; background: none; border: 1.5px dashed var(--line-2); }
.steps.acts .act:not(.now) .act-steps li.available:hover::before, .steps.acts .act:not(.now) .act-steps li.available:focus-visible::before { transform: scale(1.5); background: var(--accent); }
.steps.acts .act.now .act-steps { margin-left: 2px; padding-left: 8px; border-left: 1px solid var(--line); }
.steps.acts .act.now .act-steps li { padding: 3px 9px; font-weight: 600; }
.steps.acts .act.now .act-steps li.done { color: var(--ok); } .steps.acts .act.now .act-steps li.done span::before { content: '✓ '; }
.steps.acts .act.now .act-steps li.current { color: var(--accent); background: var(--accent-t); }
.steps.acts .act.now .act-steps li.available:hover { background: var(--side); }
@media (max-width: 1320px) { .top .steps.acts { flex-basis: auto; gap: 4px; } }
@media (max-width: 640px) {
  .steps.acts .act { gap: 4px; padding: 0 6px 0 3px; }
  .steps.acts .act .act-name { display: none; }
  .steps.acts .act.now .act-steps { margin-left: 0; padding-left: 4px; border-left: 0; }
  .steps.acts .act.now .act-steps li { padding: 3px 7px; }
  /* a phone: in the open act only the current step keeps its name, the others are dots like in the closed acts */
  .steps.acts .act.now .act-steps li:not(.current) { display: grid; place-items: center; width: 14px; height: 22px; padding: 0; }
  .steps.acts .act.now .act-steps li:not(.current) > span { display: none; }
  .steps.acts .act.now .act-steps li:not(.current)::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
  .steps.acts .act.now .act-steps li.done:not(.current)::before { background: var(--ok); }
}

/* step bar (ADR 0040): the one fixed place with the cost and the main button, a little larger */
.bar-cost { font-size: 14px; }
.bar-action .btn { min-height: 44px; padding: 0 22px; font-size: 15px; }

/* motion only where it explains a change; none for people who asked the system for less */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.bookmarks { flex-wrap: wrap; } .bookmarks button { padding: 0 8px; }

/* ---------- Studio (ADR 0066), stage 2: the finished film ----------
   The same cream palette as every screen (owner, 2026-11-23: "Niech paleta bedzie kremowa i spojna wszedzie"); only the stage
   around the player is dark, like the empty stage of the new story. */
.film { grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; max-width: 1500px; }
.film-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.film-top { margin: 0; } .film-top h1 { font-size: 30px; }
.film-stage { position: relative; padding: 14px; background: #1a1714; border-radius: 22px; box-shadow: 0 2px 4px rgba(26, 23, 20, .05), 0 24px 60px -24px rgba(26, 23, 20, .35); }
.film-stage video, .film-stage .show { border-radius: 12px; }
.film-stage .empty { color: #a39a8d; }
.film-col > .sterowanie-report, .film-col > audio { margin: 0; }

/* chapters as a timeline: thumbnail width follows the chapter length; ✎ opens the change under the timeline */
.film-chapters { display: grid; gap: 10px; }
.film-chapters-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; }
.film-chapters-head .chapters-hint { font-size: 13px; color: var(--gray); }
.timeline { position: relative; display: flex; gap: 6px; padding-top: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.timeline .tl-ch { position: relative; flex: var(--sec) 1 0; min-width: 116px; }
.tl-pick { display: grid; gap: 6px; width: 100%; padding: 0; text-align: left; border-radius: 10px; }
.tl-pick img, .tl-slot { display: block; width: 100%; height: 76px; object-fit: cover; border-radius: 8px; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .2s; }
.tl-slot { display: grid; place-items: center; padding: 6px; font-size: 12px; text-align: center; color: var(--gray); background: var(--side); overflow: hidden; }
.tl-pick:hover img, .tl-pick:hover .tl-slot { outline-color: var(--line-2); }
.tl-ch.playing .tl-pick img, .tl-ch.playing .tl-slot { outline-color: var(--accent); }
.tl-t { display: -webkit-box; overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.3; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; } .tl-t b { font: 500 11.5px 'IBM Plex Mono', monospace; color: var(--gray); }
.tl-pick small { margin-top: -4px; font: 500 11.5px 'IBM Plex Mono', monospace; color: var(--gray); }
.tl-pen { position: absolute; top: 14px; right: 6px; display: grid; place-items: center; width: 30px; height: 30px; font-size: 14px; color: #1a1714; background: rgba(255, 250, 241, .92); border-radius: 50%; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); opacity: 0; transition: opacity .15s; }
.tl-ch:hover .tl-pen, .tl-ch:focus-within .tl-pen, .tl-ch.opened .tl-pen, .tl-ch.marked .tl-pen { opacity: 1; }
.tl-ch.marked .tl-pen, .tl-ch.opened .tl-pen { color: #fff; background: var(--accent); }
@media (hover: none) { .tl-pen { opacity: 1; } }
.playhead { position: absolute; top: 4px; height: 82px; width: 2px; background: var(--accent); pointer-events: none; transition: left .25s linear; }
.playhead::before { content: ''; position: absolute; top: -3px; left: -5px; width: 12px; height: 12px; background: var(--accent); border-radius: 50%; }
.chapter-forms { display: contents; }
.film .chapter-correction:not([hidden]) { position: relative; display: grid; gap: 8px; margin: 4px 0 0; padding: 14px 16px; background: var(--pow); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); animation: appears .2s var(--ease); }
.film .chapter-correction::before { content: ''; position: absolute; top: -7px; left: calc(var(--arrow, 40px) - 6px); width: 12px; height: 12px; background: var(--pow); border-left: 1px solid var(--line-2); border-top: 1px solid var(--line-2); transform: rotate(45deg); }
.film .chapter-correction input { width: 100%; height: 42px; padding: 0 12px; }
.chapter-form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; } .chapter-form-foot small { color: var(--gray); font-size: 12.5px; }
.film .chapters-send:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 14px; border: 1px solid var(--accent); border-radius: 12px; animation: appears .2s var(--ease); }
#chapters-marked { font-size: 14px; color: var(--gray); }
.film-correction { margin: 0; } .film-correction input { height: 44px; }
.film-col > .pod.small { margin-top: -8px; font-size: 12.5px; }
.film-col > .improve { margin: 0; }

/* the side column: sharing first, downloads as a quiet row, then details and more */
.film > aside { display: grid; gap: 14px; align-content: start; }
.film > aside > .card { padding: 18px; }
.film > aside .share { margin: 0; }
.film .download { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; border-top: 1px solid var(--line); }
.download-label { margin-right: 6px; font: 500 12px 'IBM Plex Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); }
.film .download .btn { min-height: 32px; padding: 0 12px; font-size: 13px; }
.film-details .panel-lista { margin-top: 10px; }
.film-more { display: grid; gap: 8px; } .film-more .language-row { margin: 0; }
.film-more-links { display: flex; flex-wrap: wrap; gap: 4px; } .film-more-links .btn { padding: 0 10px; }
@media (max-width: 1180px) { .film { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (max-width: 900px) {
  .film { grid-template-columns: minmax(0, 1fr); }
  .timeline { padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .timeline .tl-ch { flex: 0 0 132px; scroll-snap-align: start; }
  .playhead { display: none; }
}
@media (max-width: 640px) { .film-top h1 { font-size: 24px; } .film-stage { margin: 0 -16px; padding: 8px; border-radius: 0; } .film-stage video, .film-stage .show { border-radius: 6px; } }
.film-details .bookmarks { flex-wrap: nowrap; } .film-details .bookmarks button { flex: 1 1 auto; padding: 0 6px; font-size: 13.5px; }

/* ---------- Studio (ADR 0066), stage 3: the new story ----------
   one field, the settings under "Customize" with their defaults shown, the cost as one number, an empty stage that follows the topic */
.new-story { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 44px; max-width: 1360px; margin: 0 auto; align-items: start; }
.new-main { min-width: 0; }
.new-main > h1 { font-size: 44px; margin: 4px 0 8px; }
.new-main > .pod { font-size: 16px; }
.new-story #topic { margin-top: 16px; min-height: 104px; padding: 18px 20px; font: 700 21px/1.35 'Bricolage Grotesque', sans-serif; letter-spacing: -.005em; border: 2px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow); }
.new-story #topic::placeholder { color: #b9ae9d; }
.new-story #topic:focus { border-color: var(--ink); box-shadow: 0 0 0 6px rgba(26, 23, 20, .06), var(--shadow); }
.new-story .materials-new { margin-top: 14px; }
.new-story .materials-new > .pod.small { margin-top: 6px; font-size: 12.5px; }
.new-story .zone.short { grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 12px; padding: 10px 14px; text-align: left; }
.new-story .zone.short b { grid-row: 1; } .new-story .zone.short small { grid-row: 2; grid-column: 1 / 3; }
.new-story .zone.short .folder-btn { grid-row: 1 / 3; grid-column: 3; margin: 0; }
.tune { margin-top: 14px; }
.tune-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; text-align: left; background: var(--pow); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s; }
.tune-row:hover { border-color: var(--ink); }
.tune-k { flex: none; font: 800 16px 'Bricolage Grotesque', sans-serif; }
.tune-v { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; min-width: 0; }
.tune-v span { padding: 1px 9px; font-size: 13px; color: #3a342e; white-space: nowrap; background: var(--side); border-radius: 999px; }
.tune-go { flex: none; font-weight: 700; } .tune-go::after { content: ' ▾'; } .tune-row[aria-expanded="true"] .tune-go::after { content: ' ▴'; }
.tune-panel { margin-top: 8px; padding: 4px 18px 18px; animation: appears .25s var(--ease); }
.tune-panel .private-choice { background: var(--background); }
.new-story .go-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.new-story #quote-new { flex: 1 1 240px; }
.cost-one { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; text-align: left; }
.cost-one span { font-size: 14px; color: var(--gray); }
.cost-one b { font: 800 24px/1.1 'Bricolage Grotesque', sans-serif; letter-spacing: -.01em; }
.cost-one .cost-more { font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.cost-one .cost-more::after { content: ' ▾'; } .cost-one[aria-expanded="true"] .cost-more::after { content: ' ▴'; }
.new-story #next { min-height: 50px; padding: 0 26px; font-size: 16px; }
#quote-details .quote-card { margin-top: 12px; background: var(--pow); animation: appears .25s var(--ease); }
.new-main > .pod.small { margin-top: 10px; font-size: 13px; }
.module-line .link-btn { font-weight: 600; }
.new-stage { position: sticky; top: 88px; }
.new-stage > .pod { margin-top: 12px; text-align: center; }
.ghost-stage { padding: 14px; background: var(--ink); border-radius: 22px; box-shadow: 0 2px 4px rgba(26, 23, 20, .05), 0 24px 60px -24px rgba(26, 23, 20, .35); }
.ghost-frame { display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 16 / 9; padding: 28px; overflow: hidden; color: var(--background); background: radial-gradient(120% 90% at 80% 110%, #3a2a20 0%, #1a1714 60%); border-radius: 12px; }
.ghost-kicker { font: 500 12px 'IBM Plex Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: #f39a7d; }
.ghost-frame h2 { max-height: 3.4em; margin-top: 10px; overflow: hidden; font-size: 30px; line-height: 1.1; color: #fff; }
.ghost-frame h2.placeholder { color: #6f675d; }
.ghost-tl { display: flex; gap: 6px; margin-top: 12px; } .ghost-tl i { height: 40px; background: #2a2521; border-radius: 7px; }
@media (max-width: 1100px) {
  .new-story { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .new-stage { position: static; order: -1; }
  .ghost-frame { aspect-ratio: auto; min-height: 120px; padding: 18px; } .ghost-frame h2 { font-size: 22px; }
  .ghost-tl i { height: 14px; } .new-stage > .pod { display: none; }
}
@media (max-width: 640px) {
  .new-main > h1 { font-size: 32px; }
  .new-story #topic { font-size: 18px; }
  .tune-row { flex-wrap: wrap; } .tune-v { order: 3; flex-basis: 100%; }
  .new-story #next { width: 100%; }
  .new-story .zone.short { grid-template-columns: 1fr; } .new-story .zone.short .folder-btn { grid-row: auto; grid-column: auto; justify-self: start; }
}

/* ---------- Studio (ADR 0066), stage 4: no sidebar; the top bar holds the logo, recent stories, credits and the account menu ---------- */
.top { padding: 0 24px; gap: 10px 16px; }
.top > .logo { flex: none; padding: 0; font-size: 18px; }
.top > .logo b { margin-left: 0; }
.okruszki { display: flex; align-items: center; gap: 4px; flex: 1 1 180px; min-width: 0; overflow: visible; }
.okruszki #breadcrumb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-wrap { position: relative; display: inline-flex; align-items: center; }
.recent-open { width: 24px; height: 24px; margin-right: 2px; font-size: 11px; color: var(--gray); border-radius: 6px; }
.recent-open:hover, .recent-open[aria-expanded="true"] { color: var(--ink); background: var(--side); }
.menu { position: absolute; z-index: 30; top: calc(100% + 10px); display: grid; gap: 2px; min-width: 260px; max-height: min(70vh, 560px); padding: 8px; overflow-y: auto; animation: appears .18s var(--ease); }
.menu[hidden] { display: none; }
.recent-menu { left: -6px; width: 320px; }
.account-menu { right: 0; }
.menu-label { padding: 6px 10px 2px; font: 500 11.5px 'IBM Plex Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--light); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; font-size: 14.5px; text-align: left; border-radius: 8px; }
.menu a:hover, .menu button:hover, .menu .report.active { background: var(--side); }
.menu .report span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .menu-all { margin-top: 4px; font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.menu-who { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-who b { display: block; } .menu-who small { color: var(--gray); }
.menu .modules-side { display: grid; gap: 2px; margin: 4px 0 0; padding: 4px 0 0; border-top: 1px solid var(--line); }
.menu .modules-side[hidden] { display: none; }
.menu .admin-side { padding: 9px 10px; font-weight: 500; color: inherit; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; margin-top: 4px; font-size: 14px; color: var(--gray); border-top: 1px solid var(--line); }
.menu .menu-row button { display: inline-flex; width: auto; padding: 4px 9px; font-size: 13px; }
.menu .logout { margin: 0; font-size: 14.5px; color: var(--gray); }
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
.top-actions .new-top { min-height: 38px; padding: 0 14px; }
.top .credits-side { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; margin: 0; padding: 0 12px; font: 500 13.5px 'IBM Plex Mono', monospace; white-space: nowrap; background: var(--pow); border: 1px solid var(--line); border-radius: 999px; }
.top .credits-side[hidden] { display: none; }
.top .credits-side i { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f6a284, var(--accent)); }
.top .credits-side .credits-label { color: var(--gray); font-family: 'Figtree', sans-serif; }
.profile-side { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; }
.profile-side .avatar, .menu-who .avatar { width: 36px; height: 36px; font-size: 13px; }
.profile-side:hover .avatar, .profile-side[aria-expanded="true"] .avatar { box-shadow: 0 0 0 3px var(--line-2); }
@media (max-width: 1320px) { .top .steps.acts { order: 5; } .top .bar-step { order: 6; } }
@media (max-width: 900px) {
  .top { position: sticky; top: 0; z-index: 5; padding: 8px 16px; }
  .top .okruszki { order: 4; flex-basis: 100%; }
  .top-actions .new-label, .top .credits-side .credits-label, .top > .logo span { display: none; }
  .top-actions .new-top { width: 38px; padding: 0; font-size: 18px; }
  .recent-menu { width: min(320px, calc(100vw - 32px)); }
}

/* library: cards with the whole 16:9 frame (the frame has its own title, so the story title goes under it), length, language and state;
   the stories waiting for a decision first */
.library-head h1 { font-size: 44px; }
.waiting-section { margin-bottom: 30px; }
.waiting-section h2 { margin-bottom: 12px; } .waiting-section h2 small { font: 500 14px 'Figtree', sans-serif; }
.waiting-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.waiting-card { display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: center; padding: 10px; transition: transform .2s var(--ease); }
.waiting-card:hover { transform: translateY(-2px); }
.waiting-card .image { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #2b2840, #6b4a8a); border-radius: 9px; }
.waiting-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.waiting-text { display: grid; gap: 4px; min-width: 0; } .waiting-text b { font-size: 15.5px; line-height: 1.25; }
.waiting-text small { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent); }
.covers { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 22px; }
.okl.poster { display: flex; flex-direction: column; gap: 12px; overflow: visible; background: none; border: 0; box-shadow: none; }
.okl.poster .image { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s; }
.okl.poster:hover .image { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(26, 23, 20, .05), 0 24px 60px -24px rgba(26, 23, 20, .35); }
.poster-top { position: absolute; z-index: 2; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; }
.poster-tags { display: flex; gap: 6px; }
.poster .tag { padding: 2px 9px; font: 500 12px 'IBM Plex Mono', monospace; color: #fff; background: rgba(20, 18, 16, .7); border-radius: 999px; backdrop-filter: blur(6px); }
.poster-progress { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: block; height: 4px; background: rgba(255, 255, 255, .25); }
.poster-progress i { display: block; height: 100%; background: var(--accent); }
.okl.poster .description { gap: 4px; padding: 0 2px; }
.okl.poster .poster-title { display: -webkit-box; overflow: hidden; font: 800 19px/1.2 'Bricolage Grotesque', sans-serif; letter-spacing: -.01em; color: var(--ink); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.poster-state { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.okl.poster[data-state="waiting"] .poster-state { color: var(--accent); } .okl.poster[data-state="error"] .poster-state { color: var(--red); }
.okl.new { aspect-ratio: 16 / 9; align-self: start; display: grid; place-content: center; justify-items: center; gap: 4px; border-radius: 14px; }
.okl.new .plus { display: grid; place-items: center; width: 52px; height: 52px; font-size: 26px; color: #fff; background: var(--accent); border-radius: 50%; }
.okl.new b { font: 700 18px 'Bricolage Grotesque', sans-serif; color: var(--ink); }
@media (max-width: 640px) {
  .library-head h1 { font-size: 32px; }
  .covers { grid-template-columns: 1fr; gap: 22px; }
  .okl.poster .poster-title { font-size: 18px; }
  .waiting-row { grid-template-columns: 1fr; } .waiting-card { grid-template-columns: 104px 1fr; }
}
.recent-menu #reports-side { display: grid; gap: 2px; } /* the old phone rule hid the sidebar list */
.poster .tag.tag-module { background: var(--accent); } /* a film made in a partner module (ADR 0051), e.g. Karting */
.segment.disabled { opacity: .55; cursor: not-allowed; } /* was the Polish "wylaczony" until 2026-11-23, so it never showed */
/* contrast on cream (checked 2026-11-23 when the finished film left the dark surround): small grey text on cards and the step chips of the open act */
.film-details .panel-lista small, .film .share .pod { color: var(--gray); }
.film .share-note { color: #6b4a00; }
.steps.acts .act.now .act-steps li.current { color: #b23e1c; } .steps.acts .act.now .act-steps li.done { color: #17734b; }

/* ---------- the top bar fits one row from about 1100 px, also with the credit chip and a long title (INT, 2026-11-23) ----------
   the path truncates first, then the names of the other acts collapse to numbers, then "New story" to "＋"; only below 1100 px
   the acts take their own row */
.top > .logo, .top #steps, .top-actions { flex: none; }
.okruszki { flex: 1 1 0; min-width: 60px; }
.top .credits-side .credits-label { display: none; }
@media (max-width: 1320px) { .top .steps.acts, .top .bar-step { order: 0; } .top .steps.acts { flex-basis: auto; } }
@media (max-width: 1599px) { .steps.acts .act:not(.now) .act-name { display: none; } .steps.acts .act:not(.now) { padding-right: 8px; } }
@media (max-width: 1439px) { .top-actions .new-label { display: none; } .top-actions .new-top { width: 38px; padding: 0; font-size: 18px; } }
@media (max-width: 1099px) { .top .steps.acts { order: 5; } .top .bar-step { order: 6; } }

/* ---------- interaction system (ADR 0066, 2026-11-23): one set of durations, easing and states for everything clickable ----------
   Owner after using INT: "when hovering nothing reacts or happens, elements are not moving/signaling readiness". Every clickable
   element gets a visible hover (fill, lift or shadow), a pressed state, the focus ring, a disabled look and a busy look, in 120-200 ms. */
:root {
  --t-fast: 120ms; --t: 180ms; --t-slow: 260ms; --ease-out: cubic-bezier(.2, .7, .2, 1);
  --hover-fill: #ece3d4; --lift: 0 2px 4px rgba(26, 23, 20, .06), 0 16px 32px -16px rgba(26, 23, 20, .38);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);
}
.btn, .choice button, .segment button, .bookmarks button, .examples button, .panel-language button, .act, .act-steps li, .menu a, .menu button,
.profile-side, .recent-open, .link-btn, .icon-btn, .remove-el, .tl-pen, .tl-pick, .okl, .okl .image, .waiting-card, .variant-card, .voice, .style,
.template-card, .music-direction, .profile-card, .zone, .tune-row, .cost-one, .bar-cost, .panel-lista > a, .panel-lista > button, .report,
.choice-sources, .r-add, .question .create, .assumptions-choice button, .voice-listen, .variant-motion, .credits-side, .logo, summary, .fact-edit {
  transition: background-color var(--t) var(--ease-out), color var(--t) var(--ease-out), border-color var(--t) var(--ease-out),
    box-shadow var(--t) var(--ease-out), transform var(--t) var(--ease-out), opacity var(--t) var(--ease-out), outline-color var(--t) var(--ease-out);
}
:focus-visible { outline: none; box-shadow: var(--ring); }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: none; box-shadow: var(--ring); }

/* hover: a fill, a lift or a shadow, never only a border tint; only where a pointer can hover (a tapped card on a phone does not stay lifted) */
@media (hover: hover) {
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn.second:hover:not(:disabled) { background: #fff; box-shadow: var(--lift); }
.btn.accent:hover:not(:disabled), .btn.main:hover:not(:disabled) { box-shadow: 0 10px 24px -10px rgba(26, 23, 20, .45); }
.btn.cichy:hover:not(:disabled) { background: var(--hover-fill); }
.choice button:hover:not(.selected):not(:disabled), .examples button:hover { background: #fff; border-color: var(--ink); color: var(--ink); transform: translateY(-1px); box-shadow: 0 6px 14px -10px rgba(26, 23, 20, .5); }
.examples button:hover { border-style: solid; }
.segment button:hover:not(.selected), .bookmarks button:hover:not(.selected), .panel-language button:hover:not(.selected) { color: var(--ink); background: rgba(255, 250, 241, .7); }
.steps.acts .act:not(.now):hover { background: rgba(255, 250, 241, .75); color: var(--ink); }
.steps.acts .act.now .act-steps li.available:hover { background: var(--hover-fill); color: var(--ink); }
.menu a:hover, .menu button:hover { background: var(--hover-fill); }
.profile-side:hover { transform: scale(1.06); } .recent-open:hover { background: var(--hover-fill); }
.credits-side:hover { background: #fff; box-shadow: var(--lift); }
.logo:hover img { transform: rotate(-6deg); } .logo img { transition: transform var(--t) var(--ease-out); }
.link-btn:hover { color: #b23e1c; text-decoration-thickness: 2px; }
.icon-btn:hover, .fact-edit:hover { background: var(--hover-fill); color: var(--ink); }
.remove-el:hover { color: #b42318; background: #fdece6; border-radius: 6px; }
.tl-pen:hover { transform: scale(1.1); box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.tl-pick:hover { transform: translateY(-2px); }
.panel-lista > a:hover, .panel-lista > button:hover, .report:hover { background: var(--hover-fill); }
.tune-row:hover { background: #fff; box-shadow: var(--lift); }
.cost-one:hover .cost-more { color: var(--ink); text-decoration-color: var(--ink); }
.bar-cost:hover { background: var(--hover-fill); }
.zone:hover { box-shadow: var(--lift); }
summary:hover { color: var(--ink); }
.choice-sources:hover, .r-add:hover, .question .create:hover { color: var(--ink); background: var(--hover-fill); }
.assumptions-choice button:hover { color: var(--ink); }
.voice-listen:hover, .variant-motion:hover { transform: scale(1.08); }

/* cards lift with a shadow; a library card shows an open/play sign over its frame */
.okl:hover .image, .okl.new:hover, .waiting-card:hover, .variant-card:hover, .voice:hover, .style:hover, .template-card:hover, .music-direction:hover, .profile-card:hover { transform: translateY(-3px); box-shadow: var(--lift); }
.okl.new:hover { border-color: var(--accent); background: var(--pow); }
.okl.new:hover .plus { transform: scale(1.08); } .okl.new .plus { transition: transform var(--t) var(--ease-out); }
.okl.poster .image::after { content: '→'; position: absolute; z-index: 3; top: 50%; left: 50%; display: grid; place-items: center; width: 58px; height: 58px; margin: -29px 0 0 -29px; font-size: 22px; font-weight: 700; color: var(--ink); background: rgba(255, 250, 241, .94); border-radius: 50%; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); opacity: 0; transform: scale(.85); transition: opacity var(--t) var(--ease-out), transform var(--t) var(--ease-out); }
.okl.poster[data-state="ready"] .image::after { content: '▶'; padding-left: 4px; font-size: 20px; }
.okl.poster:hover .image::after, .okl.poster:focus-visible .image::after { opacity: 1; transform: scale(1); }

}
/* pressed */
.btn:active:not(:disabled), .choice button:active, .segment button:active, .bookmarks button:active, .examples button:active, .panel-language button:active,
.act:active, .act-steps li.available:active, .menu a:active, .menu button:active, .icon-btn:active, .remove-el:active, .tl-pen:active, .profile-side:active,
.recent-open:active, .tune-row:active, .cost-one:active, .zone:active, .panel-lista > a:active, .panel-lista > button:active, .report:active, .credits-side:active,
.choice-sources:active, .r-add:active, .question .create:active, .voice-listen:active, .variant-motion:active, .fact-edit:active { transform: scale(.96); }
.okl:active .image, .okl.new:active, .waiting-card:active, .variant-card:active, .voice:active, .style:active, .template-card:active, .music-direction:active, .profile-card:active, .tl-pick:active { transform: translateY(-1px) scale(.985); }

/* disabled and busy: a disabled control looks inactive; a control waiting for the server shows a spinner and stays put */
button:disabled, .btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn.waiting, .btn.busy { opacity: .85; cursor: progress; pointer-events: none; }
.btn.waiting::before, .btn.busy::before { content: ''; flex: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rotation .7s linear infinite; }
button.busy:not(.btn), button.waiting:not(.btn), a.busy:not(.btn) { opacity: .6; cursor: progress; pointer-events: none; }

/* readiness: the main button of the new story wakes up with a one-time cue; the dark stage reacts while the topic is typed */
@keyframes ready-cue { 0% { transform: scale(.96); box-shadow: 0 0 0 0 rgba(228, 87, 46, .55); } 55% { transform: scale(1.04); box-shadow: 0 0 0 12px rgba(228, 87, 46, 0); } 100% { transform: none; box-shadow: 0 6px 18px -8px rgba(228, 87, 46, .8); } }
.btn.ready-cue { animation: ready-cue .6s var(--ease-out) 1; }
.ghost-stage { transition: box-shadow var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.ghost-stage.typing { transform: translateY(-2px); box-shadow: 0 0 0 3px rgba(228, 87, 46, .35), 0 24px 60px -24px rgba(26, 23, 20, .45); }
.ghost-frame h2 { transition: color var(--t-slow) var(--ease-out); }
.ghost-tl i { transition: background-color var(--t-slow) var(--ease-out); }
.ghost-stage.has-topic .ghost-tl i { background: #43302a; }
.ghost-stage.typing .ghost-tl i:nth-child(odd) { background: #5a3a2c; }

/* the acts: the step that waits for the user carries a dot, the step the agent works on a small spinner */
.steps.acts .act-steps li.current.yours span::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 6px; vertical-align: 1px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 3px var(--accent-t); }
.steps.acts .act-steps li.current.working span::after { content: ''; display: inline-block; width: 9px; height: 9px; margin-left: 6px; vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rotation .8s linear infinite; }

/* motion between states: a new screen fades in (CSS fallback of View Transitions), new list items enter briefly; a loading order shows a skeleton */
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#view.screen-enter > * { animation: screen-in .22s var(--ease-out) backwards; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
.materials-lista > li, .tl-ch, .grid > .frame, .waiting-card, .okl.poster, .variant-card, .music-direction, .template-card, .plan-lista .row, .question { animation: appears .24s var(--ease-out) backwards; }
.order-loading { display: grid; gap: 14px; max-width: 980px; }
.order-loading .skeleton { display: block; } .order-loading .stage-skeleton { aspect-ratio: 16 / 9; height: auto; border-radius: 16px; }
/* rows that are labels with a switch, collapsible headings and the cost number also react; entrance animations never hold a transform */
.private-choice, .music-choice, .sources-choice { transition: background-color var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out); border-radius: 10px; cursor: pointer; }
@media (hover: hover) { .private-choice:hover, .music-choice:hover, .sources-choice:hover { background: #fff; box-shadow: var(--lift); } }
.private-choice:active, .music-choice:active, .sources-choice:active, .screen details > summary:active, .bar-cost:active { transform: scale(.98); }
.private-choice, .music-choice, .sources-choice, .bar-cost { transition: background-color var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.screen details:not(.dbg details) > summary { border-radius: 8px; } .screen details:not(.dbg details) > summary:hover { background: var(--hover-fill); }
.cost-one { margin: -4px -8px; padding: 4px 8px; border-radius: 10px; } .cost-one:hover { background: var(--hover-fill); }

/* ---------- Studio order screens (ADR 0066 stages 5–6): title, dark stage, chapter timeline, document; one side panel ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; max-width: 1500px; }
.studio-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.studio-top .kicker { margin: 0 0 6px; font: 600 12px/1.2 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.studio-top .film-top { margin: 0; } .studio-top .film-top h1 { font-size: 30px; }
.studio-stage { overflow: hidden; }
.studio-stage .show { border-radius: 12px; }
.stage-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; cursor: zoom-in; background: #000; }
.stage-title { display: grid; align-content: center; gap: 10px; aspect-ratio: 16 / 9; padding: 6% 8%; color: #f5efe4; border-radius: 12px; background: radial-gradient(120% 90% at 85% 10%, #3a2c22 0%, #1a1714 60%); }
.stage-title .kicker { margin: 0; font: 600 13px/1.2 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: #f0a184; }
.stage-title h2 { max-width: 22ch; font-size: clamp(26px, 3.4vw, 48px); line-height: 1.08; color: #fffaf1; overflow-wrap: anywhere; }
.stage-title p { margin: 0; font-size: 16px; color: #cfc6b8; } .stage-title .mole { border-color: rgba(255, 250, 241, .2); border-top-color: var(--accent); }
.studio-stage.compact .stage-title { aspect-ratio: auto; min-height: 170px; padding: 28px 32px; }
.studio-stage.compact .stage-title h2 { font-size: clamp(24px, 2.6vw, 36px); max-width: 30ch; }
.stage-badge { position: absolute; top: 26px; left: 26px; z-index: 1; padding: 4px 10px; font: 600 12px/1.3 'IBM Plex Mono', monospace; color: #fff; background: rgba(26, 23, 20, .72); border-radius: 999px; }
.stage-badge.live { background: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .stage-badge.live { animation: live-pulse 1.8s var(--ease-out) infinite; } }
@keyframes live-pulse { 50% { opacity: .55; } }
.stage-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 10px 4px 0; font-size: 13px; color: #cfc6b8; }
.stage-caption span:last-child { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #a39a8d; }
.studio-stage .sterowanie-report { margin: 10px 0 0; justify-content: center; }
.studio-stage .sterowanie-report .btn.second { color: #f5efe4; background: rgba(255, 250, 241, .08); border-color: rgba(255, 250, 241, .18); }
.studio-stage .sterowanie-report .btn.second:hover { background: rgba(255, 250, 241, .16); }
.studio-stage .sterowanie-report .btn.cichy { color: #cfc6b8; } .studio-stage .sterowanie-report span { color: #cfc6b8; font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
/* timeline states while the story is made */
.studio-chapters .tl-slot { height: 76px; }
.tl-slot.done { color: var(--ok); background: var(--ok-t); font-weight: 600; }
.tl-slot.working { gap: 6px; color: var(--accent); font-weight: 600; background: linear-gradient(100deg, var(--accent-t) 30%, #fff4ee 50%, var(--accent-t) 70%) 0 0 / 300% 100%; }
@media (prefers-reduced-motion: no-preference) { .tl-slot.working { animation: shimmer 1.6s linear infinite; } }
@keyframes shimmer { to { background-position: -300% 0; } }
.tl-slot.working .mole { width: 14px; height: 14px; }
.tl-ch.waiting .tl-slot { background: transparent; border: 1px dashed var(--line-2); }
.tl-ch.waiting .tl-t { color: var(--light); }
.tl-ch.changed .tl-pick img, .tl-ch.changed .tl-slot { outline-color: var(--yellow); }
.tl-ch.sample .tl-slot { color: var(--accent); background: var(--accent-t); font-weight: 600; }
.tl-ch .tl-note { position: absolute; top: 14px; left: 6px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; font: 700 11px/1 'IBM Plex Mono', monospace; color: #fff; background: var(--yellow); border-radius: 999px; }
.studio-chapters .tl-pick { cursor: pointer; }
/* the document under the timeline: the screen's own content */
.studio-doc { display: grid; gap: 16px; min-width: 0; }
.studio-doc > * { margin: 0; }
.studio-doc > h3 { margin: 6px 0 -6px; }
.progress-box { display: grid; gap: 12px; padding: 18px 20px; background: var(--pow); border: 1px solid var(--line); border-radius: var(--r); }
.progress-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; }
.progress-top h2 { font-size: 20px; } .progress-top .eta { font: 600 14px/1.3 'IBM Plex Mono', monospace; color: var(--accent); }
.studio-stages { grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; }
.studio-stages .stage.you b { color: var(--yellow); }
.progress-box .honest { margin: 0; font-size: 13px; color: var(--gray); }
/* the side panel: the decision of the moment */
.studio-side { position: sticky; top: 124px; display: grid; gap: 0; align-content: start; max-height: calc(100vh - 140px); overflow: auto; overscroll-behavior: contain; background: var(--pow); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); scrollbar-width: thin; }
.studio-side > * { min-width: 0; padding: 18px 20px; margin: 0; }
.studio-side > * + * { border-top: 1px solid var(--line); }
.studio-side .side-head { display: grid; gap: 8px; }
.studio-side .side-head h2 { font-size: 21px; line-height: 1.2; }
.studio-side .side-head p { margin: 0; }
.studio-side .side-section { display: grid; gap: 10px; }
.studio-side .side-section > * { margin: 0; }
.studio-side h3 { font-size: 15px; }
.studio-side .btn.wide { width: 100%; white-space: normal; text-align: center; padding-block: 8px; }
.studio-side .log { max-height: 260px; }
.studio-side details.side-more > summary { font-weight: 600; }
.studio-side details.side-more[open] > summary { margin-bottom: 12px; }
/* the screen's main button lives in the fixed bar (ADR 0040): its section in the panel joins the heading above, or disappears when empty */
.studio-side .side-section:has(> .btn.in-bar:first-child) { border-top: 0; padding-top: 0; margin-top: -6px; }
.studio-side .side-section:has(> .btn.in-bar:only-child) { display: none; }
.studio-side details.side-more > :not(summary) + :not(summary) { margin-top: 12px; }
.btn.stop { color: var(--red); background: var(--pow); border: 1px solid #f0c8bd; }
.btn.stop:hover { background: #fdece6; border-color: var(--red); }
.btn.stop small { font-weight: 500; opacity: .8; }
.spent { display: grid; gap: 6px; } .spent p { margin: 0; } .spent .spent-n { font-size: 26px; font-weight: 700; }
.spent-bar { height: 8px; overflow: hidden; background: var(--side); border-radius: 999px; }
.spent-bar i { display: block; height: 100%; background: var(--ink); border-radius: inherit; transition: width var(--t-slow) var(--ease-out); }
@media (max-width: 1180px) { .studio { grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; } }
@media (max-width: 900px) {
  .studio { grid-template-columns: minmax(0, 1fr); }
  .studio-side { position: static; max-height: none; overflow: visible; }
  .studio-stages { grid-template-columns: repeat(6, minmax(64px, 1fr)); overflow-x: auto; }
}
@media (max-width: 640px) {
  .studio-top .film-top h1 { font-size: 24px; }
  .studio-stage { margin: 0 -16px; padding: 8px; border-radius: 0; }
  .studio-stage .show, .stage-img, .stage-title { border-radius: 6px; }
  .stage-badge { top: 16px; left: 16px; }
  .studio-stage.compact .stage-title { min-height: 140px; padding: 20px; }
}
/* the stage leaves room for the timeline above the fold: at most the window height minus the title, bar and timeline */
.studio-main > .studio-stage:not(.compact) { width: min(100%, calc((100vh - 330px) * 16 / 9 + 28px)); min-width: min(100%, 560px); margin-inline: auto; }
.stage-title.with-photo { background: linear-gradient(90deg, rgba(26, 23, 20, .92) 0%, rgba(26, 23, 20, .7) 55%, rgba(26, 23, 20, .35) 100%), var(--photo) center / cover; }
.studio-side .materials-block { display: grid; gap: 8px; } .studio-side .materials-block > * { margin: 0; }
.studio-side .materials-lista { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.studio-side .options-orders { margin: 0; }
.studio-side .assumptions { margin: 0; }
.studio-side .direction h3 { margin-bottom: 6px; }
.studio-side .gate { background: none; border: 0; }
.studio-side .error-card { background: none; border: 0; box-shadow: none; }
.studio-side .error-card pre { margin: 0; max-height: 220px; overflow: auto; white-space: pre-wrap; font-size: 12.5px; }
.studio-doc .changes-plan { margin: 0; }
.notes-card ul { margin: 6px 0 0; }
.studio-side .sources-choice { margin: 0; }
.studio-side .gate { display: grid; gap: 8px; }
.stage-title h2.topic, .studio-stage.compact .stage-title h2.topic { max-width: 46ch; font-size: clamp(20px, 1.9vw, 28px); font-weight: 600; line-height: 1.3; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.stage-title .working-mark { display: inline-flex; align-items: center; gap: 8px; }
.timeline .tl-pick img { width: auto; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.studio-main > .studio-stage.small { width: min(100%, 600px); min-width: 0; }
@media (max-width: 640px) { .studio-main > .studio-stage:not(.compact), .studio-main > .studio-stage.small { width: auto; min-width: 0; } }
.tl-slot.working { display: flex; align-items: center; justify-content: center; text-align: center; }

/* in-page questions (ask.js): a card by the button that asked, instead of the browser's confirm/alert/prompt */
.ask-veil { position: fixed; inset: 0; z-index: 30; background: rgba(26, 23, 20, .12); }
.ask { position: fixed; z-index: 31; display: grid; gap: 12px; padding: 16px 18px; background: var(--pow); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--lift); }
.ask.danger { border-color: #f0c8bd; }
.ask-text { margin: 0; font-size: 14.5px; line-height: 1.45; white-space: pre-line; color: var(--ink); }
.ask-input { width: 100%; height: 40px; padding: 0 12px; }
.ask-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ask-buttons .btn { min-height: 38px; }
.btn.danger { color: #fff; background: var(--red); border-color: var(--red); }
.btn.danger:hover { background: #a93a22; }
.ask.sheet { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 900px) { .ask.sheet { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: no-preference) { .ask { animation: ask-in var(--t) var(--ease-out); } }
@keyframes ask-in { from { opacity: 0; transform: translateY(4px); } }
.stage-badge.preview { color: #1a1714; background: #fffaf1; }
/* the Debug link next to the story title stays whole; the title is shortened instead */
.okruszki #breadcrumb { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.okruszki #breadcrumb b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.okruszki #breadcrumb .debug-link { flex: none; }
@media (max-width: 900px) { .bar-next { white-space: normal; line-height: 1.25; padding-block: 8px; height: auto; min-height: 44px; } } /* a long paid-step label wraps instead of running out of the button */

/* ---------- account screens in the Studio look (2026-11-24): sign-in, profiles, credits, administration, debug ----------
   The same kicker over the title as the order screens, pill controls, tables as cards with a mono header, and on a phone
   one card per row instead of a table to scroll sideways. Nothing here changes what the screens do. */
.page-top .kicker { margin: 0 0 6px; font: 600 12px/1.2 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.heading.page-top { display: block; }
.page-top h1 { margin: 0; }
.login form { max-width: 380px; padding: 32px 28px 26px; border-radius: 22px; }
.login input { height: 44px; padding: 0 14px; border-radius: 12px; }
.login .btn { min-height: 44px; }
.profile-actions { gap: 6px; }
.profile-actions button { min-height: 30px; padding: 0 12px; font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: none; background: var(--pow); border: 1px solid var(--line-2); border-radius: 999px;
  transition: background-color var(--t) var(--ease-out), border-color var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.profile-actions button[data-remove] { color: var(--red); }
.profile-actions button:active { transform: scale(.96); }
.new-profile input { height: 40px; border-radius: 10px; }
.table-credits table { border: 1px solid var(--line); border-collapse: separate; border-spacing: 0; border-radius: var(--r); box-shadow: var(--shadow); }
.table-credits th { font: 600 11px/1.3 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--light); }
.table-credits th, .table-credits td { padding: 10px 12px; }
.table-credits tbody tr:last-child > td { border-bottom: 0; }
.table-credits tbody td { transition: background-color var(--t) var(--ease-out); }
.admin-bar { flex-wrap: wrap; }
.admin-bar input { flex: 1 1 220px; max-width: 360px; height: 40px; padding: 0 16px; border-radius: 999px; }
.admin-bar .pod { white-space: nowrap; }
.admin-table .open-cell { text-align: right; } .admin-table .open-cell .btn { min-height: 34px; padding: 0 14px; font-size: 13px; }
.admin-details .quick .btn { min-height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; }
.dbg-card { border-radius: var(--r); box-shadow: var(--shadow); }
.dbg-tabs { padding: 4px; border-radius: 14px; box-shadow: var(--shadow); }
.dbg-tabs button { min-height: 32px; border-radius: 9px; transition: background-color var(--t) var(--ease-out), color var(--t) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.dbg-tabs button:active { transform: scale(.96); }
@media (hover: hover) {
  .profile-actions button:hover { background: #fff; border-color: var(--ink); box-shadow: var(--lift); }
  .profile-actions button[data-remove]:hover { border-color: var(--red); background: #fdece6; }
  .table-credits tbody tr:hover > td { background: #fff; }
  .dbg-tabs button:hover:not(.selected) { color: var(--ink); background: var(--hover-fill); }
}
/* a phone: one card per row, each value with its column name */
@media (max-width: 760px) {
  .table-stack table, .table-stack tbody, .table-stack tr, .table-stack td { display: block; }
  .table-stack thead { display: none; }
  .table-stack tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack tbody td { padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
  .table-stack td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font: 600 10.5px/1.3 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--light); }
  .table-stack td.number { white-space: normal; }
  .table-stack .who { min-width: 0; }
  .admin-table tr[data-account] > td:first-child, .admin-table tr[data-account] > td.open-cell, .admin-table td.modules-cell, .table-stack td:last-child:nth-child(4) { grid-column: 1 / -1; }
  .admin-table .open-cell { text-align: left; }
  .pools-table td.pool-name, .pools-table td.pool-actions { grid-column: 1 / -1; } .pools-table tbody tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pools-table .pool-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .admin-table tr.details { display: block; padding: 0 16px 16px; }
  .admin-table tr.details > td { display: block; padding: 0; }
}

/* "waking the server" (connection.js): the first request after a long quiet spell waits for the API container; a status pill on top */
.waking { position: fixed; z-index: 60; top: max(12px, env(safe-area-inset-top)); left: 50%; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 10px 16px 10px 12px;
  color: var(--ink); background: var(--pow); border: 1px solid var(--line-2); border-radius: 999px; box-shadow: var(--lift); transform: translateX(-50%); animation: waking-in .2s var(--ease-out, ease); }
@keyframes waking-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.waking span:last-child { display: grid; line-height: 1.25; } .waking b { font-weight: 700; } .waking small { font-size: 12.5px; color: var(--gray); }
.waking .mole { flex: none; width: 18px; height: 18px; }

/* administration: limits (2026-11-24): one row per setting with its value, default, range, who changed it, and Change */
.admin-limits { margin-top: 28px; } .admin-limits h2 { margin: 0 0 4px; }
.limit-list { display: grid; padding: 4px 0; }
.limit-row { display: grid; grid-template-columns: minmax(0, 1.6fr) auto minmax(0, 1.2fr) auto; align-items: center; gap: 8px 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.limit-row:last-child { border-bottom: 0; }
.limit-name { display: grid; gap: 2px; } .limit-name small { color: var(--light); font-size: 12.5px; }
.limit-value { display: flex; align-items: center; gap: 8px; } .limit-value b { font: 700 22px/1 'Bricolage Grotesque', sans-serif; }
.limit-who { font-size: 12.5px; }
.limit-row .btn { min-height: 34px; padding: 0 14px; font-size: 13px; }
.jobs-cell { white-space: nowrap; } .jobs-cell .small-pill { min-height: 28px; margin-left: 8px; padding: 0 10px; font-size: 12px; }
@media (max-width: 760px) { .limit-row { grid-template-columns: minmax(0, 1fr) auto; } .limit-who { grid-column: 1 / -1; order: 3; } .limit-row .btn { justify-self: start; } }
.ask-error { margin: 0 0 8px; padding: 8px 10px; color: var(--red); font-weight: 600; background: #fdece6; border-radius: 10px; }

/* a ready chapter that is not on the assembled mockup yet (guardStage): a quiet note over the stage instead of slide 1 or black */
.studio-stage.assembling { position: relative; }
.studio-stage.assembling .stage-show { visibility: hidden; }
.studio-stage.assembling::after { content: attr(data-wait); position: absolute; inset: 14px 14px auto; display: grid; place-items: center; aspect-ratio: 16 / 9; color: #cfc6b8; font: 600 15px/1.4 'Figtree', sans-serif; background: radial-gradient(120% 90% at 85% 10%, #3a2c22 0%, #1a1714 60%); border-radius: 12px; }
/* the live badge would cover the slide's title on a phone; the caption under the stage already says the chapter is live */
@media (max-width: 640px) { .studio-stage .stage-badge.live { display: none; } }

/* ---------- wide screens (owner, 2026-11-24: "the layout stops early and leaves empty space on the right") ----------
   Every screen takes the width of the window up to 1920 px of content and is centred beyond it; the order screens' stage column
   grows and the side panel keeps a readable width. The stage itself stays capped by the window height (it must fit on screen). */
.screen { width: 100%; max-width: calc(1920px + 72px); margin-inline: auto; }
.studio, .film { max-width: none; }
.new-story { max-width: 1600px; }
@media (min-width: 1181px) {
  .studio, .film { grid-template-columns: minmax(0, 1fr) clamp(360px, 22vw, 440px); gap: clamp(28px, 2.2vw, 44px); }
}
/* "Uwagi automatycznego testu" (owner: no inner margins, flush against the card above): the padding and spacing of its neighbours */
.notes-card { padding: 16px 20px; margin-top: 16px; } .notes-card .notes-quality { font-size: 13px; line-height: 1.5; }

/* questions (owner, 2026-11-24): a question says whether it takes one answer or several and looks like it; a chip changes at once */
.question-kind { margin: -4px 0 8px; font: 600 11.5px/1.3 'IBM Plex Mono', monospace; letter-spacing: .04em; text-transform: uppercase; color: var(--light); }
.choice button { transition-duration: 90ms; }
.choice.single button { display: inline-flex; align-items: center; gap: 8px; }
.choice.single button::before { content: ''; flex: none; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; opacity: .55; }
.choice.single button.selected::before { opacity: 1; background: radial-gradient(circle, currentColor 0 3px, transparent 3.5px); }
.choice.multi button { display: inline-flex; align-items: center; gap: 8px; }
.choice.multi button::before { content: ''; flex: none; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 3px; opacity: .55; }
.choice.multi button.selected::before { content: '✓'; display: grid; place-items: center; font: 700 10px/1 'Figtree', sans-serif; opacity: 1; }

/* materials (owner, 2026-11-24): fields grow with their text up to 5 lines, then scroll; a photo that did not load says so */
textarea.grows { resize: none; overflow-y: hidden; }
.image-foundation img { background: var(--side); }
.image-foundation.broken img { visibility: hidden; }
.image-foundation.broken::before { content: '⚠ ' attr(data-broken); position: absolute; inset: 0 0 auto; display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 10px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--gray); background: repeating-linear-gradient(135deg, var(--side) 0 10px, var(--background) 10px 20px); }
.image-foundation figcaption textarea, .abstract-list textarea, .fact-text { line-height: 1.45; }

/* waiting (owner, 2026-11-24): one component for every long operation */
.wait-box { display: grid; gap: 8px; }
.wait-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wait-what { display: inline-flex; align-items: center; gap: 8px; font: 700 15px/1.3 'Bricolage Grotesque', sans-serif; }
.wait-pct { font: 600 13px 'IBM Plex Mono', monospace; color: var(--accent); }
.wait-bar { position: relative; height: 8px; overflow: hidden; background: var(--side); border-radius: 999px; }
.wait-bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 999px; transition: width .6s var(--ease-out); }
.wait-bar.indeterminate i { width: 35%; animation: wait-slide 1.6s var(--ease-out) infinite; }
@keyframes wait-slide { from { left: -35%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .wait-bar.indeterminate i { animation: none; left: 0; width: 100%; opacity: .35; } }
.wait-times { margin: 0; font-size: 13px; color: var(--gray); font-variant-numeric: tabular-nums; }
.wait-box.late .wait-left { color: var(--yellow); font-weight: 600; }
.wait-note { margin: 0; font-size: 12.5px; color: var(--gray); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wait-how { margin: 0; font-size: 12.5px; color: var(--light); }
.progress-box .wait-box { margin-bottom: 12px; }
.poster-progress.indeterminate i { position: absolute; width: 35%; animation: wait-slide 1.6s var(--ease-out) infinite; }
.poster-progress { position: absolute; overflow: hidden; }
.poster-wait { display: inline; color: var(--light); font-size: 12px; } .poster-wait .wait-elapsed::before { content: '· '; }

/* paid service switches in Limits (ADR 0072) */
.limits-sub { margin: 18px 0 8px; font: 600 12px/1.2 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--light); }
.badge.service-on { color: var(--ok); background: var(--ok-t); } .badge.service-off { color: var(--red); background: #fdece6; }
.service-row.off .limit-name b { color: var(--red); }

/* chapter phases during generation (owner, 2026-11-24): written, being checked, ready; a finished chapter shows a small live slide */
.tl-pick { position: relative; }
.tl-live { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #1a1714; pointer-events: none; }
.tl-live iframe { position: absolute; top: 0; left: 0; width: 1920px; height: 1080px; border: 0; transform: scale(var(--tl-scale, .1)); transform-origin: 0 0; }
.tl-phase { position: absolute; left: 6px; bottom: 6px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; font: 600 11px/1.4 'Figtree', sans-serif; color: #fff; background: rgba(26, 23, 20, .78); border-radius: 999px; }
.tl-phase .mole { width: 10px; height: 10px; border-width: 1.5px; }
.tl-phase.final { background: var(--ok); } .tl-phase.checking { background: #9a6700; }
.tl-ch.ready .tl-pick { cursor: zoom-in; }

/* look samples side by side (owner, 2026-11-24) */
.samples-strip { display: grid; gap: 10px; }
.samples-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sample-tile { display: grid; gap: 6px; padding: 8px; text-align: left; background: var(--pow); border: 2px solid var(--line); border-radius: var(--r); transition: border-color var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out), transform var(--t) var(--ease-out); }
.sample-tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.sample-tile.chosen { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-t); }
.sample-tile.shown { border-color: var(--ink); }
.sample-tile small { color: var(--gray); font-size: 12px; }
@media (hover: hover) { .sample-tile:hover { transform: translateY(-2px); box-shadow: var(--lift); } }
.samples-actions { display: flex; gap: 8px; }
/* "Kroki slajdu": the step board is a sheet of several frames; it is shown whole (it was cropped to 16:9, two huge slices at 1920 px) */
.frame.slate img { aspect-ratio: auto; height: auto; max-height: 460px; object-fit: contain; background: var(--pow); }
.wait-inline { display: inline; font-size: 13px; color: var(--gray); } .wait-inline .mole { width: 12px; height: 12px; vertical-align: -2px; }
.wait-box.wait-inline.late .wait-left { color: var(--yellow); }

/* the page before the first answer (index.html #boot): the profile chooser's skeleton */
.boot { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; }
.boot .skeleton-title { width: min(420px, 80vw); height: 30px; margin-top: 18px; } .boot .short { width: min(300px, 60vw); }
.boot-cards { display: flex; gap: 18px; margin-top: 30px; } .boot-cards .skeleton { width: 88px; height: 88px; border-radius: 50%; }
