/* DEPC portal, release 2.15.0: one design system for the portal (2.14.0 mockup "DEPC Dark Enterprise UI"; colours
   and type from option B "Corporate", chosen by the consultant 13 Nov 2026). Dark by default, Light as an option
   (html[data-theme]); navy side bar, one corporate blue for actions and selection, green / amber / red only for
   pass / warning / fail. Local fonts only (Source Sans 3 / Roboto Mono, SIL OFL); no inline styles (CSP). */

@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/source-sans-3-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/roboto-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/roboto-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/roboto-mono-latin-600-normal.woff2") format("woff2"); }

/* ------------------------------------------------------------------ tokens */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B1622;          /* page */
  --side: #071019;        /* sidebar */
  --top: #0E1B29;         /* top bar, header band */
  --surface: #112233;     /* cards, panels */
  --surface-2: #0F1E2D;   /* table head, card head */
  --raise: #14283C;       /* secondary buttons, chips */
  --input: #0C1926;
  --hover: #17304A;
  --line: #1F364E;
  --line-2: #2C4A69;
  --text: #E9F0F7;
  --text-2: #C9D6E3;
  --text-3: #A8B9CB;
  --text-4: #8DA1B6;
  --track: #1F364E;
  --nav-on: #12385E;
  --nav-on-text: #FFFFFF;
  --accent: #3B8BD9;      /* lines, focus, selection */
  --accent-btn: #1F6FBF;  /* primary buttons (white text) */
  --accent-text: #7CB8F2; /* links, info text */
  --accent-soft: #0F2A45;
  --accent-line: #1D4C7A;
  --ok: #34D399;    --ok-bg: #0B2A20;    --ok-line: #14532D;
  --warn: #FBBF24;  --warn-bg: #231B07;  --warn-line: #713F12;
  --bad: #F87171;   --bad-bg: #3A1010;   --bad-line: #7F1D1D;
  --neutral-bg: #16293D; --neutral-fg: #A8B9CB;
  --tile-bg: #16293D; --tile-fg: #C9D6E3;
  --shadow: none;
  --shadow-lift: 0 10px 28px rgba(0, 0, 0, 0.35);
  --head-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F2F4F7;
  --side: #0B2545;
  --top: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F6F8FA;
  --raise: #FFFFFF;
  --input: #FFFFFF;
  --hover: #EEF2F6;
  --line: #DFE4EA;
  --line-2: #C5CED8;
  --text: #13202E;
  --text-2: #34465A;
  --text-3: #4A5D72;
  --text-4: #627489;
  --track: #E3E8EE;
  --nav-on: #143A66;
  --nav-on-text: #FFFFFF;
  --accent: #0B5CAD;
  --accent-btn: #0B5CAD;
  --accent-text: #0A4F95;
  --accent-soft: #E8F1FA;
  --accent-line: #B9D3EE;
  --ok: #047857;    --ok-bg: #ECFDF5;    --ok-line: #A7F3D0;
  --warn: #B45309;  --warn-bg: #FEF3C7;  --warn-line: #FDE68A;
  --bad: #B91C1C;   --bad-bg: #FEE2E2;   --bad-line: #FECACA;
  --neutral-bg: #EEF2F6; --neutral-fg: #4A5D72;
  --tile-bg: #E6ECF2; --tile-fg: #34465A;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-lift: 0 10px 28px rgba(15, 23, 42, 0.10);
  --head-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}
:root {
  --font: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --mono: "Roboto Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --topbar-h: 52px;
  --radius: 8px;
  --radius-lg: 12px;
  --ctl-h: 36px;          /* inputs, selects, buttons (desktop); phones keep 44px */
  /* release 1.x names still used by a few rules */
  --link: var(--accent-text);
  --link-hover: var(--text);
  --page: var(--bg);
  --soft: var(--surface-2);
  --soft-2: var(--neutral-bg);
  --blue: var(--accent-btn);
  --green: #059669;
  --amber: #D97706;
  --red: #DC2626;
  --violet: var(--accent-btn);
  --teal: var(--accent);
  --navy: var(--side);
  --hero: var(--top);
  --on-dark: var(--text);
  --on-dark-2: var(--text-3);
  --on-dark-3: var(--text-4);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14.5px; line-height: 1.5; font-variant-numeric: tabular-nums; }
