/* ourobo.si - front end. Visual language taken from genreg.tech (slate theme, one blue accent, Inter + JetBrains Mono, thin borders, small radii).
   Flat fills only: no gradients, no glows. Fonts are self-hosted (fonts/). */
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jbmono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --bg: #14171a; --panel: #1b1f23; --panel-2: #22272d; --panel-3: #0f1215;
  --border: #30373e; --border-soft: #23282e;
  --text: #e6edf3; --text-2: #c2ccd6; --muted: #8b959f;
  --accent: #4a9eff; --accent-2: #7c8cf8; --accent-soft: #182638; --accent-line: #2a4a73;
  --green: #3fb950; --red: #f85149; --amber: #d29922;
  --fs-micro: 10px; --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13px; --fs-lg: 15px; --fs-xl: 19px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 22px; --sp-6: 32px;
  --r-sm: 2px; --r-md: 4px; --r-lg: 6px; --r-xl: 10px; --r-pill: 999px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  --topbar-h: 46px; --on-accent: #07121f;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: var(--fs-md); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- top bar ---- */
.topbar { height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 0 var(--sp-4); background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.brand { font-weight: 600; letter-spacing: 1px; color: var(--accent); font-size: var(--fs-md); }
.brand small { color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 8px; font-family: var(--mono); font-size: var(--fs-xs); }
.nav { display: flex; align-items: center; gap: var(--sp-2); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--panel-2); color: var(--text); cursor: pointer; font-size: var(--fs-md); line-height: 1.2; white-space: nowrap; }
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.quiet:hover { color: var(--text); border-color: var(--border-soft); }
.btn.big { padding: 11px 20px; font-size: var(--fs-lg); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- landing ---- */
.lp { max-width: 1180px; margin: 0 auto; padding: var(--sp-5) var(--sp-4) var(--sp-6); }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: clamp(28px, 5vw, 68px); align-items: center; min-height: calc(100vh - var(--topbar-h) - 40px); }
.eyebrow, .num, .pill { font-family: var(--mono); font-size: var(--fs-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(2.3rem, 6.2vw, 5.4rem); font-weight: 600; line-height: .98; margin: 8px 0 var(--sp-4); letter-spacing: -.05em; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.55; color: var(--text-2); margin: 0 0 var(--sp-4); max-width: 56ch; }
.cta { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; margin-top: var(--sp-5); }
.quiet-note { color: var(--muted); font-size: var(--fs-sm); margin-top: var(--sp-3); }
.pill { border: 1px solid var(--accent-line); background: var(--accent-soft); padding: 2px 8px; border-radius: var(--r-pill); }

.demo { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--panel); overflow: hidden; }
.demo-head { display: flex; justify-content: space-between; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4); border-bottom: 1px solid var(--border-soft); background: var(--accent-soft); }
.demo-head h2 { margin: 0; font-size: var(--fs-lg); font-weight: 600; }
.demo-head p { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.demo-body { padding: var(--sp-4); background: var(--panel-3); display: grid; gap: var(--sp-3); }
.step { display: grid; grid-template-columns: 22px 1fr auto; gap: var(--sp-3); align-items: center; border: 1px solid var(--border-soft); border-radius: var(--r-lg); padding: 10px 12px; background: var(--panel); color: var(--text-2); }
.step .dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; font-size: 10px; color: var(--muted); }
.step.done .dot { background: var(--green); border-color: var(--green); color: #06130a; }
.step.now .dot { border-color: var(--accent); color: var(--accent); }
.step .t { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); }
.bar { height: 6px; border-radius: var(--r-pill); background: var(--panel-2); border: 1px solid var(--border-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .6s ease; }
.demo-foot { display: flex; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; padding: 0 var(--sp-4) var(--sp-4); background: var(--panel-3); color: var(--muted); font-size: var(--fs-xs); }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); margin: var(--sp-6) 0; }
.card { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-4); background: var(--panel); }
.card h3 { margin: 6px 0 var(--sp-2); font-size: var(--fs-lg); font-weight: 600; }
.card p { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.55; }
.statement { border: 1px solid var(--border); border-radius: var(--r-xl); padding: clamp(22px, 4vw, 42px); background: var(--panel); }
.statement h3 { margin: 0 0 var(--sp-3); font-size: clamp(1.35rem, 2.4vw, 2rem); line-height: 1.15; letter-spacing: -.02em; }
.statement p { margin: 0 0 var(--sp-4); max-width: 70ch; color: var(--text-2); }
.foot { border-top: 1px solid var(--border-soft); margin-top: var(--sp-6); padding: var(--sp-5) 0 0; display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; justify-content: space-between; color: var(--muted); font-size: var(--fs-sm); }

