@font-face { font-family: "Montreal"; src: url("/fonts/montreal-BoldSemiSqueezed.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --ink: #0a0a0a;
  --panel: #141312;
  --panel-2: #1b1a19;
  --red: #ff0000;
  --red-deep: #d90000;
  --paper: #f3f2ef;
  --paper-ink: #111010;
  --ash: #8e8a86;
  --fog: #c9c6c2;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);
  --paper-line: rgba(17, 16, 16, 0.14);
  --ok: #3ddc84;
  --warn: #ffb020;

  --display: "Montreal", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "neue-haas-grotesk-text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --haas-display: "neue-haas-grotesk-display", "neue-haas-grotesk-text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --track-display: -0.03em;
  --track-caps: 0.09em;
  --side-w: 248px;
  --gutter: clamp(16px, 3.4vw, 44px);

  --bg: #0a0a0a;
  --surface: #141312;
  --surface-2: #1b1a19;
  --text: #f3f2ef;
  --text-2: #c9c6c2;
  --muted: #8e8a86;
  --line-strong: rgba(255, 255, 255, 0.35);
  --topbar: rgba(10, 10, 10, 0.86);
  --red-tint: rgba(255, 0, 0, 0.12);
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  color-scheme: light;
  --bg: #f4f3f0;
  --surface: #ffffff;
  --surface-2: #efeee9;
  --text: #111010;
  --text-2: #3d3a37;
  --muted: #6f6a66;
  --line: rgba(17, 16, 16, 0.13);
  --line-soft: rgba(17, 16, 16, 0.08);
  --line-strong: rgba(17, 16, 16, 0.4);
  --topbar: rgba(244, 243, 240, 0.88);
  --red: #e60000;
  --red-deep: #c40000;
  --ok: #0a8a44;
  --warn: #c77700;
} }
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f3f0;
  --surface: #ffffff;
  --surface-2: #efeee9;
  --text: #111010;
  --text-2: #3d3a37;
  --muted: #6f6a66;
  --line: rgba(17, 16, 16, 0.13);
  --line-soft: rgba(17, 16, 16, 0.08);
  --line-strong: rgba(17, 16, 16, 0.4);
  --topbar: rgba(244, 243, 240, 0.88);
  --red: #e60000;
  --red-deep: #c40000;
  --ok: #0a8a44;
  --warn: #c77700;
}


*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- type ---------- */
.display { font-kerning: normal; font-feature-settings: "kern" 1; font-family: var(--display); font-weight: 700; letter-spacing: var(--track-display); line-height: .9; text-transform: uppercase; margin: 0; }
h1.display { font-size: clamp(40px, 6vw, 76px); }
h2.display { font-size: clamp(28px, 3.4vw, 40px); }
.h3 { font-family: var(--haas-display); font-weight: 700; font-size: 19px; line-height: 1.2; margin: 0; }
.label { font-size: 11px; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.red { color: var(--red); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--line); background: var(--bg);
  display: flex; flex-direction: column; padding: 22px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; text-decoration: none; }
.brand img { height: 18px; width: auto; }
.brand .tag { font-size: 10px; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--red); border: 1px solid rgba(255,0,0,.45); padding: 2px 6px; }
.client-chip { display: flex; align-items: center; gap: 12px; padding: 12px 10px; margin-bottom: 14px; border: 1px solid var(--line); background: var(--surface); }
.client-chip img { height: 22px; width: auto; }
.client-chip .who { font-size: 12px; color: var(--muted); line-height: 1.3; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-decoration: none;
  color: var(--text-2); font-weight: 500; border-left: 2px solid transparent;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.on { color: var(--text); background: var(--surface); border-left-color: var(--red); }
.nav a .count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--red); color: #fff; padding: 1px 7px; border-radius: 0; }
.nav svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; }
.nav .sep { height: 1px; background: var(--line); margin: 14px 10px; }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.side-foot .me { color: var(--text-2); word-break: break-all; }
.side-foot button { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; margin-top: 6px; text-decoration: underline; text-underline-offset: 3px; }
.side-foot button:hover { color: var(--text); }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 14px var(--gutter); background: var(--topbar); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs b { color: var(--text); font-weight: 500; }
.topbar .spacer { flex: 1; }
.as-client { font-size: 12px; background: rgba(255,0,0,.12); border: 1px solid rgba(255,0,0,.4); color: var(--text); padding: 6px 10px; display: flex; gap: 10px; align-items: center; }
.as-client a { color: var(--red); font-weight: 700; text-decoration: none; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); padding: 8px 10px; cursor: pointer; }
.page { padding: clamp(24px, 4vw, 48px) var(--gutter) 80px; max-width: 1280px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.page-head .eyebrow { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.page-head .eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--red); }
.page-head p { margin: 14px 0 0; color: var(--text-2); max-width: 62ch; }

