/* RPKP Builder — mobile-first (iPhone / iPad Safari), no build step. */
:root { --fg:#1d1f23; --muted:#5f6670; --bg:#f4f5f7; --card:#fff; --line:#dde1e6; --accent:#1f4e8c; --accent-fg:#fff;
        --ok:#1d6b3a; --ok-bg:#e3f3e8; --err:#a12222; --err-bg:#fbe7e7; --warn:#7a5200; --warn-bg:#fff4d6;
        --mark:#ffe36e; --code-bg:#eef0f3; --radius:10px; }
@media (prefers-color-scheme: dark) {
  :root { --fg:#e7e9ec; --muted:#a2a9b3; --bg:#14161a; --card:#1d2026; --line:#30353d; --accent:#7fb0ff; --accent-fg:#0d1420;
          --ok:#7fd69c; --ok-bg:#163020; --err:#ff8f8f; --err-bg:#3a1a1a; --warn:#ffd27a; --warn-bg:#3a2d10; --mark:#8a6d00; --code-bg:#262a31; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color:var(--fg); background:var(--bg);
       padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
a { color: var(--accent); }
.bar { position: sticky; top: 0; z-index: 10; display:flex; flex-wrap: wrap; gap: 6px 12px; justify-content:space-between; align-items:center;
       padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background:var(--card); border-bottom:1px solid var(--line); }
.brand { font-weight:700; text-decoration:none; color: var(--fg); }
nav.top { display:flex; align-items:center; gap: 14px; flex-wrap: wrap; }
nav.top a { text-decoration: none; }
.who { color:var(--muted); margin-right:6px; font-size: 14px; }
main { max-width: 1200px; margin: 14px auto; padding: 0 12px; }
footer { text-align:center; color:var(--muted); font-size: 12px; padding: 24px 16px; }
h1 { font-size: 1.35rem; margin: 6px 0; } h2, .h2 { font-size: 1.15rem; margin: 4px 0 10px; } h3, .h3 { font-size: 1.02rem; margin: 10px 0 6px; } .h4 { font-size: .95rem; }
.head { display:flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin: 6px 0 10px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; margin: 0 0 12px; }
.card.narrow { max-width: 440px; margin: 30px auto; }
.card.compact { padding: 10px 14px; }
.card.warn { border-color: var(--warn); }
.cards { list-style: none; padding: 0; margin: 0; }
.cards .title { font-weight: 600; text-decoration: none; }
.cols { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 1fr; } }
.g3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .g3 { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .page-pane { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; } }
.page-img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.page-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; background: var(--code-bg); padding: 10px; border-radius: 6px; max-height: 60vh; overflow: auto; }
mark { background: var(--mark); color: inherit; padding: 0 1px; }
blockquote { margin: 8px 0; padding: 8px 12px; border-left: 4px solid var(--accent); background: var(--code-bg); border-radius: 4px; white-space: pre-wrap; word-break: break-word; }
blockquote.verbatim { font-size: 1.02rem; }
.prompt { white-space: pre-wrap; }
label { display:block; margin: 10px 0; font-weight: 500; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 6px 0; }
input, select, textarea { display:block; width:100%; margin-top:5px; padding:11px 12px; font: inherit; font-size: 16px; /* 16px: no iOS zoom */
       color: var(--fg); background: var(--card); border:1px solid var(--line); border-radius:8px; }
input[type=checkbox], input[type=radio] { display: inline-block; width: 22px; height: 22px; margin: 0; flex: none; }
input[type=file] { padding: 8px; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; padding: 6px 12px 10px; }
legend { font-weight: 600; padding: 0 4px; }
.hint { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 4px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height:44px; padding: 10px 16px; font: inherit; font-size:16px;
       font-weight: 600; border:0; border-radius:8px; background:var(--accent); color:var(--accent-fg); cursor:pointer; text-decoration: none; }
button.wide { width: 100%; margin-top: 8px; }
button.secondary, .button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.danger { background: var(--err); color: #fff; }
button.ok { background: var(--ok); color: #fff; }
button.link { background:none; color:var(--accent); padding:0 4px; min-height:auto; font-weight: 400; }
button[disabled] { opacity: .45; cursor: not-allowed; }
form.inline { display:flex; align-items:center; margin:0; }
.row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 8px 0; }
.row-form input, .row-form select { flex: 1 1 180px; width: auto; margin-top: 0; }
.row-form label { flex: 1 1 160px; margin: 0; }
.stack > * { margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.stage-actions { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .stage-actions { grid-template-columns: 1fr 1fr; } }
.stage-actions form { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
details.action, details.gapkind, details.raw { margin: 10px 0; }
details > summary { cursor: pointer; min-height: 32px; padding: 6px 0; font-weight: 600; }
details.raw > summary { font-weight: 400; color: var(--muted); font-size: 13px; }
details.raw pre { font-size: 12px; overflow: auto; max-height: 50vh; background: var(--code-bg); padding: 8px; border-radius: 6px; }
.flash { padding: 10px 14px; border-radius: 8px; margin: 0 0 12px; background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.error, .errors { color: var(--err); }
.warn-text { color: var(--warn); }
.muted { color:var(--muted); }
.small { font-size: 13px; } .big { font-size: 1.3rem; }
.mono, code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
code { background: var(--code-bg); padding: 1px 4px; border-radius: 4px; word-break: break-all; }
.break { word-break: break-all; }
.clip { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--code-bg); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.bad { background: var(--err-bg); color: var(--err); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
dl.kv { display: grid; grid-template-columns: minmax(100px, 30%) 1fr; gap: 4px 12px; margin: 6px 0; }
dl.kv dt { color: var(--muted); font-size: 14px; } dl.kv dd { margin: 0; word-break: break-word; }
@media (max-width: 520px) { dl.kv { grid-template-columns: 1fr; } dl.kv dt { margin-top: 6px; } }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.grid { border-collapse: collapse; width: 100%; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
table.grid th { font-size: 13px; color: var(--muted); }
tr.differs td { background: var(--warn-bg); }
td.old { color: var(--err); } td.new { color: var(--ok); }
nav.tabs { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 12px; padding-bottom: 2px; }
nav.tabs a, nav.filters a, nav.pager a { flex: none; padding: 8px 12px; border-radius: 999px; text-decoration: none; border: 1px solid var(--line); background: var(--card); font-size: 14px; }
nav.tabs a[aria-current], nav.filters a[aria-current] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
nav.filters, nav.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
ul.gaps { list-style: none; padding: 0; margin: 0; }
ul.gaps li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.gaps li.closed { opacity: .7; }
ol.stages { padding-left: 20px; } ol.stages li { margin: 4px 0; }
ul.files { padding-left: 18px; } ul.files li { margin: 4px 0; word-break: break-all; }
.list { list-style:none; padding:0; margin:0; } .list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.link-row { border-bottom: 1px solid var(--line); padding: 8px 0; }
.warnings { color: var(--warn); }

/* Phase 9.1: focused scope */
.badge.focus { background: #e8f0fe; color: #1a4fa0; }
.scope-mode { border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.scope-mode .segmented { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
form:has(input[name="scope_mode"][value="full_act"]:checked) .focus-fields { display: none; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree-head { margin: 10px 0; }
.tree-row { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; padding: 8px 0;
  border-bottom: 1px solid var(--line, #eee); }
.tree-row.depth-1 { padding-left: 14px; } .tree-row.depth-2 { padding-left: 28px; } .tree-row.depth-3 { padding-left: 42px; }
.tree-row.depth-4 { padding-left: 56px; } .tree-row.depth-5 { padding-left: 70px; } .tree-row.depth-6 { padding-left: 84px; }
.tree-row .unit { flex: 1 1 auto; min-width: 0; }
.tree-row .ticks { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.tree-row .ticks label { min-height: 32px; display: flex; align-items: center; gap: 6px; }
.tree-row .ticks input[type="checkbox"] { width: 22px; height: 22px; }
.tree-row.role-focus { background: #f2f7ff; }
.tree-row.role-context { background: #fffaf0; }
.tree-row .cite { font-weight: 600; margin-right: 6px; }
.head-row { border-bottom: 2px solid var(--line, #ddd); }

/* Phase 9.2 — navigation: bottom bar on iPhone, sidebar on wider screens */
.who-box { display: flex; align-items: center; gap: 12px; }
.appnav { position: fixed; z-index: 20; display: flex; background: var(--card); border-color: var(--line); }
.appnav a { text-decoration: none; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.appnav a[aria-current="page"] { color: var(--accent); font-weight: 700; }
@media (max-width: 739px) {
  .appnav { left: 0; right: 0; bottom: 0; border-top: 1px solid var(--line); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  .appnav a { flex: 1 1 0; min-height: 52px; font-size: 11.5px; padding: 4px 2px; text-align: center; }
  .appnav a { flex-direction: column; gap: 1px; } .appnav .nav-icon { font-size: 18px; line-height: 1; }
  body.with-nav main { margin-bottom: 80px; }
  body.with-nav footer { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (min-width: 740px) {
  .appnav { top: 0; left: 0; bottom: 0; width: 190px; flex-direction: column; padding: 70px 10px 10px; border-right: 1px solid var(--line); }
  .appnav a { justify-content: flex-start; padding: 10px 12px; border-radius: 8px; }
  .appnav a[aria-current="page"] { background: var(--code-bg); }
  .appnav a { gap: 10px; } .appnav .nav-icon { width: 20px; text-align: center; }
  body.with-nav .bar, body.with-nav main, body.with-nav footer, body.with-nav .crumbs, body.with-nav .stepbar-wrap { margin-left: 190px; }
  body.with-nav main { max-width: 1200px; }
}
nav.tabs { display: flex; gap: 4px 14px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 6px 0 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
nav.tabs a { white-space: nowrap; text-decoration: none; padding: 6px 2px; }
nav.tabs a[aria-current="page"] { font-weight: 700; border-bottom: 2px solid var(--accent); }
nav.tabs.gates { border-bottom: 0; font-size: 14px; padding-top: 0; }
.badges .badge { margin: 2px 0; }
.badge.focus { background: #e8f0fe; color: #1a4fa0; }
@media (prefers-color-scheme: dark) { .badge.focus { background: #1d2b46; color: #9cc0ff; } }

/* dashboard */
.gate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 700px) { .gate-grid { grid-template-columns: repeat(6, 1fr); } }
.gate { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--muted); }
.gate.busy { border-color: var(--warn); background: var(--warn-bg); color: var(--warn); }
.gate-name { font-weight: 700; } .gate-count { font-size: 1.5rem; font-weight: 700; }
ul.list { list-style: none; padding: 0; margin: 0; }
ul.list > li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.list > li:last-child { border-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.filters label { margin: 0; flex: 1 1 140px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

/* viewer */
.sheet-wrap { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
table.sheet { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
table.sheet th { position: sticky; top: 0; z-index: 1; background: var(--code-bg); text-align: left; white-space: nowrap; }
table.sheet th, table.sheet td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; max-width: 420px; }
table.sheet td { white-space: pre-wrap; word-break: break-word; }
table.sheet tr > :first-child { position: sticky; left: 0; background: var(--card); }
table.sheet thead tr > :first-child { z-index: 2; background: var(--code-bg); }
.pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.pager input { width: 80px; display: inline-block; }
.pager [aria-disabled="true"] { opacity: .4; pointer-events: none; }
.pdf-page { margin: 0; } .pdf-page img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.kb { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .kb { grid-template-columns: 280px minmax(0, 1fr); align-items: start; } .kb-tree[open] { position: sticky; top: 70px; } }
.kb-tree ul { list-style: none; padding: 0; font-size: 14px; max-height: 70vh; overflow: auto; }
.kb-tree li a { display: block; padding: 4px 0; word-break: break-all; }
.md { overflow-wrap: anywhere; } .md pre { overflow-x: auto; }
input.wide { width: 100%; }
.ok-card { border-color: var(--ok); }

/* shared copies */
.share-banner { position: sticky; top: 0; z-index: 10; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; background: var(--card); border-bottom: 3px solid var(--accent); }
.share-banner p { margin: 2px 0; }
.share-banner.draft { border-bottom-color: var(--err); }
.draft-mark { color: var(--err); font-weight: 800; letter-spacing: .04em; }


/* Live build progress (DEC-RPKP-GOV-092). Native <progress>: the CSP forbids inline styles. */
progress.pbar { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 10px; border: 0;
  border-radius: 6px; background: var(--code-bg); overflow: hidden; color: var(--accent); }
progress.pbar::-webkit-progress-bar { background: var(--code-bg); border-radius: 6px; }
progress.pbar::-webkit-progress-value { background: var(--accent); border-radius: 6px; transition: width .4s ease; }
progress.pbar::-moz-progress-bar { background: var(--accent); border-radius: 6px; }
progress.pbar.small-bar, .bar-placeholder.small-bar { height: 6px; flex: 1 1 80px; min-width: 60px; }
.bar-placeholder { display: block; border-radius: 6px; background: var(--code-bg); }
.state-pause progress.pbar::-webkit-progress-value { background: var(--warn); } .state-pause progress.pbar::-moz-progress-bar { background: var(--warn); }
.state-bad progress.pbar::-webkit-progress-value { background: var(--err); } .state-bad progress.pbar::-moz-progress-bar { background: var(--err); }
.state-ok progress.pbar::-webkit-progress-value { background: var(--ok); } .state-ok progress.pbar::-moz-progress-bar { background: var(--ok); }
.progress-panel { padding: 10px 0; border-bottom: 1px solid var(--line); }
.progress-panel:last-child { border-bottom: 0; }
.pp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pp-pct { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-activity { margin: 6px 0 2px; font-size: 14px; }
.pp-note { margin: 4px 0; }
.pp-stages { list-style: none; padding: 0; margin: 8px 0; }
.pp-stages li { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 14px; }
.pp-stage { flex: 0 0 120px; }
.pp-steps { padding-left: 18px; }
.badge.pp-run { background: #e3edfb; color: #1f4e8c; } .badge.pp-ok { background: var(--ok-bg); color: var(--ok); }
.badge.pp-pause { background: var(--warn-bg); color: var(--warn); } .badge.pp-bad { background: var(--err-bg); color: var(--err); }
.badge.pp-wait { background: #efe6fb; color: #5b2a99; }
.minibar-slot:empty { display: none; }
.minibar { display: grid; gap: 3px; padding: 6px 12px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--fg); }
.minibar .mb-line { font-size: 13px; } .minibar .mb-activity { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 739px) {
  .minibar-slot { position: fixed; left: 0; right: 0; bottom: calc(52px + env(safe-area-inset-bottom)); z-index: 19; }
  .minibar { border-width: 1px 0 0; box-shadow: 0 -2px 6px rgba(0,0,0,.08); }
  body.with-nav main { margin-bottom: 140px; }
}
@media (min-width: 740px) {
  .minibar-slot { position: sticky; top: 52px; z-index: 9; margin-left: 190px; }
  .minibar { border-width: 0 0 1px; }
}

/* ---- Phase 9.3 / DEC-RPKP-GOV-100…104: command box, tasks, stepper, library, info buttons ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-count, .bell-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--err); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; margin-left: 4px; }
.bell { text-decoration: none; font-size: 18px; margin-right: 8px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 8px auto 0; padding: 0 12px; max-width: 1200px; font-size: 13px; }
.crumbs li + li::before { content: "›"; color: var(--muted); margin-right: 4px; }
.crumbs a { text-decoration: none; }
.stepbar-wrap { position: sticky; top: 52px; z-index: 8; background: var(--bg); padding: 6px 12px 4px; max-width: 1200px; margin: 0 auto; }
.stepbar ol { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; }
.stepbar li a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted); padding: 6px 2px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-size: 12px; min-height: 52px; text-align: center; }
.stepbar .st-num { width: 22px; height: 22px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--code-bg); font-weight: 700; font-size: 12px; }
.stepbar .st-done .st-num { background: var(--ok-bg); color: var(--ok); }
.stepbar .st-current a { border-color: var(--accent); color: var(--fg); font-weight: 600; }
.stepbar .st-current .st-num { background: var(--accent); color: var(--accent-fg); }
.stepbar .st-who { font-size: 10.5px; color: var(--warn); font-weight: 600; }
.stepbar .st-note { margin: 4px 2px 0; color: var(--muted); }
.next-btn { display: block; margin-top: 6px; text-align: center; }
.flash.next { background: none; border: 0; padding: 0; } .flash.next .button { display: block; text-align: center; }
.button.secondary, button.secondary { background: var(--card); color: var(--accent); border: 1px solid var(--accent); }
.work-cards { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 740px) { .work-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .work-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.work-cards .card { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.work-cards .card .button { margin-top: auto; }
.wc-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .wc-step { font-weight: 700; }
.wc-count { font-size: 28px; font-weight: 700; margin: 0; line-height: 1; }
.work.readonly { opacity: .85; }
.empty-state { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px; color: var(--muted); }
details.tip { display: inline-block; position: relative; vertical-align: middle; margin-left: 2px; }
details.tip > summary { list-style: none; cursor: pointer; display: inline-flex; width: 20px; height: 20px; border-radius: 10px;
  align-items: center; justify-content: center; font: italic 700 12px Georgia, serif; color: var(--accent); border: 1px solid var(--accent); }
details.tip > summary::-webkit-details-marker { display: none; }
details.tip > summary::before { content: ""; position: absolute; inset: -12px; } /* a 44px tap target */
.tip-body { position: absolute; z-index: 30; left: -8px; top: 26px; width: min(300px, 80vw); background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; box-shadow: 0 4px 14px rgba(0,0,0,.15); font-size: 13px; font-weight: 400; color: var(--fg); }
.tip-i { font: italic 700 12px Georgia, serif; border: 1px solid var(--accent); border-radius: 9px; padding: 0 5px; color: var(--accent); }
dl.gloss dt { font-weight: 700; margin-top: 10px; } dl.gloss dd { margin: 2px 0 0; }
.command-hero { margin: 10px 0 18px; }
.command-hero h1 { font-size: 1.6rem; }
.command-form textarea { width: 100%; font-size: 18px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); }
.command-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 8px; }
.command-row button { min-width: 96px; min-height: 44px; }
.attach { font-size: 14px; color: var(--accent); cursor: pointer; } .attach input { display: block; font-size: 13px; max-width: 220px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 10px 0; }
.chip, button.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--fg);
  border-radius: 18px; padding: 8px 12px; min-height: 40px; font-size: 14px; cursor: pointer; }
.chip:has(input:checked) { border-color: var(--accent); background: #e3edfb; }
@media (prefers-color-scheme: dark) { .chip:has(input:checked) { background: #1d2b46; } }
fieldset.chip-q { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.recent-strip { list-style: none; display: flex; gap: 8px; overflow-x: auto; padding: 0 0 6px; margin: 0 0 10px; -webkit-overflow-scrolling: touch; }
.recent-strip a { display: flex; flex-direction: column; min-width: 150px; max-width: 200px; padding: 8px 10px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--fg); }
.library-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .library-filters .grow { flex: 1 1 260px; }
.library-filters input[type=search] { width: 100%; min-height: 44px; }
.filter-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-top: 8px; }
.lib-group .cards { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 740px) { .lib-group .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pack-card { margin: 0; } .pack-card.nested { border-style: dashed; } .pc-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nested-list { margin-top: 8px !important; grid-template-columns: 1fr !important; }
.badge.status-needs-review, .badge.status-stale { background: var(--warn-bg); color: var(--warn); }
.badge.status-needs-refresh { background: var(--err-bg); color: var(--err); }
.badge.status-released { background: var(--ok-bg); color: var(--ok); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 14px 0; }
.plan-fields dt { font-weight: 600; margin-top: 10px; } .plan-fields dd { margin: 4px 0 0; }
.choice-row { display: grid; gap: 6px; }
label.choice { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
label.choice:has(input:checked) { border-color: var(--accent); }
.tag-a, .tag-b { font-weight: 700; font-size: 12px; padding: 0 6px; border-radius: 6px; background: var(--code-bg); }
.plan-items { list-style: none; padding: 0; } .plan-items > li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.inex { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.question { border-bottom: 1px solid var(--line); padding: 8px 0; } .answer { color: var(--ok); }
.inline-defer { margin-top: 6px; }
pre.brief { white-space: pre-wrap; font-size: 14px; }
.preparing { border-color: var(--accent); }
.notif .unread { font-weight: 600; } .notif .dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--accent); margin-right: 6px; }
.walk { max-width: 560px; margin: 20px auto; } .walk .dots { display: flex; gap: 6px; justify-content: center; margin: 10px 0; }
.walk .dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--line); } .walk .dots span.on { background: var(--accent); }
.walk-nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.mock { border: 2px solid var(--line); border-radius: 14px; padding: 10px; background: var(--bg); font-size: 14px; }
.mock .callout { display: inline-block; background: var(--mark); color: #000; border-radius: 10px; padding: 0 7px; font-weight: 700; font-size: 12px; margin-right: 4px; }
.admin-links { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } .admin-links .card { margin: 0; }
details.tip:not([open]) .tip-body { display: none; }
@media (max-width: 739px) {
  .tip-body { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(70px + env(safe-area-inset-bottom)); width: auto; }
}
.plan-items, .plan-fields, .prov, .summary { overflow-wrap: anywhere; }
.plan-items .badge, .prov .badge { white-space: normal; }
.plan-items code, .plan-fields code { overflow-wrap: anywhere; white-space: normal; }
.appnav a { min-width: 0; }
.appnav .nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.appnav a { position: relative; }
@media (max-width: 739px) { .appnav .nav-count { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; } }
.nowrap { white-space: nowrap; } label.choice input.grow { flex: 1 1 auto; min-width: 0; }
@media (max-width: 739px) {
  .stepbar-wrap { position: static; }
  .stepbar li a { min-height: 44px; padding: 4px 1px; font-size: 11px; }
}
details.tip > summary { padding: 0; margin: 0; min-height: 0; line-height: 18px; background: none; box-sizing: border-box; }
.shots { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.shots li { display: flex; flex-direction: column; gap: 4px; } .shots img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.deliverables { display: grid; gap: 8px; margin: 8px 0; } .deliv { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.row-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.program-row legend { font-weight: 700; } .loc { font-size: 12px; background: var(--code-bg); border-radius: 6px; padding: 0 5px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.form-actions .wide { flex: 1 1 100%; }
.master-form label { display: block; margin: 8px 0; } .master-form input:not([type=checkbox]):not([type=radio]), .master-form textarea { width: 100%; }