/* ---- modal ---- */
.overlay { position: fixed; inset: 0; background: rgba(8, 10, 12, .78); display: none; align-items: center; justify-content: center; padding: var(--sp-4); z-index: 50; }
.overlay.open { display: flex; }
.modal { width: min(440px, 100%); border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--panel); padding: var(--sp-5); }
.modal h2 { margin: 0 0 4px; font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.01em; }
.modal .sub { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 var(--sp-4); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; margin-bottom: var(--sp-4); }
.tabs button { background: var(--panel-3); border: 0; padding: 8px; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--text); }
label.f { display: block; font-size: var(--fs-xs); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin: var(--sp-3) 0 4px; font-family: var(--mono); }
input.i, textarea.i { width: 100%; background: var(--panel-3); border: 1px solid var(--border); border-radius: var(--r-md); padding: 9px 11px; color: var(--text); }
input.i:focus, textarea.i:focus { border-color: var(--accent); outline: none; }
.err { color: var(--red); font-size: var(--fs-sm); min-height: 18px; margin-top: var(--sp-2); }
.fine { color: var(--muted); font-size: var(--fs-xs); margin-top: var(--sp-3); }
.x { position: absolute; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; }
.close { background: transparent; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; padding: 2px 6px; }

/* ---- app (signed in) ---- */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.side-top { padding: var(--sp-3) var(--sp-3) var(--sp-2); }
.side-top .brand { display: block; padding: 6px 6px 12px; }
.side h4 { margin: var(--sp-3) var(--sp-4) 6px; font-family: var(--mono); font-size: var(--fs-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.plist { flex: 1; overflow: auto; padding: 0 var(--sp-2); }
.pitem { display: block; width: 100%; text-align: left; background: transparent; border: 0; color: var(--text-2); padding: 8px 10px; border-radius: var(--r-md); cursor: pointer; }
.pitem:hover { background: var(--panel-2); }
.pitem.on { background: var(--accent-soft); color: var(--text); }
.pitem .pt { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pitem .pm { display: block; font-size: var(--fs-xs); color: var(--muted); font-family: var(--mono); }
.empty { color: var(--muted); font-size: var(--fs-sm); padding: 8px 10px; }
.side-foot { border-top: 1px solid var(--border-soft); padding: var(--sp-3) var(--sp-4); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.me { font-size: var(--fs-sm); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.main-top { height: var(--topbar-h); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--sp-4); background: var(--panel); }
.main-top h1 { margin: 0; font-size: var(--fs-md); font-weight: 600; }
.thread { flex: 1; overflow: auto; padding: var(--sp-5) var(--sp-4); }
.thread-in { max-width: 760px; margin: 0 auto; display: grid; gap: var(--sp-4); }
.msg { display: grid; grid-template-columns: 30px 1fr; gap: var(--sp-3); }
.av { width: 30px; height: 30px; border-radius: var(--r-md); display: grid; place-items: center; font-family: var(--mono); font-size: var(--fs-xs); border: 1px solid var(--border); background: var(--panel-2); color: var(--accent); }
.msg.user .av { color: var(--text-2); }
.bubble { color: var(--text-2); }
.bubble b { color: var(--text); font-weight: 600; }
.bubble .file { display: flex; width: fit-content; max-width: 100%; gap: 8px; align-items: center; border: 1px solid var(--border); background: var(--panel); border-radius: var(--r-md); padding: 6px 10px; margin-top: 6px; font-family: var(--mono); font-size: var(--fs-xs); }
.work { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--panel); padding: var(--sp-4); margin-top: 8px; }
.work h5 { margin: 0 0 4px; font-size: var(--fs-lg); font-weight: 600; color: var(--text); }
.work .eta { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--sp-3); font-family: var(--mono); }
.work ul { list-style: none; padding: 0; margin: var(--sp-3) 0 0; display: grid; gap: 6px; }
.work li { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: var(--fs-sm); }
.work li i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--border); display: inline-block; flex: 0 0 auto; }
.work li.done { color: var(--text-2); } .work li.done i { background: var(--green); border-color: var(--green); }
.work li.now { color: var(--text); } .work li.now i { border-color: var(--accent); background: var(--accent-soft); }
.hint { color: var(--muted); font-size: var(--fs-xs); margin-top: var(--sp-3); }
.suggest { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-3); }
.chip { border: 1px solid var(--border); background: var(--panel); color: var(--text-2); border-radius: var(--r-pill); padding: 5px 12px; font-size: var(--fs-sm); cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--text); }

