/* base reset */
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
/* Layout: a plan-sheet title block on top, then a field checklist of span tags you can tap through on a phone. */
:root {
  --bg: #eef2f1;
  --surface: #ffffff;
  --surface-2: #f6f8f7;
  --ink: #14211e;
  --muted: #586864;
  --faint: #8a9894;
  --line: #d3dcd9;
  --line-strong: #a9b7b3;
  --accent: #1d5ea8;
  --accent-ink: #ffffff;
  --accent-soft: #e3edf8;
  --span: #2f7a1f;
  --span-soft: #eaf4e5;
  --conduit: #a8247a;
  --conduit-soft: #f8e8f2;
  --ok: #18794a;
  --ok-soft: #e1f2e8;
  --issue: #c2410c;
  --issue-soft: #fbe9df;
  --warn: #9a6400;
  --warn-soft: #fbf1d9;
  --on-status: #ffffff;
  --hl: #ff5a00;
  --hl-fill: rgba(255, 200, 0, .28);
  --vbg: #59625f;
  --shadow: 0 1px 2px rgba(20, 33, 30, .06), 0 2px 8px rgba(20, 33, 30, .05);
  --f-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1514; --surface: #172020; --surface-2: #1c2625; --ink: #e4ecea; --muted: #a2b2ae; --faint: #74847f;
    --line: #2b3735; --line-strong: #44524f; --accent: #6aa7ec; --accent-ink: #0b1a2b; --accent-soft: #1a2a3c;
    --span: #7fc46a; --span-soft: #1c2b1a; --conduit: #e27cbd; --conduit-soft: #33192b;
    --ok: #57c48b; --ok-soft: #15291f; --issue: #f08a5a; --issue-soft: #34201a; --warn: #e2b04d; --warn-soft: #2e2615; --on-status: #0f1514;
    --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1514; --surface: #172020; --surface-2: #1c2625; --ink: #e4ecea; --muted: #a2b2ae; --faint: #74847f;
  --line: #2b3735; --line-strong: #44524f; --accent: #6aa7ec; --accent-ink: #0b1a2b; --accent-soft: #1a2a3c;
  --span: #7fc46a; --span-soft: #1c2b1a; --conduit: #e27cbd; --conduit-soft: #33192b;
  --ok: #57c48b; --ok-soft: #15291f; --issue: #f08a5a; --issue-soft: #34201a; --warn: #e2b04d; --warn-soft: #2e2615; --on-status: #0f1514;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.45; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }

/* top bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; align-items: center; gap: 12px; padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 1240px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.brand svg { flex: none; }
.bar-sp { flex: 1; min-width: 0; }
.jobsel { min-width: 0; max-width: 260px; flex: 0 1 auto; height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn.danger { color: var(--issue); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.sm { height: 32px; padding: 0 10px; font-size: 14px; }

main { max-width: 1240px; margin: 0 auto; padding-block: 18px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 16px; }
.note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.off { background: var(--faint); }

/* title block */
.tb { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); border: 1.5px solid var(--ink); background: var(--surface); }
.tb-wo { padding: 14px 16px; border-right: 1.5px solid var(--ink); display: grid; align-content: space-between; gap: 10px; }
.lbl { font-family: var(--f-display); font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.wo { font-family: var(--f-display); font-weight: 700; font-size: clamp(38px, 7vw, 56px); line-height: .95; letter-spacing: .01em; }
.tb-proj { font-family: var(--f-display); font-weight: 600; font-size: 20px; text-transform: uppercase; letter-spacing: .03em; }
.tb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tb-cell { padding: 10px 14px; border-bottom: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); min-width: 0; }
.tb-cell:nth-child(3n) { border-right: 0; }
.tb-cell .v { font-weight: 600; overflow-wrap: anywhere; }
.tb-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px; align-items: center; }

