/* Girdernote · blueprint and site-diary design system
   Type: Rubik 12/14/16/20/28/40 (+11 caps labels). Space: 4-based. Radius 2/4/6. Shadows only on overlays. */

:root {
  --paper: #EEF3F8;
  --grid-minor: rgba(29, 78, 137, .055);
  --grid-major: rgba(29, 78, 137, .11);
  --sheet: #FBFDFF;
  --sheet-2: #F3F7FB;
  --sheet-3: #E8EFF7;
  --line: #C9D6E5;
  --line-2: #DDE6F0;
  --line-strong: #9AAFC6;
  --ink: #12243A;
  --ink-2: #3D536E;
  --ink-3: #5A6E87;
  --blue: #1D4E89;
  --blue-ink: #153D6D;
  --blue-soft: #DDF1FF;
  --blue-tint: #E9F2FA;
  --on-blue: #FFFFFF;
  --primary-bg: #1D4E89;
  --primary-ink: #FFFFFF;
  --primary-hover: #163F70;
  --yellow: #FFD400;
  --yellow-soft: #FFF5BF;
  --yellow-ink: #5A4800;
  --ok: #2B7A50;
  --ok-soft: #E2F2E8;
  --bad: #B5372A;
  --bad-soft: #FBE6E2;
  --hatch: rgba(29, 78, 137, .22);
  --focus: #1D4E89;
  --sh-pop: 0 1px 2px rgba(18, 36, 58, .08), 0 14px 36px rgba(18, 36, 58, .18);
  --scrim: rgba(12, 28, 48, .42);
  --pl-paper: #FBFDFF;
  --pl-ink: #163D6D;
  --pl-wall: #12243A;
  --pl-dim: #1D4E89;
  --pl-grid: rgba(29, 78, 137, .32);
  --pl-furn: rgba(29, 78, 137, .55);
  --pl-text: #1D4E89;
  --pl-hatchc: rgba(29, 78, 137, .22);
  --ph-sky: #DDEBF7; --ph-light: #C3D6EA; --ph-mid: #93AFCD; --ph-dark: #2F5B8E; --ph-line: rgba(18, 36, 58, .45);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r1: 2px; --r2: 4px; --r3: 6px;
  --t-fast: 140ms; --t-mid: 200ms;
  --top-h: 56px;
  --font: "Rubik", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0B1A2E;
  --grid-minor: rgba(221, 241, 255, .04);
  --grid-major: rgba(221, 241, 255, .085);
  --sheet: #10243D;
  --sheet-2: #132B48;
  --sheet-3: #18345A;
  --line: #27466B;
  --line-2: #1D3A5C;
  --line-strong: #3F6390;
  --ink: #E8F2FC;
  --ink-2: #B9CCE0;
  --ink-3: #93ABC5;
  --blue: #8DBDF2;
  --blue-ink: #B5D6FA;
  --blue-soft: rgba(141, 189, 242, .16);
  --blue-tint: rgba(141, 189, 242, .09);
  --on-blue: #0B1A2E;
  --primary-bg: #DDF1FF;
  --primary-ink: #0C2442;
  --primary-hover: #F2FAFF;
  --yellow-soft: rgba(255, 212, 0, .14);
  --yellow-ink: #FFE25C;
  --ok: #74CF9C;
  --ok-soft: rgba(116, 207, 156, .14);
  --bad: #FF9282;
  --bad-soft: rgba(255, 146, 130, .14);
  --hatch: rgba(141, 189, 242, .3);
  --focus: #DDF1FF;
  --sh-pop: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 44px rgba(0, 0, 0, .45);
  --scrim: rgba(2, 8, 18, .62);
  --pl-paper: #123056;
  --pl-ink: #DDF1FF;
  --pl-wall: #EEF7FF;
  --pl-dim: #BFE0FF;
  --pl-grid: rgba(221, 241, 255, .3);
  --pl-furn: rgba(221, 241, 255, .55);
  --pl-text: #DDF1FF;
  --pl-hatchc: rgba(221, 241, 255, .22);
  --ph-sky: #1E4471; --ph-light: #2C5687; --ph-mid: #3E6EA3; --ph-dark: #A9CCF2; --ph-line: rgba(221, 241, 255, .5);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 20px; color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid-major) 1px, transparent 1px), linear-gradient(90deg, var(--grid-major) 1px, transparent 1px), linear-gradient(var(--grid-minor) 1px, transparent 1px), linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  background-position: -1px -1px;
  min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
code, kbd { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; }
kbd { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--r2); background: var(--sheet); color: var(--ink-2); line-height: 18px; text-align: center; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.grow { flex: 1; }
.late-t { color: var(--bad); font-weight: 500; }
.due-t { color: var(--blue); font-weight: 500; }
.warn-t { color: var(--yellow-ink); display: inline-flex; gap: 4px; align-items: center; font-weight: 500; }
:root[data-theme="light"] .warn-t { color: #7A5F00; }
.danger-t { color: var(--bad) !important; }
.fine { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.kicker { display: block; font-size: 11px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--ink-3); }
.lbl { display: block; font-size: 11px; line-height: 16px; letter-spacing: .07em; text-transform: uppercase; font-weight: 500; color: var(--ink-3); }
.code { font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: .02em; color: var(--blue); }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary-bg); color: var(--primary-ink); padding: 8px 12px; border-radius: var(--r2); }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }
::selection { background: var(--blue-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--r2); font-size: 14px; font-weight: 500; line-height: 20px; white-space: nowrap; text-decoration: none;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  position: relative;
}
.btn .ic { width: 16px; height: 16px; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn.lg { height: 44px; padding: 0 18px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--primary-bg); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.primary:active { transform: translateY(1px); }
.btn.secondary { background: var(--sheet); border-color: var(--line-strong); color: var(--ink); }
.btn.secondary:hover { border-color: var(--blue); color: var(--blue); }
.btn.quiet { background: transparent; color: var(--ink-2); }
.btn.quiet:hover { background: var(--blue-tint); color: var(--blue); }
.btn.danger { background: var(--bad); color: #fff; }
:root[data-theme="dark"] .btn.danger { color: #2A0A06; }
.btn.danger:hover { filter: brightness(.94); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--primary-ink); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid transparent; border-radius: var(--r2); background: transparent; color: var(--ink-2); flex: none; transition: background-color var(--t-fast), color var(--t-fast); }
.icon-btn:hover { background: var(--blue-tint); color: var(--blue); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; background: none; }
.icon-btn.sm { width: 30px; height: 30px; }
.link { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-col { display: grid; gap: 8px; }

/* segmented control */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r2); background: var(--sheet); padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: var(--r1); height: 30px; padding: 0 10px; font-size: 13px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button:hover { color: var(--blue); background: var(--blue-tint); }
.seg button.on { background: var(--blue); color: var(--on-blue); }
.seg button em { font-style: normal; font-size: 11px; font-variant-numeric: tabular-nums; opacity: .75; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.sm { gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--sheet); color: var(--ink-2); font-size: 13px; font-weight: 500; transition: border-color var(--t-fast), background-color var(--t-fast); }
.chips.sm .chip { min-height: 26px; padding: 0 10px; font-size: 12px; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.on { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-ink); }
:root[data-theme="dark"] .chip.on { color: var(--ink); }
.chip .ic { width: 16px; height: 16px; }

/* tags and status */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--r1); font-size: 11px; line-height: 20px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; border: 1px solid var(--line); color: var(--ink-2); background: var(--sheet-2); }
.st-open, .st-overdue, .st-requested { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: var(--bad-soft); }
.st-requested { color: var(--yellow-ink); border-color: color-mix(in srgb, var(--yellow) 70%, transparent); background: var(--yellow-soft); }
:root[data-theme="light"] .st-requested { color: #6A5300; }
.st-fixed, .st-for-approval, .st-part, .st-submitted, .st-hold, .st-returned { color: #6A5300; border-color: #E7C200; background: var(--yellow-soft); }
:root[data-theme="dark"] .st-fixed, :root[data-theme="dark"] .st-for-approval, :root[data-theme="dark"] .st-part, :root[data-theme="dark"] .st-submitted, :root[data-theme="dark"] .st-hold, :root[data-theme="dark"] .st-returned { color: var(--yellow-ink); border-color: rgba(255, 212, 0, .45); }
.st-closed, .st-delivered, .st-paid, .st-gfc, .st-approved, .st-done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-soft); }
.st-ordered, .st-certified, .st-active { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, transparent); background: var(--blue-tint); }
.st-cancelled, .st-superseded, .st-draft, .st-info { color: var(--ink-3); background: var(--sheet-2); }
.st-superseded, .st-cancelled { text-decoration: line-through; text-decoration-thickness: 1px; }
.late { display: inline-block; font-size: 11px; font-weight: 600; color: var(--bad); background: var(--bad-soft); padding: 0 5px; border-radius: var(--r1); line-height: 18px; }
.early, .ok-t { display: inline-block; font-size: 11px; font-weight: 600; color: var(--ok); background: var(--ok-soft); padding: 0 5px; border-radius: var(--r1); line-height: 18px; }

/* meters */
.meter { display: block; height: 6px; background: var(--sheet-3); border-radius: 1px; overflow: hidden; position: relative; }
.meter i { display: block; height: 100%; background: var(--blue); }
.meter.sm { height: 4px; }
.track { position: relative; display: block; }
.plan-tick { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--ink); transform: translateX(-1px); }

