/* Handover · Forma Cube colourway
   Blue = actual progress & actions · Yellow = plan & attention · Green = done / on track · Orange = behind / risk */
:root {
  --fc-blue: #4F6FB5; --fc-yellow: #F8BC27; --fc-green: #048041; --fc-orange: #F27030;
  --bg: #F2F1EE; --surface: #FFFFFF; --surface-2: #F7F6F3; --ink: #2B2B2B; --muted: #6A6762;
  --line: #DEDBD5; --rule: #A3A09A;
  --accent: #4F6FB5; --accent-ink: #FFFFFF; --accent-soft: #E2E8F4;
  --brass: #C98F00; --brass-soft: #FDF0CF;
  --good: #048041; --good-soft: #DDF0E5;
  --warn: #A87700; --warn-soft: #FDF0CF;
  --bad: #CF561C; --bad-soft: #FDE4D6;
  --neutral-soft: #ECEAE6; --plan-bar: #E4E2DD;
  --scrim: rgba(43, 43, 43, 0.45);
  --shadow: 0 1px 2px rgba(43, 43, 43, 0.06), 0 8px 24px rgba(43, 43, 43, 0.08);
  --f-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1E1E1E; --surface: #2B2B2B; --surface-2: #333333; --ink: #F1EFEA; --muted: #A9A59F;
    --line: #3D3D3D; --rule: #5F5C58; --accent: #7F9BDB; --accent-ink: #1E1E1E; --accent-soft: #28344F;
    --brass: #F8BC27; --brass-soft: #3F3313; --good: #3DB476; --good-soft: #173A27; --warn: #F8BC27;
    --warn-soft: #3F3313; --bad: #F27030; --bad-soft: #452616; --neutral-soft: #353535; --plan-bar: #3E3E3E;
    --scrim: rgba(0, 0, 0, 0.6); --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--f-mono); font-size: 12.5px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.boot { padding: 40px 16px; color: var(--muted); text-align: center; }

.app { max-width: 1240px; margin: 0 auto; padding-inline: clamp(16px, 3vw, 32px);
  padding-block: env(safe-area-inset-top, 0px) calc(56px + env(safe-area-inset-bottom, 0px)); }

/* top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-block: 12px 14px; }
.topbar::after, .fc-line { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--fc-blue) 0 25%, var(--fc-yellow) 25% 50%, var(--fc-green) 50% 75%, var(--fc-orange) 75% 100%); }
.topbar::after { position: absolute; left: 0; right: 0; bottom: 0; }
.fc-line { width: 132px; margin-block: 4px 2px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; color: inherit; min-width: 0; }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 24px; letter-spacing: .01em; line-height: 1; }
.brand-co { font-size: 13.5px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { flex: none; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.who b { font-weight: 600; }

.pill { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--brass-soft); color: var(--brass); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; font-weight: 600; color: var(--muted); font-size: 13.5px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--rule); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; }
.btn.confirming { background: var(--bad); border-color: var(--bad); color: var(--accent-ink); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 14px; }
.field .help { font-size: 13px; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: var(--surface); min-height: 40px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.error { color: var(--bad); font-size: 14px; font-weight: 600; }
.note { padding: 10px 14px; border-radius: 10px; background: var(--brass-soft); font-size: 14px; }
.note.info { background: var(--accent-soft); }
.preview-bar { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; border: 1px solid var(--brass); position: sticky; top: 8px; z-index: 5; }

/* auth pages */
.auth { min-height: 80vh; display: grid; place-items: center; padding-block: 32px; }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px 24px; display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { font-family: var(--f-display); font-size: 32px; font-weight: 700; line-height: 1.05; }
.auth-card .links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* page heads */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 22px; }
.page-head h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.02; }

/* title block */
.titleblock { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr); border: 1px solid var(--rule); background: var(--surface); }
.tb-main { padding: 18px 20px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tb-main h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.02; overflow-wrap: anywhere; }
.tb-main p { margin: 0; color: var(--muted); max-width: 52ch; }
.tb-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.tb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.tb-grid > div { padding: 12px 16px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); min-width: 0; }
.tb-grid > div:nth-child(3n+1) { border-left: 0; }
.tb-grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.tb-grid dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tb-grid dd { margin: 2px 0 0; font-family: var(--f-display); font-weight: 600; font-size: 21px; line-height: 1.15; overflow-wrap: anywhere; }