.composer { border-top: 1px solid var(--border); background: var(--panel); padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.composer-in { max-width: 760px; margin: 0 auto; }
.box { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--panel-3); padding: 10px 12px; display: grid; gap: 8px; }
.box:focus-within { border-color: var(--accent); }
.box textarea { width: 100%; resize: none; border: 0; background: transparent; outline: none; min-height: 44px; max-height: 160px; color: var(--text); }
.box-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.attach { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 240px; }
.attached { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-2); max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footnote { text-align: center; color: var(--muted); font-size: var(--fs-xs); margin-top: 8px; }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; min-height: 0; } .grid3 { grid-template-columns: 1fr; } .demo { order: -1; }
  .app { grid-template-columns: 1fr; } .side { display: none; } .side.open { display: flex; position: fixed; inset: 0 auto 0 0; width: 82%; z-index: 40; }
}
@media (min-width: 921px) { .only-narrow { display: none !important; } }

.btn.block { width: 100%; margin-top: 6px; }
.side-top .btn.block { margin-top: 0; }
.row-gap { display: flex; align-items: center; gap: 10px; }

.check { display: flex; gap: 10px; align-items: flex-start; margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); flex: 0 0 auto; }
.footnote.rights { margin-top: 4px; color: var(--text-2); }
.rights-inline { margin: 0; padding-top: 8px; border-top: 1px solid var(--border-soft); color: var(--text-2); font-size: var(--fs-xs); line-height: 1.45; }
.rights-inline b { color: var(--amber); font-weight: 600; }

.doc-wrap { max-width: 820px; margin: 0 auto; padding: var(--sp-6) var(--sp-4) 80px; }
.doc h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 var(--sp-3); }
.doc h2 { font-size: var(--fs-xl); margin: var(--sp-6) 0 var(--sp-2); letter-spacing: -.01em; }
.doc p, .doc li { color: var(--text-2); font-size: var(--fs-lg); line-height: 1.65; }
.doc strong { color: var(--text); font-weight: 600; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: 4px 0; }
.agree { border-top: 1px solid var(--border-soft); padding-top: 8px; }
.agree-h { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--amber); }
.agree-p { margin: 4px 0 0; color: var(--text-2); font-size: var(--fs-xs); }
.agree .check { margin-top: 6px; font-size: var(--fs-xs); }
.agree-note { margin: 6px 0 0; color: var(--muted); font-size: var(--fs-xs); }
.tpl-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); color: var(--muted); font-size: var(--fs-xs); }
.tpl-row .btn { padding: 5px 10px; font-size: var(--fs-sm); }

