/* Blank HQ — app styles. Tokens from 01_Master/Blank Space Design — System/colors_and_type.css
   Redesign (28 Sep 2026): one sidebar instead of the stacked bars, each dashboard section its own page,
   calmer cards, and a few charts where they help. Muted text and small labels are darker than before so they
   read at 4.5:1 or better on the paper colour. */
:root {
  --bsd-espresso: #584F46;
  --bsd-espresso-deep: #3F3833;
  --bsd-espresso-warm: #6E6356;
  --bsd-sage: #918D75;
  --bsd-taupe: #B4957E;
  --bsd-paper: #F9F6F0;
  --bsd-paper-2: #FBF9F5;
  --bsd-paper-cool: #ECEBE6;
  --side: #F1EDE5;
  --line: rgba(88, 79, 70, 0.16);
  --line-strong: rgba(88, 79, 70, 0.28);
  --line-soft: #EEE8E0;
  --track: #ECE6DD;
  --fg-1: var(--bsd-espresso);
  --fg-2: var(--bsd-espresso-deep);
  --fg-3: #6E6356;
  --label: #6B6752;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --pos: #4F6B49;
  --neg: #94472F;
  --warn: #7A5324;
  --ok-bg: #E7EAE0;
  --warn-bg: #F3EADC;
  --bad-bg: #F4E6DF;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bsd-paper); color: var(--fg-2); font-family: var(--sans); font-weight: 400; font-size: 15px; line-height: 1.45; }
a { color: var(--fg-1); text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
a:hover { color: var(--fg-2); text-decoration-color: currentColor; }
button { font-family: var(--sans); }
:focus-visible { outline: 2px solid var(--bsd-sage); outline-offset: 2px; }
.ic { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 13px; height: 13px; }
.ic.lg { width: 22px; height: 22px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--fg-1); cursor: pointer; font-size: 13px; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.icbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--fg-1); cursor: pointer; }
.icbtn:hover { background: rgba(88, 79, 70, 0.07); }
.icbtn.line { width: 40px; height: 40px; border: 1px solid var(--line-strong); background: var(--bsd-paper-2); }
.brand { font-family: var(--serif); font-size: 27px; font-weight: 500; line-height: 1; color: var(--fg-2); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--label); font-style: italic; }

/* ===== the shell: sidebar + page ===== */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh;
         background: linear-gradient(to right, var(--side) 263px, var(--line) 263px, var(--line) 264px, transparent 264px); }
.topbar { display: none; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 22px;
        padding: 24px 14px 16px; background: var(--side); border-right: 1px solid var(--line); scrollbar-width: thin; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; min-height: 32px; }