/* tabs */
.tabs { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 0 4px; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 12px; font-weight: 600; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--bad-soft); color: var(--bad); font-size: 11.5px; line-height: 18px; text-align: center; }
.view { margin-top: 18px; display: flex; flex-direction: column; gap: 16px; }

/* cards & chips */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; }
.card-head h2 { font-family: var(--f-display); font-weight: 600; font-size: 21px; letter-spacing: .01em; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--neutral-soft); color: var(--muted); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.brass { background: var(--brass-soft); color: var(--brass); }
.chip.plain::before { display: none; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .val { font-family: var(--f-display); font-weight: 700; font-size: 40px; line-height: 1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kpi .val small { font-size: 18px; font-weight: 600; color: var(--muted); }
.kpi .sub { font-size: 13.5px; color: var(--muted); }
.kpi ul { margin: 2px 0 0; padding: 0; list-style: none; font-size: 13.5px; display: flex; flex-direction: column; gap: 3px; }
.kpi li { display: flex; gap: 8px; align-items: baseline; }
.meter { display: block; position: relative; height: 8px; border-radius: 99px; background: var(--plan-bar); margin-top: 6px; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--accent); }
.meter b { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--brass); border-radius: 1px; }

.grid-ov { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 960px) { .grid-ov { grid-template-columns: minmax(0, 1fr); } }

/* charts */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
.legend b { color: var(--ink); font-weight: 600; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .gl { stroke: var(--line); stroke-width: 1; }
svg.chart .ax { fill: var(--muted); font: 500 11px var(--f-body); }
svg.chart .plan { fill: none; stroke: var(--brass); stroke-width: 2; stroke-dasharray: 6 5; }
svg.chart .act { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linejoin: round; }
svg.chart .area { fill: var(--accent); opacity: .12; }
svg.chart .nowline { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 3 3; }
svg.chart .nowlbl { fill: var(--muted); font: 600 11px var(--f-body); }
svg.chart .dot-a { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
svg.chart .dot-p { fill: var(--brass); stroke: var(--surface); stroke-width: 2; }
svg.chart .bar-p { fill: var(--plan-bar); }
svg.chart .bar-a { fill: var(--accent); }

.phases { display: flex; flex-direction: column; gap: 12px; }
.phase-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; }
.phase-row .meter { grid-column: 1 / -1; margin-top: 4px; }
.phase-row span { font-weight: 600; min-width: 0; }

.list { display: flex; flex-direction: column; }
.list-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding-block: 9px; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; padding-top: 0; }
.list-row .when { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); }
.list-row .what { min-width: 0; font-weight: 600; line-height: 1.3; }
.list-row .what small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); font-size: 14px; padding-block: 8px; margin: 0; }

/* feed */
.feed { display: flex; flex-direction: column; }
.post { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 12px; padding-block: 14px; border-top: 1px solid var(--line); }
.post:first-child { border-top: 0; padding-top: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--accent-soft); color: var(--accent); }
.avatar.client { background: var(--brass-soft); color: var(--brass); }
.post .avatar { grid-row: span 2; }
.post-meta { min-height: 22px; padding-top: 2px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; }
.post-meta b { font-weight: 700; }
.post-body { grid-column: 2; min-width: 0; }
.post-body p { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-line; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photo { width: 128px; max-width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); display: block; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quick-post { display: flex; flex-wrap: wrap; gap: 8px; }

/* gantt */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .spacer { margin-left: auto; }
.fchip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.fchip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: var(--surface-2); }
.gantt-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.gantt { --nw: 300px; --cw: 46px; min-width: max-content; }
.g-row { display: grid; grid-template-columns: var(--nw) calc(var(--weeks) * var(--cw)); border-top: 1px solid var(--line); }
.g-row:first-child { border-top: 0; }
.g-name { position: sticky; left: 0; z-index: 2; background: var(--surface); padding: 9px 14px; border-right: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.g-name .nm { font-weight: 600; line-height: 1.25; font-size: 14px; overflow-wrap: anywhere; }
.g-name .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--muted); }
.g-time { position: relative; min-height: 54px; background-image: repeating-linear-gradient(to right, transparent 0 calc(var(--cw) - 1px), var(--line) calc(var(--cw) - 1px) var(--cw)); }
.g-row.act { cursor: pointer; }
.g-row.act:hover .g-name, .g-row.act:hover .g-time { background-color: var(--surface-2); }
.g-row.act:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.g-row.head .g-name, .g-row.head .g-time { background-color: var(--surface-2); min-height: 0; }
.g-weeks { display: flex; height: 100%; }
.g-weeks div { width: var(--cw); flex: none; padding: 6px 0; text-align: center; font-size: 11px; line-height: 1.25; color: var(--muted); border-right: 1px solid var(--line); }
.g-weeks div b { display: block; font-family: var(--f-mono); font-weight: 500; color: var(--ink); font-size: 11px; }
.g-weeks div.cur { background: var(--brass-soft); }
.g-row.phase .g-name { background: var(--surface-2); }
.g-row.phase .g-time { background-color: var(--surface-2); min-height: 38px; }
.g-row.phase .nm { font-family: var(--f-display); font-size: 16px; letter-spacing: .02em; text-transform: uppercase; }
.bar { position: absolute; top: 50%; height: 16px; transform: translateY(-50%); border-radius: 4px; background: var(--plan-bar); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.bar.late { box-shadow: inset 0 0 0 1.5px var(--bad); }
.bar.span { height: 6px; background: var(--rule); opacity: .5; }
.g-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--brass); z-index: 1; pointer-events: none; }
.g-pct { position: absolute; top: 50%; transform: translateY(-50%); font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }

/* approvals */
.appr { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 4px 14px; padding-block: 14px; border-top: 1px solid var(--line); align-items: start; }
.appr:first-child { border-top: 0; padding-top: 2px; }
.appr.clickable { cursor: pointer; }
.appr.clickable:hover h3 { color: var(--accent); }
.appr .mark { width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; border: 2px solid var(--rule); background: var(--surface); }
.appr .mark.done { border-color: var(--good); background: var(--good); }
.appr .mark.live { border-color: var(--warn); background: var(--warn-soft); }
.appr .mark.bad { border-color: var(--bad); background: var(--bad-soft); }
.appr h3 { font-size: 15.5px; font-weight: 700; }
.appr .by { font-size: 13.5px; color: var(--muted); }
.appr .note-t { font-size: 13.5px; margin-top: 4px; }
.appr .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .appr { grid-template-columns: 20px minmax(0, 1fr); } .appr .right { grid-column: 2; align-items: flex-start; text-align: left; } }

/* tables */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 14px; }
th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
td .row-actions { justify-content: flex-end; }
.bad-row td { background: var(--bad-soft); }

/* projects */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.proj { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); }
.proj:hover { border-color: var(--rule); box-shadow: var(--shadow); }
.proj .h3 { font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1.1; overflow-wrap: anywhere; }
.proj .row { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; color: var(--muted); width: 100%; }
.proj .big { font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1; color: var(--ink); }
.empty-card { border: 1px dashed var(--rule); border-radius: 12px; padding: 28px 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.empty-card h2 { font-family: var(--f-display); font-size: 24px; }

.trades { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.trade { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.trade b { font-family: var(--f-display); font-size: 26px; line-height: 1; }

/* drawer */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow); z-index: 41; overflow-y: auto; padding: calc(18px + env(safe-area-inset-top, 0px)) 22px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 16px; animation: slidein .22s ease-out; }
.drawer > * { flex-shrink: 0; }
@keyframes slidein { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  .drawer { top: auto; height: 90%; width: 100%; border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; animation-name: slideup; }
  @keyframes slideup { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
}
.dr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dr-head h2 { font-family: var(--f-display); font-weight: 700; font-size: 28px; line-height: 1.05; margin-top: 4px; overflow-wrap: anywhere; }
.dr-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; font-size: 14px; margin: 0; }
.dr-facts dt { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.dr-facts dd { margin: 1px 0 0; font-weight: 600; }
.dr-pct { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dr-pct .big { font-family: var(--f-display); font-weight: 700; font-size: 54px; line-height: .95; }
.dr-section { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.dr-section h3 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.filebtn { position: relative; display: inline-flex; align-items: center; gap: 8px; border: 1px dashed var(--rule); border-radius: 8px; padding: 9px 12px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.filebtn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.filebtn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.err { background: var(--bad); color: #fff; }

@media (max-width: 760px) {
  .titleblock { grid-template-columns: minmax(0, 1fr); }
  .tb-main { border-right: 0; border-bottom: 1px solid var(--rule); }
  .tb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-grid > div, .tb-grid > div:nth-child(3n+1) { border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .tb-grid > div:nth-child(2n+1) { border-left: 0; }
  .tb-grid > div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .tb-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .gantt { --nw: 178px; --cw: 40px; }
  .kpi .val { font-size: 34px; }
  .brand-co { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