a { color: var(--accent-text); text-underline-offset: 2px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; color: inherit; }
h1 { font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: 15px; font-weight: 600; line-height: 1.3; }
h3 { font-size: 13px; font-weight: 600; line-height: 1.3; margin-top: 4px; }
p { margin: 0; }
code, .mono { font-family: var(--mono); }
.muted { color: var(--text-4); }
.muted2 { color: var(--text-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; }
.inline { display: inline; margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--surface); color: var(--text); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { top: 8px; }
.ico { flex: 0 0 auto; }
.c-ok { color: var(--ok); } .c-blue { color: var(--accent-text); } .c-amber { color: var(--warn); }
/* SVG parts drawn by the templates: CSS wins over the presentation attributes */
.svg-track { fill: var(--track); }
.svg-track-s { stroke: var(--track); }
.svg-text { fill: var(--text); }
.svg-text-2 { fill: var(--text-4); }
.seismic { display: none; }

/* ------------------------------------------------------------------ shell */
.shell { min-height: 100vh; display: flex; }
.side {
  flex: 0 0 232px; width: 232px; background: var(--side); color: var(--text-2); padding: 14px 10px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30;
}
.maincol { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; padding: 2px 8px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--accent-btn); display: inline-flex; align-items: center; justify-content: center; color: #FFFFFF; flex: 0 0 auto; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-mark { font-weight: 700; font-size: 15px; letter-spacing: 0.06em; color: var(--text); }
.brand-sub { font-size: 10.5px; color: var(--text-4); }
.sidenav { display: flex; flex-direction: column; gap: 1px; }
.navsec { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-4); padding: 12px 10px 4px; }
.sidenav a, .mnav-panel a { display: flex; gap: 10px; align-items: center; min-height: 34px; padding: 0 10px; border-radius: 6px; color: var(--text-2); text-decoration: none; font-size: 13.5px; }
.sidenav .ico { width: 16px; height: 16px; }
.sidenav a:hover, .mnav-panel a:hover { background: var(--hover); color: var(--text); }
.sidenav a[aria-current="page"], .mnav-panel a[aria-current="page"] { background: var(--nav-on); color: var(--nav-on-text); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.navbadge { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 600; border-radius: 999px; padding: 0 7px; background: var(--neutral-bg); color: var(--neutral-fg); }
.navbadge-on { background: var(--accent-btn); color: #FFFFFF; }
.navproj { display: flex; flex-direction: column; gap: 1px; margin: 4px 0; padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.navproj-id { display: flex; gap: 10px; align-items: center; padding: 2px 10px 4px; color: var(--accent-text); font-size: 12px; }
.sidenav .navproj a, .mnav-panel .navproj a { min-height: 30px; padding-left: 36px; font-size: 13px; }
.sidecard { margin-top: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.sc-label { font-size: 11px; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.sc-status { display: flex; gap: 8px; align-items: center; color: var(--text); font-weight: 600; font-size: 13px; }
.sc-sub { font-size: 12px; color: var(--text-4); }
.sc-link { color: var(--accent-text); font-size: 12.5px; font-weight: 600; }
.sc-link:hover { color: var(--text); }
.sc-bar { display: block; width: 100%; height: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot-on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.dot-idle { background: var(--text-4); box-shadow: 0 0 0 3px var(--neutral-bg); }

/* top bar */
.topbar { background: var(--top); border-bottom: 1px solid var(--line); color: var(--text); padding: 6px 24px; display: flex; flex-wrap: nowrap; gap: 14px; align-items: center; justify-content: space-between; min-height: var(--topbar-h); height: var(--topbar-h); }
.tb-left { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; }
.tb-right { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tb-time { font-size: 12px; color: var(--text-4); white-space: nowrap; }
.tb-link { font-size: 12.5px; color: var(--text-3); white-space: nowrap; text-decoration: none; }
.tb-link:hover { color: var(--text); }
.tb-search { display: flex; align-items: center; gap: 8px; background: var(--input); border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; min-height: 34px; flex: 0 1 420px; color: var(--text-4); }
.tb-search input { border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; flex: 1 1 auto; min-width: 0; min-height: 32px; }
.tb-search input::placeholder { color: var(--text-4); }
.tb-search input:focus { outline: none; }
.tb-search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.themetoggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; height: 30px; }
.themetoggle button { display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; border: 0; background: transparent; color: var(--text-3); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.themetoggle button:hover { color: var(--text); }
.themetoggle button[aria-pressed="true"] { background: var(--accent-btn); color: #FFFFFF; }
.themetoggle .ico { width: 14px; height: 14px; }
.who { display: flex; gap: 10px; align-items: center; }
.who-av { width: 30px; height: 30px; border-radius: 50%; background: #1E3A8A; color: #DBEAFE; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.who-txt { display: flex; flex-direction: column; line-height: 1.2; }
.who-name { font-weight: 600; font-size: 13px; color: var(--text); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-role { font-size: 11px; color: var(--text-4); }
.crumbs { font-size: 13px; color: var(--text-4); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--text-3); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.phonebar { display: none; }

/* header band (was the dark hero): same surface as the top bar, calm */
.hero { position: relative; overflow: hidden; background: var(--top); color: var(--text); padding: 18px 24px 18px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--line); }
.hero-dash { padding: 20px 24px 20px; }
.hero-project { padding-bottom: 14px; }
.hero-teal { border-bottom: 1px solid var(--line); }
.hero-row { position: relative; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.hero-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 900px; }
.hero h1 { font-size: 22px; }
.hero-dash h1 { font-size: 22px; line-height: 1.2; }
.hero-compact { padding-top: 12px; padding-bottom: 12px; }
.hero-compact h1 { font-size: 18px; }
.hero-sub { color: var(--text-3); font-size: 13px; }
.eyebrow { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); font-weight: 600; }
.hero-actions { position: relative; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hero-line { font-size: 12.5px; color: var(--text-3); }
.ptabs { position: relative; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; min-width: 0; }
.ptabs a { display: block; padding: 10px 12px 9px; color: var(--text-3); text-decoration: none; font-weight: 500; font-size: 13px; white-space: nowrap; border-bottom: 2px solid transparent; }
.ptabs a:hover { color: var(--text); }
.ptabs a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.sel-dark { min-height: var(--ctl-h); border-radius: 8px; border: 1px solid var(--line-2); background: var(--input); color: var(--text); padding: 8px 10px; font: inherit; }
.sel-dark option { color: var(--text); background: var(--surface); }

/* page */
.page { padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 16px; flex: 1 0 auto; }
.page-overlap { margin-top: 0; position: relative; padding-top: 20px; }
.foot { padding: 12px 24px 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-4); border-top: 1px solid var(--line); }
.lead-note { color: var(--text-3); font-size: 13px; }

/* chips, pills: neutral + accent + three status tints */
.idchip { font-family: var(--mono); font-size: 12px; background: var(--raise); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 8px; color: var(--text-2); }
.idchip-light { background: var(--raise); border-color: var(--line-2); color: var(--text-2); }
.type { border-radius: 999px; padding: 1px 9px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; border: 1px solid var(--line-2); color: var(--text-2); background: transparent; }
.type-oil_gas, .type-geothermal { color: var(--text-2); }
.chip { border-radius: 999px; padding: 1px 9px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.chip-active, .chip-you { background: var(--accent-soft); color: var(--accent-text); }
.chip-clients, .chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-critical, .chip-err { background: var(--bad-bg); color: var(--bad); }
.chip-drive, .chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-off { background: var(--neutral-bg); color: var(--neutral-fg); }
.pill, .tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 1px 9px; font-size: 11.5px; font-weight: 600; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.pills-row { display: flex; gap: 6px; flex-wrap: wrap; }
.p-green, .dst-approved, .fst-resolved, .fst-accepted_by_client, .rq-done, .drv-backed_up, .lk-low, .td-confirmed, .sst-approved { background: var(--ok-bg); color: var(--ok); }
.p-red, .sev-critical, .fst-rejected_by_client, .lk-high, .td-gap { background: var(--bad-bg); color: var(--bad); }
.p-amber, .sev-warning, .dst-draft, .rq-queued, .drv-changed, .lk-medium, .td-conflict, .sst-draft, .sev-finding { background: var(--warn-bg); color: var(--warn); }
.p-blue, .dst-issued_for_review, .rq-picked_up, .sst-review, .pill-current, .p-violet, .rq-needs_decision, .fst-open { background: var(--accent-soft); color: var(--accent-text); }
.p-grey, .tag-plain, .dst-superseded, .fst-withdrawn, .drv-not_yet, .sev-info { background: var(--neutral-bg); color: var(--neutral-fg); }
.lk-unknown { background: var(--neutral-bg); color: var(--text-2); }
.pill-proposed { background: var(--accent-soft); color: var(--accent-text); border: 1px dashed var(--accent); padding: 3px 12px; font-size: 13px; }
.vis-internal { background: var(--neutral-bg); color: var(--neutral-fg); border: 1px dashed var(--line-2); }
.vis-changed { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.lock { display: inline-flex; font-size: 11px; font-weight: 600; color: var(--bad); background: var(--bad-bg); border: 1px solid var(--bad-line); border-radius: 999px; padding: 0 8px; white-space: nowrap; }
.d { font-weight: 600; }
.dec-approve, .dec-accept { color: var(--ok); }
.dec-reject { color: var(--bad); }
.dec-approve_with_comments, .dec-request_change { color: var(--warn); }
.dec-comment { color: var(--accent-text); }
.gate { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.gate .gid { font-family: var(--mono); font-weight: 500; }
.gate-done { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.gate-done_with_conditions { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.gate-proposed_done { background: var(--accent-soft); color: var(--accent-text); border: 1px dashed var(--accent); }
.gate-skipped, .gate-pending { background: var(--neutral-bg); color: var(--neutral-fg); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--ctl-h); padding: 6px 14px; border-radius: 8px; border: 1px solid var(--accent-btn); background: var(--accent-btn); color: #FFFFFF; font: inherit; font-weight: 600; font-size: 13px; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { color: #FFFFFF; filter: brightness(1.08); }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-teal, .btn-blue, .btn-violet, .btn-green { background: var(--accent-btn); border-color: var(--accent-btn); color: #FFFFFF; }
.btn-teal:hover { color: #FFFFFF; }
.btn-glass, .btn-ghost-dark, .btn-quiet, .btn-tool, .btn-indigo { background: var(--raise); border-color: var(--line-2); color: var(--text); font-weight: 500; }
.btn-glass:hover, .btn-ghost-dark:hover, .btn-quiet:hover, .btn-tool:hover, .btn-indigo:hover { color: var(--text); background: var(--hover); filter: none; }
.btn-tool { min-height: 32px; padding: 4px 12px; }
.btn-amber { background: transparent; border-color: var(--warn); color: var(--warn); }
.btn-amber:hover { color: var(--warn); background: var(--warn-bg); filter: none; }
.btn-danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: #FFFFFF; filter: none; }
.btn-disabled { background: var(--surface-2); border-color: var(--line); color: var(--text-4); font-weight: 500; cursor: not-allowed; }
.btn-disabled:hover { color: var(--text-4); filter: none; }

/* forms */
.form { display: flex; flex-direction: column; gap: 12px; }
.form > .btn { align-self: flex-start; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .fs legend { font-weight: 500; font-size: 12px; color: var(--text-2); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search]:not(.tb-search input), input:not([type]), select, textarea {
  min-height: var(--ctl-h); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; font: inherit; font-weight: 400; font-size: 13.5px; background: var(--input); color: var(--text); width: 100%; max-width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--text-4); }
select option { background: var(--surface); color: var(--text); }
.tb-search input { width: auto; min-height: 32px; border: 0; padding: 0; background: transparent; color: var(--text); }
textarea { min-height: 72px; line-height: 1.5; resize: vertical; }
.ta-violet { background: var(--input); }
input.mono { font-family: var(--mono); }
.help { font-size: 12px; color: var(--text-4); font-weight: 400; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent-btn); flex: 0 0 auto; }
.choices { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choices legend { font-weight: 500; font-size: 13px; color: var(--text-2); margin-bottom: 6px; padding: 0; }
.choice { display: inline-flex; gap: 8px; align-items: center; min-height: 32px; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; font-weight: 500; cursor: pointer; background: var(--raise); color: var(--text); }
.choice:has(input:checked) { background: var(--accent-btn); color: #FFFFFF; border-color: var(--accent-btn); }
.choice:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.choice input { accent-color: var(--accent-btn); }
.grid2, .grid3, .grid4 { display: grid; gap: 12px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.fs { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.fs legend { padding: 0 6px; }
.form-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; }
.form-foot.end { justify-content: flex-end; }
.seg-row { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.seg { display: flex; flex-wrap: wrap; gap: 10px; }
.segopt { position: relative; }
.segopt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.segopt span { display: inline-flex; align-items: center; min-height: var(--ctl-h); padding: 6px 14px; border-radius: 999px; font-weight: 500; font-size: 13px; border: 1px solid var(--line-2); background: var(--raise); color: var(--text); }
.segopt input:checked + span { background: var(--accent-btn); border-color: var(--accent-btn); color: #FFFFFF; }
.segopt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.userline { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.npform { max-width: 900px; }

/* notices */
.notice { padding: 9px 14px; border-radius: 8px; border: 1px solid; font-size: 13px; }
.notice-ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); font-weight: 500; }
.notice-err { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.notice-info { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.empty { padding: 18px 16px; color: var(--text-4); font-size: 13px; }
.proposal { background: var(--accent-soft); border: 1px dashed var(--accent); color: var(--accent-text); border-radius: 10px; padding: 8px 12px; font-size: 14px; }

/* cards and panels */
.card { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-accent { border-top: 1px solid var(--line); box-shadow: var(--shadow); }
.acc-violet, .acc-blue, .acc-sky, .acc-indigo, .acc-green { border-top-color: var(--line); }
.card-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.h-ico { display: flex; gap: 10px; align-items: center; }
.hico { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; }
.hico-violet { background: var(--accent-soft); color: var(--accent-text); }
.h-sm { font-size: 14px; }
.sublabel { font-size: 11px; font-weight: 600; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.06em; }
.panel { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.panel-body { padding: 14px 16px; }
.panel-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.progline { display: flex; gap: 10px; align-items: center; }
.segbar { flex: 1 1 auto; display: block; height: 8px; border-radius: 999px; overflow: hidden; min-width: 60px; }
.empty-card { align-items: flex-start; }

/* tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-4); padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tbody tr:hover td { background: var(--hover); }
table.data tr:last-child td { border-bottom: 0; }
table.data.compact { font-size: 13px; min-width: 620px; }
table.data.compact th { padding: 7px 8px; }
table.data.compact td { padding: 8px; }
.panel table.data th:first-child, .panel table.data td:first-child { padding-left: 16px; }
.panel table.data th:last-child, .panel table.data td:last-child { padding-right: 16px; }
table.data .code { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
table.data td.num, table.data th.num { text-align: right; font-family: var(--mono); }
table.data tr.internal td { background: var(--surface-2); }
table.studies { min-width: 700px; }
.rowlink { font-weight: 600; color: var(--text); text-decoration: none; }
.rowlink:hover { color: var(--accent-text); text-decoration: underline; }

/* life cycle rail (was chevrons): flat segments, accent for the current step */
.chevrons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 6px; position: relative; }
.chev { min-height: 52px; padding: 7px 12px; display: flex; flex-direction: column; justify-content: center; gap: 1px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.chev.chev-first { padding-left: 12px; }
.chev-code { font-family: var(--mono); font-size: 11px; color: var(--text-4); }
.chev-name { font-weight: 600; font-size: 13px; line-height: 1.2; }
.chev-state { font-size: 11px; color: var(--text-4); }
.chevrons-hero .chev { min-height: 54px; }
.st-done { background: var(--surface-2); border-color: var(--line-2); }
.st-done .chev-state, .st-done .chev-code { color: var(--ok); }
.st-cond { background: var(--surface-2); border-color: var(--warn-line); }
.st-cond .chev-state, .st-cond .chev-code { color: var(--warn); }
.st-current { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.st-current .chev-state, .st-current .chev-code { color: var(--accent-text); }
.st-proposed { background: var(--accent-soft); border: 1px dashed var(--accent); }
.st-proposed .chev-state, .st-proposed .chev-code { color: var(--accent-text); }
.st-skipped { background: var(--surface); border-style: dashed; color: var(--text-4); }
.st-pending, .chevrons-hero .st-pending, .st-pending-dark { background: var(--surface); color: var(--text-3); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 12px; color: var(--text-3); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; }
.legend strong { color: var(--text); font-weight: 600; }
.lg { display: inline-flex; gap: 6px; align-items: center; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--line-2); background: var(--surface); }
.sw-done { border-color: var(--ok); background: var(--ok-bg); } .sw-cond { border-color: var(--warn); background: var(--warn-bg); }
.sw-current { border-color: var(--accent); background: var(--accent-soft); }
.sw-proposed { border: 1px dashed var(--accent); background: var(--accent-soft); } .sw-skipped { border-style: dashed; }
.sw-pending { background: var(--surface); }

/* dashboard */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi-label { font-size: 11px; color: var(--text-4); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.kpi-mid { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; min-height: 28px; }
.kpi-value { font-family: var(--mono); font-size: 24px; font-weight: 600; line-height: 1; color: var(--text); }
.kpi-critical .kpi-value, .kpi-err .kpi-value { color: var(--bad); }
.kpi-sub { font-size: 12px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.spark { flex: 0 0 auto; }
.charts { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 12px; }
.charts .card { padding: 14px 16px; border-radius: var(--radius-lg); gap: 10px; }
.charts h2 { font-size: 14px; font-weight: 600; }
.gantt { display: flex; flex-direction: column; gap: 10px; }
.g-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; }
.g-head { font-size: 11px; color: var(--text-4); }
.g-months { display: flex; }
.g-months span { flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; }
.g-id { font-size: 12px; color: var(--text-2); text-decoration: none; font-family: var(--mono); }
.g-id:hover { color: var(--accent-text); }
.g-track { display: block; width: 100%; height: 22px; }
.g-nodate { font-size: 12px; color: var(--text-4); background: var(--neutral-bg); border-radius: 6px; padding: 2px 8px; }
.g-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-3); }
.g-legend span { display: inline-flex; gap: 6px; align-items: center; }
.gsw { width: 12px; height: 8px; border-radius: 2px; display: inline-block; }
.gsw-early { background: #9CC7F0; } .gsw-ready { background: #3B8BD9; } .gsw-execute { background: #0B5CAD; } .gsw-close { background: #64748B; }
.gsw-today { width: 2px; height: 12px; background: var(--bad); border-radius: 0; }
.donut-wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.donut-legend li { display: flex; gap: 8px; align-items: center; }
.dot-sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dsw-approved { background: #0B5CAD; } .dsw-issued_for_review { background: #3B8BD9; } .dsw-draft { background: #94A3B8; }
.sevbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sevbars li { display: grid; grid-template-columns: 70px 1fr 22px; gap: 10px; align-items: center; font-size: 13px; }
.sb-label { color: var(--text-2); }
.sb-track { display: block; width: 100%; height: 8px; }
.sb-n { text-align: right; font-family: var(--mono); }
.projbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.projbar h2 { font-size: 15px; margin-right: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pillbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: transparent; color: var(--text-2); border: 1px solid var(--line-2); text-decoration: none; }
.pillbtn:hover { color: var(--text); border-color: var(--text-4); }
.pillbtn[aria-current="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill-n { font-family: var(--mono); font-size: 11px; background: var(--neutral-bg); color: var(--neutral-fg); border-radius: 999px; padding: 0 7px; }
.pillbtn[aria-current="true"] .pill-n { background: var(--bg); color: var(--text); }
.pcards { display: flex; flex-direction: column; gap: 12px; }
.pcard { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.pcard.fluid-geothermal { border-color: var(--line); }
.pc-top { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.thumb { flex: 0 0 56px; height: 64px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line); }
.thumb-oil_gas, .thumb-geothermal { background: var(--surface-2); }
.pc-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 420px; }
.pc-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pc-name { font-size: 16px; font-weight: 600; color: var(--text); text-decoration: none; line-height: 1.3; }
.pc-name:hover { color: var(--accent-text); text-decoration: underline; }
.pc-now { font-size: 13px; color: var(--text-2); }
.pc-side { display: flex; gap: 16px; align-items: center; }
.pc-side-txt { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-3); min-width: 170px; }
.pc-side-txt strong { color: var(--text); }
.drive-link { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.pc-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fact { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact-wait { flex-direction: row; gap: 10px; align-items: center; }
.fact-col { display: flex; flex-direction: column; min-width: 0; }
.fact-l { font-size: 11.5px; color: var(--text-4); }
.fact-v { font-size: 13px; }
.fact-v.strong { font-weight: 600; }
.f-crit { color: var(--bad); font-weight: 600; } .f-some { color: var(--warn); font-weight: 600; } .f-none { color: var(--ok); font-weight: 600; }
.avatar { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--tile-bg); color: var(--tile-fg); }
.av-you { background: #1E3A8A; color: #DBEAFE; } .av-client, .av-agent { background: var(--tile-bg); color: var(--tile-fg); } .av-none { background: var(--ok-bg); color: var(--ok); }
.ring { flex: 0 0 auto; }

/* project page */
.flow { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.flow-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.flow-side { flex: 1 1 300px; max-width: 400px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.reqs { display: flex; flex-direction: column; gap: 8px; }
.req { display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface-2); }
.req-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.req-title { font-weight: 600; font-size: 13px; }
.req-note { font-size: 13px; white-space: pre-line; color: var(--text-2); }
.req-reply { font-size: 13px; color: var(--accent-text); }
.req-meta { font-size: 12px; color: var(--text-4); }
.attach summary { cursor: pointer; font-size: 12.5px; color: var(--text-3); font-weight: 500; min-height: 30px; display: inline-flex; align-items: center; border: 1px dashed var(--line-2); border-radius: 999px; padding: 4px 12px; }
.attach-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.attach-item { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; background: var(--accent-soft); color: var(--accent-text); border-radius: 999px; padding: 3px 10px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.mark { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.mk-done, .mk-done_with_conditions, .mk-complete { background: var(--ok-bg); color: var(--ok); }
.mk-pending, .mk-proposed_done { border: 1.5px solid var(--line-2); }
.mk-skipped { background: var(--neutral-bg); color: var(--neutral-fg); }
.mk-gap { background: var(--bad-bg); color: var(--bad); }
.mk-conflict { background: var(--warn-bg); color: var(--warn); }
.mk-assumed { background: var(--accent-soft); color: var(--accent-text); }
.b-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gapbox { display: flex; flex-direction: column; gap: 6px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px; padding: 8px 10px; }
.gapbox-ro { align-self: flex-start; }
.gap-l { font-size: 12px; color: var(--warn); font-weight: 600; }
.gap-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.gpill { min-height: 30px; padding: 3px 10px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; background: var(--raise); color: var(--text); border: 1px solid var(--line-2); }
.gpill:hover { border-color: var(--text-4); }
.gpill[aria-pressed="true"] { background: var(--accent-btn); color: #FFFFFF; border-color: var(--accent-btn); }
.gap-note { min-height: 30px !important; font-size: 13px !important; padding: 4px 10px !important; }
.gap-chosen { display: flex; flex-direction: column; gap: 4px; font-size: 13px; align-items: flex-start; }
.decide-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.conds { margin: 0; padding-left: 18px; }
details.return { display: inline-block; margin-left: 4px; vertical-align: top; }
details.return summary { list-style: none; }
details.return summary::-webkit-details-marker { display: none; }
details.return[open] { display: block; margin: 8px 0 0; }
details.return .form { margin-top: 8px; gap: 8px; }
.waitrow { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.drivetree { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 3px; overflow-x: auto; }
.dt-root { color: var(--accent-text); }
.dt-1 { padding-left: 12px; } .dt-2 { padding-left: 24px; } .dt-3 { padding-left: 36px; }
.activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; }
.activity li { display: flex; gap: 10px; align-items: flex-start; }
.adot { flex: 0 0 10px; margin-top: 7px; }
.a-body { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; color: var(--text-2); }
.a-when { font-size: 11.5px; color: var(--text-4); }

/* explorer */
.explorer-form { margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.explorer { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.tree { flex: 1 1 240px; max-width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tree-pid { font-size: 12px; color: var(--text-4); padding: 4px 8px; }
.tnode { min-height: 32px; display: flex; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 6px; font-size: 13px; color: var(--text-2); text-decoration: none; }
.tnode:hover { background: var(--hover); color: var(--text); }
.tnode[aria-current="page"] { background: var(--nav-on); color: var(--nav-on-text); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.depth-1 { padding-left: 22px; } .depth-2 { padding-left: 36px; } .depth-3 { padding-left: 50px; } .depth-4 { padding-left: 64px; }
.depth-1 .ficon, .depth-2 .ficon, .depth-3 .ficon, .depth-4 .ficon { width: 22px; height: 22px; }
.tlabel { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcount { font-family: var(--mono); font-size: 11px; color: var(--neutral-fg); background: var(--neutral-bg); border-radius: 999px; padding: 0 8px; }
.ficon { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--tile-fg); background: var(--tile-bg); flex: 0 0 auto; }
.ficon .ico { width: 14px; height: 14px; }
.fc-sub { background: var(--tile-bg); width: 22px; height: 22px; border-radius: 6px; }
.filepane { flex: 999 1 640px; border-radius: var(--radius-lg); padding: 12px 14px; gap: 10px; }
.fp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fp-path { font-size: 13px; color: var(--text-2); }
.fp-path a { color: var(--accent-text); }
table.files { min-width: 720px; }
table.files thead tr { background: var(--surface-2); }
table.files th { padding: 9px 8px; }
table.files td { padding: 9px 8px; vertical-align: middle; }
table.files .sel { width: 32px; }
table.files .sel input { width: 18px; height: 18px; accent-color: var(--accent-btn); }
table.files .fname { display: inline-flex; gap: 10px; align-items: center; font-weight: 500; color: var(--text); text-decoration: none; }
table.files .fname:hover { color: var(--accent-text); text-decoration: underline; }
tr.oldver td { color: var(--text-4); }
.ext { min-width: 40px; height: 24px; padding: 0 4px; border-radius: 6px; font-family: var(--mono); font-size: 10px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; letter-spacing: 0.04em; background: var(--neutral-bg); color: var(--neutral-fg); }
.dropzone { display: flex; flex-direction: column; gap: 10px; }
.dz-area { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: center; border: 1.5px dashed var(--line-2); background: var(--surface-2); border-radius: 12px; padding: 18px; text-align: center; color: var(--text-2); font-size: 14px; cursor: pointer; }
.dz-area:hover, .dz-area:focus-within { background: var(--accent-soft); border-color: var(--accent); }
.dz-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dz-text { font-weight: 600; }
.dz-help { font-size: 12px; color: var(--text-4); }
.dz-chosen { font-size: 13px; color: var(--text-2); font-weight: 500; }
.dz-row input { flex: 1 1 240px; width: auto; }
.mkdir { border-top: 1px solid var(--line); padding-top: 10px; }
.mkdir input { flex: 0 1 260px; width: auto; min-height: 36px; }

/* findings, gates, deliverable pages */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.filters .field { flex: 0 1 200px; }
.findings { list-style: none; margin: 0; padding: 0; }
.finding { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line); }
.fid { font-family: var(--mono); font-weight: 500; font-size: 13px; display: flex; flex-direction: column; color: var(--text-2); }
.fid small { color: var(--text-4); }
.fbody { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fmeta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--text-3); }
.ftitle { font-weight: 600; font-size: 14px; }
.fdetail { color: var(--text-2); max-width: 90ch; font-size: 13px; }
.refs { display: flex; flex-wrap: wrap; gap: 6px; }
.ref { font-size: 12px; background: var(--neutral-bg); color: var(--neutral-fg); border-radius: 999px; padding: 1px 10px; }
.resolution { background: var(--ok-bg); border: 1px solid var(--ok-line); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.declog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.declog li { border-left: 2px solid var(--line-2); padding-left: 10px; }
details.decide { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
details.decide > summary { cursor: pointer; padding: 6px 12px; font-weight: 600; font-size: 13px; color: var(--accent-text); min-height: 34px; display: flex; align-items: center; }
details.decide[open] > summary { border-bottom: 1px solid var(--line); }
details.decide > .form { padding: 14px; }
.gates { list-style: none; margin: 0; padding: 0; }
.gaterow { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.gatehead { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gname { font-weight: 600; font-size: 14px; }
.gphase { font-size: 13px; color: var(--text-4); }
.gatebody { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.gatebody ul { margin: 4px 0 0; padding-left: 18px; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; flex-direction: column; gap: 2px; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.history .when { color: var(--text-4); font-size: 13px; min-width: 150px; }
.kv { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--text-3); }
ul.files { list-style: none; margin: 0; padding: 0; }
ul.files li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 13px; }
ul.files .fname { font-weight: 500; overflow-wrap: anywhere; }
.fsha { font-family: var(--mono); font-size: 11px; color: var(--text-4); overflow-wrap: anywhere; }
.page > .crumbs { color: var(--text-3); }
.page > .crumbs a { color: var(--accent-text); }
.assigned { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.assigned form { margin: 0; }
.pill-x { display: inline-flex; align-items: center; gap: 2px; font-family: var(--mono); font-size: 12px; background: var(--neutral-bg); border: 1px solid var(--line); border-radius: 999px; padding: 0 0 0 10px; }
.pill-x button { border: 0; background: transparent; cursor: pointer; min-width: 30px; min-height: 30px; font-size: 16px; color: var(--text-3); border-radius: 999px; }
.pill-x button:hover { color: var(--bad); }
.assigned select { width: auto; min-height: 36px; font-size: 13px; }
.useracts { display: flex; flex-wrap: wrap; gap: 6px; }
.checklist { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checklist label { display: inline-flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 13px; }
.temp { font-family: var(--mono); font-size: 18px; font-weight: 500; background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 4px 10px; display: inline-block; user-select: all; }
.detail { font-family: var(--mono); font-size: 12px; color: var(--text-3); max-width: 520px; overflow-wrap: anywhere; }
.errorbox { max-width: 560px; margin: 40px auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.errorbox .status { font-family: var(--mono); font-size: 13px; color: var(--text-4); }
.shell-anon .maincol { background: var(--bg); }

/* login */
body.login { background: var(--bg); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.login-side { position: relative; overflow: hidden; background: var(--side); border-right: 1px solid var(--line); color: var(--text); padding: 36px 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.login-side .brand { position: relative; padding: 0; }
.login-copy { position: relative; display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.login-copy h1 { font-size: 36px; line-height: 1.1; }
.login-copy p { color: var(--text-3); font-size: 16px; }
.chevrons-login .chev { min-height: 54px; }
.login-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; gap: 12px; }
.login-card { width: min(420px, 100%); background: var(--surface); border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-lift); padding: 28px; border-top: 2px solid var(--accent); }
.login-card h2 { font-size: 22px; }
.login-foot { font-size: 13px; color: var(--text-4); }
.login-tz { color: var(--text-4); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
  .kpis, .kpis-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .charts { grid-template-columns: 1fr 1fr; }
  .chart-gantt { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .side { display: none; }
  .phonebar { display: flex; justify-content: space-between; align-items: center; background: var(--top); border-bottom: 1px solid var(--line); color: var(--text); padding: 10px 16px; position: relative; z-index: 20; }
  .phonebar .brand { padding: 0; }
  .phonebar .brand-mark { font-size: 18px; letter-spacing: 0.04em; }
  .mnav > summary { list-style: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); }
  .mnav > summary::-webkit-details-marker { display: none; }
  .mnav[open] > summary { background: var(--nav-on); }
  .mnav-panel { position: absolute; right: 12px; top: 62px; width: min(320px, calc(100vw - 24px)); background: var(--side); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-lift); }
  .mnav-panel form { margin: 8px 12px 4px; }
  .tb-right { display: none; }
  .topbar { padding: 10px 16px; min-height: 0; }
  .flow-side { flex-basis: 100%; }
  .cols { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { padding: 28px 20px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .hero { padding: 16px; gap: 12px; }
  .hero-dash { padding: 16px; }
  .hero h1, .hero-dash h1 { font-size: 21px; }
  .hero-compact h1 { font-size: 19px; }
  .page { padding: 16px 16px 40px; gap: 14px; }
  .page-overlap { padding-top: 16px; }
  .topbar { display: none; }
  .foot { padding: 12px 16px 20px; }
  .kpis, .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; gap: 6px; }
  .kpi-value { font-size: 22px; }
  .kpi-top .chip { display: none; }
  .kpi-sub { font-size: 11px; }
  .spark { width: 60px; }
  .charts { grid-template-columns: 1fr; }
  .g-row { grid-template-columns: 96px minmax(0, 1fr); }
  .pcard { padding: 14px; gap: 10px; }
  .pc-top { gap: 12px; }
  .thumb { display: none; }
  .pc-main { flex-basis: 100%; }
  .pc-name { font-size: 17px; }
  .pc-side { width: 100%; }
  .pc-facts { grid-template-columns: 1fr; gap: 8px; }
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .userline { grid-template-columns: 1fr; }
  .finding { grid-template-columns: 1fr; gap: 6px; }
  .card { padding: 14px; }
  .legend { gap: 10px; }
  .chevrons, .chevrons-hero { grid-template-columns: 1fr; }
  .chev { flex-direction: row; align-items: center; gap: 8px; min-height: 40px; }
  .chev-code { flex: 0 0 56px; }
  .chev-name { flex: 1 1 auto; }
  .chev-state { text-align: right; }
  .chevrons-login { display: none; }
  .login-copy h1 { font-size: 28px; }
  .explorer { flex-direction: column; align-items: stretch; }
  .tree, .filepane { flex-basis: auto; }
  .toolbar .btn-tool { flex: 1 1 auto; }
  .flow-main, .flow-side { flex-basis: 100%; }
  .ptabs a { padding: 10px 10px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* grouped studies, well montage */
.btn-indigo { min-height: 40px; padding: 8px 14px; }
table.studies tbody.sgroup tr.grouprow th { background: var(--surface-2); padding: 8px 10px; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); }
.gr-in { display: flex; align-items: center; gap: 12px; }
.gr-name { font-weight: 600; color: var(--text); font-size: 13px; min-width: 170px; text-transform: none; letter-spacing: 0; }
.gr-in .segbar { max-width: 220px; height: 6px; }
.gr-n { font-size: 12px; color: var(--text-4); font-weight: 500; text-transform: none; letter-spacing: 0; }
table.studies td.acts { white-space: normal; min-width: 150px; }
table.studies td.acts > * { margin: 2px 0; }
table.studies td.acts a { display: inline-block; margin-top: 4px; }
table.studies td.acts form.inline { display: block; }
.kvtable th { width: 34%; color: var(--text-3); font-weight: 500; white-space: normal; font-size: 12.5px; text-transform: none; letter-spacing: 0; }
table.data.kvtable th { text-transform: none; letter-spacing: 0; font-size: 12.5px; background: var(--surface-2); width: 32%; }
.page-wide { padding-left: 20px; padding-right: 20px; }
.hero-montage { padding-bottom: 20px; }
.mfacts { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.mfact { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; }
.mf-k { font-size: 11px; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.08em; }
.mf-v { font-weight: 600; }
.mfact.unapproved { border-style: dashed; border-color: var(--accent); }
/* the well montage is a printable sheet: it keeps a paper (light) palette in both themes */
.montage-wrap {
  --text: #0F172A; --text-2: #334155; --text-3: #475569; --text-4: #5B6B82; --line: #E3E8F0; --surface-2: #F7F9FC; --neutral-bg: #F1F5F9;
  color-scheme: light; color: #0F172A; overflow-x: auto; background: #FFFFFF; border-radius: 12px; border: 1px solid var(--line-2);
}
table.montage { width: 100%; min-width: 1500px; border-collapse: separate; border-spacing: 0; font-size: 13px; line-height: 1.45; }
table.montage th { position: sticky; top: 0; background: #0F172A; color: #FFFFFF; text-align: left; padding: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; border-right: 1px solid #1F2B45; vertical-align: bottom; }
.mth, .msrc { display: block; }
.msrc { font-size: 10px; font-weight: 500; color: #9AA8BF; text-transform: none; letter-spacing: 0; }
.mc-formation { min-width: 150px; } .mc-hole { min-width: 170px; } .mc-casing { min-width: 200px; } .mc-pp { min-width: 130px; }
.mc-mud { min-width: 140px; } .mc-fit { min-width: 90px; } .mc-bit { min-width: 170px; } .mc-logging { min-width: 150px; }
.mc-risks { min-width: 170px; } .mc-mitigation { min-width: 280px; }
table.montage td { padding: 10px; border-bottom: 1px solid #E3E8F0; border-right: 1px solid #E3E8F0; vertical-align: top; }
table.montage td > strong, table.montage td > span { display: block; }
table.montage td > span + span, table.montage td > strong + span { margin-top: 4px; }
.pre { white-space: pre-line; }
.mform .mf { display: flex; flex-direction: column; margin-bottom: 6px; }
.mform .mf strong { font-weight: 600; }
.band-0 { background: #F1F5F9; box-shadow: inset 4px 0 0 #64748B; } .band-1 { background: #F8FAFC; box-shadow: inset 4px 0 0 #1E40AF; }
.band-2 { background: #F1F5F9; box-shadow: inset 4px 0 0 #1D4ED8; } .band-3 { background: #F8FAFC; box-shadow: inset 4px 0 0 #2563EB; }
.band-4 { background: #F1F5F9; box-shadow: inset 4px 0 0 #3B82F6; } .band-5 { background: #F8FAFC; box-shadow: inset 4px 0 0 #60A5FA; }
table.montage td.mschem { padding: 0; background: #F7F9FC; }
.mschem svg { display: block; }
.mchip { display: inline-block !important; align-self: flex-start; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 600; font-family: var(--mono); }
.mchip-high { background: #FEE2E2; color: #B91C1C; } .mchip-normal { background: #ECFDF5; color: #047857; }
.mchip-fit { background: #EFF6FF; color: #1D4ED8; } .mchip-na { background: #F1F5F9; color: #475569; }
table.montage td.mrisk { background: #FFFBEB; }
table.montage td.mmit { background: #F8FAFC; }
.mmit ul { margin: 0; padding-left: 16px; color: #1E293B; }
.rk-list { display: flex !important; flex-wrap: wrap; gap: 4px; }
.rk { border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.rk-H { background: var(--bad-bg); color: var(--bad); } .rk-M { background: var(--warn-bg); color: var(--warn); } .rk-L { background: var(--neutral-bg); color: var(--neutral-fg); }
.montage-wrap .rk-H { background: #FEE2E2; color: #B91C1C; } .montage-wrap .rk-M { background: #FEF3C7; color: #B45309; } .montage-wrap .rk-L { background: #F1F5F9; color: #475569; }
table.montage td.unapproved { outline: 2px dashed #3B82F6; outline-offset: -4px; }
.lg-casing { width: 18px; height: 4px; background: var(--accent); display: inline-block; }
.lg-shoe { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid var(--accent); border-bottom: 9px solid var(--accent); display: inline-block; }
.lg-cement { width: 18px; height: 10px; background: #FDE68A; display: inline-block; }
.lg-draft { width: 18px; height: 12px; border: 2px dashed var(--accent); display: inline-block; }
.legend .lg .rk { margin-right: 2px; }
@media (max-width: 960px) { .mfacts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .mfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gr-in { flex-wrap: wrap; gap: 6px 12px; }
  .gr-name { min-width: 0; }
}

/* agent approvals */
.apcards { display: flex; flex-direction: column; gap: 10px; }
.apcard { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 10px; padding: 12px 14px; background: var(--surface-2); }
.ap-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ap-what { font-weight: 600; font-size: 14px; }
.ap-cmd { display: block; font-size: 13px; white-space: pre-wrap; word-break: break-word; background: var(--input); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.ap-why { font-size: 13px; color: var(--text-2); }
.ap-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.ap-form input { flex: 1 1 220px; min-width: 0; }
.sc-alert { color: var(--warn); font-weight: 600; text-decoration: none; }
.agentpanel > h2 { margin: 0; padding: 12px 16px 8px; font-size: 15px; }
.agentpanel > .apcards { padding: 0 16px 16px; }
.agentpanel .detail { word-break: break-all; max-width: 460px; min-width: 220px; }
@media (max-width: 720px) { .agentpanel .detail { max-width: 260px; } .agentpanel > .apcards { padding: 0 12px 12px; } }
.ap-detail summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.ap-detail pre { max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12px; background: var(--input); border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin: 6px 0 0; }
.ap-detail pre.ap-old { background: var(--bad-bg); border-color: var(--bad-line); }
.ap-detail pre.ap-new { background: var(--ok-bg); border-color: var(--ok-line); }

/* AI agents */
.rq-ready_for_review { background: var(--accent-soft); color: var(--accent-text); }
.rq-agents { margin-top: 4px; }
.ag-done { background: var(--ok-bg); color: var(--ok); }
.ag-running, .ag-queued { background: var(--accent-soft); color: var(--accent-text); }
.ag-waiting_approval, .ag-needs_decision, .ag-pending { background: var(--warn-bg); color: var(--warn); }
.ag-failed, .ag-denied, .ag-error { background: var(--bad-bg); color: var(--bad); }
.ag-cancelled { background: var(--neutral-bg); color: var(--neutral-fg); }
.ag-text { white-space: pre-wrap; max-height: 320px; overflow: auto; }
.ag-final { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.ag-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 12px; }
.ag-facts dt { color: var(--text-3); font-size: 13px; }
.ag-facts dd { margin: 0; }
.ag-steps { list-style: none; padding: 0; display: grid; gap: 6px; }
.ag-allowed { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: grid; gap: 8px; }
.ag-edit, .ag-new { margin-top: 8px; }
.ag-edit > summary, .ag-new > summary { cursor: pointer; }
.ag-edit .form { margin-top: 10px; }
.agentpanel > .panel-body { padding: 0 16px 16px; }
@media (max-width: 720px) { .agentpanel > .panel-body { padding: 0 12px 12px; } }

/* frozen header, project tab bar, modules */
.ptabbar { background: var(--top); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px 0 16px; }
.ptabbar .ptabs { flex: 1 1 auto; }
.ptab-ctx { font-size: 12px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.ptab-ctx .mono { color: var(--text-2); }
.psubtabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; padding: 8px 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
.psubtabs a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--text-2); text-decoration: none; border: 1px solid var(--line-2); background: transparent; }
.psubtabs a:hover { border-color: var(--text-4); color: var(--text); }
.psubtabs a[aria-current="page"] { background: var(--accent-btn); border-color: var(--accent-btn); color: #FFFFFF; }
.psubtabs a.planned { color: var(--text-4); border-style: dashed; }
.psubtabs .soon { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-4); }
.hero-warn { display: inline-flex; gap: 6px; align-items: center; align-self: flex-start; font-size: 12.5px; font-weight: 500; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 3px 10px; text-decoration: none; }
.hero-warn:hover { color: var(--text); }
.modgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 14px 16px 16px; }
.modcard { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.modcard.planned { background: var(--surface-2); border-style: dashed; }
.modcard.selected { box-shadow: 0 0 0 1px var(--accent); border-color: var(--accent); }
.mod-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mod-name { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.mod-code { width: 24px; height: 24px; border-radius: 6px; background: var(--tile-bg); color: var(--tile-fg); font-family: var(--mono); font-size: 10.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.mod-lm { font-size: 11px; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.mod-desc { font-size: 13px; color: var(--text-2); flex: 1 1 auto; }
.modcard .btn { align-self: flex-start; margin-top: 4px; }
.hero-actions .btn { min-height: 32px; }
@media (min-width: 1400px) { .page { padding-left: 28px; padding-right: 28px; } }
@media (max-width: 960px) {
  :root { --ctl-h: 44px; }
  .psubtabs { padding: 8px 16px; }
  .ptab-ctx { display: none; }
  .phonebar { position: sticky; top: 0; z-index: 40; }
  .sidenav a, .mnav-panel a { min-height: 44px; }
  .flow-side { max-width: none; }
  .tree { max-width: none; }
}
.a-detail { font-size: 11px; color: var(--text-4); overflow-wrap: anywhere; }
.a-body > span:first-child { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }

/* one frozen header block, project table */
.headfix { position: relative; z-index: 40; }
@media (min-width: 961px) and (min-height: 600px) {
  .headfix { position: sticky; top: 0; box-shadow: var(--head-shadow); }
}
.hero-dash h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.hero-dash h1 .eyebrow { font-size: 10.5px; }
.hero .kpis { position: relative; gap: 10px; }
.hero .kpi { padding: 10px 12px; gap: 4px; }
.hero .kpi-top { gap: 6px; }
.hero .kpi-top .chip { font-size: 10.5px; padding: 0 7px; }
.hero .kpi-mid { min-height: 0; align-items: center; justify-content: flex-start; gap: 10px; }
.hero .kpi-value { font-size: 21px; flex: 0 0 auto; }
.hero .kpi-sub { display: block; font-size: 11.5px; white-space: nowrap; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hero .spark { order: 3; }
.ptable-head { gap: 8px 12px; }
.ptable-head .pills { gap: 6px; }
.table-scroll { overflow-x: auto; }
.ptable td { vertical-align: middle; }
.pl-proj { min-width: 180px; }
.pl-id { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--accent-text); text-decoration: none; }
.pl-name { display: block; font-weight: 600; color: var(--text); text-decoration: none; line-height: 1.3; }
a.pl-name:hover, a.pl-id:hover { color: var(--accent-text); text-decoration: underline; }
.pl-client, .pl-who { display: block; }
.pl-who { font-weight: 600; }
.pl-sub { display: block; font-size: 11.5px; color: var(--text-4); line-height: 1.35; }
.pl-wait { min-width: 160px; max-width: 280px; }
.pl-stage { min-width: 160px; }
.gsegs { display: inline-flex; align-items: center; gap: 2px; }
.gseg { display: inline-block; width: 14px; height: 6px; border-radius: 2px; background: var(--track); }
.gseg-done { background: var(--ok); }
.gseg-cond { background: var(--warn); }
.gseg-skipped { background: var(--text-4); }
.gseg-current { background: var(--accent); }
.gseg-proposed { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.gsegs b { margin-left: 8px; font-size: 12px; color: var(--text-2); font-family: var(--mono); font-weight: 500; }
.col-actions { width: 1%; white-space: nowrap; text-align: right; }
table.data th.col-actions { text-align: right; }
.iconbtns { display: inline-flex; gap: 4px; align-items: center; }
.iconbtns form { margin: 0; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border-radius: 7px; border: 1px solid var(--line-2); background: var(--raise); color: var(--text-3); cursor: pointer; text-decoration: none; transition: background 0.12s, color 0.12s; }
.ibtn .ico { width: 15px; height: 15px; }
.ibtn-view:hover, .ibtn-edit:hover, .ibtn-restore:hover { background: var(--hover); color: var(--text); border-color: var(--text-4); }
.ibtn-del:hover { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.ibtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.viewtoggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.viewtoggle a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 28px; color: var(--text-3); }
.viewtoggle a + a { border-left: 1px solid var(--line-2); }
.viewtoggle a[aria-current] { background: var(--accent-btn); color: #FFFFFF; }
.pl-archived { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-3); }
.panel.danger { box-shadow: inset 0 2px 0 var(--bad); }
.panel.narrow { max-width: 680px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
input.ro { background: var(--surface-2); color: var(--text-3); }
input.mono, .field input.mono { font-size: 13px; }
@media (max-width: 960px) {
  .hero .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ptable-head .pillbtn { white-space: nowrap; flex: 0 0 auto; }
  .ibtn { width: 36px; height: 36px; }
  .ptable-head .pills { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
}
@media (max-width: 640px) {
  /* phones: project, stage and actions only (the project page has the rest) */
  .ptable th:nth-child(2), .ptable td:nth-child(2), .ptable th:nth-child(3), .ptable td:nth-child(3),
  .ptable th:nth-child(5), .ptable td:nth-child(5), .ptable th:nth-child(6), .ptable td:nth-child(6),
  .ptable th:nth-child(7), .ptable td:nth-child(7), .ptable th:nth-child(8), .ptable td:nth-child(8) { display: none; }
  #archived .ptable th, #archived .ptable td { display: table-cell; }
  #archived .ptable th:nth-child(2), #archived .ptable td:nth-child(2), #archived .ptable th:nth-child(4),
  #archived .ptable td:nth-child(4) { display: none; }
  .pl-proj, .pl-stage { min-width: 0; }
  .pl-stage .pl-sub { display: none; }
  .gsegs b { display: none; }
  .ibtn { width: 34px; height: 34px; }
  .pl-id { white-space: nowrap; }
  .gseg { width: 8px; }
  .iconbtns { gap: 3px; }
  .ptable td, .ptable th { padding-left: 8px; padding-right: 8px; }
  .panel .ptable th:first-child, .panel .ptable td:first-child { padding-left: 12px; }
  .panel .ptable th:last-child, .panel .ptable td:last-child { padding-right: 12px; }
}
@media (min-width: 961px) and (min-height: 600px) {
  /* the column titles stay under the frozen header while the list scrolls */
  .ptable-panel, .ptable-panel .table-scroll { overflow: visible; }   /* a clipped panel would hold the sticky titles */
  .ptable-panel .ptable thead th { position: sticky; top: var(--headfix-h, 0px); z-index: 5; }
}

/* ------------------------------------------------------------------ 2.14.0: My tasks */
.tasks-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tasks-add input[name=title] { flex: 1 1 320px; width: auto; }
.tasks-add select, .tasks-add input[type=date] { flex: 0 1 180px; width: auto; }
.tgroup-h { display: flex; align-items: center; gap: 8px; padding: 10px 16px 6px; font-size: 12px; font-weight: 600; color: var(--text); border-top: 1px solid var(--line); }
.tgroup-h .n { font-family: var(--mono); font-weight: 500; color: var(--text-4); }
.tgroup-overdue .tgroup-h { color: var(--bad); }
.trow { display: grid; grid-template-columns: 30px minmax(0, 1fr) 150px 120px 90px 36px; gap: 10px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--line); }
.trow:hover { background: var(--hover); }
.tcheck { margin: 0; }
.tcheck button { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-2); background: transparent; color: #FFFFFF; font-size: 11px; font-weight: 700; padding: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.tcheck button:hover { border-color: var(--accent); }
.trow.done .tcheck button { background: var(--accent-btn); border-color: var(--accent-btn); }
.trow.auto .tcheck .tauto { width: 18px; height: 18px; border-radius: 5px; border: 1.5px dashed var(--line-2); display: inline-block; }
.ttitle { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ttitle > a, .ttitle > span:first-child { font-weight: 500; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.ttitle > a:hover { color: var(--accent-text); text-decoration: underline; }
.trow.done .ttitle > a, .trow.done .ttitle > span:first-child { color: var(--text-4); text-decoration: line-through; }
.tmeta { font-size: 11.5px; color: var(--text-4); }
.tlink { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.towner { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-2); }
.towner .avatar { flex-basis: 20px; width: 20px; height: 20px; font-size: 9.5px; }
.tdue { font-family: var(--mono); font-size: 12px; color: var(--text-2); text-align: right; white-space: nowrap; }
.tdue.late { color: var(--bad); }
.tsrc { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-4); }
@media (max-width: 960px) {
  .trow { grid-template-columns: 30px minmax(0, 1fr) 80px 36px; }
  .trow .tlink, .trow .towner { display: none; }
}

/* ------------------------------------------------------------------ 2.14.0: portfolio list, fewer colours */
.ptable .c-ok, .ptable .c-blue, .ptable .c-amber { color: var(--text-3); }
.ptable .c-ok strong, .ptable .c-blue strong, .ptable .c-amber strong { color: var(--text); font-weight: 600; }
.ptable td.pl-deliv { white-space: normal; min-width: 104px; font-size: 12.5px; }
.ptable td.pl-deliv > span { display: block; line-height: 1.5; }
.ptable td.pl-deliv .sep { display: none; }
.ptable th { white-space: normal; vertical-align: bottom; letter-spacing: 0.04em; }
.ptable td, .ptable th { padding-left: 8px; padding-right: 8px; }
.ptable td.nowrap { white-space: normal; }
.ptable td.nowrap[title] { white-space: nowrap; }
.ptable .type { padding: 1px 7px; font-size: 10.5px; letter-spacing: 0.02em; }

/* ------------------------------------------------------------------ 2.15.0: project page, grouped and denser */
.headfix:has(.hero-project) { position: relative; }                 /* project pages: the header scrolls away */
.hero-project { padding: 14px 24px 12px; gap: 12px; }
.hero-project .hero-row { align-items: center; }
.hero-project h1 { font-size: 20px; }
.hero-compact.hero-project { padding: 10px 24px; }
.hero-compact.hero-project h1 { font-size: 17px; }
.ptabbar { background: var(--top); border-bottom: 1px solid var(--line); padding: 0 16px; }

/* phase stepper (replaces the seven boxes) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; }
.step { position: relative; display: flex; gap: 8px; align-items: flex-start; padding-right: 8px; min-width: 0; }
.step::before { content: ""; position: absolute; left: 22px; right: 4px; top: 10px; height: 2px; background: var(--line-2); }
.step:last-child::before { display: none; }
.step-dot { position: relative; z-index: 1; flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; font-family: var(--mono); background: var(--top); border: 1.5px solid var(--line-2); color: var(--text-4); }
.step-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; padding-top: 1px; background: var(--top); padding-right: 6px; position: relative; z-index: 1; }
.step-code { font-family: var(--mono); font-size: 10.5px; color: var(--text-4); }
.step-name { font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-when { font-size: 11px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.st-done::before, .step.st-cond::before { background: var(--accent); }
.st-done .step-dot { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.st-cond .step-dot { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.st-cond .step-when { color: var(--warn); }
.st-current .step-dot, .st-proposed .step-dot { border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-soft); }
.st-proposed .step-dot { border-style: dashed; }
.st-current .step-name, .st-proposed .step-name { color: var(--text); }
.st-current .step-when, .st-proposed .step-when { color: var(--accent-text); }
.st-skipped .step-dot { border-style: dashed; }

/* status tiles */
.ptiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ptile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); min-width: 0; box-shadow: var(--shadow); }
.ptile:hover { border-color: var(--line-2); background: var(--hover); color: var(--text); }
.pt-l { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-4); }
.pt-v { font-size: 18px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-v small { font-size: 12px; font-weight: 500; color: var(--text-3); }
.pt-v .mono { font-size: 15px; }
.pt-s { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-bad { box-shadow: inset 3px 0 0 var(--bad); }
.pt-bad .pt-v { color: var(--bad); }
.pt-warn { box-shadow: inset 3px 0 0 var(--warn); }

/* two columns */
.ov { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.ov-main, .ov-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ov .card { padding: 14px 16px; gap: 10px; }
.ov .card h2 { font-size: 14px; }
.ov-side .card { gap: 8px; }
.ov-side .activity { gap: 8px; }
.ov .checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.ov .checks.basis { display: flex; }
.ov .decide-row { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 0; }

/* work panel with tabs */
.otabs { display: flex; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); overflow-x: auto; }
.otab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px 9px; font-size: 13px; font-weight: 500; color: var(--text-3); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.otab:hover { color: var(--text); }
.otab[aria-selected="true"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.otab-n { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 999px; background: var(--neutral-bg); color: var(--neutral-fg); }
.otab-warn { background: var(--warn-bg); color: var(--warn); }
.opanel { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.opanel + .opanel { border-top: 1px solid var(--line); }
.js-tabs .opanel + .opanel { border-top: 0; }
.js-tabs .opanel-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.opanel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 22px; }
.opanel-head h2 { font-size: 14px; }
.opanel .tablewrap { margin: 0 -16px; }
.opanel table.data th:first-child, .opanel table.data td:first-child { padding-left: 16px; }
.opanel table.data th:last-child, .opanel table.data td:last-child { padding-right: 16px; }
.opanel table.data td { padding-top: 7px; padding-bottom: 7px; }
.opanel textarea { min-height: 64px; }
@media (max-width: 1180px) {
  .ov { grid-template-columns: minmax(0, 1fr); }
  .ov-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr; gap: 6px; }
  .step::before { display: none; }
  .step-txt { flex-direction: row; gap: 8px; align-items: baseline; }
  .ov .checks { grid-template-columns: 1fr; }
}
.steps .step { background: transparent; border: 0; border-radius: 0; min-height: 0; color: inherit; }
.opanel[hidden] { display: none; }
.step { gap: 0; }
.step-txt { padding-left: 8px; }
.a-meta { font-size: 11px; color: var(--text-4); overflow-wrap: anywhere; }
.a-meta .a-detail, .a-meta .a-when { display: inline; font-size: 11px; }

/* ------------------------------------------------------------------ 2.15.0: engineering applications inside DEPC */
.page-app { padding: 0; gap: 0; }
.appframe { display: block; width: 100%; height: calc(100vh - 132px); min-height: 480px; border: 0; background: var(--bg); }
.appframe[hidden] { display: none; }   /* modules kept open, one shown (2.28.0) */
.headfix:has(.ptabbar-app) { position: sticky; top: 0; }
.ptabbar-app { padding-left: 16px; }

/* ------------------------------------------------------------------ 2.15.0: navy side bar in the light theme (option B) */
:root[data-theme="light"] .side { color: #C9D6E3; border-right-color: #0B2545; }
:root[data-theme="light"] .side .brand, :root[data-theme="light"] .side .brand-mark { color: #FFFFFF; }
:root[data-theme="light"] .side .brand-sub, :root[data-theme="light"] .side .navsec { color: #8DA6C2; }
:root[data-theme="light"] .side .sidenav a { color: #D5E0EC; }
:root[data-theme="light"] .side .sidenav a:hover { background: #12345C; color: #FFFFFF; }
:root[data-theme="light"] .side .sidenav a[aria-current="page"] { background: #1A4778; color: #FFFFFF; box-shadow: inset 3px 0 0 #5BA4F0; }
:root[data-theme="light"] .side .navbadge { background: #1A3A5E; color: #D5E0EC; }
:root[data-theme="light"] .side .navbadge-on { background: #1F6FBF; color: #FFFFFF; }
:root[data-theme="light"] .side .navproj { border-color: #1A3A5E; }
:root[data-theme="light"] .side .navproj-id { color: #8EC2F5; }
:root[data-theme="light"] .side .sidecard { background: #10304F; border-color: #1A3A5E; }
:root[data-theme="light"] .side .sc-status { color: #FFFFFF; }
:root[data-theme="light"] .side .sc-label, :root[data-theme="light"] .side .sc-sub { color: #9FB4CB; }
:root[data-theme="light"] .side .sc-link { color: #8EC2F5; }
:root[data-theme="light"] .side .sc-link:hover { color: #FFFFFF; }
:root[data-theme="light"] .side .brand-ico { background: #1F6FBF; }
:root[data-theme="light"] .side .dot-idle { background: #8DA6C2; box-shadow: 0 0 0 3px #1A3A5E; }
.panel .step-txt, .card .step-txt { background: var(--surface); }
.panel .step-dot, .card .step-dot { background: var(--surface); }
.panel .st-done .step-dot, .card .st-done .step-dot { background: var(--accent); }
.panel .st-cond .step-dot, .card .st-cond .step-dot { background: var(--warn-bg); }

/* 2.21.3: confirm dialog (portal.js) instead of the browser's */
.pdlg-back { position: fixed; inset: 0; z-index: 90; background: rgba(5, 12, 20, .5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pdlg { width: 100%; max-width: 440px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-top: 4px solid #DC2626;
  border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); padding: 16px 18px 14px; }
.pdlg-t { font-weight: 700; margin-bottom: 8px; }
.pdlg-m { opacity: .85; line-height: 1.5; margin-bottom: 14px; word-break: break-word; }
.pdlg-b { display: flex; justify-content: flex-end; gap: 8px; }
.pdlg.pdlg-info { border-top-color: var(--accent); }
.pdlg-b { flex-wrap: wrap; }

/* engineering references page (2.26.0) */
.refs-sec { font-size: 14px; margin: 18px 0 6px; }
table.refs td { vertical-align: top; }

/* ------------------------------------------------------------------ 2.30.0: four stages */
.ptabbar[data-stages] .ptabs { align-items: stretch; }
.ptabs a.stab { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }
.stab-no { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--raise); color: var(--text-3); border: 1px solid var(--line-2); flex: none; }
.stab-current .stab-no, .stab-proposed .stab-no, .ptabs a.stab[aria-current="page"] .stab-no { background: var(--accent-btn); color: #FFFFFF; border-color: var(--accent-btn); }
.stab-done .stab-no, .stab-cond .stab-no { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.ptabs-gap { flex: 1 1 auto; min-width: 12px; }
.ptabs a.ptab-aux { font-size: 12.5px; color: var(--text-4); }
.btn-ico { padding: 4px 8px; }
.btn-xs { min-height: 24px; padding: 2px 8px; font-size: 12px; border-radius: 6px; }
.stagehead { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.stl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stl-i a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; min-height: 56px; position: relative; }
.stl-i a:hover { background: var(--hover); }
.stl-i.stl-on a { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.stl-dot { width: 28px; height: 28px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; background: var(--raise); color: var(--text-3); border: 1px solid var(--line-2); }
.stl-current .stl-dot, .stl-proposed .stl-dot { background: var(--accent-btn); color: #FFFFFF; border-color: var(--accent-btn); }
.stl-done .stl-dot { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.stl-cond .stl-dot { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.stl-skipped a { border-style: dashed; }
.stl-txt { display: flex; flex-direction: column; min-width: 0; }
.stl-name { font-weight: 600; font-size: 14px; }
.stl-st { font-size: 12px; color: var(--text-4); }
.stl-proposed .stl-st { color: var(--accent-text); }
.stagehead .ptiles { margin: 0; }
.wcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.wcard { position: relative; }
.wcard-a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-decoration: none; }
.wcard-a:hover { border-color: var(--accent); background: var(--hover); }
.wcard-other .wcard-a { border-style: dashed; }
.wc-name { font-weight: 600; font-size: 14.5px; padding-right: 48px; }
.wc-desc { font-size: 12px; color: var(--text-4); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--text-3); margin-top: auto; }
.wc-move { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; opacity: .55; }
.wcard:hover .wc-move, .wc-move:focus-within { opacity: 1; }
.wc-tools { align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.wc-add, .wc-place, .wc-upload, .wc-step { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wc-add input, .wc-step input[name="text"] { min-width: 220px; flex: 1 1 220px; }
.wc-owner { max-width: 150px; }
.mstone { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ms-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ms-head h3 { margin: 0; font-size: 14px; }
.decide { border-top: 1px solid var(--line); padding-top: 12px; }
.seg { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg legend { margin-bottom: 6px; }
.segopt { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--raise); cursor: pointer; font-size: 13px; }
.segopt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.segopt-off { opacity: .6; cursor: not-allowed; }
.stg-done, .stg-cond { background: var(--ok-bg); color: var(--ok); }
.stg-proposed, .stg-current, .stg-open { background: var(--accent-soft); color: var(--accent-text); }
.stg-pending, .stg-skipped { background: var(--raise); color: var(--text-3); }
.appgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.appcard { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text); text-decoration: none; }
.appcard:hover { border-color: var(--accent); }
.appcard-wide { max-width: 320px; }
.ac-name { font-weight: 600; }
.ac-role { font-size: 12px; color: var(--text-4); }
.flist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.flist a { display: inline-flex; gap: 6px; align-items: center; }
.wmod { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.wmod-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wmod-head h3 { margin: 0; font-size: 14px; }
.wmod-rm { margin-left: auto; }
.steplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.steplist li { display: flex; gap: 8px; align-items: flex-start; }
.sl-body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.sl-done .sl-body > span:first-child { text-decoration: line-through; color: var(--text-3); }
.tlgantt { display: flex; flex-direction: column; gap: 4px; }
.tl-months { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-4); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-3); }
.tl-legend svg { vertical-align: -1px; }
.opanel-flat { padding: 16px; }
.sidenav a.navstage, .mnav-panel a.navstage { padding-left: 14px; gap: 10px; }
.nst-no { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; background: var(--raise); border: 1px solid var(--line-2); color: var(--text-3); flex: none; }
.nst-current .nst-no, .nst-proposed .nst-no { background: var(--accent-btn); border-color: var(--accent-btn); color: #FFFFFF; }
.nst-done .nst-no, .nst-cond .nst-no { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.sidenav a.navchild, .mnav-panel a.navchild { padding-left: 46px; min-height: 26px; font-size: 12.5px; color: var(--text-3); }
@media (max-width: 760px) {
  .stl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ptabs a.ptab-aux { display: none; }
}
.wc-place select, .wc-place button, .wc-step input[type="date"] { width: auto; min-width: 0; }
.wc-place select { min-width: 160px; max-width: 280px; }
/* 2.31.0: checklist items, progress and the project timeline */
.notice-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--text-2); }
.notice-warn a { color: inherit; text-decoration: underline; }
.bad { color: var(--bad); font-weight: 600; }
.nowrap { white-space: nowrap; }
.table.items td, table.data.items td { vertical-align: top; }
.ir-how { display: block; margin-left: 24px; }
.idot { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; font-size: 11px; font-weight: 700; border: 1.5px solid var(--line-2); color: #FFFFFF; vertical-align: -3px; flex: none; }
.idot-done, .idot-cond { background: var(--ok); border-color: var(--ok); }
.idot-na { background: var(--raise); color: var(--text-4); }
.idot-progress, .idot-review { border-color: var(--accent); background: transparent; }
.ir-done td, .ir-na td { color: var(--text-3); }
.ist { font-size: 12px; font-weight: 600; }
.ist-done, .ist-cond { color: var(--ok); }
.ist-na { color: var(--text-4); }
.ist-review, .ist-progress { color: var(--accent); }
.itm { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 9px; border: 1px solid var(--line-2); color: var(--text-3); }
.itm-overdue { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); font-weight: 600; }
.itm-due_soon, .itm-late_start { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.itm-on_track { color: var(--ok); border-color: var(--ok-line); }
.itm-done { display: none; }
.it-act { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.it-note { width: 170px; min-width: 0; font-size: 12px; padding: 3px 6px; }
.btn-xs.btn-green { padding: 3px 9px; }
.wc-prog { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; color: var(--text-3); }
.pbar { width: 100%; height: 6px; display: block; }
.pb-bg { fill: var(--track); }
.pb-fg { fill: var(--accent); }
.wc-full .pb-fg { fill: var(--ok); }
.wc-late .pb-fg { fill: var(--bad); }
.wc-late { color: var(--bad); }
.tl-settings { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.tl-settings .field { margin: 0; }
.tl-settings input, .tl-settings select { width: auto; }
.tl-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.segbtn { border: 1px solid var(--line-2); background: var(--raise); color: var(--text-2); padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.segbtn:first-child { border-radius: 7px 0 0 7px; }
.segbtn:last-child { border-radius: 0 7px 7px 0; margin-left: -1px; }
.segbtn[aria-pressed="true"] { background: var(--accent-btn); border-color: var(--accent-btn); color: #FFFFFF; }
.tlg-done::before, .tlg-over::before, .tlg-crit::before { content: ""; display: inline-block; width: 12px; height: 10px; margin-right: 4px; border-radius: 2px; vertical-align: -1px; }
.tlg-done::before { background: var(--ok); }
.tlg-over::before { border: 2px solid var(--bad); }
.tlg-crit::before { border: 2px dashed var(--text); }
.tl-gwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 0; min-height: 60px; }
.tl-gwrap.busy { opacity: .6; }
.gantt { display: inline-flex; flex-direction: column; min-width: 100%; }
.gr { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.gr:last-child { border-bottom: 0; }
.gl { flex: 0 0 230px; width: 230px; display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 12.5px; overflow: hidden; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.gl-head { color: var(--text-4); font-size: 11.5px; }
.gl-stage { font-weight: 700; }
.gl-area { padding-left: 14px; }
.gl-item { padding-left: 38px; color: var(--text-2); }
.gnm { overflow: hidden; text-overflow: ellipsis; }
.gtag { margin-left: auto; font-size: 11px; color: var(--text-4); }
.gok { color: var(--ok); font-weight: 700; }
.gchev { border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 12px; padding: 0 2px; width: 18px; }
.gr-stage { background: var(--surface-2); }
.gr-stage .gl { background: var(--surface-2); }
.gt { display: block; flex: none; }
.gm { stroke: var(--line); stroke-width: 1; }
.gy { stroke: var(--line-2); stroke-width: 1.5; }
.gtoday { stroke: var(--bad); stroke-width: 1.5; stroke-dasharray: 3 3; }
.gmon { font-size: 10.5px; fill: var(--text-4); }
.gmlab { font-size: 10.5px; fill: var(--text-2); }
.gb { stroke-width: 0; }
.gb[data-id] { cursor: grab; }
.gb.drag { cursor: grabbing; opacity: .75; }
.gb:focus { outline: none; stroke: var(--text); stroke-width: 2; }
.st-plan { fill: #2F6FD0; }
.st-contract { fill: #8B5CF6; }
.st-execution { fill: #0E9F8A; }
.st-closeout { fill: #D97706; }
.gb-agg { opacity: .55; }
.gb.is-done, .gms.is-done { fill: var(--ok); }
.gb.is-na { opacity: .3; }
.gb.is-crit, .gms.is-crit { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 4 2; }
.gb.is-over, .gms.is-over { stroke: var(--bad); stroke-width: 2.5; stroke-dasharray: none; }
.gb.is-soon { stroke: var(--warn); stroke-width: 2; }
.gb.is-conf { stroke: var(--bad); stroke-dasharray: 2 2; }
.gms { stroke: var(--surface); stroke-width: 1; }
.gms[data-id] { cursor: grab; }
.gh { fill: transparent; cursor: ew-resize; }
.gh:hover { fill: var(--text-4); opacity: .4; }
.gbase { stroke: var(--text); stroke-width: 2; opacity: .55; }
.tl-wk { display: inline-flex; gap: 4px; align-items: center; }
.tl-wk input { width: 68px; padding: 2px 4px; }
@media (max-width: 760px) { .gl { flex-basis: 150px; width: 150px; } .gl-item { padding-left: 20px; } }
.ptabbar[data-stages] { min-width: 0; max-width: 100%; }
.ptabbar[data-stages] .ptabs { min-width: 0; flex: 1 1 0; }
@media (max-width: 760px) { .ptabs-gap { display: none; } }
.card > .tablewrap, .card > details { min-width: 0; max-width: 100%; }
.tablewrap { position: relative; }   /* keeps .sr-only labels inside the scroll box */
.gyr { font-weight: 700; fill: var(--text-3); }
/* 2.32.0: one project header (sticky) - the four stages as arrows, overall progress */
.headfix:has(.phead) { position: sticky; top: 0; box-shadow: var(--head-shadow); }
@media (max-width: 960px), (max-height: 599px) { .headfix:has(.phead) { position: relative; } }
.phead { background: var(--top); border-bottom: 1px solid var(--line); padding: 8px 20px 8px; display: flex; flex-direction: column; gap: 6px; }
.ph-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ph-id { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; flex-wrap: wrap; }
.ph-id h1 { font-size: 16px; margin: 0; line-height: 1.25; }
.ph-line { font-size: 12px; color: var(--text-4); }
.ph-actions { display: flex; gap: 6px; flex: none; }
.ph-flow { align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.parrows { flex: 1 1 560px; min-width: 0; }
.parrows ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.pa { --pa-base: var(--raise); --pa-fill: var(--accent-soft); display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 22px 0 26px; text-decoration: none; color: var(--text-2);
  background: var(--pa-base); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); }
.parrows li:first-child .pa { padding-left: 12px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); border-radius: 6px 0 0 6px; }
.pa:hover { color: var(--text); filter: brightness(1.12); }
.pa-no { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-3); }
.pa-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.pa-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-sub { font-size: 11px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-current, .pa-proposed { --pa-base: var(--nav-on); --pa-fill: #1F5B94; color: #FFFFFF; }
.pa-current .pa-sub, .pa-proposed .pa-sub { color: #CFE3F7; }
.pa-current .pa-no, .pa-proposed .pa-no { background: var(--accent-btn); border-color: var(--accent-btn); color: #FFFFFF; }
.pa-done, .pa-cond { --pa-base: var(--ok-bg); --pa-fill: var(--ok-bg); }
.pa-done .pa-no, .pa-cond .pa-no { background: var(--ok); border-color: var(--ok); color: #FFFFFF; }
.pa-skipped { opacity: .75; }
.pa[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }
.pa[aria-current="page"] .pa-name { text-decoration: underline; text-underline-offset: 3px; }
.pa-late .pa-sub { color: var(--bad); font-weight: 600; }
.pa-current.pa-late .pa-sub, .pa-proposed.pa-late .pa-sub { color: #FFB4B4; }
.ph-side { display: flex; align-items: center; gap: 14px; flex: 0 1 auto; flex-wrap: wrap; }
.ph-prog { display: flex; flex-direction: column; gap: 3px; min-width: 210px; text-decoration: none; color: var(--text-2); font-size: 12px; }
.ph-bar { width: 100%; height: 6px; display: block; }
.pb-late { fill: var(--warn); }
.ph-aux { display: flex; gap: 12px; font-size: 12.5px; }
.ph-aux a { color: var(--text-3); text-decoration: none; white-space: nowrap; }
.ph-aux a:hover, .ph-aux a[aria-current="page"] { color: var(--text); text-decoration: underline; }
.phead-app { padding-top: 6px; }
@media (max-width: 760px) {
  .phead { padding: 8px 12px; }
  .parrows ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pa, .parrows li:first-child .pa { clip-path: none; border-radius: 6px; padding: 0 10px; height: 38px; }
  .ph-line { display: none; }
}
.pa.pf-0 { background: linear-gradient(90deg, var(--pa-fill) 0%, var(--pa-base) 0%); }
.pa.pf-5 { background: linear-gradient(90deg, var(--pa-fill) 5%, var(--pa-base) 5%); }
.pa.pf-10 { background: linear-gradient(90deg, var(--pa-fill) 10%, var(--pa-base) 10%); }
.pa.pf-15 { background: linear-gradient(90deg, var(--pa-fill) 15%, var(--pa-base) 15%); }
.pa.pf-20 { background: linear-gradient(90deg, var(--pa-fill) 20%, var(--pa-base) 20%); }
.pa.pf-25 { background: linear-gradient(90deg, var(--pa-fill) 25%, var(--pa-base) 25%); }
.pa.pf-30 { background: linear-gradient(90deg, var(--pa-fill) 30%, var(--pa-base) 30%); }
.pa.pf-35 { background: linear-gradient(90deg, var(--pa-fill) 35%, var(--pa-base) 35%); }
.pa.pf-40 { background: linear-gradient(90deg, var(--pa-fill) 40%, var(--pa-base) 40%); }
.pa.pf-45 { background: linear-gradient(90deg, var(--pa-fill) 45%, var(--pa-base) 45%); }
.pa.pf-50 { background: linear-gradient(90deg, var(--pa-fill) 50%, var(--pa-base) 50%); }
.pa.pf-55 { background: linear-gradient(90deg, var(--pa-fill) 55%, var(--pa-base) 55%); }
.pa.pf-60 { background: linear-gradient(90deg, var(--pa-fill) 60%, var(--pa-base) 60%); }
.pa.pf-65 { background: linear-gradient(90deg, var(--pa-fill) 65%, var(--pa-base) 65%); }
.pa.pf-70 { background: linear-gradient(90deg, var(--pa-fill) 70%, var(--pa-base) 70%); }
.pa.pf-75 { background: linear-gradient(90deg, var(--pa-fill) 75%, var(--pa-base) 75%); }
.pa.pf-80 { background: linear-gradient(90deg, var(--pa-fill) 80%, var(--pa-base) 80%); }
.pa.pf-85 { background: linear-gradient(90deg, var(--pa-fill) 85%, var(--pa-base) 85%); }
.pa.pf-90 { background: linear-gradient(90deg, var(--pa-fill) 90%, var(--pa-base) 90%); }
.pa.pf-95 { background: linear-gradient(90deg, var(--pa-fill) 95%, var(--pa-base) 95%); }
.pa.pf-100 { background: linear-gradient(90deg, var(--pa-fill) 100%, var(--pa-base) 100%); }
.navchild { justify-content: space-between; }
.nc-ok { color: var(--ok); font-weight: 700; margin-left: auto; padding-right: 10px; }
.nc-late { margin-left: auto; margin-right: 10px; min-width: 18px; height: 16px; padding: 0 5px; border-radius: 8px; background: var(--bad-bg); color: var(--bad); font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
/* 2.32.0: one checklist per work area */
.areanav { margin-left: auto; display: flex; gap: 14px; font-size: 12.5px; }
.areanav a { color: var(--accent-text); text-decoration: none; white-space: nowrap; }
.areanav a:hover { text-decoration: underline; }
.cl { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cl-row { display: grid; grid-template-columns: minmax(200px, 2.3fr) minmax(96px, .8fr) minmax(110px, 1fr) minmax(120px, 1.5fr) minmax(130px, auto); gap: 4px 12px; align-items: start; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.cl-row:first-child { border-top: 0; }
.cl-head { background: var(--surface-2); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-4); font-weight: 600; padding-top: 6px; padding-bottom: 6px; }
.cl-group { padding: 6px 12px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--text-2); display: flex; gap: 10px; align-items: baseline; }
.cl-item { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.cl-name { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.cl-name em { font-style: normal; color: var(--text-3); }
.cl-due { white-space: nowrap; }
.cl-lab { display: none; }
.cl-ev { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.cl-act { display: flex; gap: 6px; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; }
.cl-row.ir-done .cl-name > span:first-child, .cl-row.ir-cond .cl-name > span:first-child { color: var(--text-3); }
.chip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.ch-done, .ch-cond { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.ch-na { color: var(--text-4); }
.ch-progress, .ch-review { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-soft); }
.chip.cht-due_soon, .chip.cht-late_start { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.chip.cht-overdue { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.chip.gate-done, .chip.gate-done_with_conditions { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.chip.gate-proposed_done { border-color: var(--accent-line); color: var(--accent-text); }
.evc { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; padding: 1px 7px; border-radius: 6px; background: var(--raise); border: 1px solid var(--line-2); color: var(--text-2); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evc:hover { border-color: var(--accent); }
.ev-del.ds-approved { border-color: var(--ok-line); color: var(--ok); }
.ev-del.ds-issued_for_review { border-color: var(--accent-line); color: var(--accent-text); }
.ir-more { position: static; }
.ir-more > summary { list-style: none; }
.ir-more > summary::-webkit-details-marker { display: none; }
.ir-more[open] > summary { background: var(--accent-soft); border-color: var(--accent-line); }
.cl-row:has(.ir-more[open]) { background: var(--hover); }
.ir-panel { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 14px; margin-top: 8px; padding: 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); text-align: left; }
.cl-row:has(.ir-more[open]) .cl-act { grid-column: 1 / -1; justify-content: flex-start; }
.ir-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ir-f input[type="number"] { width: 110px; }
.ir-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ir-radio { display: flex; flex-direction: column; gap: 2px; }
.ir-ask textarea { min-height: 52px; }
.gap-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.cl-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-start; }
.cl-extra h3 { font-size: 13px; margin: 10px 0 6px; }
.exgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.excard { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--raise); text-decoration: none; color: var(--text); }
.excard:hover { border-color: var(--accent); }
.ex-name { font-weight: 700; font-size: 15px; }
@media (max-width: 860px) {
  .cl-head { display: none; }
  .cl-row { grid-template-columns: 1fr auto; }
  .cl-item { grid-column: 1 / -1; }
  .cl-lab { display: inline; color: var(--text-4); font-size: 11px; margin-right: 4px; }
  .cl-ev { grid-column: 1 / -1; }
  .cl-act { grid-column: 1 / -1; justify-content: flex-start; }
}
.wc-next { color: var(--text-3); }
.segbtn + .segbtn { margin-left: -1px; }
.segbtn:not(:first-child):not(:last-child) { border-radius: 0; }
.gr .gl { font-size: 12px; }
.gl-item .gnm { color: var(--text-2); text-decoration: none; }
.gl-item a.gnm:hover { text-decoration: underline; color: var(--text); }
.gchev { font-size: 11px; }
.cl-row:has(.ir-more[open]) .cl-act .ir-more { flex: 1 1 100%; }
.cl-row:has(.ir-more[open]) .cl-act .ir-more > summary { margin-bottom: 0; }
.cl-st .chip { white-space: normal; max-width: 100%; }
:root[data-theme="light"] .pa:not(.pa-current):not(.pa-proposed):not(.pa-done):not(.pa-cond) { --pa-base: #E3E9F0; --pa-fill: #C9DAEE; }
:root[data-theme="light"] .pa-done, :root[data-theme="light"] .pa-cond { --pa-base: #D1FAE5; --pa-fill: #D1FAE5; }
/* 2.33.0: traffic lights, detailed tasks, In progress */
.tl-light { width: 18px; height: 18px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #FFFFFF; margin-top: 1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.tl-r { background: #DC2626; }
.tl-y { background: #F59E0B; }
.tl-g { background: #16A34A; }
.tl-n { background: var(--raise); box-shadow: inset 0 0 0 1px var(--line-2); }
.cl-kid .cl-item { padding-left: 22px; }
.cl-sub { background: var(--surface); color: var(--text); font-weight: 700; border-top: 1px solid var(--line); }
.cl-late, .cl-soon { display: block; margin-top: 1px; }
.cl-soon { color: var(--warn); font-weight: 600; }
.cl-btns { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.btn-amber { border-color: #F59E0B !important; color: #B45309 !important; }
:root:not([data-theme="light"]) .btn-amber { color: #FBBF24 !important; }
.ev-ai { border-color: var(--violet-line, #8B5CF6); }
.ev-ai.rq-done { border-color: var(--ok-line); color: var(--ok); }
.ch-open { color: var(--text-3); }
/* 2.33.0: key figures in the sticky header */
.ph-kpis { display: grid; grid-template-columns: minmax(200px, 1.6fr) repeat(5, minmax(110px, 1fr)); gap: 6px; }
.kp { display: flex; flex-direction: column; gap: 2px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-decoration: none; color: var(--text-2); min-width: 0; }
.kp:hover { border-color: var(--accent); }
.kp-l { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-4); font-weight: 600; white-space: nowrap; }
.kp-v { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-v strong { font-size: 15px; color: var(--text); }
.kp-s { color: var(--text-3); }
.kp-bad { border-color: var(--bad-line); }
.kp-bad .kp-v strong { color: var(--bad); }
.kp-warn { border-color: var(--warn-line); }
.kp-prog .ph-bar { margin-top: 2px; }
.ph-side { flex: 0 0 auto; }
@media (max-width: 1100px) { .ph-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ph-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.btn-del { color: var(--bad) !important; }
.ex-main { border-color: var(--accent); }
/* 2.33.0: symbol buttons on each checklist row (title + aria-label carry the words) */
.cl-row { grid-template-columns: minmax(200px, 2.6fr) minmax(96px, .8fr) minmax(96px, .8fr) minmax(120px, 1.5fr) 128px; }
.cl-act { flex-wrap: nowrap; gap: 4px; }
.ib { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; border: 1px solid var(--line-2); background: var(--raise); color: var(--text-2); font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; list-style: none; }
.ib::-webkit-details-marker { display: none; }
.ib:hover { border-color: var(--accent); color: var(--text); }
.ib:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ib-done { background: #16A34A; border-color: #16A34A; color: #FFFFFF; }
.ib-done:hover { background: #15803D; color: #FFFFFF; }
.ib-prog { color: #D97706; border-color: #F59E0B; }
.ib-del { color: var(--bad); }
.ib-del:hover { border-color: var(--bad); }
.ir-more[open] > summary.ib { background: var(--accent-soft); border-color: var(--accent-line); }
.cl-btns { flex-wrap: nowrap; }
.cl-row:has(.ir-more[open]) .cl-act { flex-wrap: wrap; }
@media (max-width: 860px) { .cl-row { grid-template-columns: 1fr auto; } }
.ib-prog { font-size: 10px; }
.btn-red { background: var(--bad); border-color: var(--bad); color: #FFFFFF; }
/* 2.33.1: checklist - enterprise look; panels open under the row */
.cl { border-radius: 10px; box-shadow: 0 1px 2px rgba(15, 42, 68, .06); }
.cl-row { padding: 9px 14px; align-items: center; transition: background .12s; }
.cl-row:hover { background: var(--hover); }
.cl-row.cl-open { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.cl-head { padding: 8px 14px; }
.cl-group { padding: 7px 14px; letter-spacing: .01em; }
.cl-act { flex-wrap: nowrap !important; justify-content: flex-end; gap: 4px; }
.cl-btns { display: inline-flex; gap: 4px; }
.cl-row .cl-name > span:first-child { font-weight: 600; color: var(--text); }
.ib { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; transition: border-color .12s, background .12s; }
.ib-more[aria-expanded="true"], .ib-del[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); }
.ib-x { width: 24px; height: 24px; font-size: 12px; }
.cl-panel { border-top: 1px solid var(--line); background: var(--surface-2); padding: 12px 14px 14px 46px; }
.cl-panel[hidden] { display: none; }
.clp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.clp-title { font-size: 12px; font-weight: 700; color: var(--text-2); letter-spacing: .02em; }
.clp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.clp-sec { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.clp-lab { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-4); display: inline-flex; gap: 5px; align-items: center; }
.clp-sec input:not([type="radio"]):not([type="file"]), .clp-sec select, .clp-sec textarea { width: 100%; font-size: 13px; }
.clp-inline { display: flex; align-items: center; gap: 6px; }
.clp-inline input { width: 90px !important; }
.clp-file { font-size: 12px; max-width: 100%; }
.clp-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 2px; }
.clp-seg { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.clp-seg label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.clp-ai textarea { min-height: 54px; resize: vertical; }
.cl-panel-del { padding-top: 10px; padding-bottom: 10px; background: var(--bad-bg); }
.clp-delrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.clp-delrow input { flex: 1 1 260px; min-width: 0; }
@media (max-width: 860px) { .cl-panel { padding-left: 14px; } }