/* ---------- blocks ---------- */
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line-soft); padding: 22px; min-width: 0; }
.card.pad-0 { padding: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head .more { font-size: 13px; color: var(--muted); text-decoration: none; }
.card-head .more:hover { color: var(--text); }
.section { margin-top: 36px; }
.section > .label { display: block; margin-bottom: 14px; }

.stat .n { font-family: var(--display); font-weight: 700; letter-spacing: var(--track-display); font-size: 46px; line-height: .95; margin-top: 12px; font-variant-numeric: normal; font-kerning: normal; font-feature-settings: "kern" 1; }
.stat .n small { font-size: .45em; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.stat .sub { font-size: 13px; color: var(--muted); margin-top: 8px; }
.stat.alert { border-color: rgba(255,0,0,.45); }
.stat.alert .n { color: var(--red); }

.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border: 1px solid var(--line); white-space: nowrap; color: var(--text-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.pill.ok::before { background: var(--ok); }
.pill.live { color: var(--text); border-color: rgba(255,0,0,.5); }
.pill.live::before { background: var(--red); animation: blink 1.4s steps(2, jump-none) infinite; }
.pill.warn::before { background: var(--warn); }
.pill.bad { color: #fff; background: var(--red); border-color: var(--red); }
.pill.bad::before { background: #fff; }
@keyframes blink { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .pill.live::before { animation: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--text); white-space: nowrap; }
.btn:hover { border-color: var(--text); }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn.sm { padding: 7px 11px; font-size: 11px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* action needed */
.actions-list { display: flex; flex-direction: column; }
.action { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line-soft); text-decoration: none; }
.action:first-child { border-top: 0; padding-top: 0; }
.action .dot { width: 34px; height: 34px; flex: none; display: grid; place-items: center; background: rgba(255,0,0,.12); color: var(--red); }
.action .dot svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.action .t { font-weight: 500; }
.action .s { font-size: 13px; color: var(--muted); }
.action .go { margin-left: auto; color: var(--muted); }
.action:hover .go { color: var(--text); }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

/* progress */
.bar { height: 4px; background: var(--line); position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--red); }

/* project cards */
.proj { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line-soft); transition: border-color .2s ease; min-width: 0; }
.proj:hover { border-color: var(--line-strong); }
.proj .body { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.proj .meta { display: flex; gap: 8px 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.proj .foot { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--text-2); }
.proj .foot .bar { flex: 1; }
.proj .cover { aspect-ratio: 16/7; background: #000 center/cover no-repeat; position: relative; }
.proj .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(10,10,10,.8)); }

/* timeline (done / now / next) */
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lane { background: var(--surface); border: 1px solid var(--line-soft); padding: 18px; min-width: 0; }
.lane-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.lane ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lane li { background: var(--surface-2); padding: 11px 12px; border-left: 2px solid var(--line); }
.lane.now li { border-left-color: var(--red); }
.lane.done li { border-left-color: var(--ok); }
.lane li .t { font-weight: 500; font-size: 14px; line-height: 1.35; }
.lane li .s { font-size: 12px; color: var(--muted); margin-top: 3px; }
.lane li a { color: var(--red); font-size: 12px; font-weight: 700; text-decoration: none; }

/* vertical milestones */
.steps { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.steps::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.steps li { position: relative; padding: 0 0 18px; }
.steps li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li.now::before { background: var(--red); border-color: var(--red); }
.steps li .t { font-weight: 500; }
.steps li .s { font-size: 13px; color: var(--muted); }

/* tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.t tr.link { cursor: pointer; }
table.t tr.link:hover td { background: var(--surface-2); }
table.t .r { text-align: right; }
table.t td a { text-decoration: none; }

/* deliverables list */
.deliv { list-style: none; margin: 0; padding: 0; }
.deliv li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.deliv li:first-child { border-top: 0; }
.deliv .t { flex: 1; min-width: 0; }
.deliv .t small { display: block; color: var(--muted); font-size: 12px; }
.deliv .open-link { color: var(--red); font-weight: 700; font-size: 12px; text-decoration: none; letter-spacing: .04em; text-transform: uppercase; }

/* files */
.file { display: flex; gap: 14px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line-soft); text-decoration: none; min-width: 0; }
.file:hover { border-color: var(--line-strong); }
.file .ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--red); }
.file .ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.file .t { font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.file .s { font-size: 12px; color: var(--muted); }

/* tabs / filters */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.filters button { background: none; border: 1px solid var(--line); padding: 7px 12px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.filters button.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* proposal doc (native render) */
.doc { background: var(--paper); color: var(--paper-ink); padding: clamp(24px, 5vw, 64px); }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--paper-line); margin-bottom: 32px; }
.doc-head img.wm { height: 20px; width: auto; }
.doc-head .client-logo { height: 26px; width: auto; filter: invert(1); }
.doc h1.display { color: var(--paper-ink); font-size: clamp(36px, 5vw, 64px); }
.doc .doc-meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; color: #5d5955; }
.doc .doc-meta b { color: var(--paper-ink); display: block; font-size: 15px; }
.doc-toc { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.doc-toc a { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--paper-line); padding: 6px 10px; color: var(--paper-ink); }
.doc-toc a:hover { border-color: var(--paper-ink); }
.doc-section { padding-top: 34px; }
.doc-section > .sec-label { font-size: 11px; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--red); display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.doc-section > .sec-label::before { content: ""; width: 7px; height: 7px; background: var(--red); }
.md { max-width: 76ch; font-size: 16px; line-height: 1.65; }
.md h1, .md h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: var(--track-display); line-height: .95; font-size: 34px; margin: 38px 0 14px; }
.md h3 { font-family: var(--haas-display); font-size: 21px; margin: 30px 0 10px; line-height: 1.25; }
.md h4 { font-size: 16px; margin: 22px 0 6px; }
.md p { margin: 0 0 14px; }
.md ul, .md ol { padding-left: 22px; margin: 0 0 16px; }
.md li { margin-bottom: 5px; }
.md hr { border: 0; border-top: 1px solid var(--paper-line); margin: 28px 0; }
.md a { color: var(--red-deep); }
.md strong { font-weight: 700; }
.md blockquote { margin: 0 0 16px; padding: 12px 18px; border-left: 3px solid var(--red); background: rgba(17,16,16,.04); }
.md table { width: 100%; border-collapse: collapse; margin: 6px 0 22px; font-size: 14px; display: block; overflow-x: auto; }
.md th { text-align: left; font-size: 11px; letter-spacing: var(--track-caps); text-transform: uppercase; color: #5d5955; border-bottom: 2px solid var(--paper-ink); padding: 9px 12px 9px 0; }
.md td { border-bottom: 1px solid var(--paper-line); padding: 10px 12px 10px 0; vertical-align: top; }
.md code { font-size: .9em; background: rgba(17,16,16,.06); padding: 1px 5px; }
.accept-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); padding: 18px 22px; margin-bottom: 16px; }
.accept-bar .t { font-weight: 500; }
.accept-bar .s { font-size: 13px; color: var(--muted); }