.devsw { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); cursor: pointer; border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px 10px; }
.devsw input { accent-color: var(--amber); }
.devsw:has(input:checked) { color: var(--amber); border-color: var(--amber); }
.modal.wide { width: min(760px, 100%); }
.vid { width: 100%; max-height: 52vh; background: #000; border-radius: var(--r-lg); border: 1px solid var(--border); display: block; }
.vid-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-3); }
.work .open-video { margin-top: var(--sp-3); }
.tl { max-width: 760px; margin: 0 auto var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--panel-3); padding: var(--sp-3); }
.tl[hidden] { display: none; }
.tl-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.tl-body { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
.tl-video { width: 224px; height: 126px; background: #000; border-radius: var(--r-md); border: 1px solid var(--border); object-fit: contain; }
.tl-read { display: flex; gap: var(--sp-3); align-items: baseline; font-family: var(--mono); font-size: var(--fs-sm); }
.tl-read #tlTime { color: var(--text); font-size: var(--fs-lg); } .tl-read #tlFrame { color: var(--accent); } .tl-fps { color: var(--muted); }
.tl-track { position: relative; margin: 8px 0 4px; height: 26px; }
.tl-track input[type=range] { width: 100%; margin: 0; position: absolute; left: 0; top: 0; height: 26px; accent-color: var(--accent); background: transparent; }
.tl-marks { position: absolute; left: 0; right: 0; top: 18px; height: 8px; pointer-events: none; }
.tl-marks i { position: absolute; top: 0; width: 3px; height: 8px; background: var(--red); border-radius: 1px; transform: translateX(-1px); }
.tl-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tl-btns .btn { padding: 5px 10px; font-size: var(--fs-sm); }
.tl-notes { display: grid; gap: 4px; margin-top: 8px; }
.tl-note { display: flex; gap: 8px; align-items: center; border: 1px solid var(--border-soft); border-radius: var(--r-md); padding: 4px 8px; font-size: var(--fs-xs); background: var(--panel); cursor: pointer; }
.tl-note b { font-family: var(--mono); color: var(--red); font-weight: 400; flex: 0 0 auto; }
.tl-note span { color: var(--text-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-note button { background: transparent; border: 0; color: var(--muted); cursor: pointer; }
.tl-hint { margin: 8px 0 0; color: var(--muted); font-size: var(--fs-xs); }
.composer.editing .agree, .composer.editing .attach, .composer.editing .tpl-row { display: none; }
.composer.editing .box-row { justify-content: flex-end; }
.sel-frame { color: var(--accent); font-family: var(--mono); }
@media (max-width: 720px) { .tl-body { grid-template-columns: 1fr; } .tl-video { width: 100%; height: auto; aspect-ratio: 16 / 9; } }

.think { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.think .dots { display: inline-flex; gap: 4px; }
.think .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .25; animation: thinkp 1.1s infinite ease-in-out; }
.think .dots i:nth-child(2) { animation-delay: .18s; } .think .dots i:nth-child(3) { animation-delay: .36s; }
.think-t { animation: thinkt 1.5s infinite ease-in-out; }
@keyframes thinkp { 0%, 80%, 100% { opacity: .25; transform: scale(.85); } 40% { opacity: 1; transform: scale(1.1); } }
@keyframes thinkt { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.chatvid { max-width: 520px; margin-top: var(--sp-3); }
@media (prefers-reduced-motion: reduce) { .think .dots i, .think-t { animation: none; opacity: 1; } }

.explore-btn { margin-bottom: 8px; } .side-top a.btn.block:hover { text-decoration: none; }
.pub-confirm { border: 1px solid var(--amber); border-radius: var(--r-lg); padding: var(--sp-3); margin-top: var(--sp-3); background: var(--panel-3); }
.pub-confirm p { margin: 6px 0; color: var(--text-2); font-size: var(--fs-sm); }
.pub-state { margin: var(--sp-3) 0 0; color: var(--green); font-size: var(--fs-sm); }
.pub-state a { margin-left: 8px; }
.explore { max-width: 1180px; margin: 0 auto; padding: var(--sp-6) var(--sp-4) 80px; }
.explore-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.explore h1 { margin: 4px 0; font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -.03em; }
.lead2 { margin: 0; color: var(--text-2); }
.egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-4); }
.ecard { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; }
.evid { width: 100%; display: block; background: #000; aspect-ratio: 16 / 9; }
.emeta { padding: var(--sp-3); } .et { font-weight: 600; font-size: var(--fs-lg); } .ea { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.eb { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-3); }
.explore .fine { margin-top: var(--sp-6); } .explore .empty { padding: 20px 0; }
.nav .me { color: var(--text-2); font-size: var(--fs-sm); margin-right: 8px; }

/* ---- light theme (Settings > Theme) ---- */
:root[data-theme="light"] { --bg: #f6f8fa; --panel: #ffffff; --panel-2: #eef1f4; --panel-3: #f3f5f8; --border: #d0d7de; --border-soft: #e3e8ee; --text: #1f2328; --text-2: #424a53; --muted: #5d6671; --accent: #0969da; --accent-2: #5a4fcf; --accent-soft: #e4f1fd; --accent-line: #a8cdf2; --green: #1a7f37; --red: #cf222e; --amber: #9a6700; --on-accent: #ffffff; color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] .overlay { background: rgba(31, 35, 40, .45); }
:root[data-theme="light"] .step.done .dot { color: #fff; }
:root[data-motion="reduced"] *, :root[data-motion="reduced"] *::before, :root[data-motion="reduced"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
:root[data-motion="reduced"] .think .dots i, :root[data-motion="reduced"] .think-t { opacity: 1 !important; }

/* ---- settings page ---- */
.settings { max-width: 1040px; margin: 0 auto; padding: var(--sp-6) var(--sp-4) 100px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
.snav { position: sticky; top: calc(var(--topbar-h) + 16px); display: grid; gap: 2px; }
.snav h4 { margin: 14px 0 4px; font-family: var(--mono); font-size: var(--fs-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.snav a { color: var(--text-2); padding: 5px 8px; border-radius: var(--r-md); font-size: var(--fs-md); } .snav a:hover { background: var(--panel-2); text-decoration: none; color: var(--text); }
.sgroup > h2 { margin: var(--sp-6) 0 var(--sp-3); font-size: var(--fs-xl); letter-spacing: -.01em; padding-top: var(--sp-3); border-top: 1px solid var(--border-soft); }
.sgroup:first-child > h2 { border-top: 0; margin-top: 0; padding-top: 0; }
.scard { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--panel); padding: var(--sp-4); margin-bottom: var(--sp-3); }
.scard h3 { margin: 0 0 2px; font-size: var(--fs-lg); font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scard .desc { margin: 0 0 var(--sp-3); color: var(--muted); font-size: var(--fs-sm); }
.srow { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 8px 0; border-top: 1px solid var(--border-soft); } .srow:first-of-type { border-top: 0; }
.srow .lab { color: var(--text-2); } .srow .lab small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.srow.soon { opacity: .62; }
.soon-pill { font-family: var(--mono); font-size: var(--fs-micro); letter-spacing: .06em; text-transform: uppercase; color: var(--amber); border: 1px solid var(--amber); border-radius: var(--r-pill); padding: 1px 8px; white-space: nowrap; }
.sel, .txt { background: var(--panel-3); border: 1px solid var(--border); border-radius: var(--r-md); padding: 7px 10px; color: var(--text); }
.txt.full { width: 100%; } textarea.txt { resize: vertical; min-height: 70px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.seg button { background: var(--panel-3); border: 0; padding: 6px 14px; color: var(--muted); cursor: pointer; } .seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); }
.switch { position: relative; width: 38px; height: 22px; flex: 0 0 auto; } .switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--panel-2); border: 1px solid var(--border); transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + i { background: var(--accent-soft); border-color: var(--accent); } .switch input:checked + i::after { transform: translateX(16px); background: var(--accent); }
.switch input:disabled { cursor: not-allowed; } .switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.fieldgrid { display: grid; gap: 4px; } .btnrow { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; margin-top: var(--sp-3); }
.msg-ok { color: var(--green); font-size: var(--fs-sm); } .msg-err { color: var(--red); font-size: var(--fs-sm); }
.danger { border-color: var(--red); } .btn.danger-btn { border-color: var(--red); color: var(--red); } .btn.danger-btn:hover { background: var(--red); color: #fff; }
.blk { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border-soft); }
@media (max-width: 820px) { .settings { grid-template-columns: 1fr; } .snav { position: static; grid-auto-flow: column; overflow-x: auto; } .snav h4 { display: none; } }
.ecard .block-link { color: var(--muted); font-size: var(--fs-xs); background: transparent; border: 0; cursor: pointer; padding: 0; } .ecard .block-link:hover { color: var(--red); }
.mb4 { margin: 0 0 var(--sp-4); } .mt12 { margin-top: 12px; } .mt6 { margin-top: 6px; } .mt14 { margin-top: 14px; } .mt0 { margin-top: 0 !important; }