.side-x { display: none; }
.side-sec { display: flex; flex-direction: column; gap: 1px; }
.side-h { display: flex; justify-content: space-between; padding: 0 10px 8px; font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.nav-i { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px; color: var(--fg-2); text-decoration: none; font-size: 14.5px; }
.nav-i .ic { color: var(--label); width: 17px; height: 17px; }
.nav-i:hover, .nav-p:hover, .nav-s:hover { background: rgba(88, 79, 70, 0.06); color: var(--fg-2); }
.nav-i.on, .nav-p.on, .nav-s.on { background: var(--bsd-paper-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.nav-p { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 0 12px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--fg-2); text-decoration: none; }
.nav-p b { display: block; font-weight: inherit; font-size: 14px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-p small { display: block; font-size: 12px; font-weight: 400; color: var(--fg-3); }
.nav-p.open:not(.on) b { font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #B8AFA3; }
.dot.ok { background: #5E7A57; } .dot.warn { background: #B27B3E; } .dot.bad { background: #A3563E; }
.nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 8px 14px; padding-left: 10px; border-left: 1px solid var(--line-strong); }
.nav-g { padding: 10px 10px 3px; font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.nav-s { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; padding: 0 10px; border-radius: 7px; color: var(--fg-2); text-decoration: none; font-size: 13.5px; }
.nb { font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 999px; background: #E6E0D6; color: var(--fg-1); }
.nb.bad { background: var(--bad-bg); color: var(--neg); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding: 14px 10px 0; border-top: 1px solid var(--line); }
.sync { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.sync small, .me small { display: block; font-size: 12px; color: var(--fg-3); }
.me { display: flex; align-items: center; gap: 10px; font-size: 13px; min-width: 0; }
.me > span:nth-child(2) { flex: 1; min-width: 0; }
.me b { display: block; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--bsd-espresso); color: var(--bsd-paper); font-size: 13px; font-weight: 500; }
.main { min-width: 0; }
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(63, 56, 51, 0.45); }
.scrim[hidden] { display: none; }

/* ===== pages ===== */
.page { max-width: 1200px; margin: 0 auto; padding: 36px 48px 72px; }
.page .page { max-width: none; margin: 0; padding: 0; }
.eyebrow { font-size: 11.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--label); }
h1 { font-family: var(--serif); font-weight: 500; font-size: 44px; line-height: 1.05; color: var(--fg-2); margin: 4px 0 4px; }
h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.15; color: var(--fg-2); margin: 32px 0 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
h2 .cnt, .cnt, .muted { color: var(--fg-3); font-family: var(--sans); font-size: 13px; font-weight: 400; letter-spacing: 0; }
h3 { font-family: var(--sans); font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); margin: 22px 0 8px; }
.meta { color: var(--fg-3); font-size: 14px; }
.note { color: var(--fg-3); font-size: 12.5px; margin-top: 10px; }
.lead { color: var(--fg-3); font-size: 14px; margin: -8px 0 20px; max-width: 80ch; }
.phead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.phead h1 { margin-bottom: 0; }
.phead-r { color: var(--fg-3); font-size: 14px; padding-bottom: 6px; }
/* company Financials: the period picker (30 Sep 2026) */
.period { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.period label { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.per-c { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.per-l { margin-top: 8px; text-align: right; }
.period select, .fbox input { min-height: 40px; font: inherit; font-size: 15px; color: var(--fg-2); background: var(--bsd-paper-2); border: 1px solid var(--line-strong); border-radius: 8px; }
.period select { max-width: 100%; padding: 0 10px; cursor: pointer; }
.period select:focus, .fbox input:focus { outline: none; border-color: var(--bsd-sage); box-shadow: 0 0 0 3px rgba(145, 141, 117, 0.22); }
.sec-h { margin-bottom: 24px; }
.sec-h h1 { font-size: 40px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--fg-3); margin-bottom: 14px; }
.crumbs a { color: var(--fg-3); }
.secbtn { display: none; }
.proj-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.proj-t { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.proj-t h1 { margin: 4px 0; }
.flinks { display: flex; flex-wrap: wrap; gap: 8px; }
.flinks a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bsd-paper-2);
            color: var(--fg-2); text-decoration: none; font-size: 13px; white-space: nowrap; }
.flinks a:hover { border-color: var(--bsd-sage); }
.flinks .ic { color: var(--label); }
.empty { color: var(--fg-3); padding: 14px 0; font-size: 14px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 20px; border-radius: 10px; background: #F4E8E1; border: 1px solid #E9D4C8; font-size: 14px; }
.alert .ic, .flag .ic { color: var(--neg); }
.ok-box { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px; background: var(--ok-bg); color: #3F5A3A; font-size: 14px; }
.ok-box .ic { color: var(--pos); }
.ok { color: var(--pos); } .warn { color: var(--warn); } .bad { color: var(--neg); }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.trunc { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
small { font-size: 12.5px; }

/* cards and grids */
.card { background: var(--bsd-paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px 22px; min-width: 0; margin-bottom: 24px; }
.card.flush { padding: 20px 0 0; overflow: hidden; }
.card.flush > .card-h { padding: 0 24px; }
.card-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.card-h h2 { margin: 0; }
.card-h > a { font-size: 13.5px; }
.block { margin-bottom: 24px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; align-items: start; }
.grid2.wide-l { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.grid2 > .card, .grid3 > .card { height: calc(100% - 24px); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; align-items: start; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--fg-3); }
.legend.center { justify-content: center; margin-top: 14px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.legend i.tick { width: 2px; height: 13px; border-radius: 0; }
.legend i.line { width: 16px; height: 2px; border-radius: 0; }
.legend i.today { width: 0; height: 13px; border-left: 2px dashed #A3563E; border-radius: 0; background: none !important; }
.pill { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 500; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: #EDE8E0; color: var(--fg-1); }
.pill.ok { background: var(--ok-bg); color: var(--pos); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--neg); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: #EDE8E0; color: var(--fg-1); white-space: nowrap; }
.chip.lg { font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 400; padding: 5px 11px; background: var(--bsd-paper); border: 1px solid var(--line); }
.chip.lg b { font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* key figures */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: var(--radius); background: var(--bsd-paper-2); border: 1px solid var(--line); color: var(--fg-2); text-decoration: none; min-width: 0; }
a.kpi:hover { border-color: var(--line-strong); color: var(--fg-2); }
.kpi-l { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.kpi-l i { width: 10px; height: 10px; border-radius: 2px; }
.kpi-v, .duo b, .money-top .kpi-v { font-family: var(--serif); font-size: 36px; font-weight: 500; line-height: 1; color: var(--fg-2); white-space: nowrap; }
.kpi-n { font-size: 13px; color: var(--fg-3); }
.cur { font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--fg-3); margin-right: 6px; vertical-align: 0.35em; }

/* thin progress bars: filled = done, tick = planned by today */
.pb { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--track); }
.pb i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.pb u { position: absolute; top: -3px; width: 2px; height: 12px; margin-left: -1px; background: var(--fg-2); }
.pb.wide { height: 8px; margin: 8px 0 4px; }

/* company: projects list */
.plist { display: flex; flex-direction: column; }
.plist-h, .plist-r { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.2fr) minmax(0, 1.05fr) minmax(0, 1.4fr) 128px; gap: 28px; align-items: center; padding: 0 24px; }
.plist-h { padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.plist-h > span:last-child, .pl-sched { text-align: right; justify-self: end; }
.plist-r { min-height: 78px; padding-top: 12px; padding-bottom: 12px; border-top: 1px solid var(--line-soft); color: var(--fg-2); text-decoration: none; }
.plist-h + .plist-r { border-top: 0; }
.plist-r:hover { background: rgba(88, 79, 70, 0.035); color: var(--fg-2); }
.plist-r small { display: block; color: var(--fg-3); }
.pl-name { min-width: 0; }
.pl-name b { display: block; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-prog { display: flex; flex-direction: column; gap: 8px; }
.pl-bar { display: grid; grid-template-columns: 46px minmax(0, 1fr) 38px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--fg-3); }
.pl-bar b { text-align: right; font-weight: 400; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.pl-coll { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 13px; }
.pl-cn { display: flex; justify-content: space-between; gap: 8px; }
.pl-cn b { font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-next { min-width: 0; font-size: 14px; }

/* attention */
.att-g { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 4px; border-top: 1px solid var(--line); }
.att-g:first-of-type { border-top: 0; padding-top: 0; }
.att-p { font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--label); text-decoration: none; }
.att-r { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 7px 0; font-size: 14px; }
.att-r .d, .up-d, .row3 .d { color: var(--fg-3); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* timelines */
.tl { display: flex; flex-direction: column; gap: 12px; }
.tl-axis { position: relative; height: 18px; font-size: 11.5px; color: var(--fg-3); border-bottom: 1px solid var(--line); }
.tl-axis span { position: absolute; top: 0; white-space: nowrap; }
.tl-body { position: relative; display: flex; flex-direction: column; gap: 16px; }
.tl-row { display: flex; flex-direction: column; gap: 7px; text-decoration: none; color: var(--fg-2); }
.tl-lab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tl-lab b { font-weight: 500; font-size: 14.5px; }
.tl-lab small { color: var(--fg-3); white-space: nowrap; }
.tl-bars { position: relative; display: flex; flex-direction: column; gap: 4px; }
.tl-bar { position: relative; display: block; height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.tl-bars .tl-bar { position: relative; }
.tl-bar i { position: absolute; left: 0; top: 0; bottom: 0; }
.tl-end { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--fg-2); }
.tl-today { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 1.5px dashed #A3563E; pointer-events: none; }

/* charts */
.chart { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
.ch-y { position: relative; font-size: 11px; color: var(--fg-3); text-align: right; }
.ch-y span { position: absolute; right: 0; transform: translateY(50%); }
.ch-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ch-plot { position: relative; }
.ch-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed #E6E0D7; }
.ch-grid.zero { border-top: 1px solid #BDB3A6; }
.ch-cols { position: absolute; inset: 0; display: grid; }
.ch-col { position: relative; }
.ch-col i { position: absolute; width: min(20px, 34%); border-radius: 3px 3px 0 0; }
.ch-col b { position: absolute; left: 50%; width: 8px; height: 8px; margin: 0 0 -4px -4px; border-radius: 50%; background: var(--bsd-paper-2); box-shadow: inset 0 0 0 2px var(--fg-2); z-index: 2; }
.ch-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ch-line polyline { fill: none; stroke: var(--fg-2); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ch-x { display: grid; font-size: 11.5px; color: var(--fg-3); text-align: center; }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.duo.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.duo > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 10px; background: #F4F0E9; min-width: 0; }
.duo span, .trio span { font-size: 12.5px; color: var(--fg-3); }
.duo b { font-size: 26px; }
.duo small { color: var(--fg-3); }
.bars6 { display: grid; gap: 6px; border-bottom: 0; }
.b6 { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.b6-plot { position: relative; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid #BDB3A6; }
.b6-in, .b6-out { display: flex; flex-direction: column; justify-content: flex-end; width: min(24px, 40%); }
.b6-in i, .b6-out i { display: block; width: 100%; }
.b6-in i:first-child, .b6-out i { border-radius: 3px 3px 0 0; }
.b6-m { font-size: 11.5px; color: var(--fg-3); }
.b6-n { font-size: 12.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.bars6 + .legend { margin-top: 12px; }
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hb { display: flex; flex-direction: column; gap: 6px; color: var(--fg-2); text-decoration: none; min-width: 0; }
.hb.row { display: grid; grid-template-columns: minmax(120px, 1.1fr) minmax(0, 1.4fr) 84px; gap: 12px; align-items: center; font-size: 14px; }
.hb.row b { font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; }
.hb-t { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; min-width: 0; }
.hb-t small { color: var(--fg-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hb-track { position: relative; display: block; height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.hb-track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bsd-espresso); }
.hb-track.full { width: 100%; }
a.hb:hover .hb-t { text-decoration: underline; text-decoration-color: var(--line-strong); }

/* project overview */
.rings { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.ring-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.ring-cell b { font-weight: 500; font-size: 15px; margin-top: 6px; }
.ring-cell small { color: var(--fg-3); }
.ring { position: relative; }
.ring svg { display: block; }
.ring-track { fill: none; stroke: var(--track); stroke-width: 10; }
.ring-fill { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring-tick { stroke: var(--fg-2); stroke-width: 2.5; }
.ring-v { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 32px; font-weight: 500; color: var(--fg-2); }
.money-top { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.money-top small { color: var(--fg-3); }
.mstack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--track); margin-bottom: 12px; }
.mstack i { display: block; height: 100%; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.trio > div { display: flex; flex-direction: column; gap: 2px; }
.trio span { display: flex; align-items: center; gap: 6px; }
.trio span i { width: 10px; height: 10px; border-radius: 2px; }
.trio span i.hollow { background: var(--track); box-shadow: inset 0 0 0 1px #D9D1C6; }
.trio b { font-weight: 400; font-size: 16px; font-variant-numeric: tabular-nums; }
.card .duo { margin-bottom: 0; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--radius); background: var(--bsd-paper-2);
        border: 1px solid var(--line); color: var(--fg-2); text-decoration: none; }
.tile:hover { border-color: var(--line-strong); color: var(--fg-2); }
.tile > b { font-family: var(--serif); font-size: 48px; font-weight: 500; line-height: 1; }
.tile strong { display: block; font-weight: 500; font-size: 15px; }
.tile small { display: block; color: var(--fg-3); }
.tile .ic { color: var(--label); }
.up { display: flex; flex-direction: column; }
.up-r { display: grid; grid-template-columns: 56px 12px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.up-r:first-child { border-top: 0; padding-top: 0; }
.up-d { font-family: var(--serif); font-size: 19px; color: var(--fg-2); line-height: 1.2; }
.up-t { font-size: 14px; }
.up-t small { display: block; color: var(--fg-3); }
.up-r > i { margin-top: 6px; }
i.dot { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--bsd-sage); }
i.dot.end { background: #9A785F; }
i.dia { display: inline-flex; align-items: center; justify-content: center; width: 10px; height: 10px; transform: rotate(45deg) scale(0.9); background: var(--fg-2); border-radius: 1px; flex-shrink: 0; }
i.dia.hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fg-2); }
.gate { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 10px; background: #F4F0E9; margin-bottom: 10px; font-size: 14px; }
.gate small { display: block; color: var(--fg-3); }
.gate b { font-weight: 500; font-size: 13.5px; white-space: nowrap; }
.gate.over b { color: var(--neg); }
.gates .gate { background: transparent; border-bottom: 1px solid var(--line-soft); border-radius: 0; margin: 0; padding: 11px 0; }
.gates .gate.done { color: var(--fg-3); }
.gates i.ok { display: flex; width: 16px; height: 16px; color: var(--pos); }
.gates i.ok .ic { width: 16px; height: 16px; }
.so-sum { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-top: 6px; }
.so-sum span:last-child { color: var(--fg-3); }
.so-sum b { color: var(--fg-2); font-weight: 500; }
.so-sum.big { font-size: 15px; }
.so-sum.big b { font-family: var(--serif); font-size: 26px; }
.so-r { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0 7px 2px; font-size: 14px; border-top: 1px solid var(--line-soft); }
.so-r small { display: block; color: var(--fg-3); }
.so-r .chips { margin: 0; flex-shrink: 0; align-items: center; gap: 6px; }

/* grouped lists (site focus, sign-offs) */
.col .card-h { align-items: center; }
.big-n { font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--fg-2); }
details.grp { border-top: 1px solid var(--line-soft); }
details.grp > summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0; cursor: pointer; list-style: none; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); }
details.grp > summary::-webkit-details-marker { display: none; }
details.grp > summary::before { content: '▸'; margin-right: 6px; font-size: 10px; color: var(--bsd-sage); }
details.grp[open] > summary::before { content: '▾'; }
details.grp > summary > span:first-child { flex: 1; }
details.grp > summary .cnt { font-size: 12px; text-transform: none; letter-spacing: 0; }
.task { display: grid; grid-template-columns: minmax(0, 1fr) 60px 36px; gap: 4px 10px; align-items: center; padding: 6px 0 8px 16px; font-size: 13.5px; }
.task small { grid-column: 1 / -1; color: var(--fg-3); margin-top: -2px; }
.task.nobar { grid-template-columns: minmax(0, 1fr); }
.task b { font-weight: 400; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.task.over small { color: var(--neg); }
.flags { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.flag { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); }
.flag .ic { margin-top: 1px; }
.subh { margin: 14px 0 2px; font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--neg); }
.card .subh { color: var(--label); }
.card .flags + .subh { color: var(--neg); }

/* rows of figures (project financials) */
.rows { display: flex; flex-direction: column; }
.row2 { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.row2 > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.row2 small { display: block; color: var(--fg-3); font-size: 12px; }
.row2.tot { font-weight: 500; border-top-color: var(--line-strong); }
.row2.grand { font-size: 15.5px; }
.row3 { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto auto; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.row3 .n { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.row3.tot { font-weight: 500; border-top-color: var(--line-strong); }
.row3.tot small { display: block; font-weight: 400; font-size: 12px; color: var(--fg-3); }
.rows:first-child > :first-child { border-top: 0; }

/* programme: planned vs actual */
.pv .pv-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; margin-bottom: 14px; }
.pv h2 { margin: 0 0 4px; }
.pv-n { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.pv-n b { font-family: var(--serif); font-size: 40px; font-weight: 500; line-height: 1; }
.pv-n span { color: var(--fg-3); font-size: 13px; }
.pv-bars { display: flex; flex-direction: column; gap: 8px; }
.pv-r { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 70px; gap: 12px; align-items: center; font-size: 13.5px; }
.pv-r b { font-weight: 400; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pv-r small { color: var(--fg-3); }
.curve { width: 100%; height: auto; max-height: 130px; }
.cv-g { stroke: #E6E0D7; stroke-width: 1; }
.cv-t { font-size: 9px; fill: var(--fg-3); font-family: var(--sans); }
.cv-today { stroke: #A3563E; stroke-width: 1; stroke-dasharray: 3 3; }
.cv-plan { fill: none; stroke: var(--fg-2); stroke-width: 1.6; stroke-dasharray: 4 3; }
.cv-act { fill: none; stroke: #9A785F; stroke-width: 2.2; }
.pv + .legend, .grid2 + .legend { margin: -8px 0 8px; }

details.fold { margin: 8px 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bsd-paper-2); }
details.fold > summary { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 20px; cursor: pointer; list-style: none; font-size: 15px; color: var(--fg-1); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: '＋'; margin-left: auto; color: var(--label); }
details.fold[open] > summary::after { content: '－'; }
details.fold[open] > summary { border-bottom: 1px solid var(--line); }
details.fold > .fold-in { padding: 14px 20px 16px; }
.flinks-t { margin: -4px 0 10px; font-size: 14px; }

/* figures inside the older pages (Billing, Scope & cost, Procurement) */
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 12px; }
.fig { padding: 14px 16px; border-radius: 10px; background: var(--bsd-paper-2); border: 1px solid var(--line); min-width: 0; }
.fig .k { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.fig .v { font-family: var(--serif); font-size: 26px; font-weight: 500; color: var(--fg-2); margin-top: 4px; white-space: nowrap; }
.fig .s { font-size: 12.5px; color: var(--fg-3); margin-top: 2px; }

/* tables */
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 500; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3);
     padding: 8px 10px 7px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.n, th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.c { white-space: nowrap; }
.meta + .tw { margin-top: 20px; }
tr.sec td { font-family: var(--serif); font-size: 17px; color: var(--fg-1); padding-top: 18px; border-bottom-color: var(--line-strong); }
tr.sub td { color: var(--fg-3); }
tr.tot td { font-weight: 500; color: var(--fg-1); border-top: 1px solid var(--line-strong); }
tr.omit td { color: var(--fg-3); text-decoration: line-through; text-decoration-color: var(--bsd-taupe); }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--bsd-paper-2); }
tr.detail > td { background: var(--bsd-paper-2); padding: 4px 10px 12px 26px; }
.tag { display: inline-block; font-size: 10.5px; letter-spacing: 0.08em; padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--fg-2); white-space: nowrap; }
.tag.ok { border-color: rgba(94, 122, 87, 0.5); color: var(--pos); }
.tag.warn { border-color: rgba(180, 149, 126, 0.8); color: #8A6A52; }
.tag.bad { border-color: rgba(163, 86, 62, 0.6); color: var(--neg); }
.pos { color: var(--pos); } .neg { color: var(--neg); }

/* mini programme bars */
.gb { position: relative; height: 10px; min-width: 160px; background: transparent; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.gb i { position: absolute; top: 2px; height: 6px; background: rgba(145, 141, 117, 0.35); border-radius: 1px; }
.gb i b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bsd-sage); border-radius: 1px; }
.gb u { position: absolute; top: -2px; bottom: -2px; width: 1px; background: var(--bsd-taupe); }
.lvl1 td { font-weight: 400; color: var(--fg-1); }
.lvl1 td:first-child { padding-left: 14px; }
.lvl2 td:first-child { padding-left: 26px; color: var(--fg-3); }
.lvl2 td:nth-child(2) { padding-left: 24px; }

/* lists */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.feed .d { color: var(--fg-3); font-size: 12.5px; }
.files { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.files li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; overflow-wrap: anywhere; }

/* filter boxes on long lists (30 Sep 2026): rows that do not match are hidden while there is text */
.fbox { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; }
.fbox .ic { position: absolute; left: 12px; top: 11px; color: var(--label); pointer-events: none; }
.fbox input { width: min(100%, 380px); padding: 0 12px 0 38px; }
.fcount { font-size: 13px; color: var(--fg-3); }
.fx-out { display: none !important; }

/* the two legal entities (3 Oct 2026): a small chip on every money row — BSD in the sage accent, BSA in the taupe one;
   an Entity filter (All / BSD / BSA) in the filter-box pattern; the cards and the Entities table on the Financials pages */
.chip.ent { gap: 0; padding: 1px 7px; letter-spacing: 0.1em; vertical-align: 1px; border: 1px solid var(--line-strong); background: var(--bsd-paper); color: var(--fg-2); }
.chip.ent-bsd { border-color: var(--bsd-sage); background: rgba(145, 141, 117, 0.16); background: color-mix(in srgb, var(--bsd-sage) 16%, transparent); }
.chip.ent-bsa { border-color: var(--bsd-taupe); background: rgba(180, 149, 126, 0.18); background: color-mix(in srgb, var(--bsd-taupe) 18%, transparent); }
td .chip.ent, .row2 .chip.ent, h2 .chip.ent { margin-right: 2px; }
h2 .chip.ent { vertical-align: 4px; }
.fbox.ent-f label { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.fbox select { min-height: 40px; padding: 0 10px; font: inherit; font-size: 15px; color: var(--fg-2); background: var(--bsd-paper-2); border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; max-width: 100%; }
.fbox select:focus { outline: none; border-color: var(--bsd-sage); box-shadow: 0 0 0 3px rgba(145, 141, 117, 0.22); }
.ent-out { display: none !important; }
.ent-cards .card-h h2 { display: flex; align-items: center; gap: 10px; }
.ent-cards .duo { margin-bottom: 0; }
.ent-cards .duo small { font-size: 11.5px; }
.ent-t td small, .con-t td small { display: block; color: var(--fg-3); font-size: 12px; }
.ent-t b { font-weight: 500; }
.row3 .d { white-space: normal; overflow-wrap: anywhere; }      /* a VO code of the new form (BSA-VO-01) breaks at a hyphen instead of running into the title */
.ent-split { color: var(--fg-3); font-size: 13px; }
.ent-split > span:last-child { white-space: normal; }
.ent-rows .row2 > span:first-child { display: inline-flex; align-items: center; gap: 6px; }

/* groups that open and close (Scope & cost, Variations): the header row carries the group's totals */
tr.grp { cursor: pointer; }
tr.grp.flat { cursor: default; }
tr.grp:hover td { background: var(--bsd-paper-2); }
tr.grp.flat:hover td { background: none; }
.gbtn, .gname { display: inline-flex; align-items: baseline; gap: 8px; padding: 0; border: 0; background: none; font-family: var(--serif); font-size: 17px; line-height: 1.25;
                color: var(--fg-1); text-align: left; cursor: pointer; }
.gname { cursor: default; padding-left: 18px; }
.gbtn::before { content: '▸'; flex-shrink: 0; width: 10px; font-family: var(--sans); font-size: 10px; color: var(--bsd-sage); }
.gbtn[aria-expanded="true"]::before { content: '▾'; }
tr.grp small { display: block; margin: 2px 0 0 18px; color: var(--fg-3); }
tbody.gl > tr:last-child > td { border-bottom-color: var(--line-strong); }
tr.omv td, tr.vl.om td { color: var(--fg-3); }
tr.vl small { display: block; color: var(--fg-3); }
tr.est .est-m { font-size: 11.5px; color: var(--fg-3); }
.inv-t .chip, .bs-t .chip { font-size: 10px; }

/* login */
.login { max-width: 380px; margin: 12vh auto 0; padding: 0 22px; }
.login h1 { font-size: 44px; }
.login-logo { display: block; width: auto; height: 40px; margin: 0 0 22px; }
.login p { color: var(--fg-3); }
.login label { display: block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); margin: 18px 0 6px; }
.login input { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line-strong); background: var(--bsd-paper-2); color: var(--fg-2); border-radius: 2px; }
.login input:focus { outline: none; border-color: var(--bsd-sage); }
.btn { margin-top: 22px; width: 100%; padding: 11px 14px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; background: var(--bsd-espresso); color: var(--bsd-paper); border: 0; border-radius: 2px; cursor: pointer; }
.btn:disabled { opacity: 0.5; }
.msg { margin-top: 14px; font-size: 13px; color: var(--neg); min-height: 18px; }
.msg.ok { color: var(--pos); }
.boot { font-family: var(--serif); font-size: 26px; color: var(--fg-3); text-align: center; margin-top: 30vh; }


/* ===== narrower windows and phones: the sidebar slides in from the left under the menu button ===== */
@media (max-width: 1180px) {
  .page { padding: 32px 32px 64px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plist-h { display: none; }
  .plist-r { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 24px; align-items: start; padding-top: 16px; padding-bottom: 16px; }
  .plist-r:first-of-type { border-top: 1px solid var(--line-soft); }
  .pl-name { grid-column: 1; }
  .pl-sched { grid-column: 2; grid-row: 1; }
  .pl-next small { white-space: normal; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 6px; background: var(--side); border-bottom: 1px solid var(--line); }
  .topbar .brand { flex: 1; font-size: 25px; }
  .side { position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); height: auto; padding-top: 8px; transform: translateX(-104%); transition: transform 0.22s ease;
          box-shadow: 8px 0 32px rgba(63, 56, 51, 0.18); visibility: hidden; }
  .shell.nav-open .side { transform: none; visibility: visible; }
  .side-top { min-height: 48px; padding-right: 0; }
  .side-x { display: inline-flex; }
  .nav-i, .nav-s { min-height: 44px; }
  .nav-p { min-height: 52px; }
  .secbtn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; margin: 0 0 18px; padding: 6px 14px;
            border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bsd-paper-2); color: var(--fg-2); font-size: 16px; font-weight: 500; text-align: left; cursor: pointer; }
  .secbtn small { display: block; font-size: 11.5px; font-weight: 400; color: var(--fg-3); }
  .proj .crumbs { display: none; }
  .grid2, .grid2.wide-l, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .grid2 > .card, .grid3 > .card { height: auto; }
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
@media (max-width: 720px) {
  .page { padding: 20px 16px 56px; }
  h1 { font-size: 34px; }
  .sec-h h1 { font-size: 32px; }
  h2 { font-size: 23px; }
  .phead { margin-bottom: 20px; }
  .card { padding: 16px; margin-bottom: 16px; }
  .card.flush { padding: 16px 0 0; }
  .card.flush > .card-h { padding: 0 16px; }
  .kpis { gap: 10px; margin-bottom: 16px; }
  .kpis.three { grid-template-columns: minmax(0, 1fr); }
  .kpi { padding: 14px; gap: 6px; }
  .kpi-v, .money-top .kpi-v { font-size: 27px; }
  .duo b { font-size: 21px; }
  .cur { font-size: 11.5px; margin-right: 4px; }
  .plist-r { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; gap: 10px; }
  .pl-sched { grid-column: 1; grid-row: auto; justify-self: start; text-align: left; order: -1; }
  .pl-name { order: -2; }
  .proj-h { margin-bottom: 20px; }
  .flinks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .flinks a { justify-content: space-between; min-height: 44px; }
  .rings { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .ring { width: 92px !important; height: 92px !important; }
  .ring svg { width: 92px; height: 92px; }
  .ring-v { font-size: 25px; }
  .ring-cell b { font-size: 13.5px; }
  .ring-cell small { font-size: 11.5px; }
  .trio b { font-size: 14.5px; }
  .tile { padding: 14px 16px; }
  .tile > b { font-size: 38px; }
  .up-r { grid-template-columns: 52px 10px minmax(0, 1fr); }
  .up-r .chip { display: none; }
  .att-r { grid-template-columns: 48px minmax(0, 1fr); }
  .att-r .chip { grid-column: 2; justify-self: start; }
  .pv .pv-top { grid-template-columns: minmax(0, 1fr); }
  .hb.row { grid-template-columns: minmax(0, 1fr) 72px; }
  .hb.row .hb-track { grid-column: 1 / -1; grid-row: 2; }
  .row3 { grid-template-columns: 50px minmax(0, 1fr) auto; }
  .row3 > :nth-child(4) { grid-column: 2; justify-self: start; }
  .duo.three { grid-template-columns: minmax(0, 1fr); }
  .chart { grid-template-columns: 34px minmax(0, 1fr); gap: 4px; }
  .ch-x span:nth-child(even) { visibility: hidden; }
  .tl-lab { flex-direction: column; gap: 0; }
  .tl-axis span:nth-child(even) { visibility: hidden; }
  .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fig { padding: 12px; }
  .fig .v { font-size: 21px; white-space: normal; }
  .feed li { grid-template-columns: 80px 1fr; }
  .feed li .n { grid-column: 2; }
  .gb { min-width: 0; }
  .period { justify-content: flex-start; }
  .per-l { text-align: left; }
  .period select, .fbox input { font-size: 16px; }
  .fbox input { width: 100%; }
  .tw { overflow-x: visible; }
}
@media (min-width: 721px) { tbody.gl:not(.pg) > tr:not(.detail) > td:first-child { padding-left: 28px; } }
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

/* tables on a phone (stackTable in portal.js marks them): each row a block, its title first, then label / value lines */
@media (max-width: 720px) {
  table.stack, table.stack > tbody, table.stack > tbody > tr, table.stack > tbody > tr > td { display: block; width: auto !important; }
  table.stack > tbody > tr.hd, table.stack > tbody > tr[hidden], table.stack > tbody[hidden] { display: none; }
  table.stack > tbody.gl > tr, table.stack > tbody.pt-lines > tr { margin-left: 4px; padding-left: 12px; border-left: 2px solid var(--line-strong); }
  table.stack > tbody > tr.grp > td.t { padding-bottom: 2px; }
  table.stack > tbody > tr { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.stack > tbody > tr > td { display: grid; grid-template-columns: minmax(84px, 38%) minmax(0, 1fr); gap: 12px; padding: 2px 0; border: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  table.stack .tag { display: inline-block; }
  table.stack > tbody > tr > td::before { content: attr(data-label); padding-top: 2px; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }
  table.stack > tbody > tr > td.n > .v { text-align: right; }
  table.stack > tbody > tr > td.t { display: block; order: -1; padding-bottom: 4px; font-size: 14.5px; color: var(--fg-1); }
  table.stack > tbody > tr > td.t::before, table.stack > tbody > tr.full > td::before { content: none; }
  table.stack > tbody > tr > td.blank { display: none; }
  table.stack > tbody > tr.full { display: block; }
  table.stack > tbody > tr.full[hidden] { display: none; }            /* a closed detail row stays closed */
  table.stack > tbody > tr.full > td { display: inline; padding: 0 8px 0 0; }
  table.stack > tbody > tr.sec { padding-top: 18px; }
  table.stack > tbody > tr.detail > td { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--line-strong); }
  table.stack > tbody > tr.tot > td.t { font-weight: 500; }
  table.stack tr.click:hover td { background: none; }
}

/* ===== client portal (G7; redesign 28 Sep 2026) — calm cards in the staff app's style; on a phone the page links
   become a tab bar at the bottom of the screen ===== */
.pt { --gut: clamp(16px, 4vw, 48px); max-width: 1240px; margin: 0 auto; padding-inline: var(--gut); padding-block: 0 56px; }
.pt-preview { margin-inline: calc(-1 * var(--gut)); padding: 9px var(--gut); background: var(--bsd-espresso); color: var(--bsd-paper); font-size: 13px; letter-spacing: 0.02em; }
.pt-preview a { color: var(--bsd-paper); margin-left: 8px; }
.pt-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; border-bottom: 1px solid var(--line); }
.pt-logo { display: block; width: auto; height: 36px; }
.pt-who { font-size: 13px; color: var(--fg-3); display: flex; gap: 16px; align-items: center; min-width: 0; }
.pt-who .em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-hero { padding: 40px 0 22px; }
.pt-hero h1 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 500; margin: 8px 0 0; }
.pt-sub { margin: 8px 0 0; font-size: 15px; color: var(--fg-3); }
.pt-switch { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 40px); color: var(--fg-2); background: transparent; border: 0; border-bottom: 1px solid var(--line-strong);
             padding: 4px 0; margin: 6px 0 0; max-width: 100%; }
.pt-ic { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* the page links: underlined tabs on a computer */
.pt-tabs { position: sticky; top: 0; z-index: 10; display: flex; gap: 32px; margin-bottom: 28px; background: var(--bsd-paper); border-bottom: 1px solid var(--line); }
.pt-tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 50px; margin-bottom: -1px; color: var(--fg-3); font-size: 15px; text-decoration: none;
             border-bottom: 2px solid transparent; white-space: nowrap; transition: color 0.2s ease, border-color 0.2s ease; }
.pt-tabs a .pt-ic { width: 18px; height: 18px; opacity: 0.8; }
.pt-tabs a:hover { color: var(--fg-2); }
.pt-tabs a.on { color: var(--fg-2); font-weight: 500; border-bottom-color: var(--fg-2); }
.pt-tabs .s { display: none; }

/* sections */
.pt-page { padding-top: 0; }
.pt-card { padding: 22px 26px 24px; margin-bottom: 24px; background: var(--bsd-paper-2); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.pt-card > h2, .pt-ph2 h2 { margin: 0 0 16px; font-size: 28px; }
.pt-card h3 { margin: 22px 0 10px; }
.pt-card .note { margin-top: 12px; max-width: 80ch; }
.pt-foot { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-3); line-height: 1.5; }
.pt small { display: block; color: var(--fg-3); font-size: 12.5px; margin-top: 2px; }
.pt-file { display: inline-flex; align-items: center; min-height: 30px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--fg-1);
           border: 1px solid var(--line-strong); border-radius: 6px; padding: 3px 10px; white-space: nowrap; background: var(--bsd-paper); }
.pt-file:hover { border-color: var(--bsd-sage); }
.pt-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; align-items: start; }
.pt-two > .pt-card { height: calc(100% - 24px); }

/* next from you */
.pt-callout { display: flex; align-items: center; gap: 16px; padding: 18px 22px; margin-bottom: 24px; border-radius: var(--radius); background: var(--bsd-paper-2); border: 1px solid var(--line-strong); }
.pt-cic { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: var(--bsd-espresso); color: var(--bsd-paper); }
.pt-cic .pt-ic { width: 18px; height: 18px; }
.pt-cwhat { flex: 1; min-width: 0; font-size: 17px; }
.pt-cwhat small { font-size: 11.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); margin: 0 0 2px; }
.pt-callout > b { font-family: var(--serif); font-size: 24px; font-weight: 500; white-space: nowrap; }

/* progress: two rings */
.pt-prog { display: grid; grid-template-columns: minmax(200px, 0.8fr) minmax(0, 2fr); gap: 16px 32px; align-items: center; }
.pt-ph2 .note { margin: 0; }
.pt-rings { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 32px; }
.pt-rcell { display: flex; align-items: center; gap: 20px; }
.pt-ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.pt-ring svg { width: 100%; height: 100%; display: block; }
.pt-ring > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 36px; font-weight: 500; color: var(--fg-2); }
.pt-rtrack { fill: none; stroke: var(--track); stroke-width: 9; }
.pt-rfill { fill: none; stroke-width: 9; stroke-linecap: round; }
.pt-rtick { stroke: var(--fg-2); stroke-width: 2.4; }
.pt-rtxt b { display: block; font-size: 18px; font-weight: 500; }
.pt-rtxt small { font-size: 14px; }

/* coming up: a short timeline */
.pt-next { list-style: none; margin: 0; padding: 0; position: relative; }
.pt-next::before { content: ''; position: absolute; left: 91px; top: 14px; bottom: 14px; width: 1px; background: var(--line-strong); }
.pt-next li { position: relative; display: grid; grid-template-columns: 70px 12px minmax(0, 1fr); gap: 16px; align-items: start; padding: 11px 0; font-size: 15px; }
.pt-next li > i { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 7px; border-radius: 50%; background: var(--bsd-sage); box-shadow: 0 0 0 4px var(--bsd-paper-2); }
.pt-next li.mine > i { border-radius: 1px; transform: rotate(45deg) scale(0.9); background: var(--fg-2); }
.pt-ndate { font-family: var(--serif); font-size: 21px; color: var(--fg-2); line-height: 1.2; white-space: nowrap; }
.pt-nwhat { color: var(--fg-2); }
.pt-hint { margin: -8px 0 6px !important; }

/* programme stages: one line each on a wide screen */
.pt-folds { display: flex; flex-direction: column; gap: 28px; margin-top: 20px; }
.pt-stages { list-style: none; margin: 0; padding: 0; }
.pt-band { font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--label); padding: 16px 0 4px; }
.pt-stage { border-bottom: 1px solid var(--line-soft); }
.pt-stage:last-child { border-bottom: 0; }
.pt-srow { width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name pct" "when when" "strip strip"; gap: 3px 10px;
           background: none; border: 0; padding: 11px 0; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 44px; }
.pt-srow:disabled { cursor: default; }
.pt-sname { grid-area: name; font-size: 15px; color: var(--fg-2); }
.pt-spct { grid-area: pct; font-size: 14px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.pt-swhen { grid-area: when; font-size: 12.5px; color: var(--fg-3); }
.pt-strip { grid-area: strip; position: relative; height: 6px; margin-top: 4px; }
.pt-strip i { position: absolute; top: 0; height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
.pt-strip i b { position: absolute; left: 0; top: 0; bottom: 0; background: #9A785F; }
.pt-strip u { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1.5px dashed #A3563E; }
.pt-srow[aria-expanded="true"] .pt-sname { font-weight: 500; }
.pt-tasks { list-style: none; margin: 0 0 10px; padding: 0 0 0 12px; border-left: 1px solid var(--line-strong); }
.pt-tasks li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name pct" "when when"; gap: 1px 10px; padding: 6px 0; font-size: 13.5px; }
.pt-tname { grid-area: name; }
.pt-twhen { grid-area: when; color: var(--fg-3); font-size: 12px; }
.pt-tpct { grid-area: pct; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.pt-gate { color: var(--fg-2); }
@media (min-width: 760px) {
  .pt-srow { grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 0.9fr) minmax(160px, 2.2fr) 56px; grid-template-areas: "name when strip pct"; align-items: center; gap: 0 24px; padding: 11px 0; }
  .pt-two .pt-srow { grid-template-columns: minmax(0, 1fr) minmax(90px, 0.8fr) 48px; grid-template-areas: "name strip pct" "when when when"; gap: 2px 16px; }
  .pt-strip { margin-top: 0; }
  .pt-spct { text-align: right; }
  .pt-tasks li { grid-template-columns: minmax(168px, 1.4fr) minmax(150px, 0.9fr) minmax(0, 2.2fr) 56px; grid-template-areas: "name when . pct"; gap: 0 24px; align-items: baseline; }
  .pt-two .pt-tasks li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name pct" "when when"; gap: 1px 10px; }
  .pt-tpct { text-align: right; }
}

/* tables and figures */
.pt-t td, .pt-t th { padding: 9px 8px; }
.pt-t td:first-child, .pt-t th:first-child { padding-left: 0; }
.pt-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.pt-figs div { padding: 12px 14px; border-radius: 10px; background: #F4F0E9; min-width: 0; }
.pt-figs span { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.pt-figs b { display: block; font-family: var(--serif); font-weight: 500; font-size: 24px; color: var(--fg-2); margin-top: 4px; white-space: nowrap; }

/* lists (30 Sep 2026): invoices, valuations, variation orders and weekly reports, one line each */
.pt-t .chip { font-size: 10px; }
.pt-t td .pt-file { min-height: 28px; }
.pt-vo-t .pt-gsub { margin-left: 18px; }
.pt-lines td { color: var(--fg-2); }
.pt-lines tr.om td { color: var(--fg-3); }
.pt-lines td small { margin-top: 1px; }
.pt-lines > tr:last-child > td { border-bottom-color: var(--line-strong); }
@media (min-width: 721px) { .pt-lines > tr > td:nth-child(2) { padding-left: 18px; } }
/* the two companies (3 Oct 2026): which one issued an invoice, valuation or variation, and where to pay */
.pt small.pt-ent { font-size: 11.5px; white-space: normal; }
.pt-pays { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 18px; }
.pt-pay { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: 10px; background: #F4F0E9; min-width: 0; font-size: 14px; }
.pt-pay-h { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.pt-pay b { font-weight: 500; font-size: 15px; }
.pt-iban { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pt-pay .muted { font-size: 14px; }
.pt-con-t td .tag { margin-left: 4px; }
/* the monthly fee (4 Oct 2026): shown per month, not as a total */
.pt small.pt-pm { display: inline; margin: 0; font-size: 12px; color: var(--fg-3); }
.pt-repnotes { margin-top: 8px; font-size: 14px; color: var(--fg-2); }
.pt-repnotes p { margin: 4px 0 10px; }
/* the Programme card's two lists, each under a small heading (3 Oct 2026) */
.pt-card h3.pt-plh { display: flex; align-items: baseline; gap: 10px; margin: 0 0 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 18px; color: var(--fg-1); }
.pt-plh span { font-family: var(--sans); font-size: 13px; color: var(--fg-3); }

/* photos and documents */
.pt-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
@media (min-width: 760px) { .pt-photos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; } }
.pt-ph { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bsd-paper-cool); border-radius: 6px; }
.pt-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-box { position: fixed; inset: 0; z-index: 50; background: rgba(40, 35, 31, 0.92); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pt-box[hidden] { display: none; }
.pt-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pt-boxx { position: absolute; top: 10px; right: 14px; background: none; border: 0; color: #fff; font-size: 34px; line-height: 1; cursor: pointer; min-width: 44px; min-height: 44px; }
.pt-docs { list-style: none; margin: 0; padding: 0; }
.pt-docs li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }

@media (max-width: 900px) {
  .pt-two { grid-template-columns: minmax(0, 1fr); }
  .pt-two > .pt-card { height: auto; }
  .pt-prog { grid-template-columns: minmax(0, 1fr); }
}
/* a phone: the page links become a tab bar at the bottom of the screen */
@media (max-width: 600px) {
  .pt { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .pt-top { min-height: 60px; }
  .pt-logo { height: 28px; }
  .pt-who .em { display: none; }
  .pt-hero { padding: 24px 0 16px; }
  .pt-tabs { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; gap: 4px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
             padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); background: var(--bsd-paper-2); border-top: 1px solid var(--line); border-bottom: 0;
             box-shadow: 0 -4px 16px rgba(63, 56, 51, 0.06); }
  .pt-tabs a { flex-direction: column; justify-content: center; gap: 3px; min-height: 54px; margin: 0; border: 0; border-radius: 10px; font-size: 11.5px; letter-spacing: 0.02em; }
  .pt-tabs a .pt-ic { width: 22px; height: 22px; opacity: 1; }
  .pt-tabs a.on { background: #EFEAE2; border: 0; }
  .pt-tabs .l { display: none; }
  .pt-tabs .s { display: inline; }
  .pt-card { padding: 16px; margin-bottom: 16px; }
  .pt-card > h2, .pt-ph2 h2 { font-size: 24px; }
  .pt-callout { padding: 14px; gap: 12px; margin-bottom: 16px; }
  .pt-callout > b { font-size: 18px; }
  .pt-cwhat { font-size: 15.5px; }
  .pt-rings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pt-rcell { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pt-ring { width: 88px; height: 88px; }
  .pt-ring > span { font-size: 25px; }
  .pt-rtxt b { font-size: 15px; }
  .pt-rtxt small { font-size: 12.5px; }
  .pt-next::before { left: 75px; }
  .pt-next li { grid-template-columns: 58px 12px minmax(0, 1fr); gap: 12px; font-size: 14.5px; }
  .pt-ndate { font-size: 18px; }
  .pt-figs { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pt-figs b { font-size: 20px; }
  .pt-file { white-space: normal; }
}

/* Admin's client-portal tab */
.btn.inline { display: inline-block; width: auto; margin-top: 8px; padding: 10px 18px; text-decoration: none; }
.inv { max-width: 460px; margin-top: 18px; padding: 16px 18px 12px; border: 1px solid var(--line); background: var(--bsd-paper-2); }
.inv h3 { margin-top: 0; }
.inv label { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); margin: 10px 0 0; }
.inv input { display: block; width: 100%; margin-top: 5px; font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line-strong); background: var(--bsd-paper); color: var(--fg-2); }
.adm-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.adm-ph { position: relative; aspect-ratio: 1 / 1; padding: 0; border: 0; background: var(--bsd-paper-cool); cursor: pointer; overflow: hidden; }
.adm-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adm-ph.off img { opacity: 0.25; }
.adm-ph em { position: absolute; left: 4px; bottom: 4px; font-style: normal; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; background: var(--bsd-paper); padding: 1px 5px; }
.adm-ph span { font-size: 11px; color: var(--fg-3); }
.adm-files { table-layout: fixed; }
.adm-files td:first-child { width: auto; overflow-wrap: anywhere; }
.adm-files td:nth-child(2) { width: 230px; }
.adm-files td:nth-child(3) { width: 120px; }