/* invoice paper */
.inv { background: #fff; color: var(--paper-ink); padding: clamp(24px, 4.5vw, 56px); font-size: 14px; line-height: 1.5; }
.inv-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.inv-top img { height: 22px; width: auto; }
.inv-title { font-family: var(--display); font-weight: 700; letter-spacing: var(--track-display); text-transform: uppercase; font-size: 56px; line-height: .9; margin: 34px 0 6px; }
.inv-title .red { color: var(--red); }
.inv-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 28px 0; padding: 20px 0; border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
.inv .k { font-size: 10px; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: #6f6a66; margin-bottom: 4px; }
.inv .v { white-space: pre-line; }
.inv table { width: 100%; border-collapse: collapse; }
.inv th { text-align: left; font-size: 10px; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: #6f6a66; border-bottom: 2px solid var(--paper-ink); padding: 8px 10px 8px 0; }
.inv td { border-bottom: 1px solid var(--paper-line); padding: 12px 10px 12px 0; vertical-align: top; }
.inv .r { text-align: right; padding-right: 0; }
.inv-totals { margin-left: auto; width: min(320px, 100%); margin-top: 18px; }
.inv-totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.inv-totals .grand { border-top: 2px solid var(--paper-ink); margin-top: 6px; padding-top: 12px; font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: var(--track-display); text-transform: uppercase; }
.inv-pay { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 34px; }
.inv-pay .box { border: 1px solid var(--paper-line); padding: 16px; display: flex; gap: 14px; min-width: 0; }
.inv-pay .box .addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }
.inv-pay .qr { width: 96px; height: 96px; flex: none; }
.inv-pay .qr svg, .inv-pay .qr img { width: 100%; height: 100%; }
.inv-note { margin-top: 26px; color: #5d5955; font-size: 13px; white-space: pre-line; }
.inv-foot { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--paper-line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 11px; color: #6f6a66; }
.inv .stamp { display: inline-block; border: 2px solid currentColor; padding: 3px 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 12px; transform: rotate(-4deg); }
.inv .stamp.paid { color: #0a8a44; }
.inv .stamp.due { color: var(--red); }
.missing { color: var(--red); font-style: italic; }
.pdf-frame { width: 100%; height: 80vh; border: 1px solid var(--line); background: #fff; }

/* forms */
.form { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 11px; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  background: var(--bg); border: 1px solid var(--line); padding: 10px 12px; width: 100%; min-width: 0; border-radius: 0;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--text); }
.field textarea { resize: vertical; min-height: 76px; }
.field .hint { font-size: 12px; color: var(--muted); }
.frow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.frow.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { accent-color: var(--red); width: 16px; height: 16px; }
.lines { display: flex; flex-direction: column; gap: 8px; }
.line-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 110px 34px; gap: 8px; align-items: center; }
.line-row input { background: var(--bg); border: 1px solid var(--line); padding: 9px 10px; width: 100%; min-width: 0; }
.line-row .x { background: none; border: 1px solid var(--line); height: 38px; cursor: pointer; color: var(--muted); }
.line-row .x:hover { color: var(--text); border-color: var(--text); }
.builder { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 20px; align-items: start; }
.builder .preview { position: sticky; top: 76px; }
.seg { display: inline-flex; border: 1px solid var(--line); }
.seg button { background: none; border: 0; padding: 8px 14px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.seg button.on { background: var(--text); color: var(--bg); }
.drop { border: 1px dashed var(--line-strong); padding: 22px; text-align: center; color: var(--muted); font-size: 14px; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--text); color: var(--text); }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; background: #000 url("/assets/superteam-can.jpg") center/cover no-repeat; display: flex; flex-direction: column; justify-content: space-between; padding: 40px; overflow: hidden; }
.login-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.55), rgba(10,10,10,.2) 40%, rgba(10,10,10,.92)); }
.login-art > * { position: relative; z-index: 1; }
.login-art { color: #fff; }
.login-art img { height: 22px; width: auto; }
.login-art h1 { font-size: clamp(48px, 7vw, 104px); }
.login-art h1 .red { color: var(--red); }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px var(--gutter); }
.login-form .inner { width: min(400px, 100%); }
.login-form h2 { margin-bottom: 10px; }
.login-form p { color: var(--text-2); margin: 0 0 26px; }
.proto-note { margin-top: 26px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.proto-note button { background: none; border: 0; color: var(--text-2); text-decoration: underline; cursor: pointer; padding: 0; font-size: 12px; text-underline-offset: 3px; }

/* process */
.process { counter-reset: p; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.process .card { position: relative; }
.process .card::before { counter-increment: p; content: "0" counter(p); font-family: var(--display); font-weight: 700; font-size: 44px; color: var(--red); line-height: 1; display: block; margin-bottom: 14px; letter-spacing: var(--track-display); }
.process .card p { color: var(--text-2); font-size: 14px; margin: 8px 0 0; }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 11px 18px; font-weight: 500; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 100; max-width: calc(100% - 32px); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .builder { grid-template-columns: 1fr; }
  .builder .preview { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); z-index: 50; transform: translateX(-100%); transition: transform .25s ease; }
  .shell.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.6); }
  .menu-btn { display: inline-flex; }
  .lanes, .g3, .g2 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 300px; }
  .inv-cols { grid-template-columns: 1fr 1fr; }
  .inv-pay { grid-template-columns: 1fr; }
  .as-client span { display: none; }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 16px; }
  .stat .n { font-size: 34px; }
  .frow, .frow.three { grid-template-columns: 1fr; }
  .inv-title { font-size: 40px; }
  .inv-cols { grid-template-columns: 1fr; }
  .line-row { grid-template-columns: minmax(0, 1fr) 52px 88px 34px; }
  table.t th, table.t td { padding: 12px 10px; }
  .hide-sm { display: none; }
}