/* stamp */
.stamp { display: inline-grid; gap: 1px; padding: 6px 12px; border: 2px solid currentColor; outline: 1px solid currentColor; outline-offset: 2px; border-radius: var(--r1); color: var(--blue); transform: rotate(-4deg); text-align: center; font-variant-numeric: tabular-nums; background: transparent; }
.stamp b { font-size: 13px; letter-spacing: .12em; font-weight: 700; line-height: 18px; }
.stamp i { font-style: normal; font-size: 10px; letter-spacing: .14em; font-weight: 500; line-height: 14px; }
.stamp.ok { color: var(--ok); }
.stamp.pending { color: #8A6A00; }
:root[data-theme="dark"] .stamp.pending { color: var(--yellow-ink); }
.stamp.void { color: var(--bad); }
.stamp.draft { color: var(--ink-3); }
.stamp.paid { color: var(--blue); transform: rotate(3deg); }
.stamp.thunk { animation: thunk 220ms cubic-bezier(.2, .7, .3, 1); }
@keyframes thunk { from { transform: rotate(-4deg) scale(1.35); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }

/* dimension line */
.dimline { position: relative; display: block; padding: 0 0 16px; color: var(--blue); min-width: 120px; }
.dimline svg { width: 100%; height: 16px; overflow: visible; }
.dimline line { stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.dimline line.dm { stroke: var(--ink); stroke-width: 2; }
.dimline em { position: absolute; left: 50%; top: -1px; transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 600; line-height: 14px; background: var(--sheet); padding: 0 6px; color: var(--blue); font-variant-numeric: tabular-nums; }
.dimline small { position: absolute; bottom: 0; font-size: 11px; line-height: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dimline .da { left: 0; } .dimline .db { right: 0; }
.dimline.lg em { font-size: 13px; }

/* forms */
.field { display: grid; gap: 6px; align-content: start; }
.field > label, .flabel { font-size: 13px; font-weight: 500; color: var(--ink-2); line-height: 18px; display: flex; justify-content: space-between; gap: 8px; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea {
  width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r2); background: var(--sheet); color: var(--ink);
  font-size: 14px; line-height: 20px; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
textarea { resize: vertical; min-height: 64px; }
select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
input:disabled, select:disabled, textarea:disabled { background: var(--sheet-2); color: var(--ink-3); cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: .8; }
input[type=date] { font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--blue); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--blue); margin: 0; flex: none; }
.help { font-size: 12px; line-height: 16px; color: var(--ink-3); display: flex; gap: 4px; align-items: center; }
.help .ic { width: 14px; height: 14px; }
.help > span { display: inline-flex; align-items: center; gap: 4px; }
.err { font-size: 12px; line-height: 16px; color: var(--bad); font-weight: 500; }
.has-err input, .has-err select, .has-err textarea { border-color: var(--bad); }
.has-err input:focus { box-shadow: 0 0 0 3px var(--bad-soft); }
.chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.form-grid { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r2); background: var(--sheet); }
.stepper input { width: 64px !important; border: 0 !important; text-align: center; box-shadow: none !important; min-height: 34px !important; padding: 4px !important; font-variant-numeric: tabular-nums; }
.stepper .icon-btn { border-radius: 0; }
.stepper > b { min-width: 32px; text-align: center; }
.num-in { width: 96px !important; text-align: right; font-variant-numeric: tabular-nums; min-height: 32px !important; padding: 4px 8px !important; }
.search-in { position: relative; display: block; min-width: 220px; }
.search-in .ic { position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.search-in input { padding-left: 32px !important; min-height: 36px !important; }
.sort-in { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.sort-in select { width: auto; min-height: 36px; }

/* ---------- tables ---------- */
.table-wrap { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; }
table { border-collapse: collapse; width: 100%; }
.reg th { text-align: left; font-size: 11px; line-height: 16px; text-transform: uppercase; letter-spacing: .07em; font-weight: 500; color: var(--ink-3); padding: 10px 12px; background: var(--sheet-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.reg td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.reg tbody tr:last-child td { border-bottom: 0; }
.reg td small, .reg th small { display: block; color: var(--ink-3); font-size: 12px; line-height: 16px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.reg .r { text-align: right; }
.reg .c { text-align: center; }
.reg td.num, .reg td .num { font-variant-numeric: tabular-nums; }
.reg tr.click { cursor: pointer; }
.reg tr.click:hover td { background: var(--blue-tint); }
.reg tr.click:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.reg.tight td { padding: 8px 10px; }
.reg.tight th { padding: 8px 10px; }
.reg .code { white-space: nowrap; }
.bar-c { width: 30%; }
.hbar { display: block; height: 8px; background: var(--blue); opacity: .8; border-radius: 1px; min-width: 2px; }
.act-c { white-space: nowrap; }

/* ---------- shell ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 16px; padding: 0 24px; background: var(--sheet); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.mark { width: 28px; height: 28px; }
.mark-bg { fill: var(--blue); stroke: var(--blue); }
.mark-i { fill: var(--blue-soft); }
.mark-d { stroke: var(--blue-soft); stroke-width: 1; fill: none; opacity: .8; }
:root[data-theme="dark"] .mark-bg { fill: #DDF1FF; stroke: #DDF1FF; }
:root[data-theme="dark"] .mark-i { fill: #0F2B4E; }
:root[data-theme="dark"] .mark-d { stroke: #0F2B4E; }
.gnav { display: flex; gap: 2px; height: 100%; margin-left: 8px; }
.gnav a { display: inline-flex; align-items: center; padding: 0 12px; color: var(--ink-2); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.gnav a:hover { color: var(--blue); }
.gnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); }
.proj-switch { display: inline-flex; align-items: center; gap: 8px; height: 36px; max-width: 320px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--sheet-2); font-size: 13px; }
.proj-switch:hover { border-color: var(--blue); }
.proj-switch .pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.proj-switch .ic { width: 14px; height: 14px; color: var(--ink-3); }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.save-note { font-size: 12px; color: var(--ink-3); margin-right: 8px; opacity: 0; transition: opacity var(--t-mid); font-variant-numeric: tabular-nums; }
.save-note.on { opacity: 1; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--sheet); color: var(--ink-3); font-size: 13px; min-width: 240px; }
.search-btn span { flex: 1; text-align: left; }
.search-btn:hover { border-color: var(--blue); color: var(--ink-2); }
.search-btn .ic { width: 16px; height: 16px; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 4px; border: 0; background: none; border-radius: var(--r2); text-align: left; }
.user-btn:hover { background: var(--blue-tint); }
.user-btn b { display: block; font-size: 13px; line-height: 16px; font-weight: 500; }
.user-btn small { display: block; font-size: 11px; line-height: 14px; color: var(--ink-3); }
.av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-ink); font-size: 12px; font-weight: 600; flex: none; border: 1px solid var(--line); }
:root[data-theme="dark"] .av { color: var(--ink); }
.offline { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 8px 16px; background: var(--yellow); color: #3A2F00; font-weight: 500; font-size: 13px; }
.tabbar { display: none; }
main { display: block; padding-bottom: 48px; }
.page { max-width: 1360px; margin: 0 auto; padding: 24px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-h h1 { font-size: 40px; line-height: 44px; font-weight: 600; letter-spacing: -.02em; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sec { margin-top: 32px; }
.sec-h { font-size: 16px; line-height: 24px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: baseline; gap: 8px; }
.sec-h small { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.sec-h .count { font-size: 12px; font-weight: 600; color: var(--on-blue); background: var(--blue); border-radius: 10px; padding: 0 7px; line-height: 18px; font-variant-numeric: tabular-nums; }
.sec-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-row .sec-h { margin-bottom: 0; }
.mini-h { font-size: 11px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); margin: 20px 0 8px; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.hint { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); margin: 0 0 12px; min-height: 20px; }
.hint .ic { width: 16px; height: 16px; color: var(--blue); }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r2); margin-bottom: 16px; font-size: 13px; border: 1px solid var(--line); background: var(--sheet); }
.banner.warn { background: var(--yellow-soft); border-color: #E7C200; color: #4A3B00; }
:root[data-theme="dark"] .banner.warn { color: var(--ink); border-color: rgba(255, 212, 0, .45); }
.banner.warn .ic { color: #8A6A00; margin-top: 1px; }
:root[data-theme="dark"] .banner.warn .ic { color: var(--yellow); }
.plain li { padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.plain li:last-child { border-bottom: 0; }
.plain small { display: block; color: var(--ink-3); font-size: 12px; }
.only-phone { display: none; }

/* title block (project header) */
.titleblock { max-width: 1360px; margin: 24px auto 0; padding: 0 24px; display: grid; grid-template-columns: minmax(280px, 2.2fr) repeat(3, minmax(120px, 1fr)) minmax(220px, 1.6fr); }
.titleblock > .tbk { background: var(--sheet); border: 1px solid var(--line-strong); margin: 0 -1px -1px 0; padding: 10px 14px; min-width: 0; }
.tbk b { display: block; font-weight: 500; font-size: 14px; line-height: 20px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbk-main h1 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbk-main .sub { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbk .late, .tbk .early, .tbk .ok-t { margin-top: 2px; }
.tbk-dim .dimline { margin-top: 10px; }
.tbk-note { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; background: var(--yellow-soft) !important; color: var(--ink); font-weight: 500; }
.ptabs { max-width: 1360px; margin: 0 auto; padding: 0 24px; display: flex; gap: 0; border-bottom: 1px solid var(--line); position: relative; }
.ptab { display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px 11px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ptab .ic { width: 16px; height: 16px; color: var(--ink-3); }
.ptab:hover { color: var(--blue); }
.ptab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); }
.ptab[aria-current="page"] .ic { color: var(--blue); }
.ptab em { font-style: normal; font-size: 11px; font-weight: 600; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px; background: var(--sheet-3); color: var(--ink-2); padding: 0 5px; font-variant-numeric: tabular-nums; }
.ptab em.dot { min-width: 8px; width: 8px; height: 8px; padding: 0; background: var(--bad); }

/* figures strip: one ruled strip, not a wall of cards */
.figs { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--sheet); border-radius: var(--r2); margin-bottom: 20px; }
.figs.six { grid-template-columns: repeat(6, 1fr); }
.fig { padding: 14px 16px; border-left: 1px solid var(--line-2); min-width: 0; }
.fig:first-child { border-left: 0; }
.fig b { display: block; font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: -.01em; margin-top: 2px; white-space: nowrap; }
.fig small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); margin-top: 2px; }
.fig.warn { background: linear-gradient(90deg, var(--yellow) 0 3px, transparent 3px); }
.fig.key b { color: var(--blue); }

/* empty, skeleton */
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 40px 24px; border: 1px dashed var(--line-strong); border-radius: var(--r2); background: var(--sheet); }
.empty-ic { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; color: var(--blue); background: var(--blue-tint); }
.empty-ic .ic { width: 22px; height: 22px; }
.empty h3 { font-size: 16px; line-height: 24px; font-weight: 600; }
.empty p { color: var(--ink-3); max-width: 420px; }
.empty .btn { margin-top: 8px; }
.skel { display: grid; gap: 12px; padding: 16px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); }
.skel span { display: block; height: 14px; border-radius: 2px; background: linear-gradient(90deg, var(--sheet-3) 0, var(--sheet-2) 40%, var(--sheet-3) 80%); background-size: 400px 100%; animation: shimmer 1.1s linear infinite; }
@keyframes shimmer { from { background-position: -200px 0; } to { background-position: 200px 0; } }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 24px; bottom: 24px; z-index: 80; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 12px; background: var(--ink); color: var(--paper); border-radius: var(--r2); box-shadow: var(--sh-pop); animation: tin var(--t-mid) ease-out; }
:root[data-theme="dark"] .toast { background: #DDF1FF; color: #0C2442; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity var(--t-mid), transform var(--t-mid); }
.toast .t-ic { color: #9FE3BA; display: grid; }
:root[data-theme="dark"] .toast .t-ic { color: var(--ok); }
:root[data-theme="light"] .toast.err { background: #7A1E14; }
:root[data-theme="dark"] .toast.err { background: #FFD9D3; color: #4A0F07; }
.toast.err .t-ic { color: #FFB4A8; }
:root[data-theme="dark"] .toast.err .t-ic { color: #B5372A; }
.toast.info .t-ic { color: var(--blue-soft); }
:root[data-theme="dark"] .toast.info .t-ic { color: #1D4E89; }
.t-tx { flex: 1; min-width: 0; }
.t-tx b { display: block; font-weight: 500; font-size: 14px; line-height: 20px; }
.t-tx span { display: block; font-size: 12px; line-height: 16px; opacity: .78; }
.tbtn { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; border: 0; border-radius: var(--r2); background: transparent; color: inherit; font-weight: 600; font-size: 13px; white-space: nowrap; }
.tbtn:hover { background: rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .tbtn:hover { background: rgba(12, 36, 66, .1); }
.tbtn .ic { width: 15px; height: 15px; }
.tbtn.x { padding: 0 6px; opacity: .7; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- windows ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: var(--scrim); animation: fade var(--t-mid); }
#confirm-root .scrim { z-index: 90; }
@keyframes fade { from { opacity: 0; } }
.modal { position: fixed; z-index: 61; left: 50%; top: 8vh; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); max-height: 84vh; display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--line-strong); border-radius: var(--r3); box-shadow: var(--sh-pop); animation: pop var(--t-mid) ease-out; }
#confirm-root .modal { z-index: 91; top: 22vh; }
.modal.sm { width: min(440px, calc(100vw - 32px)); }
.modal.lg { width: min(1040px, calc(100vw - 48px)); top: 4vh; max-height: 92vh; }
.modal.drawer { left: auto; right: 0; top: 0; bottom: 0; transform: none; width: min(520px, 100vw); max-height: none; border-radius: 0; border-width: 0 0 0 1px; animation: slide var(--t-mid) ease-out; }
.modal.menu { width: 380px; left: auto; right: 16px; top: 64px; transform: none; max-height: calc(100vh - 80px); }
.modal.menu.menu-pj { right: auto; left: 300px; }
.modal.pal { width: min(620px, calc(100vw - 32px)); top: 12vh; }
.modal.pal .m-head { display: none; }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }
.modal.drawer, .modal.menu { --pop-x: 0; }
.modal.menu { animation: popm var(--t-mid) ease-out; }
@keyframes popm { from { opacity: 0; transform: translateY(-6px); } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.m-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--line-2); }
.m-ht { flex: 1; min-width: 0; }
.m-head h2 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.m-head p { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
/* block layout on purpose: a height-limited grid squeezes drawings (aspect-ratio SVGs) to nothing once the body scrolls */
.m-body { padding: 16px 20px 20px; overflow-y: auto; overflow-x: hidden; flex: 1 1 auto; min-height: 0; display: block; }
.m-body > * + * { margin-top: 16px; }
.m-body > .sr + *, .m-body > .help + * { margin-top: 8px; }
.m-body > p { color: var(--ink-2); }
.m-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line-2); background: var(--sheet-2); border-radius: 0 0 var(--r3) var(--r3); flex-wrap: wrap; }
.drawer .m-foot { border-radius: 0; }
.menu-list { display: grid; gap: 2px; }
.menu-i { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: var(--r2); background: none; text-align: left; color: var(--ink); text-decoration: none; }
.menu-i:hover { background: var(--blue-tint); }
.menu-i.on { background: var(--blue-tint); }
.menu-i > .ic:first-child { color: var(--blue); }
.menu-i span { flex: 1; min-width: 0; }
.menu-i b { display: block; font-weight: 500; }
.menu-i small { display: block; font-size: 12px; color: var(--ink-3); }
.menu-i .code { flex: none; width: 56px; }
.menu-foot { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; text-decoration: none; padding: 4px 10px; }
.menu-foot .ic { width: 14px; height: 14px; }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.menu-tile { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--sheet); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 500; text-align: center; }
.menu-tile .ic { color: var(--blue); width: 20px; height: 20px; }
.pal-in { position: relative; display: block; }
.pal-in .ic { position: absolute; left: 12px; top: 13px; color: var(--ink-3); }
.pal-in input { padding-left: 40px !important; min-height: 44px !important; font-size: 16px !important; }
#pal-list { max-height: 52vh; overflow-y: auto; margin: 0 -8px; }
.pal-g { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; padding: 10px 10px 4px; }
.pal-i { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: var(--r2); text-align: left; color: var(--ink); }
.pal-i .ic { color: var(--ink-3); }
.pal-i b { display: block; font-weight: 500; }
.pal-i small { display: block; font-size: 12px; color: var(--ink-3); }
.pal-i.on, .pal-i:hover { background: var(--blue-tint); }
.pal-i.on .ic { color: var(--blue); }
.pal-none { padding: 16px 10px; color: var(--ink-3); }
.pal-foot { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line-2); padding-top: 10px; }
.keys { display: grid; gap: 0; }
.keys div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.keys dt { white-space: nowrap; color: var(--ink-3); font-size: 12px; }
.keys dd { color: var(--ink); text-align: right; }

/* ---------- sign in ---------- */
.login { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; }
.login-art { position: relative; background: #133F72; color: #DDF1FF; padding: 32px 40px; display: flex; flex-direction: column; overflow: hidden;
  background-image: linear-gradient(rgba(221, 241, 255, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(221, 241, 255, .12) 1px, transparent 1px), linear-gradient(rgba(221, 241, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(221, 241, 255, .05) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px; }
.la-top { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.la-top .mark-bg { fill: #DDF1FF; stroke: #DDF1FF; }
.la-top .mark-i { fill: #133F72; }
.la-top .mark-d { stroke: #133F72; }
.elev { flex: 1; width: 100%; max-height: 62vh; margin: 24px 0; }
.elev .e-gl { stroke: #DDF1FF; stroke-width: 2; }
.elev .e-hatch, .elev .e-thin { stroke: rgba(221, 241, 255, .55); stroke-width: 1; }
.elev .e-wall { fill: rgba(221, 241, 255, .06); stroke: #EEF7FF; stroke-width: 2.4; }
.elev .e-slab { stroke: #EEF7FF; stroke-width: 3; }
.elev .e-win, .elev .e-door { fill: none; stroke: #DDF1FF; stroke-width: 1.4; }
.elev .e-lvl { fill: #FFD400; }
.elev .e-t { fill: #DDF1FF; font: 500 11px var(--font); text-anchor: start; letter-spacing: .06em; }
.elev .e-dim { stroke: #BFE0FF; stroke-width: 1; }
.elev text[transform] { text-anchor: middle; }
.elev text[x="290"] { text-anchor: middle; }
.la-block { display: grid; grid-template-columns: 1.4fr 1fr; border: 1px solid rgba(221, 241, 255, .5); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.la-block span { padding: 10px 12px; }
.la-block span + span { border-left: 1px solid rgba(221, 241, 255, .5); }
.login-form { display: grid; place-items: center; padding: 40px 24px; background: var(--sheet); }
.lf { width: min(400px, 100%); display: grid; gap: 16px; }
.lf h1 { font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -.015em; }
.roles { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.roles legend { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.role { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--r2); background: var(--sheet); }
.role .ic { color: var(--ink-3); margin-top: 1px; }
.role b { display: block; font-weight: 500; }
.role small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.role:hover { border-color: var(--blue); }
.role.on { border-color: var(--blue); background: var(--blue-tint); box-shadow: inset 0 0 0 1px var(--blue); }
.role.on .ic { color: var(--blue); }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- today ---------- */
.ph-facts { display: flex; gap: 0; border: 1px solid var(--line); background: var(--sheet); border-radius: var(--r2); }
.ph-facts span { padding: 8px 18px; border-left: 1px solid var(--line-2); }
.ph-facts span:first-child { border-left: 0; }
.ph-facts b { display: block; font-size: 20px; line-height: 28px; font-weight: 500; }
.ph-facts small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr); gap: 24px; align-items: start; }
.site-row { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); margin-bottom: 12px; }
.sr-head { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px 0; text-decoration: none; color: var(--ink); }
.sr-head b { font-size: 16px; line-height: 24px; font-weight: 600; }
.sr-head:hover b { color: var(--blue); }
.sr-place { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.sr-prog { display: grid; grid-template-columns: auto 1fr minmax(120px, 34%); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 8px 16px 12px; }
.sr-prog .lbl { grid-row: 1; }
.sr-prog > b { grid-row: 1; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-prog .track { grid-row: 1; }
.sr-prog small { grid-column: 3; grid-row: 2; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.sr-checks { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-2); }
.sr-checks li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 8px; padding: 10px 12px 12px; border-left: 1px solid var(--line-2); align-content: start; }
.sr-checks li:first-child { border-left: 0; }
.sr-checks li > .ic { grid-row: 1; margin-top: 1px; color: var(--ink-3); }
.sr-checks li.ok > .ic { color: var(--ok); }
.sr-checks li.todo > .ic { color: var(--blue); }
.sr-checks li.warn > .ic { color: var(--bad); }
.sr-checks li span b { display: block; font-weight: 500; font-size: 13px; line-height: 18px; }
.sr-checks li span small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sr-checks li .btn { grid-column: 2; justify-self: start; margin-top: 6px; }
.sr-link { grid-column: 2; justify-self: start; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--blue); }
.sr-link .ic { width: 14px; height: 14px; transition: transform var(--t-fast); }
.sr-link:hover .ic { transform: translateX(2px); }
.sr-checks li.todo { background: linear-gradient(var(--blue) 0 0) top / 100% 2px no-repeat; }
.needs { position: sticky; top: calc(var(--top-h) + 16px); }
.needs-list { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); }
.needs-list li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.needs-list li:last-child { border-bottom: 0; }
.n-num { font-size: 12px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; align-self: start; margin-top: 2px; }
.needs-list li.pri-1 .n-num { color: var(--bad); }
.needs-list .code { font-size: 11px; display: block; line-height: 14px; }
.needs-list b { display: block; font-weight: 500; line-height: 20px; }
.needs-list small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.weekstrip { margin-top: 24px; }
.weekstrip ol { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); }
.weekstrip li { padding: 10px 10px 14px; border-left: 1px solid var(--line-2); min-height: 120px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.weekstrip li:first-child { border-left: 0; }
.weekstrip li.is-today { background: var(--blue-tint); box-shadow: inset 0 2px 0 var(--blue); }
.weekstrip .wd { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.weekstrip .dn { font-size: 20px; line-height: 24px; font-weight: 500; font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.ev { font-size: 12px; line-height: 16px; padding: 4px 6px; border-left: 2px solid var(--line-strong); background: var(--sheet-2); color: var(--ink-2); border-radius: 0 var(--r1) var(--r1) 0; overflow-wrap: anywhere; }
.ev b { font-weight: 600; color: var(--ink); font-size: 11px; }
.ev-start { border-left-color: var(--blue); }
.ev-end { border-left-color: var(--ok); }
.ev-mat { border-left-color: #C8A500; }
.ev-bill { border-left-color: var(--bad); }
.ev.none { border: 0; background: none; color: var(--ink-3); padding: 0; }
.ev.more { border: 0; background: none; color: var(--blue); padding: 0; }

/* ---------- projects ---------- */
.reg .prog-c { min-width: 170px; }
.reg .prog-c .track { margin: 6px 0 4px; }

/* ---------- programme ---------- */
.gantt-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.gt-l, .gt-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pager { display: inline-flex; align-items: center; gap: 4px; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.lgd { display: inline-block; width: 18px; height: 8px; border: 1px solid var(--blue); margin-left: 8px; }
.lgd.done { background: var(--blue); }
.lgd.on { background: linear-gradient(90deg, var(--blue) 50%, var(--blue-soft) 50%); }
.lgd.next { background: var(--sheet); border-style: dashed; }
.lgd.over { border-color: var(--bad); background: repeating-linear-gradient(135deg, var(--bad) 0 2px, transparent 2px 5px); }
.gantt { display: grid; grid-template-columns: 268px minmax(0, 1fr); background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); position: relative; user-select: none; }
.g-side { border-right: 1px solid var(--line); }
.g-hcell { height: 48px; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 12px 8px 14px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; font-weight: 500; color: var(--ink-3); border-bottom: 1px solid var(--line); background: var(--sheet-2); }
.g-name { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; width: 100%; height: 42px; padding: 0 12px 0 14px; border: 0; border-bottom: 1px solid var(--line-2); background: none; text-align: left; color: var(--ink); }
.g-name:hover { background: var(--blue-tint); }
.g-n { font-size: 11px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.g-tx { min-width: 0; }
.g-tx b { display: block; font-weight: 500; font-size: 13px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-tx small { display: block; font-size: 11px; line-height: 14px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-pc { font-size: 12px; color: var(--ink-2); }
.g-main { position: relative; min-width: 0; overflow: hidden; }
.g-head { position: relative; height: 48px; border-bottom: 1px solid var(--line); background: var(--sheet-2); }
.g-months { position: absolute; left: 0; right: 0; top: 0; height: 24px; }
.g-months span { position: absolute; top: 0; height: 24px; padding: 4px 8px 0; font-size: 12px; font-weight: 500; color: var(--ink-2); border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.g-weeks { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; }
.g-weeks span { position: absolute; bottom: 0; height: 8px; border-left: 1px solid var(--line-strong); }
.g-weeks.lab span { height: 22px; padding: 4px 0 0 5px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; border-left-color: var(--line); }
.g-body { position: relative; }
.g-grid { position: absolute; inset: 0; pointer-events: none; }
.g-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.g-grid i.m { background: var(--line); }
.g-grid b { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--line-2) 0 1px, transparent 1px 6px); opacity: .8; }
.g-track { position: relative; height: 42px; border-bottom: 1px solid var(--line-2); }
.g-track:last-of-type { border-bottom: 0; }
.g-bar { position: absolute; top: 12px; height: 18px; border: 1px solid var(--blue); background: var(--sheet); border-radius: var(--r1); cursor: grab; overflow: hidden; display: flex; align-items: center; touch-action: none; z-index: 2; transition: box-shadow var(--t-fast); }
.g-bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue); pointer-events: none; }
.g-bar > em { position: relative; z-index: 1; font-style: normal; font-size: 11px; font-weight: 600; padding: 0 6px; color: var(--on-blue); mix-blend-mode: normal; white-space: nowrap; pointer-events: none; display: flex; }
.g-bar > em .ic { width: 12px; height: 12px; stroke-width: 2.2; }
.g-bar.st-on, .g-bar.st-late { background: repeating-linear-gradient(135deg, var(--blue-soft) 0 3px, var(--sheet) 3px 7px); }
.g-bar.st-next { border-style: dashed; background: var(--blue-tint); }
.g-bar.st-next > em { color: var(--blue); }
.g-bar.st-late { border-color: var(--bad); }
.g-bar.st-late > i { background: var(--bad); }
.g-bar.st-done { cursor: default; }
.g-bar.started { cursor: default; }
.g-bar:hover { box-shadow: 0 0 0 3px var(--blue-soft); }
.g-bar:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.g-h { position: absolute; right: 0; top: 0; bottom: 0; width: 9px; cursor: ew-resize; z-index: 2; background: linear-gradient(90deg, transparent 3px, var(--blue) 3px 4px, transparent 4px 5px, var(--blue) 5px 6px, transparent 6px); opacity: 0; }
.g-bar:hover .g-h, .g-bar.dragging .g-h { opacity: .9; }
.g-bar.dragging { cursor: grabbing; box-shadow: 0 0 0 3px var(--blue-soft), 0 6px 16px rgba(18, 36, 58, .18); z-index: 4; }
.g-track.shifted .g-bar { box-shadow: 0 0 0 2px var(--yellow); }
.g-base { position: absolute; top: 34px; height: 0; border-top: 2px dotted var(--ink-3); opacity: .7; pointer-events: none; }
.g-over { position: absolute; top: 12px; height: 18px; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--bad) 55%, transparent) 0 2px, transparent 2px 5px); border-right: 1px solid var(--bad); pointer-events: none; z-index: 3; }
.g-late { position: absolute; top: 13px; font-size: 11px; font-weight: 600; color: var(--bad); white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.g-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.g-links path { fill: none; stroke: var(--ink-3); stroke-width: 1.2; opacity: .75; }
.g-links marker path { fill: var(--ink-3); stroke: none; }
.g-today { position: absolute; top: -48px; bottom: 0; width: 0; border-left: 2px solid var(--blue); z-index: 3; pointer-events: none; }
.g-today span { position: absolute; top: 26px; left: -1px; transform: translateX(-50%); background: var(--blue); color: var(--on-blue); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 1px 6px; border-radius: var(--r1); white-space: nowrap; }
.g-ms { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--ink-2); z-index: 1; pointer-events: none; }
.g-ms i { position: absolute; bottom: 6px; left: -6px; width: 11px; height: 11px; background: var(--ink); transform: rotate(45deg); }
.g-ms span { position: absolute; bottom: 4px; right: 10px; font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.g-tip { position: absolute; z-index: 6; background: var(--ink); color: var(--paper); font-size: 12px; line-height: 16px; padding: 6px 10px; border-radius: var(--r2); pointer-events: none; display: flex; gap: 6px; align-items: center; white-space: nowrap; box-shadow: var(--sh-pop); }
.g-tip small { display: block; opacity: .8; margin-left: 6px; }
.g-tip .ic { width: 14px; height: 14px; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
#g-preview .late-t { margin-left: 4px; }
#g-preview b { color: var(--ink); font-weight: 600; margin: 0 2px; }
.ph-list { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); }
.ph-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 12px; border: 0; border-bottom: 1px solid var(--line-2); background: none; text-align: left; color: var(--ink); }
.ph-list li:last-child .ph-row { border-bottom: 0; }
.ph-main b { display: block; font-weight: 500; line-height: 18px; }
.ph-main small { display: block; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mini { position: relative; display: block; height: 8px; margin-top: 8px; background: var(--sheet-2); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.mini .mb { position: absolute; top: -1px; bottom: -1px; background: var(--blue); }
.mini .mb.st-next { background: var(--sheet); border: 1px dashed var(--blue); }
.mini .mb.st-on { background: repeating-linear-gradient(135deg, var(--blue) 0 2px, var(--blue-soft) 2px 5px); }
.mini .mb.st-late { background: var(--bad); }
.mini .mt { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.ph-dates { display: grid; gap: 4px; }
.preview-line { min-height: 20px; font-size: 13px; color: var(--blue); display: flex; gap: 6px; align-items: flex-start; }
.preview-line:empty { display: none; }
.preview-line .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.lists h3 { margin-top: 4px; }
.rel-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 4px 0; }
.rel-list .ic { width: 14px; height: 14px; color: var(--ink-3); margin-top: 3px; }
.delay-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.delay-list b { color: var(--bad); }
.delay-list small { color: var(--ink-3); }

/* ---------- site diary ---------- */
.diary-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.diary-side { position: sticky; top: calc(var(--top-h) + 16px); display: grid; gap: 12px; }
.cal { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); padding: 10px 12px 12px; }
.cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-h b { font-weight: 600; }
.cal-w, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-w span { font-size: 11px; text-align: center; color: var(--ink-3); font-weight: 500; padding: 2px 0; }
.cal-d { display: grid; place-items: center; height: 32px; border-radius: var(--r1); font-size: 13px; text-decoration: none; color: var(--ink); font-variant-numeric: tabular-nums; position: relative; border: 1px solid transparent; }
.cal-d:hover { background: var(--blue-tint); }
.cal-d.filed::after { content: ""; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--blue); }
.cal-d.hol { color: var(--ink-3); background: repeating-linear-gradient(135deg, var(--line-2) 0 1px, transparent 1px 5px); }
.cal-d.miss { border-color: var(--bad); color: var(--bad); font-weight: 600; }
.cal-d.off { color: var(--ink-3); opacity: .55; }
.cal-d.is-today { box-shadow: inset 0 0 0 1px var(--ink); font-weight: 600; }
.cal-d.sel { background: var(--blue); color: var(--on-blue); }
.cal-d.sel::after { background: var(--on-blue); }
.cal-k { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); margin-top: 10px; }
.k { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 6px; }
.k:first-child { margin-left: 0; }
.k.filed { background: var(--blue); }
.k.miss { border: 1px solid var(--bad); }
.k.hol { background: repeating-linear-gradient(135deg, var(--line-strong) 0 1px, transparent 1px 3px); border: 1px solid var(--line); }
.sec-h .count.bad { background: var(--bad); color: #fff; }
.miss-box .sec-h { margin-bottom: 8px; }
.miss-list { background: var(--sheet); border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--line)); border-radius: var(--r2); }
.miss-list a { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 500; }
.miss-list li:last-child a { border-bottom: 0; }
.miss-list a:hover, .miss-list a.on { background: var(--bad-soft); }
.miss-list .ic { width: 16px; height: 16px; color: var(--bad); }
.miss-list small { color: var(--ink-3); font-weight: 400; font-size: 12px; }
.log-list { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); }
.log-list a { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.log-list li:last-child a { border-bottom: 0; }
.log-list a:hover { background: var(--blue-tint); }
.log-list a.on { background: var(--blue-tint); box-shadow: inset 3px 0 0 var(--blue); }
.ll-d b { display: block; font-size: 16px; line-height: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ll-d small { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.ll-m { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.ll-m .ic { width: 15px; height: 15px; color: var(--ink-3); }
.ll-i .ic { width: 15px; height: 15px; color: var(--bad); }
.diary { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); padding: 24px 28px 28px; position: relative;
  background-image: linear-gradient(90deg, transparent 0 40px, color-mix(in srgb, var(--blue) 18%, transparent) 40px 41px, transparent 41px); }
.diary > * { margin-left: 28px; }
.d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.d-head h2 { font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -.015em; }
.d-head p { margin-top: 2px; }
.d-act { display: flex; gap: 6px; }
.d-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 0; border-bottom: 1px solid var(--line); }
.d-strip div { padding: 12px 0; }
.d-strip div + div { padding-left: 16px; border-left: 1px solid var(--line-2); }
.d-strip dt { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.d-strip dd { display: flex; align-items: center; gap: 6px; font-size: 16px; line-height: 24px; font-weight: 500; margin-top: 2px; }
.d-strip dd .ic { color: var(--blue); }
.d-sec { padding: 16px 0 4px; }
.d-sec h3 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; }
.d-sec h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.d-sec .reg td { border-bottom: 1px dashed var(--line-2); }
.d-sec .reg td:first-child { padding-left: 0; }
.work-list li, .issue-list li { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.work-list b { display: block; font-weight: 500; }
.work-list small { display: block; font-size: 12px; color: var(--ink-3); }
.issue-list li { grid-template-columns: 20px 1fr auto; align-items: center; }
.issue-list .ic { color: var(--bad); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.photos figure { display: grid; gap: 6px; }
.photo { width: 100%; height: auto; aspect-ratio: 160 / 110; border-radius: var(--r1); }
.photos figcaption { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.ph-sky { fill: var(--ph-sky); } .ph-light { fill: var(--ph-light); } .ph-mid { fill: var(--ph-mid); } .ph-dark { fill: var(--ph-dark); }
.ph-line { stroke: var(--ph-line); stroke-width: 1; fill: none; } .ph-cell { fill: var(--ph-light); stroke: var(--ph-line); stroke-width: .8; }
.ph-pipe { stroke: var(--ph-dark); stroke-width: 4; fill: none; stroke-linecap: round; } .ph-tyre { fill: var(--ink); }
.ph-frame { fill: none; stroke: var(--line); }
.d-closed { display: flex; gap: 8px; align-items: center; padding: 24px 0; color: var(--ink-2); }
.diary.blank h2 { font-size: 28px; line-height: 34px; font-weight: 600; margin-bottom: 20px; }
.nolog { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 20px; border: 1px dashed var(--blue); border-radius: var(--r2); background: var(--blue-tint); margin-bottom: 16px; }
.nolog > .ic { width: 28px; height: 28px; color: var(--blue); }
.nolog b { display: block; font-size: 16px; line-height: 24px; font-weight: 600; }
.nolog p { color: var(--ink-2); }

/* quick log */
.ql .m-body { padding-top: 12px; }
.ql-body { display: grid; gap: 0; }
.ql-sec { padding: 14px 0 16px; border-bottom: 1px solid var(--line-2); display: grid; gap: 10px; }
.ql-sec:last-of-type { border-bottom: 0; }
.ql-h { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.ql-h > span { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--blue); color: var(--blue); border-radius: 50%; font-size: 11px; font-weight: 600; }
.ql-h small { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.ql-tot { margin-left: auto; font-size: 20px; color: var(--blue); }
.ql-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -4px; }
.chips.wx .chip { min-height: 40px; }
.ql-lab li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.ql-lab li:last-child { border-bottom: 0; }
.ql-lab b { display: block; font-weight: 500; font-size: 13px; line-height: 18px; }
.ql-lab small { display: block; font-size: 12px; color: var(--ink-3); }
.stepper.big .icon-btn { width: 44px; height: 44px; }
.stepper.big input { width: 52px !important; font-size: 18px !important; font-weight: 500; min-height: 42px !important; }
.add-c { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.add-c span { white-space: nowrap; }
.ql-work { display: grid; gap: 8px; }
.qw .chip { width: 100%; justify-content: flex-start; min-height: 40px; border-radius: var(--r2); }
.qw .chip .code { font-size: 11px; }
.qw.on { border: 1px solid var(--blue); border-radius: var(--r2); padding: 6px; background: var(--blue-tint); }
.qw.on .chip { border-color: transparent; background: none; }
.qw-f { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 6px; }
.qw-p { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.qw-p select { width: 90px; }
.ql-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.ql-photos figure { position: relative; width: 104px; }
.ql-photos .x { position: absolute; top: 2px; right: 2px; background: var(--sheet); border: 1px solid var(--line); }
.add-photo { width: 104px; aspect-ratio: 160 / 110; display: grid; place-items: center; align-content: center; gap: 4px; border: 1px dashed var(--line-strong); border-radius: var(--r1); background: var(--sheet-2); color: var(--ink-2); font-size: 12px; }
.add-photo:hover { border-color: var(--blue); color: var(--blue); }
.closed { margin-top: 2px; }
.ql .m-foot { justify-content: space-between; }
.draft-note { font-size: 12px; color: var(--ink-3); }
.timer { margin-left: 8px; padding-left: 10px; border-left: 1px solid color-mix(in srgb, var(--primary-ink) 35%, transparent); font-variant-numeric: tabular-nums; font-weight: 400; opacity: .85; font-size: 14px; }

/* ---------- snags on the plan ---------- */
.snag-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.plan-wrap { background: var(--pl-paper); border: 1px solid var(--line); border-radius: var(--r2); padding: 12px; position: relative; }
.plan { width: 100%; height: auto; }
.dropping .plan { cursor: crosshair; }
.dropping .plan-wrap { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.drop-bar { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--blue); color: var(--on-blue); border-radius: var(--r2); font-size: 13px; font-weight: 500; z-index: 2; }
.drop-bar kbd { margin-left: auto; background: transparent; color: inherit; border-color: currentColor; }
.plan-key { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); padding: 8px 4px 0; }
.plan-key span { margin-left: auto; }
.pk { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 8px; }
.pk:first-child { margin-left: 0; }
.pk.st-open { background: var(--bad); border: 0; }
.pk.st-fixed { background: var(--yellow); border: 1px solid #B39500; }
.pk.st-closed { background: var(--ok); border: 0; }
.plan text { font-family: var(--font); }
.pl-grid { stroke: var(--pl-grid); stroke-width: 1; stroke-dasharray: 10 4 2 4; }
.pl-bub { fill: var(--pl-paper); stroke: var(--pl-dim); stroke-width: 1.2; }
.pl-bubt { fill: var(--pl-dim); font-size: 13px; font-weight: 600; text-anchor: middle; }
.pl-dim, .pl-tick { stroke: var(--pl-dim); stroke-width: 1; }
.pl-tick { stroke-width: 1.6; }
.pl-dimt { fill: var(--pl-dim); font-size: 12px; text-anchor: middle; font-variant-numeric: tabular-nums; }
.pl-room { fill: var(--pl-paper); }
.pl-hatch { stroke: var(--pl-hatchc); stroke-width: 1.2; }
.pl-furn { fill: none; stroke: var(--pl-furn); stroke-width: 1.1; }
.pl-furn .pl-arrow { stroke-width: 1.3; }
.pl-wall { fill: none; stroke: var(--pl-wall); stroke-width: 5; }
.pl-ext { fill: none; stroke: var(--pl-wall); stroke-width: 11; }
.pl-gap { fill: var(--pl-paper); }
.pl-win line { stroke: var(--pl-ink); stroke-width: 1.2; }
.pl-door line, .pl-door path { fill: none; stroke: var(--pl-ink); stroke-width: 1.2; }
.pl-door path { stroke-dasharray: 3 3; }
.pl-label { fill: var(--pl-text); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-anchor: middle; text-transform: uppercase; }
.pl-label.pl-sm { font-size: 11px; }
.pl-area { fill: var(--pl-text); font-size: 11px; text-anchor: middle; opacity: .75; font-variant-numeric: tabular-nums; }
.pl-north circle { fill: none; stroke: var(--pl-dim); stroke-width: 1.2; }
.pl-north path { fill: var(--pl-dim); }
.pl-north text { fill: var(--pl-dim); font-size: 12px; font-weight: 600; text-anchor: middle; }
.pl-title { fill: var(--pl-dim); font-size: 12px; letter-spacing: .1em; font-weight: 500; }
.pin { cursor: pointer; }
.pin-body { stroke: var(--pl-paper); stroke-width: 2; }
.pin text { font-size: 11px; font-weight: 700; text-anchor: middle; fill: #fff; pointer-events: none; font-variant-numeric: tabular-nums; }
.pin-halo { fill: none; stroke: var(--pl-dim); stroke-width: 2; opacity: 0; transition: opacity var(--t-fast); }
.pin.st-open .pin-body { fill: #C4382A; }
.pin.st-fixed .pin-body { fill: #FFD400; }
.pin.st-fixed text { fill: #2E2600; }
.pin.st-closed .pin-body { fill: #2B7A50; }
.pin.sel .pin-halo, .pin.hl .pin-halo, .pin:hover .pin-halo { opacity: 1; }
.pin.sel .pin-halo { stroke-width: 3; }
.pin.ghost .pin-body { fill: var(--pl-dim); opacity: .85; }
.pin.ghost text { fill: var(--pl-paper); }
.pin.ghost { pointer-events: none; }
.snag-list .sec-h { justify-content: space-between; }
.sn-list { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); max-height: calc(100vh - 220px); overflow-y: auto; }
.sn-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line-2); background: none; text-align: left; color: var(--ink); }
.sn-list li:last-child .sn-item { border-bottom: 0; }
.sn-item:hover, .sn-item.on { background: var(--blue-tint); }
.sn-item.on { box-shadow: inset 3px 0 0 var(--blue); }
.sn-item.other { opacity: .72; }
.sn-pin { display: inline-grid; place-items: center; height: 22px; min-width: 32px; padding: 0 4px; border-radius: 11px 11px 11px 2px; font-size: 11px; font-weight: 700; color: #fff; background: #C4382A; font-variant-numeric: tabular-nums; }
.st-fixed .sn-pin, .sn-pin.st-fixed { background: #FFD400; color: #2E2600; }
.st-closed .sn-pin, .sn-pin.st-closed { background: #2B7A50; }
.sn-pin.st-open { background: #C4382A; }
.sn-pin.big { height: 28px; min-width: 40px; font-size: 13px; border-radius: 14px 14px 14px 2px; }
.sn-tx b { display: block; font-weight: 500; font-size: 13px; line-height: 18px; }
.sn-tx small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.sn-meta { display: grid; justify-items: end; gap: 4px; }
.sn-meta small { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.sn-item.st-closed .sn-tx b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.pri { width: 8px; height: 8px; border-radius: 50%; display: block; }
.pri-high { background: var(--bad); } .pri-medium { background: #E0B400; } .pri-low { background: var(--line-strong); }
.lvl-one { font-weight: 500; }
.sn-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crop-wrap { position: relative; background: var(--pl-paper); border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; }
.crop-wrap .btn { position: absolute; right: 8px; bottom: 8px; background: var(--sheet); border: 1px solid var(--line); }
.plan.crop { aspect-ratio: 420 / 230; }
.stamp-row { display: flex; justify-content: flex-end; padding-right: 8px; }
.assign { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.assign .ic { color: var(--ink-3); }
.assign b { color: var(--ink); font-weight: 500; }
.assign small { display: block; color: var(--ink-3); font-size: 12px; }
.sn-photo { display: grid; gap: 6px; width: 220px; }
.sn-photo figcaption { font-size: 12px; color: var(--ink-3); }
.hist li { display: grid; padding: 6px 0 6px 16px; border-left: 2px solid var(--line); position: relative; }
.hist li::before { content: ""; position: absolute; left: -5px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--blue); }
.hist b { font-weight: 500; font-size: 13px; }
.hist small { color: var(--ink-3); font-size: 12px; }

/* ---------- materials ---------- */
.stock tr.low td { background: linear-gradient(90deg, var(--yellow) 0 3px, transparent 3px) left / 100% 100% no-repeat; }
.stock tr.low td + td { background: none; }
.stock td small { display: flex; font-size: 12px; }
.stock-bar { position: relative; display: block; height: 8px; background: var(--sheet-3); min-width: 80px; }
.stock-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue); }
.stock tr.low .stock-bar i { background: #D9B300; }
.stock-bar b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.rq-list { display: grid; gap: 10px; }
.rq { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); padding: 12px 14px; display: grid; gap: 10px; }
.rq.due { border-color: var(--blue); box-shadow: inset 3px 0 0 var(--blue); }
.rq.st-cancelled { opacity: .7; }
.rq-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rq-id { border: 0; background: none; padding: 0; font-weight: 600; color: var(--blue); font-variant-numeric: tabular-nums; }
.rq-id:hover { text-decoration: underline; }
.rq-items li { display: grid; grid-template-columns: 1fr 140px 120px; gap: 12px; align-items: center; padding: 4px 0; font-size: 13px; }
.rq-items .num { text-align: right; color: var(--ink-2); }
.rq-note { font-size: 13px; color: var(--ink-3); font-style: italic; }
.rq-a { display: flex; gap: 6px; flex-wrap: wrap; }
.dv .num-in { width: 90px !important; }

/* ---------- labour ---------- */
.wk-l { min-width: 140px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.lab th[scope=row] { text-align: left; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); background: none; border-bottom: 1px solid var(--line-2); font-weight: 400; }
.lab th[scope=row] b { font-weight: 500; }
.lab thead th.c { text-align: center; }
.lab thead th small { font-size: 10px; }
.lab th.is-today, .lab td.is-today { background: var(--blue-tint); }
.lab thead th.is-today { color: var(--blue); box-shadow: inset 0 2px 0 var(--blue); }
.lab .sun { background: repeating-linear-gradient(135deg, var(--line-2) 0 1px, transparent 1px 6px); }
.lab td.lc { text-align: center; padding: 6px 4px; }
.lab-in { width: 52px !important; min-height: 32px !important; padding: 4px !important; text-align: center; font-variant-numeric: tabular-nums; }
.lab tfoot th, .lab tfoot td { position: sticky; bottom: 0; background: var(--sheet-2); border-top: 2px solid var(--ink); font-weight: 600; padding: 10px 12px; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); }
.lab tfoot td.c { text-align: center; }
.lab-phone { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); margin-top: 8px; }
.lab-phone li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.lab-phone li b { display: block; font-weight: 500; }
.lab-phone li small { display: block; font-size: 12px; color: var(--ink-3); }
.lab-total { display: flex; justify-content: space-between; padding: 12px; border-top: 2px solid var(--ink); margin-top: 8px; font-weight: 600; }

/* ---------- bills and documents ---------- */
.ret-line { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 14px 16px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); margin-bottom: 8px; }
.ret-steps { display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.ret-steps::before { content: ""; position: absolute; left: 5px; right: 5px; top: 5px; border-top: 1px solid var(--blue); }
.ret-steps li { position: relative; padding: 18px 12px 0 0; }
.ret-steps li::before { content: ""; position: absolute; left: 0; top: 0; width: 11px; height: 11px; border: 1.5px solid var(--blue); background: var(--sheet); transform: rotate(45deg); }
.ret-steps li.done::before { background: var(--blue); }
.ret-steps b { display: block; font-weight: 500; font-size: 16px; line-height: 22px; }
.ret-steps small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.bills .fine { margin-top: 8px; }
.unit { font-size: 12px; color: var(--ink-3); }
.st-part-paid { color: #6A5300; border-color: #E7C200; background: var(--yellow-soft); }
:root[data-theme="dark"] .st-part-paid { color: var(--yellow-ink); border-color: rgba(255, 212, 0, .45); }
.ledger-line { display: flex; flex-wrap: wrap; gap: 0; align-items: baseline; margin: 0 0 20px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.ledger-line span + span::before { content: ""; display: inline-block; width: 1px; height: 12px; background: var(--line-strong); margin: 0 14px; vertical-align: -1px; }
.ledger-line b { color: var(--ink); font-weight: 600; font-size: 15px; }
.gate { background: var(--sheet); border: 1px solid var(--blue); border-radius: var(--r2); margin-bottom: 16px; box-shadow: inset 3px 0 0 var(--blue); }
.gate-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); font-weight: 600; }
.gate-h .ic { width: 16px; height: 16px; }
.gate li { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px dashed var(--line-2); }
.gate li:last-child { border-bottom: 0; }
.gate li b { display: block; font-weight: 500; }
.gate li small { display: block; font-size: 12px; color: var(--ink-3); }
.seg .sm-l { display: none; }
.more-btn { margin-top: 8px; }
.plan-wrap .plan { max-height: calc(100vh - 140px); }
.dimline.wide em { font-size: 12px; }
.doc-modal .m-body { background: var(--sheet-3); }
.doc { background: #FFFFFF; color: #12243A; padding: 36px 40px; border: 1px solid #C9D6E5; box-shadow: 0 1px 2px rgba(18, 36, 58, .08); max-width: 820px; margin: 0 auto; width: 100%; display: grid; gap: 18px;
  --ink: #12243A; --ink-2: #3D536E; --ink-3: #5A6E87; --line: #C9D6E5; --line-2: #DDE6F0; --blue: #1D4E89; --sheet: #fff; --sheet-2: #F3F7FB; --sheet-3: #E8EFF7; --ok: #2B7A50; --bad: #B5372A; --blue-soft: #DDF1FF; --on-blue: #fff; --ph-sky: #DDEBF7; --ph-light: #C3D6EA; --ph-mid: #93AFCD; --ph-dark: #2F5B8E; --ph-line: rgba(18, 36, 58, .45); }
.doc .mark-bg { fill: #1D4E89; stroke: #1D4E89; } .doc .mark-i { fill: #DDF1FF; } .doc .mark-d { stroke: #DDF1FF; }
.doc-h { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 16px; border-bottom: 2px solid #12243A; }
.doc-h > div:first-child { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.doc-h > div:first-child small { grid-column: 2; font-size: 12px; color: #5A6E87; }
.doc-h b { font-size: 16px; font-weight: 600; }
.doc-t { text-align: right; display: grid; }
.doc-t span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #5A6E87; font-weight: 500; }
.doc-t b { font-size: 28px; line-height: 34px; font-weight: 600; color: #1D4E89; }
.doc-t small { font-size: 12px; color: #5A6E87; }
.doc-meta { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid #C9D6E5; }
.doc-meta div { padding: 8px 12px; border-bottom: 1px solid #DDE6F0; }
.doc-meta div:nth-child(odd) { border-right: 1px solid #DDE6F0; }
.doc-meta dt { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #5A6E87; font-weight: 500; }
.doc-meta dd { font-weight: 500; }
.doc table th { text-align: left; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #5A6E87; font-weight: 500; padding: 6px 8px; border-bottom: 1px solid #12243A; }
.doc table td { padding: 6px 8px; border-bottom: 1px solid #DDE6F0; font-size: 13px; }
.doc .r { text-align: right; }
.doc-sum { width: 60%; margin-left: auto; }
.doc-sum tr.sub td, .doc-sum tr.tot td { font-weight: 600; border-top: 1px solid #12243A; }
.doc-sum tr.tot td { font-size: 16px; border-bottom: 3px double #12243A; color: #1D4E89; }
.doc-pay tr.tot td { font-weight: 600; }
.words { text-align: right; font-style: italic; color: #3D536E; font-size: 13px; }
.doc-f { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; padding-top: 12px; border-top: 1px dashed #C9D6E5; }
.sig { display: grid; }
.sig span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #5A6E87; }
.sig b { font-weight: 600; }
.sig small { font-size: 12px; color: #5A6E87; }
.stamp-slot { min-height: 64px; display: grid; place-items: center; }
.doc .stamp.pending { color: #8A6A00; }

/* ---------- drawings ---------- */
.dwg td.num b { display: block; }
.dwg-view { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
.dwg-sheet { position: relative; background: var(--pl-paper); border: 1px solid var(--line-strong); padding: 12px; display: block; }
.sheet { width: 100%; height: auto; }
.sheet.gen .sh-col { fill: var(--pl-wall); }
.sheet.gen .sh-line { fill: none; stroke: var(--pl-wall); stroke-width: 2; }
.sheet.gen .sh-thin { fill: none; stroke: var(--pl-ink); stroke-width: 1; }
.sheet.gen .sh-pt { fill: none; stroke: var(--pl-ink); stroke-width: 1.4; }
.sheet.gen .sh-dash { fill: none; stroke: var(--pl-ink); stroke-width: 1.2; stroke-dasharray: 6 4; }
.sheet.gen .sh-t, .elev.sheet .e-t { fill: var(--pl-dim); font: 500 12px var(--font); letter-spacing: .1em; }
.elev.sheet { background: transparent; }
.elev.sheet .e-gl, .elev.sheet .e-slab { stroke: var(--pl-wall); }
.elev.sheet .e-wall { stroke: var(--pl-wall); fill: transparent; }
.elev.sheet .e-win, .elev.sheet .e-door, .elev.sheet .e-thin, .elev.sheet .e-hatch, .elev.sheet .e-dim { stroke: var(--pl-ink); }
.elev.sheet .e-t { fill: var(--pl-dim); }
.dwg-stamp { position: absolute; right: 24px; top: 20px; background: color-mix(in srgb, var(--pl-paper) 82%, transparent); }
.tblock { border-collapse: collapse; margin-top: 8px; font-size: 12px; }
.tblock td { border: 1px solid var(--line-strong); padding: 4px 8px; color: var(--ink); font-weight: 500; }
.tblock td span { display: block; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.revs li { display: grid; grid-template-columns: 30px 1fr; gap: 4px 8px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.revs li > b { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.revs li.cur > b { color: var(--blue); }
.revs li span b { display: block; font-weight: 500; font-size: 13px; }
.revs li span small { display: block; font-size: 12px; color: var(--ink-3); }
.revs li .tag { grid-column: 2; justify-self: start; }
.approve-box { margin-top: 16px; padding: 12px; border: 1px solid #E7C200; background: var(--yellow-soft); border-radius: var(--r2); display: grid; gap: 10px; }

/* ---------- safety ---------- */
.safety-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.safety-grid > section > .meter { margin-bottom: 16px; }
.chk-group { border: 1px solid var(--line); border-radius: var(--r2); background: var(--sheet); padding: 0 14px; margin: 0 0 12px; }
.chk-group legend { padding: 0 6px; margin-left: -6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.chk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.chk-row:last-child { border-bottom: 0; }
.chk-row.no { background: linear-gradient(90deg, var(--yellow) 0 3px, transparent 3px); padding-left: 10px; margin-left: -14px; padding-right: 0; }
.chk-row.no > span::after { content: "Fix before work"; display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 600; color: #5A4800; background: var(--yellow); padding: 0 6px; border-radius: var(--r1); }
.ans { font-size: 12px; font-weight: 600; } .ans-yes { color: var(--ok); } .ans-no { color: var(--bad); } .ans-na { color: var(--ink-3); }
.sign-row { display: flex; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.inc-list li { padding: 10px 0; border-bottom: 1px dashed var(--line-2); display: grid; gap: 4px; }
.inc-list p { font-size: 13px; }
.inc-list small { font-size: 12px; color: var(--ink-3); }
.days-safe { display: flex; align-items: baseline; gap: 10px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); background: var(--sheet); border-radius: var(--r2); }
.days-safe b { font-size: 28px; line-height: 34px; font-weight: 500; color: var(--ok); }
.days-safe span { color: var(--ink-3); font-size: 13px; }
.safety aside .sec-row { margin-top: 24px; }

/* ---------- client update ---------- */
.update { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
.upd-ctrl { display: grid; gap: 16px; position: sticky; top: calc(var(--top-h) + 16px); background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); padding: 16px; }
.upd-ctrl .sec-h { margin-bottom: 0; }
.incl { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.incl legend { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.sent li small { display: block; }
.doc.upd { max-width: 760px; }
.u-sec { display: grid; gap: 8px; }
.u-sec h3 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #5A6E87; font-weight: 600; padding-bottom: 4px; border-bottom: 1px solid #DDE6F0; }
.u-prog { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.u-prog > b { font-size: 40px; line-height: 44px; font-weight: 500; color: #1D4E89; }
.u-prog small { display: block; margin-top: 6px; color: #3D536E; font-size: 13px; }
.u-list li { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; font-size: 14px; }
.u-list .ic { width: 16px; height: 16px; color: #1D4E89; margin-top: 2px; }
.u-sec.decide ol { list-style: decimal; padding-left: 20px; }
.u-sec.decide li { padding: 2px 0; }
.u-sec.decide { background: #FFF5BF; padding: 12px 14px; border-left: 3px solid #FFD400; }
.u-sec.decide h3 { border-bottom: 0; color: #5A4800; }

/* ---------- settings ---------- */
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.set-sec { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); padding: 16px 18px; display: grid; gap: 12px; }
.set-sec .sec-h { margin-bottom: 0; }

/* ---------- tablet ---------- */
@media (max-width: 1180px) {
  .search-btn { min-width: 0; }
  .search-btn span, .search-btn kbd { display: none; }
  .titleblock { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .tbk-dim { grid-column: 1 / -1; }
  .ptabs { overflow: hidden; flex-wrap: wrap; }
  .figs.six { grid-template-columns: repeat(3, 1fr); }
  .figs.six .fig:nth-child(4) { border-left: 0; }
  .figs.six .fig:nth-child(n+4) { border-top: 1px solid var(--line-2); }
  .snag-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .user-btn span { display: none; }
  .proj-switch { max-width: 220px; }
  .today-grid { grid-template-columns: 1fr; }
  .needs { position: static; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  :root { --top-h: 52px; }
  body { font-size: 15px; line-height: 22px; background-size: 64px 64px, 64px 64px, 16px 16px, 16px 16px; }
  .hide-phone { display: none !important; }
  .only-desk { display: none !important; }
  .only-phone { display: block; }
  .topbar { padding: 0 8px 0 12px; gap: 8px; }
  .brand span, .gnav, .save-note { display: none; }
  .proj-switch { flex: 1; min-width: 0; max-width: none; height: 36px; }
  .tb-right { margin-left: 0; gap: 0; }
  .search-btn { border: 0; background: none; padding: 0; width: 40px; justify-content: center; color: var(--ink-2); }
  .icon-btn { width: 40px; height: 40px; }
  .user-btn { padding: 0 4px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch; height: calc(64px + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); background: var(--sheet); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; align-content: center; gap: 3px; border: 0; background: none; color: var(--ink-3); text-decoration: none; font-size: 11px; line-height: 14px; font-weight: 500; min-width: 0; }
  .tabbar .ic { width: 22px; height: 22px; }
  .tabbar [aria-current="page"] { color: var(--blue); }
  .tabbar [aria-current="page"] .ic { stroke-width: 2; }
  .tabbar .tb-log { margin: 7px 2px; border-radius: var(--r2); background: var(--primary-bg); color: var(--primary-ink); }
  .tabbar .tb-log .ic { stroke-width: 2.2; }
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .page { padding: 16px; }
  .page-h { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 16px; }
  .page-h h1 { font-size: 28px; line-height: 34px; }
  .ph-actions .btn { flex: 1; }
  .row2 { grid-template-columns: 1fr; gap: 12px; }
  .toolbar { gap: 8px; }
  .toolbar .seg { width: 100%; }
  .toolbar .seg button { flex: 1; justify-content: center; height: 34px; }
  .search-in { min-width: 0; width: 100%; }
  .sort-in { width: 100%; }
  .sort-in select { flex: 1; }
  .toolbar .grow { display: none; }
  .toolbar > .btn { flex: 1; }
  .figs, .figs.six { grid-template-columns: 1fr 1fr; }
  .fig { padding: 10px 12px; }
  .fig:nth-child(odd) { border-left: 0; }
  .fig:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .fig b { font-size: 20px; line-height: 28px; }
  .figs.six .fig:nth-child(4) { border-left: 1px solid var(--line-2); }
  .titleblock { margin-top: 12px; padding: 0 16px; grid-template-columns: 1fr 1fr; }
  .titleblock > .tbk:nth-child(2), .titleblock > .tbk:nth-child(3) { display: none; }
  .tbk-main, .tbk-note { grid-column: 1 / -1; }
  .titleblock > .tbk { padding: 8px 12px; }
  .titleblock .tbk-dim { grid-column: auto; }
  .titleblock.compact > .tbk:not(.tbk-main):not(.tbk-note) { display: none; }
  .titleblock.compact .tbk-main .sub { display: none; }
  .gate li { grid-template-columns: 1fr; }
  .gate li .code { display: none; }
  .gate li .btn { justify-self: start; }
  .ledger-line { flex-direction: column; gap: 2px; }
  .ledger-line span + span::before { display: none; }
  .tbk-dim .dimline { margin-top: 6px; }
  .tbk-dim .dimline small { display: none; }
  .tbk-dim .dimline { padding-bottom: 0; }
  .sr-head { flex-wrap: wrap; row-gap: 0; }
  .sr-head .code { white-space: nowrap; }
  .seg .lg-l { display: none; }
  .seg .sm-l { display: inline; }
  .tbk-main h1 { font-size: 20px; white-space: normal; }
  .ptabs { display: none; }
  /* today */
  .ph-facts { width: 100%; }
  .ph-facts span { flex: 1; padding: 8px 12px; }
  .sr-prog { grid-template-columns: 1fr; row-gap: 6px; }
  .sr-prog .lbl, .sr-prog > b, .sr-prog .track, .sr-prog small { grid-column: 1; grid-row: auto; }
  .sr-checks { grid-template-columns: 1fr 1fr; }
  .sr-checks li:nth-child(odd) { border-left: 0; }
  .sr-checks li:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .needs-list li { grid-template-columns: 24px 1fr; }
  .needs-list li .btn { grid-column: 2; justify-self: start; }
  .needs-list small { max-width: none; white-space: normal; }
  .weekstrip ol { grid-template-columns: 1fr; }
  .weekstrip li { border-left: 0; border-top: 1px solid var(--line-2); min-height: 0; display: grid; grid-template-columns: 44px 1fr; gap: 4px 10px; align-items: start; }
  .weekstrip li:first-child { border-top: 0; }
  .weekstrip .wd { grid-column: 1; grid-row: 2; }
  .weekstrip .dn { grid-column: 1; grid-row: 1; }
  .weekstrip .ev { grid-column: 2; }
  .weekstrip li .ev:first-of-type { grid-row: 1; }
  /* stacked tables */
  .projects .reg thead, .drawings .reg thead, .bills .reg thead, .stock thead { display: none; }
  .projects .reg tr, .drawings .reg tr, .bills .reg tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
  .projects .reg td, .drawings .reg td, .bills .reg td { display: block; padding: 0; border: 0; }
  .projects .reg td.code { grid-column: 1; }
  .projects .reg td:nth-child(2) { grid-column: 1 / -1; }
  .projects .reg td:nth-child(3) { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); }
  .projects .reg td.prog-c { grid-column: 1 / -1; min-width: 0; }
  .projects .reg td:nth-child(5) { grid-column: 1; font-size: 13px; }
  .projects .reg td:nth-child(6) { grid-column: 2; grid-row: 1; }
  .projects .reg td:nth-child(7), .projects .reg td:nth-child(8) { display: none; }
  .drawings .reg td:nth-child(2) { grid-column: 1 / -1; }
  .drawings .reg td:nth-child(3), .drawings .reg td:nth-child(4), .drawings .reg td:nth-child(6) { display: inline; font-size: 13px; }
  .drawings .reg td:nth-child(7) { grid-column: 1 / -1; font-size: 13px; }
  .drawings .reg td:nth-child(5) { grid-column: 2; grid-row: 1; }
  .bills .reg td:nth-child(2) { grid-column: 2; grid-row: 1; font-size: 13px; color: var(--ink-3); }
  .bills .reg td:nth-child(3), .bills .reg td:nth-child(4), .bills .reg td:nth-child(5), .bills .reg td:nth-child(7) { display: none; }
  .bills .reg td:nth-child(6) { grid-column: 1; text-align: left; font-size: 16px; }
  .bills .reg td:nth-child(8) { grid-column: 2; text-align: right; }
  .stock tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
  .stock td { display: block; padding: 0 !important; border: 0 !important; }
  .stock td:nth-child(1) { grid-column: 1; }
  .stock td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .stock td.bar-c { grid-column: 1 / -1; width: auto; }
  .stock td:nth-child(4), .stock td:nth-child(5), .stock td:nth-child(7) { display: none; }
  .stock td:nth-child(6) { grid-column: 1; text-align: left; font-size: 13px; color: var(--ink-3); }
  .stock td:nth-child(6)::before { content: "Lasts "; }
  .stock td.act-c { grid-column: 2; grid-row: 3; }
  .stock tr.low td:first-child { background: none; }
  .stock tr.low { box-shadow: inset 3px 0 0 var(--yellow); }
  .sec-row .seg { width: 100%; order: 3; }
  .sec-row .seg button { flex: 1; justify-content: center; }
  .rq-items li { grid-template-columns: 1fr auto; }
  .rq-items .meter { grid-column: 1 / -1; }
  /* diary */
  .diary-wrap { grid-template-columns: 1fr; gap: 16px; }
  .diary-side { display: contents; }
  .diary-side .cal, .diary-side .miss-box { order: 1; }
  .diary-main { order: 2; }
  .diary-side > .sec-h, .diary-side .log-list, .diary-side > .btn { order: 3; }
  .diary { padding: 16px; background-image: none; }
  .diary > * { margin-left: 0; }
  .d-head { flex-direction: column; }
  .d-head h2, .diary.blank h2 { font-size: 20px; line-height: 28px; }
  .d-strip { grid-template-columns: 1fr 1fr; }
  .d-strip div:nth-child(3) { padding-left: 0; border-left: 0; }
  .d-strip div:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .nolog { grid-template-columns: 1fr; }
  .nolog > .ic { display: none; }
  .photos { grid-template-columns: 1fr 1fr; }
  .work-list li { grid-template-columns: 40px 1fr; }
  .issue-list li { grid-template-columns: 20px 1fr; }
  .issue-list li .btn { grid-column: 2; justify-self: start; }
  /* windows become sheets */
  .modal, .modal.sm, .modal.md, .modal.lg, .modal.menu, .modal.menu.menu-pj, .modal.pal { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 92vh; transform: none; border-radius: 12px 12px 0 0; border-width: 1px 0 0; animation: sheet var(--t-mid) ease-out; }
  .modal.pal { top: 0; bottom: auto; border-radius: 0 0 12px 12px; max-height: 80vh; }
  .modal.drawer { top: 0; left: 0; width: 100%; border: 0; animation: sheet var(--t-mid) ease-out; }
  #confirm-root .modal { top: auto; }
  @keyframes sheet { from { transform: translateY(24px); opacity: 0; } }
  .m-head { padding: 14px 12px 10px 16px; }
  .m-head h2 { font-size: 18px; line-height: 24px; }
  .m-body { padding: 14px 16px 18px; }
  .m-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-radius: 0; }
  .m-foot .btn { flex: 1; }
  .m-foot .grow { display: none; }
  .ql .m-foot { flex-wrap: nowrap; }
  .ql .m-foot .btn { flex: 2; }
  .ql .draft-note { flex: 1; font-size: 11px; line-height: 14px; }
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
  #toasts { left: 8px; right: 8px; bottom: calc(72px + env(safe-area-inset-bottom)); width: auto; z-index: 95; }
  .toast { padding: 8px 6px 8px 10px; }
  .dv th:nth-child(3), .dv td:nth-child(3) { display: none; }
  .dv td, .dv th { padding: 8px 6px !important; }
  .dv .num-in { width: 72px !important; }
  /* snags */
  .snag-grid { grid-template-columns: 1fr; gap: 12px; }
  .plan-wrap { padding: 6px; }
  .drop-bar { position: static; margin-bottom: 6px; font-size: 12px; }
  .drop-bar kbd { display: none; }
  .plan-key span { margin-left: 0; width: 100%; }
  .sn-list { max-height: none; }
  .pin text { font-size: 12px; }
  /* labour */
  .labour .seg { width: 100%; display: grid; grid-template-columns: repeat(7, 1fr); }
  .labour .seg button { flex-direction: column; height: 46px; gap: 0; padding: 0; line-height: 16px; }
  .labour .seg button small { font-size: 10px; opacity: .8; }
  .labour .pager { width: 100%; justify-content: space-between; }
  .labour .only-phone > .muted { margin: 8px 0 0; font-size: 13px; }
  /* bills, documents */
  .ret-line { grid-template-columns: 1fr; gap: 10px; }
  .ret-line .dimline small { position: static; display: block; }
  .ret-line .dimline .db { text-align: right; }
  .doc { padding: 20px 16px; }
  .doc-h { flex-direction: column; gap: 10px; }
  .doc-t { text-align: left; }
  .doc-meta { grid-template-columns: 1fr; }
  .doc-meta div:nth-child(odd) { border-right: 0; }
  .doc-sum { width: 100%; }
  .doc table td { font-size: 12px; padding: 6px 4px; }
  .doc-t1 th:nth-child(2), .doc-t1 td:nth-child(2) { display: none; }
  .doc-f { flex-wrap: wrap; }
  .doc-modal .m-body { padding: 0; }
  .doc-modal .doc { border: 0; }
  .u-prog > b { font-size: 28px; }
  /* drawings */
  .dwg-view { grid-template-columns: 1fr; }
  .dwg-stamp { right: 8px; top: 8px; transform: scale(.8); transform-origin: top right; }
  .tblock { width: 100%; table-layout: fixed; }
  .tblock td { overflow-wrap: anywhere; }
  /* safety, update, settings */
  .safety-grid, .update, .set-grid { grid-template-columns: 1fr; }
  .chk-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .chk-row .seg { width: 100%; }
  .chk-row .seg button { flex: 1; justify-content: center; height: 36px; }
  .chk-row.no { margin-left: -14px; padding-left: 14px; }
  .upd-ctrl { position: static; }
  .update .upd-prev { order: 2; }
  /* sign in */
  .login { grid-template-columns: 1fr; min-height: 0; }
  .login-art { padding: 16px; }
  .elev { max-height: 180px; margin: 8px 0; }
  .la-block { grid-template-columns: 1fr; font-size: 10px; }
  .la-block span + span { border-left: 0; border-top: 1px solid rgba(221, 241, 255, .5); }
  .login-form { padding: 24px 16px 40px; place-items: start stretch; }
  .lf { width: 100%; }
  .lf h1 { font-size: 24px; line-height: 30px; }
  .roles { grid-template-columns: 1fr; }
  .gantt-tools { display: none; }
}

/* ---------- print: documents only ---------- */
@media print {
  body { background: #fff !important; }
  .topbar, .tabbar, .titleblock, .ptabs, #toasts, .upd-ctrl, .skip, .offline, #confirm-root { display: none !important; }
  body.has-modal #app { display: none !important; }
  .scrim, .m-head, .m-foot { display: none !important; }
  .modal { position: static !important; transform: none !important; width: auto !important; max-height: none !important; border: 0 !important; box-shadow: none !important; animation: none !important; }
  .m-body { overflow: visible !important; padding: 0 !important; background: #fff !important; }
  .update { display: block !important; }
  .page { padding: 0 !important; }
  .doc { border: 0 !important; box-shadow: none !important; padding: 0 !important; max-width: none !important; }
  .stamp, .u-sec.decide { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
