/* Sites Studio. Bold, solid, big type. One file, no build step, no outside fonts. */
:root {
  --bg: #F4F1EA; --card: #FFFFFF; --ink: #111114; --ink-2: #4A4A55; --line: #111114; --soft: #E7E2D6;
  --brand: #5B2EFF; --on-brand: #FFFFFF; --yellow: #FFD60A; --green: #00C277; --red: #E5241B; --blue: #0A5FE8; --amber: #B25E00;
  --ok-text: #00704A; --bad-text: #C21A12; --warn-text: #9A4F00;
  --field: #FFFFFF; --code-bg: #111114; --code-ink: #F4F1EA; --shadow: #111114;
  --sud: #FF5A36; --broadrisk: #0A5FE8; --hec: #00A868; --other: #5B2EFF;
  --r: 18px; --bar-h: 0px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0E12; --card: #1B1B22; --ink: #F6F3EC; --ink-2: #B4B2BF; --line: #F6F3EC; --soft: #2B2B36;
    --brand: #7C5CFF; --on-brand: #FFFFFF; --ok-text: #3EE0A1; --bad-text: #FF8078; --warn-text: #FFC14D;
    --field: #121218; --code-bg: #08080B; --code-ink: #F6F3EC; --shadow: #000000;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 17px/1.45 var(--font); min-height: 100vh; min-height: 100dvh; }
body.has-bar main { padding-bottom: calc(var(--bar-h) + 40px); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.1rem, 7.2vw, 3.4rem); line-height: 1.02; font-weight: 900; letter-spacing: -0.035em; overflow-wrap: anywhere; }
h1:focus { outline: none; }
h2 { font-size: clamp(1.45rem, 4.6vw, 2rem); line-height: 1.1; font-weight: 900; letter-spacing: -0.025em; }
h3 { font-size: 1.25rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.015em; }
a { color: inherit; }
code { font-family: var(--mono); font-size: .9em; background: var(--soft); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; left: -9999px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--yellow); color: #111114; padding: 10px 14px; border-radius: 10px; font-weight: 800; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-2); font-size: .94rem; }
.center { text-align: center; justify-content: center; }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.warn-text { color: var(--warn-text); font-weight: 800; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.ic.big { width: 44px; height: 44px; }
.only-desk { display: none; }

/* ---------- header */
.top { position: sticky; top: 0; z-index: 30; background: #111114; color: #F6F3EC; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); min-height: 58px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.2rem; letter-spacing: -0.02em; text-decoration: none; color: #F6F3EC; }
.dot { width: 16px; height: 16px; border-radius: 50%; background: var(--yellow); display: inline-block; flex: none; }
.menu { position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 6px; border-radius: 999px; font-weight: 800; }
.menu summary::-webkit-details-marker { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); color: #111114; display: grid; place-items: center; font-weight: 900; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 10px); width: min(300px, calc(100vw - 32px)); background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: var(--r); box-shadow: 0 5px 0 var(--shadow); padding: 16px; display: grid; gap: 10px; }
.menu-who { display: grid; gap: 2px; } .menu-who span { color: var(--ink-2); font-size: .88rem; }
.menu-line { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: .95rem; }

/* ---------- layout */
main { max-width: 1160px; margin: 0 auto; padding: 22px 16px 64px; outline: none; }
.boot { padding: 20vh 0; text-align: center; font-weight: 800; color: var(--ink-2); }
.hello { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px; margin: 6px 0 22px; }
.section-h { margin: 36px 0 14px; }
.stack { display: grid; gap: 18px; max-width: 620px; }
.page-head { margin-bottom: 22px; display: grid; gap: 10px; max-width: 760px; }
.lede { font-size: 1.12rem; color: var(--ink-2); }
.backlink { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; text-decoration: none; color: var(--ink); background: none; border: 0; padding: 8px 10px 8px 0; font: inherit; font-weight: 800; cursor: pointer; min-height: 44px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; box-shadow: 0 3px 0 var(--shadow); transition: transform .08s, box-shadow .08s; -webkit-tap-highlight-color: transparent; white-space: nowrap; }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--shadow); }
.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-primary { background: var(--brand); color: var(--on-brand); border-color: var(--shadow); }
.btn-go { background: var(--green); color: #111114; border-color: var(--shadow); }
.btn-dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-danger { background: var(--red); color: #FFFFFF; border-color: var(--shadow); }
.btn-text { border-color: transparent; background: transparent; box-shadow: none; text-decoration: underline; text-underline-offset: 4px; padding-inline: 8px; }
.btn-big { min-height: 60px; font-size: 1.15rem; padding: 14px 24px; border-radius: 18px; width: 100%; }
.btn.is-busy { opacity: .8; }
.iconbtn { border: 0; background: transparent; color: inherit; min-width: 44px; min-height: 44px; display: grid; place-items: center; cursor: pointer; border-radius: 10px; }

/* ---------- cards, chips, pills */
.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); box-shadow: 0 5px 0 var(--shadow); }
.chip { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-weight: 900; font-size: .82rem; color: #FFFFFF; letter-spacing: .01em; white-space: nowrap; }
.site-sud { background: var(--sud); color: #111114; } .site-broadrisk { background: var(--broadrisk); color: #FFFFFF; } .site-hec { background: var(--hec); color: #111114; } .site-other { background: var(--other); color: #FFFFFF; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-weight: 800; font-size: .82rem; border: 2px solid var(--line); white-space: nowrap; background: var(--card); color: var(--ink); }
.pill-waiting { background: var(--yellow); color: #111114; border-color: #111114; }
.pill-preview_made { background: var(--blue); color: #FFFFFF; border-color: var(--blue); }
.pill-sent_back { background: var(--red); color: #FFFFFF; border-color: var(--red); }
.pill-live { background: var(--green); color: #111114; border-color: var(--green); }
.pill-expired { background: var(--soft); color: var(--ink); border-color: var(--soft); }
.pill-soon { background: var(--yellow); color: #111114; border-color: #111114; }
.count { display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; padding: 0 .45em; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .62em; font-weight: 900; vertical-align: .18em; letter-spacing: 0; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 800; padding: 3px 9px; border-radius: 8px; white-space: nowrap; }
.tag-dirty { background: var(--yellow); color: #111114; } .tag-saved { background: var(--green); color: #111114; } .tag-quiet { background: var(--soft); color: var(--ink); }

/* ---------- waiting block */
.waiting { background: var(--yellow); color: #111114; border: 2px solid #111114; border-radius: 26px; padding: 18px 14px 20px; box-shadow: 0 6px 0 #111114; }
.waiting h2 { margin: 2px 4px 14px; display: flex; align-items: center; gap: 10px; }
.waiting .count { background: #111114; color: var(--yellow); }
.waiting.none { background: var(--green); padding: 16px 18px; }
.waiting.none h2 { margin: 0 0 4px; font-size: 1.3rem; }
.wait-grid { display: grid; gap: 14px; }
.wait-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: none; border-color: #111114; }
.wait-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.wait-card h3 { font-size: 1.45rem; font-weight: 900; letter-spacing: -0.02em; } .wait-card h3 a { text-decoration: none; }
.wait-ask { background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: .97rem; overflow-wrap: anywhere; }
.wait-what { font-weight: 700; }
.wait-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; padding-top: 4px; }
.wait-actions > :first-child:nth-last-child(3) { grid-column: 1 / -1; }
.wait-actions > :only-child { grid-column: 1 / -1; }

/* ---------- site cards */
.site-grid { display: grid; gap: 18px; }
.site-card { overflow: hidden; display: flex; flex-direction: column; }
.site-band { padding: 16px 16px 14px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; border-bottom: 2px solid var(--line); }
.site-band h3 { font-size: 1.6rem; font-weight: 900; letter-spacing: -0.03em; }
.band-count { font-weight: 800; font-size: .9rem; }
.site-body { padding: 16px; display: grid; gap: 14px; flex: 1; align-content: start; }
.live-line { display: grid; gap: 4px; }
.live-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--green); margin-right: 8px; box-shadow: 0 0 0 2px var(--line); }
.crows { display: grid; }
.crows.card { overflow: hidden; }
.crow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; text-decoration: none; border-top: 2px solid var(--soft); min-height: 56px; }
.crows.card .crow { padding: 14px 14px; } .crows.card .crow:first-child { border-top: 0; }
.crow:hover .crow-title { text-decoration: underline; text-underline-offset: 4px; }
.crow-main { min-width: 0; display: grid; gap: 4px; }
.crow-title { font-weight: 800; font-size: 1.08rem; overflow-wrap: anywhere; }
.crow-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; color: var(--ink-2); font-size: .88rem; }
.crow-note { font-size: .94rem; background: var(--soft); border-left: 5px solid var(--red); padding: 6px 10px; border-radius: 0 8px 8px 0; overflow-wrap: anywhere; }
.crow-end { display: flex; align-items: center; gap: 6px; flex: none; }
.group { margin-bottom: 22px; display: grid; gap: 8px; }

/* ---------- notes, problems, messages */
.note-box { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 2px dashed var(--line); border-radius: var(--r); padding: 14px; margin-top: 24px; }
.stack .note-box, .solo .note-box { margin-top: 0; }
.note-box .ic { width: 28px; height: 28px; }
.problem { background: var(--card); border: 2px solid var(--line); border-left: 10px solid var(--red); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; max-width: 680px; margin: 8px 0; }
.problem-head { display: flex; gap: 8px; align-items: center; font-size: 1.15rem; color: var(--bad-text); } .problem-head strong { color: var(--ink); font-weight: 900; }
.inline-problem { display: flex; gap: 8px; align-items: flex-start; color: var(--bad-text); font-weight: 700; }
.empty { padding: 26px 18px; text-align: center; display: grid; gap: 8px; justify-items: center; color: var(--ink-2); }
.empty-big { font-size: 1.4rem; font-weight: 900; color: var(--ink); letter-spacing: -0.02em; }
.msgs { border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--card); display: grid; gap: 8px; margin: 10px 0; }
.msgs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.msgs-title { font-weight: 900; }
.msg { display: flex; gap: 8px; align-items: flex-start; font-size: .97rem; overflow-wrap: anywhere; }
.msg-error .ic, .msg-error strong { color: var(--bad-text); } .msg-warning .ic, .msg-warning strong { color: var(--warn-text); } .msg-info .ic { color: var(--ink-2); }
.ok-line { display: flex; gap: 8px; align-items: center; color: var(--ok-text); font-weight: 800; }
.details { font-size: .92rem; }
.details summary { cursor: pointer; font-weight: 700; color: var(--ink-2); padding: 8px 0; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-underline-offset: 4px; list-style: none; }
.details summary::-webkit-details-marker { display: none; }
.details-body { display: grid; gap: 8px; padding: 4px 0 6px; }
.log { margin: 0; background: var(--code-bg); color: var(--code-ink); padding: 12px; border-radius: 12px; font: 12.5px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; }
.tech { color: var(--ink-2); }
.tech-dl, .confirm-dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.tech-dl dt, .confirm-dl dt { color: var(--ink-2); font-weight: 700; } .tech-dl dd, .confirm-dl dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.tech-dl dd { font-family: var(--mono); font-size: .86rem; }
.filelist { margin: 0; padding-left: 18px; font: 13px/1.6 var(--mono); overflow-wrap: anywhere; }
.skeletons { display: grid; gap: 14px; margin-top: 8px; }
.skel { height: 96px; border-radius: var(--r); background: var(--soft); animation: pulse 1.1s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .55; } to { opacity: 1; } }
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--bar-h) + 18px + env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 8px; z-index: 60; pointer-events: none; padding: 0 16px; }
.toast { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 800; box-shadow: 0 6px 20px rgba(0,0,0,.35); transition: opacity .3s, transform .3s; max-width: 520px; }
.toast-bad { background: var(--red); color: #FFFFFF; } .toast.out { opacity: 0; transform: translateY(8px); }
.dialog { border: 2px solid var(--line); border-radius: 22px; background: var(--card); color: var(--ink); padding: 22px; max-width: min(460px, calc(100vw - 32px)); box-shadow: 0 8px 0 var(--shadow); }
.dialog::backdrop { background: rgba(0,0,0,.6); } .dialog h2 { margin-bottom: 8px; } .dialog p { margin-bottom: 16px; }

/* ---------- forms */
.field { display: grid; gap: 8px; }
.field label, .field .label { font-weight: 900; font-size: 1.12rem; }
.input { width: 100%; font: inherit; color: var(--ink); background: var(--field); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; min-height: 50px; }
.input::placeholder, .tfield::placeholder { color: var(--ink-2); opacity: .8; }
.input-big { font-size: 1.15rem; min-height: 58px; font-weight: 700; }
.input.bad { border-color: var(--red); }
.area { resize: vertical; line-height: 1.45; }
.hint { color: var(--ink-2); font-size: .92rem; } .field-err { color: var(--bad-text); font-weight: 800; }
.field-foot { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.picker { display: grid; gap: 10px; }
.pick { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; border-radius: 16px; border: 2px solid var(--line); font: inherit; font-weight: 900; font-size: 1.15rem; cursor: pointer; text-align: left; opacity: .72; }
.pick.on { opacity: 1; box-shadow: 0 4px 0 var(--shadow); }
.pick-tick { width: 30px; height: 30px; border-radius: 50%; background: #FFFFFF; border: 2px solid #111114; display: grid; place-items: center; color: #111114; flex: none; }
.checkrow { display: flex; gap: 12px; align-items: flex-start; font-weight: 800; cursor: pointer; padding: 10px 0 2px; }
.check { width: 28px; height: 28px; flex: none; accent-color: #111114; margin: 0; }
.searchbox { position: relative; flex: 1 1 220px; min-width: 0; } .searchbox .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); } .searchbox .input { padding-left: 42px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.toggle-tick { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; background: var(--field); } .toggle-tick .ic { width: 16px; height: 16px; }
.toggle.on { background: var(--ink); color: var(--bg); } .toggle.on .toggle-tick { background: var(--yellow); color: #111114; border-color: var(--yellow); }

/* ---------- change screen */
.change-head { display: grid; gap: 8px; margin-bottom: 14px; }
.change-kicker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.notices { display: grid; gap: 12px; margin-bottom: 16px; }
.notice { border: 2px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 6px; background: var(--card); overflow-wrap: anywhere; }
.notice-back { background: var(--red); color: #FFFFFF; border-color: var(--shadow); } .notice-back p { font-size: 1.12rem; font-weight: 700; } .notice-back .notice-next { font-size: .92rem; font-weight: 600; }
.notice-ask { border-left: 10px solid var(--brand); }
.notice-warn, .notice-danger { background: var(--yellow); color: #111114; border-color: #111114; }
.notice-danger .filelist { background: #111114; color: #F6F3EC; border-radius: 10px; padding: 10px 10px 10px 28px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 -2px; scrollbar-width: none; position: sticky; top: 58px; background: var(--bg); z-index: 10; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); font-weight: 800; text-decoration: none; white-space: nowrap; }
.tab.on { background: var(--ink); color: var(--bg); }
.tab-soon { font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; background: var(--yellow); color: #111114; padding: 2px 7px; border-radius: 999px; }
.tab-dot { background: var(--yellow); color: #111114; min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; font-size: .78rem; font-weight: 900; padding: 0 6px; }
.tab-panel { display: grid; gap: 12px; }
.tab-intro { color: var(--ink-2); max-width: 760px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.thead { display: none; }
.trows { display: grid; gap: 14px; }
.trow { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 12px; }
.trow.dirty { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand); }
.tpage { font-weight: 900; font-size: 1.15rem; overflow-wrap: anywhere; letter-spacing: -0.01em; }
.treason { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); margin-top: 6px; }
.tcell { display: grid; gap: 6px; min-width: 0; align-content: start; }
.tlabel { font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.tfield { width: 100%; font: inherit; font-size: 1.02rem; color: var(--ink); background: var(--field); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: none; overflow: hidden; min-height: 46px; line-height: 1.4; display: block; }
.tfield-ro { background: var(--soft); border-color: var(--soft); display: flex; gap: 8px; align-items: flex-start; color: var(--ink); overflow-wrap: anywhere; } .tfield-ro .ic { margin-top: 3px; color: var(--ink-2); }
.count-line { font-size: .86rem; font-weight: 800; }
.count-ok { color: var(--ok-text); } .count-warn { color: var(--warn-text); } .count-bad { color: var(--bad-text); }
.tcell-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tcell-act:not(:has(> :not([hidden]):not(:empty))) { display: none; }
.trow-below:empty { display: none; }
.soon { padding: 28px 20px; display: grid; gap: 14px; justify-items: start; max-width: 640px; }

/* files */
.files { display: grid; gap: 16px; }
.fside { display: grid; gap: 10px; align-content: start; min-width: 0; }
.flist { list-style: none; margin: 0; padding: 0; border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.flist li + li { border-top: 2px solid var(--soft); }
.fitem { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 58px; background: transparent; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fitem.on { background: var(--ink); color: var(--bg); } .fitem.on small { color: inherit; opacity: .8; }
.fname { display: grid; min-width: 0; flex: 1; } .fname strong { overflow-wrap: anywhere; } .fname small, .fsize { color: var(--ink-2); font-size: .82rem; overflow-wrap: anywhere; }
.lock-note { display: flex; gap: 8px; font-size: .9rem; color: var(--ink-2); align-items: flex-start; }
.fpane { display: none; min-width: 0; gap: 12px; align-content: start; }
.files.show-editor .fside { display: none; } .files.show-editor .fpane { display: grid; }
.fpane-empty { border: 2px dashed var(--line); border-radius: var(--r); }
.fhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fhead-name { display: grid; min-width: 0; } .fhead-name strong { font-size: 1.3rem; font-weight: 900; overflow-wrap: anywhere; } .fhead-name small { color: var(--ink-2); overflow-wrap: anywhere; }
.editor { display: grid; grid-template-columns: auto 1fr; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--code-bg); height: min(62vh, 640px); min-height: 280px; }
.gutter { margin: 0; padding: 12px 8px 12px 10px; text-align: right; color: #8E8C99; background: var(--code-bg); font: 16px/1.5 var(--mono); overflow: hidden; user-select: none; min-width: 3ch; border-right: 1px solid #33333D; }
.code { border: 0; margin: 0; padding: 12px; resize: none; background: var(--code-bg); color: var(--code-ink); font: 16px/1.5 var(--mono); white-space: pre; overflow: auto; width: 100%; height: 100%; tab-size: 2; outline-offset: -3px; border-radius: 0; }
.fbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- sticky bottom bar */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--card); border-top: 3px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: grid; gap: 8px; box-shadow: 0 -8px 24px rgba(0,0,0,.14); max-height: 70vh; overflow: auto; }
.bar-main { display: grid; gap: 10px; max-width: 1128px; width: 100%; margin: 0 auto; }
.bar-say { display: grid; gap: 2px; min-width: 0; } .bar-say strong { font-size: 1.12rem; font-weight: 900; display: flex; align-items: center; gap: 6px; } .bar-say span { color: var(--ink-2); font-size: .92rem; }
.bar-live strong { color: var(--ok-text); } .bar-bad strong { color: var(--bad-text); }
.bar-link { font: 600 .9rem var(--mono); overflow-wrap: anywhere; }
.bar-btns { display: flex; gap: 8px; flex-wrap: wrap; } .bar-btns .btn { flex: 1 1 auto; padding-inline: 12px; }
.bar-clock { font: 800 1.2rem var(--mono); justify-self: start; }
.bar-strip { display: flex; gap: 10px; align-items: center; border-radius: 14px; padding: 10px 12px; max-width: 1128px; width: 100%; margin: 0 auto; font-size: .94rem; border: 2px solid #111114; }
.bar-strip > div { flex: 1; min-width: 0; }
.bar-strip-warn { background: var(--yellow); color: #111114; } .bar-strip-bad { background: var(--red); color: #FFFFFF; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--soft); border-top-color: var(--brand); display: inline-block; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- approve / done / solo screens */
.summary { padding: 16px; display: grid; gap: 10px; justify-items: start; }
.confirm { padding: 18px; display: grid; gap: 14px; margin-bottom: 18px; }
.confirm-dl { gap: 10px 14px; font-size: 1.05rem; grid-template-columns: minmax(84px, max-content) 1fr; } .confirm-dl dd { font-weight: 800; }
.step-slot { display: grid; gap: 14px; max-width: 620px; }
.done { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 34px 18px; border-radius: 28px; border: 2px solid #111114; box-shadow: 0 6px 0 #111114; max-width: 620px; color: #111114; }
.done-go { background: var(--green); } .done-undo { background: var(--yellow); }
.done h1 { font-size: clamp(3rem, 14vw, 5rem); } .done .muted { color: #111114; opacity: .8; }
.done-mark { width: 84px; height: 84px; border-radius: 50%; background: #111114; color: #FFFFFF; display: grid; place-items: center; } .done-mark .ic { width: 46px; height: 46px; }
.done .row-actions { width: 100%; } .done .btn-ghost { background: #FFFFFF; color: #111114; border-color: #111114; } .done .btn-dark { background: #111114; color: #FFFFFF; border-color: #111114; }
.solo { max-width: 560px; margin: 4vh auto 0; display: grid; gap: 18px; justify-items: start; }
.solo-hero { margin-top: 8vh; }
.solo-mark { width: 76px; height: 76px; border-radius: 22px; background: var(--brand); color: #FFFFFF; display: grid; place-items: center; border: 2px solid var(--shadow); box-shadow: 0 5px 0 var(--shadow); } .solo-mark .ic { width: 42px; height: 42px; }
.wordmark-big { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.2rem; background: #111114; color: #F6F3EC; padding: 8px 16px 8px 12px; border-radius: 999px; }

/* ---------- what changed, in words */
.changed { display: grid; gap: 6px; max-width: 760px; }
.changed-h { font-weight: 900; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); display: block; }
.chg { display: grid; gap: 2px; }
.chg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chg-list li { border-left: 6px solid var(--brand); padding: 2px 0 2px 12px; overflow-wrap: anywhere; font-size: .98rem; line-height: 1.4; }
.chg-from { color: var(--ink-2); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.chg-arrow { font-weight: 900; margin: 0 6px; }
.chg-to { font-weight: 800; }
.chg-note { font-weight: 800; color: var(--ink-2); margin-right: 6px; }
.chg-files { border-left-color: var(--soft); } .chg-files .chg-note { font-weight: 600; margin: 0; }
.wait-what { display: grid; gap: 6px; }
.pick-person { background: var(--card); color: var(--ink); }
.pick-person.on { background: var(--brand); color: var(--on-brand); border-color: var(--shadow); }

/* ---------- text on the page */
.spinner-big { width: 34px; height: 34px; border-width: 5px; }
.getting { padding: 26px 20px; display: grid; gap: 12px; justify-items: start; max-width: 640px; background: var(--yellow); color: #111114; border-color: #111114; box-shadow: 0 5px 0 #111114; }
.getting .muted { color: #111114; opacity: .75; }
.getting-top { display: flex; align-items: center; gap: 14px; }
.getting .spinner { border-color: rgba(17,17,20,.2); border-top-color: #111114; }
.getting-clock { font: 900 1.6rem var(--mono); }
.getting-say { font-size: 1.1rem; font-weight: 700; min-height: 2.9em; }
.pv-tools { align-items: end; }
.pv-pick { display: grid; gap: 4px; flex: 1 1 240px; min-width: 0; } .pv-pick > span { font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
select.input { appearance: none; -webkit-appearance: none; font-weight: 800; padding-right: 44px; text-overflow: ellipsis; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 55%, calc(100% - 15px) 55%; background-size: 7px 7px, 7px 7px; background-repeat: no-repeat; cursor: pointer; }
.pv-stale { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--yellow); color: #111114; border: 2px solid #111114; border-radius: 14px; padding: 10px 12px; font-size: .95rem; }
.pv-stale > div { flex: 1 1 220px; min-width: 0; } .pv-stale .btn { flex: 1 1 auto; }
.pv-stage { display: grid; gap: 16px; }
.pv { overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.pv-bar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--ink); color: var(--bg); font-weight: 800; font-size: .92rem; min-width: 0; }
.pv-dots { display: inline-flex; gap: 5px; flex: none; } .pv-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); } .pv-dots i:nth-child(2) { background: var(--yellow); } .pv-dots i:nth-child(3) { background: var(--green); }
.pv-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.pv-hint { display: none; align-items: center; gap: 6px; font-weight: 700; opacity: .85; white-space: nowrap; }
.pv-body { position: relative; background: #FFFFFF; height: clamp(380px, calc(100dvh - var(--bar-h) - 190px), 900px); }
.pv-slot, .pv-frame { width: 100%; height: 100%; display: block; border: 0; }
.pv-over { position: absolute; inset: 0; background: var(--card); color: var(--ink); display: grid; gap: 12px; place-content: center; justify-items: center; text-align: center; padding: 24px; font-size: 1.05rem; }
.pv-over strong { font-size: 1.3rem; font-weight: 900; }

.sheet { background: var(--card); color: var(--ink); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; min-width: 0; }
.sheet > .saved-box { margin-top: 28px; }
.sheet-h { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.02em; padding-right: 44px; }
.sheet-x { position: absolute; top: 8px; right: 8px; }
.sheet-area { font-size: 1.1rem; min-height: 64px; }
.sheet-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; } .sheet-actions .btn { white-space: normal; }
.sheet-note { display: flex; gap: 8px; align-items: flex-start; font-size: .94rem; color: var(--ink-2); } .sheet-note .ic { margin-top: 2px; }
.sheet-note-warn { color: var(--warn-text); font-weight: 700; }
.sheet-idle { display: grid; gap: 10px; justify-items: start; }
.sheet-finger, .sheet-lock { width: 52px; height: 52px; border-radius: 16px; background: var(--brand); color: #FFFFFF; display: grid; place-items: center; border: 2px solid var(--shadow); } .sheet-finger .ic, .sheet-lock .ic { width: 26px; height: 26px; }
.sheet-lock { background: var(--soft); color: var(--ink); border-color: var(--line); }
.count-quiet { color: var(--ink-2); }
.ba-pair { display: grid; gap: 10px; }
.ba { border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 4px; min-width: 0; background: var(--card); }
.ba-label { font-weight: 900; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.ba-text { font-size: 1.08rem; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.ba-now { background: var(--soft); border-color: var(--soft); }
.ba-from { border-left: 10px solid var(--red); } .ba-to { border-left: 10px solid var(--green); }
.ba del { background: var(--red); color: #FFFFFF; text-decoration: line-through; border-radius: 4px; padding: 0 3px; }
.ba ins { background: var(--green); color: #111114; text-decoration: none; font-weight: 800; border-radius: 4px; padding: 0 3px; }
.saved-box { display: flex; gap: 12px; align-items: center; background: var(--green); color: #111114; border: 2px solid #111114; border-radius: var(--r); padding: 14px; }
.saved-box strong { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.02em; display: block; line-height: 1.1; } .saved-box p { font-size: .97rem; font-weight: 600; }
.saved-mark { width: 46px; height: 46px; border-radius: 50%; background: #111114; color: #FFFFFF; display: grid; place-items: center; flex: none; } .saved-mark .ic { width: 26px; height: 26px; }

/* page editor (BroadRisk) */
.pf-tools { align-items: end; } .pf-pick { flex: 2 1 280px; }
.pf-body { display: grid; gap: 14px; max-width: 820px; min-width: 0; }
.pf-head { display: grid; gap: 2px; margin-top: 6px; } .pf-head .muted { overflow-wrap: anywhere; }
.pf-form { padding: 16px; display: grid; gap: 20px; }
.pf-field { display: grid; gap: 6px; min-width: 0; }
.pf-field > label, .pf-field > h3 { font-weight: 900; font-size: 1.12rem; }
.pf-field.dirty > .tfield, .pf-piece.dirty > .tfield { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand); }
.pf-warn { display: flex; gap: 8px; align-items: flex-start; background: var(--yellow); color: #111114; border: 2px solid #111114; border-radius: 12px; padding: 8px 10px; font-size: .92rem; font-weight: 700; } .pf-warn .ic { margin-top: 2px; }
.pf-blocks { display: grid; gap: 12px; margin-top: 4px; }
.pf-block { display: grid; gap: 8px; padding-left: 12px; border-left: 4px solid var(--soft); }
.pf-block-head { border-left-color: var(--ink); } .pf-block-head .tfield { font-weight: 800; }
.pf-piece { display: grid; gap: 4px; min-width: 0; }
.pf-kind { justify-self: start; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; background: var(--soft); color: var(--ink); padding: 2px 8px; border-radius: 999px; }
.pf-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 0; }
.pf-foot.live { position: sticky; bottom: var(--bar-h); background: var(--bg); z-index: 5; border-top: 2px solid var(--line); }
.pf-foot .btn-primary, .pf-foot .btn-go { flex: 1 1 200px; }
.pf-review { display: grid; gap: 12px; }
.pf-change { padding: 14px; display: grid; gap: 10px; box-shadow: none; }
.pf-saved { display: grid; gap: 8px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

@media (max-width: 759px) { .bar-say:not(.keep) > span { display: none; } .bar-btns { display: grid; grid-template-columns: 1fr 1fr; } .bar-btns > :only-child, .bar-btns > :last-child:nth-child(odd) { grid-column: 1 / -1; } .bar-strip { padding: 6px 6px 6px 12px; } .bar-strip .btn { min-height: 44px; } }

/* ---------- desktop */
@media (min-width: 760px) {
  main { padding: 34px 32px 80px; }
  .top { padding-inline: 32px; }
  .only-desk { display: inline; } .only-phone { display: none !important; }
  .btn-big { width: auto; min-width: 280px; }
  .waiting { padding: 24px; }
  .wait-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  .wait-card { padding: 20px; }
  .site-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); align-items: stretch; }
  .picker { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .bar { padding: 12px 32px; }
  .bar-main { grid-template-columns: 1fr auto; align-items: center; }
  .bar-btns { flex-wrap: nowrap; } .bar-btns .btn { flex: none; padding-inline: 18px; }
  .bar-clock { justify-self: end; }
  .files { grid-template-columns: 330px 1fr; align-items: start; }
  .files.show-editor .fside { display: grid; } .fpane { display: grid; }
  .flist { max-height: 62vh; overflow: auto; }
  .gutter, .code { font-size: 14px; }
}
@media (min-width: 980px) {
  .thead { display: grid; grid-template-columns: 200px 1fr 1.35fr 128px; gap: 16px; padding: 0 16px; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-top: 4px; }
  .trows { gap: 0; border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); box-shadow: 0 5px 0 var(--shadow); }
  .trow { grid-template-columns: 200px 1fr 1.35fr 128px; gap: 16px; border: 0; border-radius: 0; border-top: 2px solid var(--soft); padding: 14px 16px; align-items: start; }
  .trow:first-child { border-top: 0; }
  .trow.dirty { box-shadow: inset 6px 0 0 var(--brand); }
  .trow .tlabel { position: absolute; left: -9999px; }
  .tpage { font-size: 1rem; padding-top: 10px; }
  .tcell-act { flex-direction: column; align-items: stretch; padding-top: 0; } .tcell-act:not(:has(> :not([hidden]):not(:empty))) { display: flex; }
  .tcell-act .btn { min-height: 44px; padding: 6px 12px; }
  .trow-below { grid-column: 2 / -1; }
}

@media (max-width: 979px) {
  .sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 82dvh; overflow: auto; border-top: 3px solid var(--line); border-radius: 24px 24px 0 0; padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0,0,0,.25); animation: sheet-up .22s cubic-bezier(.32,.72,0,1); }
  .sheet.idle { display: none; }
  .sheet-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.35); }
  .sheet-x { top: 10px; right: 10px; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 760px) { .pv-hint { display: inline-flex; } .ba-pair { grid-template-columns: 1fr 1fr; } .sheet .ba-pair { grid-template-columns: 1fr; } .pf-foot .btn-primary, .pf-foot .btn-go { flex: none; min-width: 220px; } }
@media (min-width: 980px) {
  .pv-stage { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .sheet { position: sticky; top: 130px; border: 2px solid var(--line); border-radius: var(--r); box-shadow: 0 5px 0 var(--shadow); padding: 20px; max-height: calc(100dvh - var(--bar-h) - 150px); overflow: auto; }
  .sheet.idle { border-style: dashed; box-shadow: none; }
  .sheet-scrim { display: none; }
}