/* ---------- print: invoice / proposal only ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; color: #000; }
  .side, .topbar, .no-print, #toast { display: none !important; }
  .shell { display: block; }
  .page { padding: 0; max-width: none; }
  .print-root .builder { display: block; }
  .print-root .builder > :not(.preview) { display: none !important; }
  .inv, .doc { padding: 0; }
  .inv-title { font-size: 44px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.count-badge { font-size: 11px; font-weight: 700; background: var(--red); color: #fff; padding: 1px 8px; border-radius: 0; }
.inv td.r, .inv th.r { padding-left: 14px; white-space: nowrap; }
.inv-title .red { white-space: nowrap; }
.builder .preview .inv-title { font-size: clamp(34px, 3.4vw, 48px); }
.builder .preview .inv { padding: clamp(20px, 3vw, 40px); }
.builder .preview .inv-cols { grid-template-columns: 1fr 1fr; }

/* ---------- theme-specific bits ---------- */
.wm-img.on-light { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .wm-img.on-dark { display: none; }
  :root:not([data-theme="dark"]) .wm-img.on-light { display: block; }
  :root:not([data-theme="dark"]) .ui-logo { filter: invert(1) hue-rotate(180deg); }
  :root:not([data-theme="dark"]) .doc, :root:not([data-theme="dark"]) .inv { border: 1px solid var(--line); }
}
:root[data-theme="light"] .wm-img.on-dark { display: none; }
:root[data-theme="light"] .wm-img.on-light { display: block; }
:root[data-theme="light"] .ui-logo { filter: invert(1) hue-rotate(180deg); }
:root[data-theme="light"] .doc, :root[data-theme="light"] .inv { border: 1px solid var(--line); }
.brand .wm-img { height: 18px; width: auto; }