/* summary row */
.sum { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card h2 { margin: 0 0 10px; font-family: var(--f-display); font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .04em; text-wrap: balance; }
.big { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
.big b { font-family: var(--f-display); font-size: 40px; font-weight: 700; line-height: 1; }
.big span { color: var(--muted); }
.pbar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); margin: 12px 0 10px; }
.pbar i { display: block; height: 100%; }
.pbar .p-ok { background: var(--ok); }
.pbar .p-is { background: var(--issue); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.xc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.xc summary::-webkit-details-marker { display: none; }
.xc summary h2 { margin: 0 0 4px; }
.xc summary svg { flex: none; color: var(--muted); transition: transform .15s; }
.xc[open] summary svg { transform: rotate(180deg); }
.xc[open] .checks { margin-top: 10px; }
.checks { display: grid; gap: 0; }
.chk { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.chk:last-child { border-bottom: 0; }
.chk .q { font-family: var(--f-mono); font-size: 13px; white-space: nowrap; }
.ok-ic { color: var(--ok); font-weight: 700; }
.bad-ic { color: var(--issue); font-weight: 700; }
.chk small { display: block; color: var(--faint); font-size: 12px; }

/* tabs + filters */
.tabs { display: flex; gap: 2px; border-bottom: 1.5px solid var(--ink); overflow-x: auto; }
.tab { border: 0; background: transparent; padding: 10px 14px 8px; font-family: var(--f-display); font-weight: 600; font-size: 16px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1.5px; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab em { font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--faint); margin-left: 4px; }
.filters { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .7fr) minmax(0, .7fr); gap: 8px; }
.field { display: grid; gap: 4px; min-width: 0; }
.inp { height: 40px; width: 100%; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); min-width: 0; }
textarea.inp { height: auto; min-height: 64px; padding: 8px 10px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip b { font-family: var(--f-mono); font-weight: 500; font-size: 12px; opacity: .75; }
.count-line { font-size: 13px; color: var(--muted); }

/* span rows */
.list { display: grid; gap: 8px; }
.row { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); border-left: 5px solid var(--line-strong); }
.row.st-done { border-left-color: var(--ok); }
.row.st-issue { border-left-color: var(--issue); }
.row-main { display: grid; grid-template-columns: 72px minmax(0, 1.3fr) 76px minmax(0, 1.5fr) auto auto; gap: 12px; align-items: center; padding: 10px 10px 10px 12px; }
.tag { display: inline-grid; place-items: center; min-width: 56px; height: 30px; padding: 0 6px; border: 2px solid var(--span); color: var(--span); background: var(--span-soft); font-family: var(--f-mono); font-weight: 600; font-size: 16px; border-radius: 3px; }
.street { font-weight: 600; text-transform: uppercase; font-size: 14px; letter-spacing: .02em; overflow-wrap: anywhere; }
.sub { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.verify { display: inline-flex; align-items: center; gap: 4px; color: var(--warn); background: var(--warn-soft); border-radius: 3px; padding: 0 6px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ft { font-family: var(--f-mono); font-weight: 600; font-size: 17px; white-space: nowrap; }
.ft small { font-size: 12px; color: var(--muted); font-weight: 400; }
.conds { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; min-width: 0; }
.cq { font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .02em; white-space: nowrap; }
.ctag { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--conduit); color: var(--conduit); background: var(--conduit-soft); font-family: var(--f-mono); font-size: 12px; padding: 0 5px; border-radius: 3px; white-space: nowrap; line-height: 20px; }
.ctag span { color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; height: 36px; padding: 0 12px; font-weight: 600; font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button[aria-pressed="true"].s-done { background: var(--ok); color: var(--on-status); }
.seg button[aria-pressed="true"].s-issue { background: var(--issue); color: var(--on-status); }
.seg button[aria-pressed="true"].s-todo { background: var(--surface-2); color: var(--ink); }
.seg button[disabled] { cursor: not-allowed; opacity: .6; }
.exp { width: 36px; height: 36px; border: 0; background: transparent; border-radius: 6px; display: grid; place-items: center; color: var(--muted); }
.exp:hover { background: var(--surface-2); color: var(--ink); }
.exp svg { transition: transform .15s; }
.row.open .exp svg { transform: rotate(180deg); }
.row-det { border-top: 1px dashed var(--line); padding: 12px 14px 14px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.det-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.det-list li { display: grid; gap: 2px; }
.det-list .muted { color: var(--muted); font-size: 13px; }
.form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-content: start; }
.form .full { grid-column: 1 / -1; }
.var { font-size: 12.5px; }
.var.bad { color: var(--issue); font-weight: 600; }
.who { font-size: 12.5px; color: var(--faint); }
.mini-note { font-size: 13px; color: var(--muted); font-style: italic; overflow-wrap: anywhere; }

.srow-main { display: grid; grid-template-columns: minmax(170px, 230px) minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 10px 10px 12px; }
.c-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sic { flex: none; }
.sid { font-size: 13.5px; white-space: nowrap; color: var(--muted); }
.sid b { color: var(--ink); font-weight: 600; font-size: 16px; }
.stype { font-size: 12.5px; color: var(--muted); }
.spl { display: inline-flex; align-items: center; border: 1px solid var(--accent); color: var(--accent); background: var(--accent-soft); border-radius: 3px; padding: 0 6px; font-size: 12px; font-weight: 600; }
.sprog { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.pbar.thin { height: 10px; margin: 8px 0; }
.blist { display: grid; gap: 0; border-top: 1px solid var(--line); }
.bitem { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bmain { min-width: 0; flex: 1 1 260px; display: grid; gap: 2px; }
.bwo { font-family: var(--f-display); font-weight: 700; font-size: 20px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bfile { font-size: 12.5px; color: var(--faint); overflow-wrap: anywhere; }
.bline { font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.bst { font-family: var(--f-body); font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.bst.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.bst.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.bst.bad { background: var(--issue-soft); color: var(--issue); border-color: var(--issue); }
.bst.run { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.bchk { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.bchk.ok { color: var(--ok); } .bchk.bad { color: var(--issue); }
.bact { flex: none; }
/* tables */
.tw { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
td.r, th.r { text-align: right; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--surface-2); }
.mbar { width: 110px; height: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; display: flex; }
.mbar i { display: block; height: 100%; }

/* intake */
.drop { border: 2px dashed var(--line-strong); border-radius: 10px; background: var(--surface); padding: 28px 20px; display: grid; justify-items: center; gap: 10px; text-align: center; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop h2 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 24px; text-transform: uppercase; letter-spacing: .03em; text-wrap: balance; }
.drop p { margin: 0; color: var(--muted); max-width: 56ch; }
.prog { width: min(420px, 100%); height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.result { display: grid; gap: 12px; }
.result .kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kv div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; min-width: 0; }
.kv b { display: block; font-family: var(--f-display); font-size: 24px; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.alert { border-radius: 6px; padding: 10px 12px; font-size: 14px; }
.alert.warn { background: var(--warn-soft); color: var(--ink); border: 1px solid var(--warn); }
.alert.err { background: var(--issue-soft); color: var(--ink); border: 1px solid var(--issue); }
.empty { text-align: center; color: var(--muted); padding: 32px 12px; }
.skel { height: 120px; border-radius: 8px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sh 1.4s linear infinite; border: 1px solid var(--line); }
@keyframes sh { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } .exp svg, .prog i { transition: none; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 6px; font-size: 14px; max-width: calc(100% - 32px); z-index: 20; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 900px) {
  .sum { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filters .field:first-child { grid-column: 1 / -1; }
  .row-main { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "tag st ft" "cd cd exp" "seg seg seg"; row-gap: 8px; }
  .row-main > .c-tag { grid-area: tag; } .row-main > .c-st { grid-area: st; } .row-main > .c-ft { grid-area: ft; text-align: right; }
  .row-main > .c-cd { grid-area: cd; } .row-main > .c-seg { grid-area: seg; } .row-main > .c-exp { grid-area: exp; justify-self: end; }
  .seg { display: flex; width: 100%; } .seg button { flex: 1; justify-content: center; padding: 0 6px; }
  .srow-main { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id exp" "info info" "seg seg"; row-gap: 8px; }
  .srow-main > .c-id { grid-area: id; } .srow-main > .c-info { grid-area: info; } .srow-main > .c-seg { grid-area: seg; } .srow-main > .c-exp { grid-area: exp; }
  .row-det { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .tb { grid-template-columns: minmax(0, 1fr); }
  .tb-wo { border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .tb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-cell:nth-child(3n) { border-right: 1px solid var(--line-strong); }
  .tb-cell:nth-child(2n) { border-right: 0; }
  .brand .bt { display: none; }
  .bar-in { gap: 8px; }
  .jobsel { flex: 1 1 auto; max-width: none; }
  .up-label { display: none; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .tab { padding: 10px 9px 8px; font-size: 15px; }
  .seg button { font-size: 13px; }
}

/* standalone app: sign-in, account menu, team */
.bar-in { position: relative; }
.acct { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-2); padding: 0; display: grid; place-items: center; flex: none; }
.acct .av { font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .03em; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--issue); color: var(--on-status); font-size: 11px; font-weight: 700; }
.acct .badge { position: absolute; top: -4px; right: -4px; }
.menu { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); top: calc(100% + 6px); width: min(300px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; z-index: 30; display: grid; }
.menu-who { display: grid; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-who span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.menu-item { text-align: left; border: 0; background: transparent; padding: 10px; border-radius: 6px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.menu-item:hover { background: var(--surface-2); }
.rolechip { display: inline-block; width: fit-content; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); background: var(--accent-soft); border-radius: 3px; padding: 1px 6px; }
.auth { max-width: 440px; width: 100%; margin: 24px auto 0; display: grid; gap: 12px; }
.auth h2 { margin: 0; }
.auth p { margin: 0; }
.auth-brand { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.auth-form { display: grid; gap: 12px; }
.auth-form .btn { height: 44px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.linkbtn { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.alert.okmsg { background: var(--ok-soft); color: var(--ink); border: 1px solid var(--ok); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.dot.warn { background: var(--warn); }
.team { display: grid; margin-top: 12px; border-top: 1px solid var(--line); }
.tm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tm-wait { background: var(--warn-soft); margin: 0 -16px; padding: 10px 16px; }
.tm-who { display: grid; gap: 1px; min-width: 0; flex: 1 1 200px; }
.tm-who span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.tm-who .tm-date { font-size: 12px; color: var(--faint); }
.tm-role { flex: 0 0 auto; }
.tm-role .inp { width: 150px; }

/* drawing viewer */
.c-exp { display: flex; gap: 2px; align-items: center; justify-content: flex-end; }
.vbtn-row { color: var(--accent); }
body.noscroll { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 40; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--vbg); }
.vbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line-strong);
  padding-top: calc(8px + env(safe-area-inset-top, 0px)); padding-bottom: 8px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
.vtitle { display: grid; min-width: 0; }
.vtitle b { font-family: var(--f-display); font-size: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.vtitle span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.vtools { display: flex; gap: 6px; align-items: center; }
.vbtn { height: 38px; min-width: 38px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 18px; font-weight: 600; display: inline-grid; place-items: center; }
.vbtn.wide { font-size: 14px; }
.vbtn.close { font-size: 22px; }
.vbtn:hover { border-color: var(--ink); }
.vscroll { position: relative; overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; overscroll-behavior: contain; }
.vstage { position: relative; margin: 0 auto; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.35); }
.vstage canvas { display: block; }
.vmarks { position: absolute; inset: 0; pointer-events: none; }
.vbox { position: absolute; border: 3px solid var(--hl); background: var(--hl-fill); border-radius: 4px; box-shadow: 0 0 0 2px #fff, 0 0 18px rgba(255, 90, 0, .55); }
.vring { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 4px solid var(--hl); box-shadow: 0 0 0 3px #fff, 0 0 0 7px rgba(255, 90, 0, .35); animation: vpulse 1.6s ease-out infinite; }
.vlink { position: absolute; height: 0; border-top: 3px dashed var(--hl); transform-origin: 0 0; }
@keyframes vpulse { 0% { transform: scale(.8); opacity: 1; } 70% { transform: scale(1.25); opacity: .55; } 100% { transform: scale(.8); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vring { animation: none; } }
.vmsg { position: sticky; left: 0; top: 40%; margin: 0 auto; width: fit-content; max-width: min(420px, calc(100% - 32px)); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 12px 16px; box-shadow: 0 6px 20px rgba(0,0,0,.3); display: flex; gap: 10px; align-items: center; font-size: 14px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: vspin .8s linear infinite; flex: none; }
@keyframes vspin { to { transform: rotate(360deg); } }
.vfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; background: var(--surface); border-top: 1px solid var(--line-strong);
  padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
.vsum { font-size: 14px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .vtools { width: 100%; }
  .vtools .wide { flex: 1; }
  .vfoot .seg { width: 100%; display: flex; } .vfoot .seg button { flex: 1; justify-content: center; }
}

/* archive + job name */
.archived-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 14px; border-radius: 8px; background: var(--warn-soft); border: 1px solid var(--warn); font-size: 14px; }
.confirm-box { flex: 1 1 100%; display: grid; gap: 8px; padding: 10px 12px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-strong); font-size: 14px; }
.confirm-box p { margin: 0; }
.rename { display: grid; gap: 6px; }
.rename .inp { height: 36px; }
.confirm-box { min-width: 0; width: 100%; box-sizing: border-box; }
.confirm-box .btn { white-space: normal; height: auto; min-height: 32px; padding-block: 6px; text-align: left; max-width: 100%; }