.view-switch { display: flex; align-items: center; gap: 10px; }
.view-switch .seg button { padding: 6px 12px; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.view-switch .exit { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: .04em; line-height: 1.55; color: var(--text); text-decoration: none; white-space: nowrap; }
.view-switch .exit .ms { font-size: 16px; }
.view-switch .exit:hover { border-color: var(--text); background: var(--text); color: var(--bg); }
.client-banner { background: var(--red-tint); border-bottom: 1px solid rgba(255,0,0,.35); color: var(--text); font-size: 13px; padding: 9px var(--gutter); }

.status-select { background: var(--bg); border: 1px solid var(--line); color: var(--text); font-size: 12px; font-weight: 700; padding: 6px 26px 6px 9px; cursor: pointer; max-width: 100%;
  appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 13px) 50%, calc(100% - 9px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.status-select:hover { border-color: var(--line-strong); }
.status-select:disabled { opacity: .5; cursor: progress; }
.lane-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.lane-foot:empty { display: none; }
.lane li .pill { font-size: 10px; padding: 3px 7px; }
@media (max-width: 520px) { .view-switch .exit { display: none; } .deliv li { flex-wrap: wrap; } }

/* ---------- sun / moon switch ---------- */
:root { --switch-bg: rgba(255,255,255,.08); --switch-thumb: #f3f2ef; --switch-on: #111010; }
:root[data-theme="light"] { --switch-bg: #e6e4df; --switch-thumb: #ffffff; --switch-on: #111010; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --switch-bg: #e6e4df; --switch-thumb: #ffffff; --switch-on: #111010; } }
.theme-switch { position: relative; display: inline-flex; padding: 3px; background: var(--switch-bg); border-radius: 0; border: 1px solid var(--line); flex: none; }
.theme-switch button { position: relative; z-index: 1; width: 40px; height: 32px; display: grid; place-items: center; background: none; border: 0; border-radius: 0; cursor: pointer; color: var(--muted); transition: color .25s ease; }
.theme-switch button:hover { color: var(--text); }
.theme-switch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-switch .thumb { position: absolute; top: 3px; left: 3px; width: 40px; height: 32px; border-radius: 0; background: var(--switch-thumb); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .28s cubic-bezier(.3,.7,.2,1); }
.theme-switch[data-on="dark"] .thumb { transform: translateX(40px); }
.theme-switch[data-on="light"] button[data-t="light"], .theme-switch[data-on="dark"] button[data-t="dark"] { color: var(--switch-on); }
@media (prefers-reduced-motion: reduce) { .theme-switch .thumb { transition: none; } }
.login-form { position: relative; }
.login-theme { position: absolute; top: 20px; right: var(--gutter); }

/* ---------- timeline (gantt) ---------- */
.gantt { --g-label: 230px; --g-row: 54px; background: var(--surface); border: 1px solid var(--line-soft); }
.gantt.fit { --g-label: 200px; }
.g-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.g-inner { min-width: 100%; }
.g-row { display: grid; grid-template-columns: var(--g-label) minmax(0, 1fr); min-height: var(--g-row); border-top: 1px solid var(--line-soft); }
.g-row.g-head { border-top: 0; min-height: 44px; }
.g-label { position: sticky; left: 0; z-index: 3; background: var(--surface); display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 14px 8px 18px; border-right: 1px solid var(--line); text-decoration: none; min-width: 0; }
.g-label:hover .g-name { color: var(--red); }
.g-name { font-size: 13px; font-weight: 500; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.g-meta .pill { font-size: 9px; padding: 2px 6px; gap: 5px; }
.g-track { position: relative; min-width: 0; }
.g-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-soft); }
.g-grid.year { background: var(--line); }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--red); z-index: 1; }
.g-head .g-today { top: 26px; }
.g-month { position: absolute; top: 14px; padding-left: 7px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.g-month b { color: var(--text-2); }
.g-today-label { position: absolute; top: 2px; transform: translateX(-50%); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--red); padding: 1px 6px; z-index: 2; white-space: nowrap; }
.g-span { position: absolute; top: 50%; height: 2px; margin-top: -1px; background: var(--line-strong); }
.g-span.cl { border-left: 0; }
.g-bar { position: absolute; top: 50%; height: 18px; margin-top: -9px; border-radius: 0; background: var(--muted); z-index: 1; transition: filter .15s ease; }
.g-bar.in_progress { background: var(--red); }
.g-bar.completed { background: var(--text-2); }
.g-bar.upcoming { background: transparent; border: 2px dashed var(--red); }
.g-bar:hover { filter: brightness(1.15); }
.g-mark { position: absolute; top: 50%; z-index: 2; transform: translate(-50%, -50%); }
.g-mark.dl { width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2px solid var(--text-2); }
.g-mark.dl.done { background: var(--ok); border-color: var(--ok); }
.g-mark.dl.review { background: var(--warn); border-color: var(--warn); }
.g-mark.ms { width: 11px; height: 11px; transform: translate(-50%, -50%) rotate(45deg); background: var(--surface); border: 2px solid var(--text); }
.g-mark.ms.done { background: var(--text); }
.g-mark:hover, .g-mark:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; z-index: 4; }
.g-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.g-legend span { display: inline-flex; align-items: center; gap: 8px; }
.g-legend i { display: inline-block; flex: none; }
.lg-bar { width: 22px; height: 10px; background: var(--red); }
.lg-span { width: 22px; height: 2px; background: var(--line-strong); }
.lg-ms { width: 9px; height: 9px; transform: rotate(45deg); background: var(--text); }
.lg-dl { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.lg-dl.open { background: transparent; border: 2px solid var(--text-2); }
.lg-today { width: 2px; height: 14px; background: var(--red); }
.g-tip { position: fixed; z-index: 200; pointer-events: none; background: var(--text); color: var(--bg); padding: 8px 11px; max-width: 280px; font-size: 13px; line-height: 1.35; opacity: 0; transition: opacity .12s ease; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.g-tip.on { opacity: 1; }
.g-tip b { display: block; font-weight: 700; }
.g-tip span { display: block; opacity: .75; font-size: 12px; margin-top: 2px; }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.agenda li:first-child { border-top: 0; padding-top: 0; }
.agenda li > a { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; text-decoration: none; }
.agenda li > .pill, .agenda li > .status-select { flex: none; }
.when { width: 48px; flex: none; display: flex; flex-direction: column; align-items: flex-start; font-family: var(--haas-display); line-height: 1; }
.when b { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: lining-nums; }
.when span { font-size: 11px; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.agenda .what { flex: 1; min-width: 0; }
.agenda .what b { display: block; font-weight: 500; font-size: 14px; line-height: 1.3; }
.agenda .what small { color: var(--muted); font-size: 12px; }
.agenda li > a:hover .what b { color: var(--red); }
@media (max-width: 860px) {
  .gantt { --g-label: 150px; }
  .gantt.fit { --g-label: 130px; }
  .g-meta { display: none; }
  .gantt.fit .g-inner { width: 640px !important; }
}
@media (max-width: 520px) { .topbar .crumbs { display: none; } }

/* Haas dates (more legible than Montreal for numbers) */
.big-date { font-family: var(--haas-display); font-weight: 700; font-size: 32px; line-height: 1.05; letter-spacing: -0.01em; margin-top: 16px; }

/* deliverable page */
.d-link { text-decoration: none; }
.d-link:hover { color: var(--red); }
.lane li .t .d-link { color: inherit; font-size: inherit; font-weight: inherit; }
.stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
.st { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 0 12px 0 0; background: none; border: 0; text-align: left; color: var(--muted); font: inherit; min-width: 0; }
button.st { cursor: pointer; }
button.st:disabled { cursor: progress; opacity: .6; }
.st::before { content: ""; position: absolute; top: 15px; left: 32px; right: 0; height: 2px; background: var(--line); }
.st:last-child::before { display: none; }
.st.done::before { background: var(--ok); }
.st-dot { position: relative; z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: 13px; color: var(--muted); }
.st.done .st-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.st.now .st-dot { background: var(--red); border-color: var(--red); color: #fff; }
.st-label { font-size: 13px; font-weight: 500; line-height: 1.3; }
.st.now .st-label, .st.done .st-label { color: var(--text); }
button.st:hover .st-dot { border-color: var(--text); }
button.st:hover .st-label { color: var(--text); }
.side-states { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.side-states .label { margin-right: 6px; }
.side-states .btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pager a { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line-soft); text-decoration: none; min-width: 0; }
.pager a:hover { border-color: var(--line-strong); }
.pager a.nx { text-align: right; align-items: flex-end; }
.pager b { font-weight: 500; }
@media (max-width: 700px) {
  .stepper { grid-template-columns: 1fr; gap: 14px; }
  .st { flex-direction: row; align-items: center; }
  .st::before { top: 32px; left: 15px; right: auto; width: 2px; height: 14px; }
  .pager { grid-template-columns: 1fr; }
}
.view-switch .seg button { white-space: nowrap; }

/* ---------- Material Symbols ---------- */
.ms { font-family: "Material Symbols Sharp"; font-weight: 400; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr; flex: none;
  -webkit-font-smoothing: antialiased; font-feature-settings: "liga"; font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20; overflow: hidden; width: 1em; }
.nav .ms { font-size: 19px; }
.nav a.on .ms { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 20; color: var(--red); }
.btn .ms { font-size: 17px; }
.action .dot .ms, .file .ic .ms { font-size: 20px; }
.menu-btn .ms { font-size: 20px; }
.theme-switch .ms { font-size: 19px; }
.theme-switch[data-on="light"] button[data-t="light"] .ms, .theme-switch[data-on="dark"] button[data-t="dark"] .ms { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 20; }

/* back arrow */
.back-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 8px; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: 13px; font-weight: 500; flex: none; max-width: 40vw; }
.back-btn span:not(.ms) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back-btn:hover { border-color: var(--text); }
.back-btn .ms { font-size: 18px; }

/* quick actions */
.quick { margin: -8px 0 28px; }
.quick > .label { display: block; margin-bottom: 12px; }
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.qa { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line-soft); text-decoration: none; text-align: left; cursor: pointer; font: inherit; color: var(--text); min-width: 0; }
.qa:hover { border-color: var(--text); }
.qa:hover .qa-ic { background: var(--red); color: #fff; }
.qa-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: var(--red-tint); color: var(--red); transition: background-color .15s ease, color .15s ease; }
.qa b { display: block; font-weight: 700; font-size: 14px; line-height: 1.25; }
.qa small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qa > span:last-child { min-width: 0; }

/* ---------- small screens: top bar + quick actions ---------- */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; row-gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .view-switch { order: 10; flex-basis: 100%; }
  .view-switch .seg { flex: 1; display: flex; }
  .view-switch .seg button { flex: 1; }
  .view-switch .exit { display: inline-flex; }
  .back-btn span:not(.ms) { display: none; }
  .back-btn { padding: 0 8px; }
  .qa-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .qa { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; }
  .qa small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
@media (max-width: 860px) and (min-width: 641px) {
  .back-btn span:not(.ms) { max-width: 22vw; }
}
@media (max-width: 860px) { .back-btn ~ .crumbs { display: none; } }
.stat .n.money { font-family: var(--haas-display); font-size: 38px; letter-spacing: -0.01em; line-height: 1.05; font-variant-numeric: lining-nums; }
@media (max-width: 520px) { .stat .n.money { font-size: 28px; } }

/* Next up card */
.next-up { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.nu-date { font-size: 12px; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--red); }
.nu-title { font-family: var(--haas-display); font-weight: 700; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.12; letter-spacing: -0.01em; color: var(--text); }
.nu-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; }
.nu-go { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.next-up:hover .nu-title { color: var(--red); }
.next-up:hover .nu-go { color: var(--text); }

/* Phones: Neue Haas Grotesk for every heading except the main page title (h1), which stays in OT Neue Montreal */
@media (max-width: 640px) {
  h2.display, .login-form h2.display, .md h1, .md h2, .inv-title, .inv-totals .grand {
    font-family: var(--haas-display); font-weight: 700; text-transform: none; letter-spacing: -0.01em; line-height: 1.12;
  }
  h2.display { font-size: 24px; }
  .md h1, .md h2 { font-size: 24px; }
  .inv-title { font-size: 30px; }
  .inv-totals .grand { font-size: 22px; }
  .stat .n { font-family: var(--haas-display); letter-spacing: -0.01em; font-size: 32px; }
  .process .card::before { font-family: var(--haas-display); font-size: 28px; letter-spacing: 0; }
  .doc h1.display { font-family: var(--haas-display); text-transform: none; letter-spacing: -0.01em; line-height: 1.1; font-size: 30px; }
}

/* ---------- deliverable files ---------- */
.files-list { list-style: none; margin: 0; padding: 0; }
.files-list > li { border-top: 1px solid var(--line-soft); }
.files-list > li:first-child { border-top: 0; }
.fl-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.fl-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--red-tint); color: var(--red); }
.fl-t { flex: 1; min-width: 0; }
.fl-t b { display: block; font-weight: 500; overflow-wrap: anywhere; line-height: 1.3; }
.fl-t small { color: var(--muted); font-size: 12px; }
.fl-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fl-x { font-size: 16px; padding: 5px 10px; }
.fl-preview { padding: 0 0 14px; }
.fl-preview iframe { width: 100%; border: 1px solid var(--line); background: #000; display: block; }
.fl-preview iframe.fl-video { aspect-ratio: 16 / 9; height: auto; }
.fl-preview iframe.fl-folder { height: 460px; background: #fff; }
.fl-note { font-size: 12px; margin: 8px 0 0; }
.link-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.link-form input { background: var(--bg); border: 1px solid var(--line); padding: 9px 11px; min-width: 0; color: var(--text); }
.link-form input:focus { outline: none; border-color: var(--text); }
.open-link { display: inline-flex; align-items: center; gap: 4px; }
.files-search input { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--line); padding: 11px 14px; color: var(--text); }
.files-search input:focus { outline: none; border-color: var(--text); }
.files-project .card { padding-top: 10px; padding-bottom: 10px; }
.fp-folder { border-bottom: 1px solid var(--line); }
.fp-item { padding: 14px 0 4px; border-top: 1px solid var(--line-soft); }
.fp-folder + .fp-item, .card > .fp-item:first-child { border-top: 0; }
.fp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fp-head b { font-weight: 700; }
@media (max-width: 640px) {
  .fl-row { flex-wrap: wrap; }
  .fl-actions { width: 100%; justify-content: flex-start; }
  .link-form { grid-template-columns: 1fr; }
  .fl-preview iframe.fl-folder { height: 360px; }
}

/* ---------- floating quick actions ---------- */
.fab-wrap { position: fixed; right: clamp(16px, 2.4vw, 32px); bottom: clamp(16px, 2.4vw, 32px); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fab { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 16px; background: var(--red); color: #fff; border: 0; border-radius: 0; cursor: pointer; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.fab:hover { background: var(--red-deep); }
.fab .ms { font-size: 22px; font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24; }
.fab.on { background: var(--text); color: var(--bg); }
.fab-panel { width: min(340px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0,0,0,.3); }
.fab-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line-soft); }
.fab-list { display: flex; flex-direction: column; }
.fab-list .qa { border: 0; border-bottom: 1px solid var(--line-soft); background: none; padding: 12px 16px; width: 100%; }
.fab-list .qa:last-child { border-bottom: 0; }
.fab-list .qa:hover, .fab-list .qa:focus-visible { background: var(--surface-2); outline: none; }
.fab-list .qa-ic { width: 34px; height: 34px; }
.page { padding-bottom: 110px; }
@media (max-width: 640px) {
  .fab { width: 52px; padding: 0; justify-content: center; }
  .fab span:not(.ms) { display: none; }
  .fab-list .qa { flex-direction: row; align-items: center; }
}
@media print { .fab-wrap { display: none !important; } }

/* live Drive browser */
.drive-slot.loading { opacity: .5; }
.fl-src { font-size: 12px; text-align: right; }
.fl-thumb { width: 40px; height: 40px; flex: none; object-fit: cover; background: var(--surface-2); }
.fl-name { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; color: var(--text); cursor: pointer; text-align: left; overflow-wrap: anywhere; line-height: 1.3; display: block; }
.fl-name:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.dv-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); padding: 2px 0 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.dv-crumbs button { background: none; border: 0; padding: 0; color: var(--text-2); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.dv-crumbs b { color: var(--text); font-weight: 500; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; padding: 10px 0; }
.thumb-grid a { display: block; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.thumb-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.thumb-grid a:hover img { transform: scale(1.04); }
.also { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.also > .label { display: block; margin-bottom: 4px; }

/* horizontal milestone track (Overview → Happening now) */
.now-card { flex-direction: column; }
.now-card > .body { padding-bottom: 8px; }
.hsteps-wrap { overflow-x: auto; overscroll-behavior-x: contain; border-top: 1px solid var(--line-soft); padding: 22px 20px 18px; scrollbar-width: thin; }
.hsteps { list-style: none; margin: 0; padding: 0; display: flex; min-width: max-content; }
.hsteps li { position: relative; flex: 1 0 150px; max-width: 200px; padding-right: 16px; display: flex; flex-direction: column; gap: 4px; }
.hsteps li::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--line); }
.hsteps li.done::before { background: var(--ok); }
.hsteps li:last-child::before { right: auto; width: 14px; }
.hs-dot { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); margin-bottom: 8px; }
.hsteps li.done .hs-dot { background: var(--ok); border-color: var(--ok); }
.hsteps li.now .hs-dot { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 4px var(--red-tint); }
.hs-date { font-size: 11px; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }
.hsteps li.now .hs-date { color: var(--red); }
.hs-t { font-size: 14px; line-height: 1.3; color: var(--text-2); }
.hsteps li.done .hs-t, .hsteps li.now .hs-t { color: var(--text); }
.hsteps li.now .hs-t { font-weight: 700; }
@media (max-width: 640px) { .hsteps li { flex-basis: 130px; } .hsteps-wrap { padding: 18px 16px 14px; } }

/* overdue (admin only) */
.tag-late { display: inline-block; margin-left: 8px; vertical-align: 1px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--red); padding: 1px 6px; }
.lane li.late { border-left-color: var(--red); background: var(--red-tint); }
.action.late .dot { background: var(--red); color: #fff; }
.lane-more { display: block; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--text-2); text-decoration: none; }
.lane-more:hover { color: var(--red); }

.d-filters { margin: -4px 0 8px; }
.d-filters button { font-size: 12px; padding: 6px 10px; }
.d-filters button .muted { margin-left: 4px; }
.d-filters button.on .muted { color: inherit; opacity: .7; }
.copy-addr { margin-top: 8px; color: var(--paper-ink); border-color: var(--paper-line); }
.copy-addr:hover { border-color: var(--paper-ink); }

.hsteps-wrap.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px); mask-image: linear-gradient(90deg, transparent, #000 48px); }
.hsteps-wrap.more-r { -webkit-mask-image: linear-gradient(270deg, transparent, #000 48px); mask-image: linear-gradient(270deg, transparent, #000 48px); }
.hsteps-wrap.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
/* breadcrumbs stay on one line */
.crumbs { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.crumbs > * { flex: none; }
.crumbs b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; }
.login-denied { border: 1px solid var(--red); background: var(--red-tint); padding: 12px 14px; font-size: 14px; margin-bottom: 22px; }
.login-denied b { display: block; margin-bottom: 2px; }

/* sign-in */
.login-msg { border: 1px solid var(--red); background: var(--red-tint); padding: 12px 14px; font-size: 14px; margin-bottom: 22px; }
.login-msg b { display: block; margin-bottom: 2px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px; }
.pw-eye { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 40px; background: none; border: 0; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover { color: var(--text); }
.login-staff { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.login-staff p { margin: 0 0 10px; font-size: 13px; }
.gbtn { min-height: 44px; }
/* admin: portal password */
.pw-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.pw-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 12px; }
.pw-result { margin-top: 12px; font-size: 13px; }
.pw-result p { margin: 0 0 8px; color: var(--text-2); }
.pw-show { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pw-show code { font-size: 15px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); padding: 6px 10px; letter-spacing: .02em; }

/* sync panel */
.sync-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.sync-list li { padding: 6px 0; border-top: 1px solid var(--line-soft); line-height: 1.35; }
.sync-list li:first-child { border-top: 0; }
.sync-list.warn li::before { content: "!"; display: inline-block; width: 16px; height: 16px; margin-right: 8px; text-align: center; font-size: 11px; font-weight: 700; line-height: 16px; color: #fff; background: var(--warn); }
/* deliverable process */
.proc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.proc li { display: flex; gap: 10px; padding: 12px; background: var(--surface-2); border-top: 3px solid var(--line); min-width: 0; }
.proc li.done { border-top-color: var(--ok); }
.proc li.now { border-top-color: var(--red); background: var(--red-tint); }
.proc-n { width: 24px; height: 24px; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 2px solid var(--line-strong); }
.proc li.done .proc-n { background: var(--ok); border-color: var(--ok); color: #fff; }
.proc li.now .proc-n { background: var(--red); border-color: var(--red); color: #fff; }
.proc b { display: block; font-size: 14px; }
.proc p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--text-2); }
.proc .proc-you span { font-weight: 700; color: var(--text); }
.name-badge { display: inline-flex; align-items: center; font-family: var(--haas-display); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; filter: none !important; height: auto !important; }
.doc .name-badge { color: var(--paper-ink); }
.gbtn { width: 100%; }
.gbtn > div { margin: 0 !important; }

/* admin: Check ClickUp now */
.check-wrap { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; font-size: 12px; }
.check-now.busy .ms { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .check-now.busy .ms { animation: none; } }

/* deliverable feedback */
.fb-bar { flex-wrap: wrap; }
.fb-form { flex-basis: 100%; display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.fb-form textarea { resize: vertical; }
.fb-log { list-style: none; margin: 0; padding: 0; }
.fb-log li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.fb-log li:first-child { border-top: 0; padding-top: 0; }
.fb-log p { margin: 4px 0 0; white-space: pre-wrap; }
html:not(.icons-ready) .ms { color: transparent !important; }

/* text-style button (e.g. "Link ClickUp task" in the admin invoice table) */
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linkish:hover { color: var(--text); }
