/* FINENERGO: palette and typography from the supplied visual guide, page 3.
   Workflow colours are semantic; gold is decorative, not small body text. */
@font-face { font-family: Manrope; src: url('/fonts/manrope-regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Manrope; src: url('/fonts/manrope-bold.ttf') format('truetype'); font-weight: 600 800; font-style: normal; font-display: swap; }
:root {
  color-scheme: light;
  --bg: #F5F3EF;
  --paper: #FFFFFF;
  --surface: #FCFBF9;
  --ink: #0B1924;
  --muted: #4E5E67;
  --line: #E1E4E6;
  --line-strong: #9BA6AD;
  --gold: #B89A6C;
  --gold-ink: #74603C;
  --action: #0B1924;
  --action-hover: #213745;
  --action-soft: #ECE8DF;
  --nav: #FCFBF9;
  --nav-ink: #0B1924;
  --nav-muted: #4E5E67;
  --nav-line: #E1E4E6;
  --nav-active: #0B1924;
  --amber: #795310;
  --amber-soft: #FFF4D8;
  --red: #A32E34;
  --red-soft: #FDF0F0;
  --slate-soft: #EBF0F4;
  --slate: #405769;
  --radius: 8px;
  --font: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
[data-tone="new"] { --stage-ink: #17468f; --stage-fill: #e6efff; --stage-accent: #3371d0; }
[data-tone="active"] { --stage-ink: #754405; --stage-fill: #fff0d1; --stage-accent: #bb720b; }
[data-tone="quote"] { --stage-ink: #592f98; --stage-fill: #f1e8fb; --stage-accent: #8951cb; }
[data-tone="paid"] { --stage-ink: #075a60; --stage-fill: #dcf5f4; --stage-accent: #18828a; }
[data-tone="install"] { --stage-ink: #37348e; --stage-fill: #e9eaff; --stage-accent: #615ac3; }
[data-tone="review"] { --stage-ink: #842756; --stage-fill: #fae6f0; --stage-accent: #bd457b; }
[data-tone="correction"] { --stage-ink: #85340c; --stage-fill: #ffead9; --stage-accent: #bc531d; }
[data-tone="problem"] { --stage-ink: #94292e; --stage-fill: #fce5e5; --stage-accent: #cc474d; }
[data-tone="won"] { --stage-ink: #146042; --stage-fill: #dff4e7; --stage-accent: #2b8b60; }
[data-tone="lost"] { --stage-ink: #4a525d; --stage-fill: #ebeff3; --stage-accent: #778391; }
[data-tone="partial"] { --stage-ink: #835100; --stage-fill: #fff2ce; --stage-accent: #b57900; }
[data-tone="balance"] { --stage-ink: #904008; --stage-fill: #ffe7d7; --stage-accent: #ce6d29; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--action); }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 4px; }
.rail :focus-visible { outline-color: var(--gold-ink); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 32px; line-height: 1.2; letter-spacing: -.035em; font-weight: 720; }
h2 { font-size: 20px; line-height: 1.24; letter-spacing: -.02em; font-weight: 700; }
h3 { font-size: 16px; line-height: 1.3; font-weight: 680; }
svg.ico { flex: 0 0 auto; width: 20px; height: 20px; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 10; background: var(--paper); padding: 12px; }
.skip:not(:focus) { clip-path: inset(50%); }
.muted { color: var(--muted); }
.label { font-size: 12px; line-height: 1.35; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }
.wrap { overflow-wrap: anywhere; white-space: pre-line; }
.row, .cluster { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 12px; min-width: 0; }
.stack.wide { gap: 24px; }
.separator { border: 0; border-top: 1px solid var(--line); margin: 0; }
.shell { min-height: 100dvh; display: grid; grid-template-columns: 244px minmax(0, 1fr); align-items: start; }
.rail { border-right: 1px solid var(--line); height: 100dvh; position: sticky; top: 0; background: var(--nav); color: var(--nav-ink); padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; }
.brand { display: flex; gap: 8px; align-items: center; padding: 4px 0 24px; border-bottom: 1px solid var(--gold); }
.brand-mark { width: 44px; height: 44px; flex: 0 0 44px; object-fit: contain; border-radius: 11px; }
.brand strong { display: block; font-size: 18px; line-height: 1.2; letter-spacing: -.04em; }
.brand span { display: block; color: var(--nav-muted); margin-top: 4px; font-size: 12px; }
.rail .label { color: var(--nav-muted); padding: 0 12px; }
.nav { display: grid; gap: 4px; }
.nav button { min-height: 44px; width: 100%; color: var(--nav-ink); background: transparent; border: 1px solid transparent; border-radius: var(--radius); display: flex; align-items: center; gap: 12px; text-align: left; padding: 8px 12px; }
.nav button:hover { background: var(--action-soft); }
.nav button[aria-current="page"] { background: var(--nav-active); color: var(--paper); }
.nav button[aria-current="page"] { border-color: var(--nav-active); font-weight: 700; }
.nav button[aria-current="page"] .ico { color: var(--gold); }
.nav button:not([aria-current="page"]) .ico { color: var(--nav-muted); }
.rail-foot { margin-top: auto; padding: 16px 4px 0; border-top: 1px solid var(--nav-line); color: var(--nav-muted); }
.main { min-width: 0; }
.topbar { min-height: 64px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: var(--paper); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar .owner { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: var(--radius); background: var(--action-soft); color: var(--action); font-size: 13px; font-weight: 700; }
.demo-tag { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: var(--radius); color: var(--action); background: var(--action-soft); font-size: 12px; font-weight: 700; }
.dot { height: 8px; width: 8px; display: inline-block; border-radius: 4px; background: currentColor; }
.content { max-width: 1320px; margin: 0 auto; padding: 28px; display: grid; gap: 20px; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.intro-copy { display: grid; gap: 8px; min-width: 0; max-width: 780px; overflow-wrap: anywhere; }
.eyebrow { color: var(--gold-ink); display: flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; display: inline-block; width: 20px; height: 3px; background: var(--gold); }
.actions { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.button { min-height: 44px; border: 1px solid var(--line-strong); padding: 8px 16px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; background: var(--paper); color: var(--ink); font-weight: 650; text-align: center; }
.button:hover { background: var(--surface); border-color: var(--action); }
.button.primary { background: var(--action); border-color: var(--action); color: var(--paper); }
.button.primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
.button:disabled { color: var(--muted); background: var(--surface); border-color: var(--line); }
.button.danger { color: var(--red); }
.text-button { background: transparent; border: 0; padding: 4px 0; color: var(--action); font-weight: 650; text-align: left; min-height: 36px; }
.text-button:hover { text-decoration: underline; }
.text-button.danger { color: var(--red); }
.box, .visit-tile { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.box { padding: 20px; }
.box.flush { padding: 0; }
.launch-assignments { list-style: none; margin: 0; padding: 0; }
.launch-assignments li + li { border-top: 1px solid var(--line); }
.launch-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; align-items: baseline;
  width: 100%; min-height: 48px; padding: 9px 0; border: 0; background: transparent;
  text-align: left; color: var(--ink); font: inherit; cursor: pointer;
}
.launch-row:hover .launch-open, .launch-row:focus-visible .launch-open { text-decoration: underline; }
.launch-open { grid-column: 2; color: var(--action); font-size: 13px; font-weight: 650; }
.launch-project, .launch-deadline { grid-column: 1 / -1; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.launch-deadline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.box-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; }
.soft { background: var(--surface); }
.payment-total { display: grid; gap: 4px; padding: 8px 16px; border-radius: var(--radius); background: var(--stage-fill); color: var(--stage-ink); }
.payment-total span { font-size: 12px; }
.payment-total strong { font-size: 18px; }
.detail-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); gap: 16px; align-items: start; }
.chips { display: flex; flex-basis: 100%; gap: 4px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--stage-ink); border: 1px solid transparent; min-height: 44px; padding: 4px 8px; border-radius: var(--radius); font-weight: 600; text-align: left; }
.chip:hover, .chip[aria-pressed="true"] { background: var(--stage-fill); border-color: var(--stage-accent); }
.chip-count { padding: 0 6px; background: var(--stage-fill); border-radius: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; max-width: 100%; align-items: center; gap: 4px; border-radius: var(--radius); padding: 4px 8px; font-size: 12px; font-weight: 700; line-height: 1.35; background: var(--slate-soft); color: var(--slate); }
.stage-badge { gap: 6px; background: var(--stage-fill); color: var(--stage-ink); text-align: left; }
.stage-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; background: var(--stage-accent); }
.stage-badge[data-stage-state="work"] { --stage-ink:#194b83; --stage-fill:#e8f1fb; --stage-accent:#3476bc; }
.stage-badge[data-stage-state="waiting"] { --stage-ink:#73500c; --stage-fill:#fff3d1; --stage-accent:#a7790b; }
.stage-badge[data-stage-state="done"] { --stage-ink:#165d42; --stage-fill:#e2f3e9; --stage-accent:#288456; }
.stage-badge[data-stage-state="alert"] { --stage-ink:#912b35; --stage-fill:#fbe8ea; --stage-accent:#c24852; }
.stage-badge[data-stage-state="neutral"] { --stage-ink:#475461; --stage-fill:#ebeff3; --stage-accent:#75818c; }
.notice { border: 1px solid var(--line); background: var(--action-soft); color: var(--action); border-radius: var(--radius); padding: 12px 16px; font-weight: 600; }
.notice.warn { background: var(--amber-soft); color: var(--amber); }
.notice.error { background: var(--red-soft); color: var(--red); }
.list-header, .deal-row { display: grid; grid-template-columns: minmax(120px, 1.35fr) minmax(116px, 1.28fr) minmax(96px, 1fr) minmax(72px, .64fr); gap: 12px; align-items: center; width: 100%; text-align: left; }
.list-header { border-top: 1px solid var(--line); background: var(--surface); padding: 8px 20px; font-size: 12px; color: var(--muted); }
.deal-row { padding: 16px 20px 16px 16px; color: var(--ink); background: color-mix(in srgb, var(--stage-fill) 22%, var(--paper)); border: 0; border-top: 1px solid var(--line); border-inline-start: 4px solid var(--stage-accent); min-height: 72px; }
.deal-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.deal-row:hover, .deal-row:focus-visible { background: var(--stage-fill); }
.deal-row strong, .deal-row small { display: block; overflow-wrap: anywhere; }
.deal-row small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.deal-row small.late { color: var(--red); font-weight: 650; }
.deal-row .amount { text-align: right; font-weight: 650; }
.search { min-width: 160px; max-width: 300px; }
.input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: var(--paper); padding: 8px 12px; }
.input:focus { border-color: var(--action); outline-color: var(--action); }
textarea.input { min-height: 100px; resize: vertical; }
label.field { display: grid; gap: 4px; min-width: 0; color: var(--ink); font-weight: 650; }
.field .hint, .hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.form-section, .equipment-box { border-inline-start: 4px solid var(--stage-accent); background: color-mix(in srgb, var(--stage-fill) 28%, var(--paper)); }
.form-section { min-width: 0; border-radius: var(--radius); padding: 12px; }
.form-section h3, .suggest-picker summary, .equipment-box h2 { color: var(--ink); }
.form-example { justify-self: end; }
.suggest-picker summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.suggest-picker[open] > .field, .suggest-picker .suggest-results:not(:empty) { margin-top: 12px; }
.catalog-shortcuts { margin-top: 8px; }
.catalog-shortcuts .chip { background: var(--paper); border-color: var(--line); }
.catalog-shortcuts .chip:hover { background: var(--stage-fill); border-color: var(--stage-accent); }
.suggest-results { display: grid; gap: 8px; min-width: 0; font-size: 14px; color: var(--muted); }
.suggest-results:empty { display: none; }
.suggest-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; width: 100%; min-height: 44px; padding: 12px; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--paper); overflow-wrap: anywhere; }
.suggest-option:hover { border-color: var(--stage-accent); background: var(--stage-fill); }
.suggest-content { display: grid; gap: 4px; }
.suggest-content small { color: var(--muted); font-size: 13px; }
.stock-tag, .choice-label { justify-self: start; padding: 4px 8px; border-radius: 4px; font-size: 12px; line-height: 1.35; font-weight: 700; }
.stock-tag { max-width: 148px; background: var(--stage-fill); color: var(--stage-ink); }
.choice-label { background: var(--stage-fill); color: var(--stage-ink); }
.fill-confirmation { color: var(--action); font-weight: 650; }
.equipment-list { padding-inline-start: 20px; margin: 0; display: grid; gap: 8px; overflow-wrap: anywhere; }
.equipment-list li::marker { color: var(--stage-accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.empty { padding: 24px 20px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.next-box { background: color-mix(in srgb, var(--stage-fill) 54%, var(--paper)); border-inline-start: 4px solid var(--stage-accent); overflow-wrap: anywhere; }
.next-box .label, .next-box .row > .stack > p { color: var(--stage-ink); }
.disclosure summary { cursor: pointer; font-weight: 650; }
.disclosure summary::marker { color: var(--action); }
.disclosure[open] > .stack { padding-top: 16px; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { position: relative; border-left: 1px solid var(--line); padding: 4px 0 12px 16px; margin-left: 4px; overflow-wrap: anywhere; }
.timeline li::before { content: ""; position: absolute; top: 12px; left: -4px; width: 8px; height: 8px; border-radius: 4px; background: var(--action); }
.timeline li:last-child { padding-bottom: 0; }
[data-rule-journal] .timeline li.attention::before { background: #b46a17; }
[data-rule-journal] button[aria-pressed="true"] { border-color: var(--action); font-weight: 700; }
.visit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.visit-tile { display: grid; gap: 12px; padding: 16px; }
.visit-tile h3 { overflow-wrap: anywhere; }
.featured-visit { border-inline-start: 4px solid var(--action); }
.featured-visit h3 { font-size: 20px; }
.featured-visit > .button { justify-self: start; }
.mobile-task { max-width: 800px; width: 100%; }
.visit-brief { display: grid; gap: 16px; }
.visit-brief .text-button { justify-self: start; }
.checks { display: grid; gap: 4px; border: 0; padding: 0; margin: 0; min-width: 0; }
.checks legend { font-weight: 700; margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 12px; padding: 8px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius); }
.check input { accent-color: var(--action); width: 20px; height: 20px; margin: 0; flex: 0 0 auto; }
.images { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 160px)); gap: 8px; }
.images a { display: grid; gap: 4px; text-decoration: none; font-size: 12px; overflow-wrap: anywhere; }
.images img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.site-form { max-width: 720px; }
dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: var(--paper); }
dialog::backdrop { background: rgba(11, 25, 36, .58); }
.dialog-head { position: sticky; top: 0; z-index: 2; background: var(--paper); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-body { padding: 20px; }
.icon-button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: var(--radius); width: 44px; height: 44px; display: grid; place-items: center; }
.icon-button:hover { border-color: var(--action); }
.boot { padding: 28px; grid-column: 1/-1; }
@media (max-width: 940px) {
  .shell { grid-template-columns: 216px minmax(0, 1fr); }
  .rail { padding: 20px 12px; }
  .content, .topbar { padding-left: 20px; padding-right: 20px; }
  .detail-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .rail { border-right: 1px solid var(--line); height: auto; position: static; padding: 12px; gap: 8px; }
  .brand { border: 0; padding: 0 4px; }
  .brand-mark { width: 40px; height: 40px; flex-basis: 40px; }
  .brand strong { font-size: 16px; }
  .brand span { font-size: 12px; margin-top: 0; }
  .rail .label, .rail-foot { display: none; }
  .nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav button { flex-direction: column; text-align: center; justify-content: center; padding: 8px 4px; gap: 4px; font-size: 12px; }
  .nav .ico { width: 16px; height: 16px; }
  .content, .topbar { padding: 16px; gap: 16px; }
  .topbar { min-height: 56px; padding-top: 8px; padding-bottom: 8px; gap: 8px; }
  .topbar .owner { font-size: 13px; }
  h1 { font-size: 24px; }
  h2 { font-size: 18px; }
  .list-header { display: none; }
  .deal-row { grid-template-columns: minmax(0, 1fr) minmax(88px, auto); padding: 12px 16px 12px 12px; gap: 8px; }
  .deal-row .client { grid-column: 1; grid-row: 1; }
  .deal-row .next { grid-column: 1; grid-row: 2; }
  .deal-row .stage { grid-column: 2; grid-row: 1; text-align: right; }
  .deal-row .amount { grid-column: 2; grid-row: 2; }
  .box-head, .box { padding: 16px; }
  .box.flush { padding: 0; }
  .visit-grid { grid-template-columns: minmax(0, 1fr); }
  .featured-visit > .button, .next-box > .row > .primary { width: 100%; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .search { width: 100%; max-width: none; min-width: 0; }
}
@media (max-width: 360px) {
  .nav .ico { display: none; }
  .topbar .avatar { display: none; }
  .content, .topbar { padding-left: 12px; padding-right: 12px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
  .suggest-option { grid-template-columns: minmax(0, 1fr); }
}
.calendar-days { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.calendar-day { display: grid; align-content: start; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; min-width: 0; }
.calendar-task { width: 100%; border: 1px solid var(--line); border-inline-start: 4px solid var(--stage-accent); background: var(--stage-fill); border-radius: var(--radius); text-align: left; padding: 12px; color: var(--ink); gap: 4px; overflow-wrap: anywhere; }
.calendar-task:hover { border-color: var(--stage-accent); }
.calendar-task small { color: var(--muted); }
.calendar-task .badge { justify-self: start; }
.quote-dialog { width: min(760px, calc(100% - 24px)); }
.quote-line { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); margin: 0; padding: 12px; min-width: 0; }
.quote-line legend { color: var(--muted); font-size: 12px; padding: 0 4px; }
.quote-line .line-name { flex: 1 1 160px; }
.quote-line-numbers { display: grid; grid-template-columns: 1.1fr .9fr .8fr 1.3fr; gap: 8px; }
.quote-line .field { font-size: 13px; }
.quote-line input { font-size: 15px; }
.quote-total { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px; background: var(--ink); border-radius: var(--radius); color: var(--paper); border-top: 3px solid var(--gold); }
.quote-total strong { font-size: 22px; }
.quote-summary-row { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.quote-summary-row > div { min-width: 0; }
.quote-summary-row small { display: block; color: var(--muted); }
.quote-summary-row > strong { flex: 0 0 auto; }
.money-grid { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.money-grid > div { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--stage-fill, var(--surface)); color: var(--stage-ink, var(--ink)); }
.money-grid span { font-size: 12px; }
.money-grid strong { font-size: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.payment-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.payment-history li { padding-bottom: 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.payment-history p { font-size: 13px; color: var(--muted); }
.draft-status { padding: 8px 12px; border-inline-start: 3px solid var(--line-strong); background: var(--surface); }
@media (max-width: 540px) {
  .quote-line-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .money-grid { grid-template-columns: minmax(0, 1fr); }
  .money-grid > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .money-grid strong { font-size: 18px; }
  .quote-dialog .dialog-body, .quote-dialog .dialog-head { padding: 12px; }
  .quote-summary-row { flex-wrap: wrap; }
}
.intake-dialog { width: min(880px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; }
.intake-dialog[open] { display: flex; flex-direction: column; }
.intake-dialog .dialog-head { flex: 0 0 auto; }
.intake-dialog .dialog-body { overflow-y: auto; min-height: 0; padding: 16px; }
.request-builder { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 16px; }
.request-builder [hidden] { display: none; }
.intake-form[data-awaiting-intake] :is(.request-builder,.intake-intro),
.intake-dialog:has([data-awaiting-intake]) .entry-footer > .hint { display: none; }
.intake-form[data-awaiting-intake] .draft-status { display: grid; gap: .3rem; padding: .65rem .75rem; font-size: .95rem; overflow-wrap: anywhere; }
.intake-form[data-awaiting-intake] .draft-status strong { color: var(--ink); }
.request-builder > .form-section { align-content: start; }
.request-builder .form-grid { grid-template-columns: minmax(0, 1fr); }
.request-choice { min-width: 0; border: 0; margin: 0; padding: 0; }
.request-choice legend { font-weight: 650; margin-bottom: 8px; }
.request-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.request-option { position: relative; cursor: pointer; min-width: 0; }
.request-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.request-option span { min-height: 44px; display: flex; align-items: center; padding: 8px 12px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); font-weight: 600; font-size: 13px; line-height: 1.35; }
.request-option input:checked + span { background: var(--action-soft); border: 2px solid var(--action); padding: 7px 11px; color: var(--action); }
.request-option input:focus-visible + span { outline: 2px solid var(--action); outline-offset: 3px; }
.optional { color: var(--muted); font-size: 12px; font-weight: 400; }
.power-control { gap: 4px; }
.power-shortcuts { display: flex; gap: 4px; flex-wrap: wrap; }
.power-shortcuts .chip { font-size: 13px; min-height: 36px; color: var(--ink); border-color: var(--line-strong); background: var(--paper); }
.power-shortcuts .chip[aria-pressed="true"] { background: var(--action-soft); color: var(--action); border-color: var(--action); }
textarea.input.request-note { min-height: 72px; font-weight: 400; }
.request-equipment { grid-column: 1/-1; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px; min-width: 0; }
.request-equipment > summary { font-weight: 650; cursor: pointer; min-height: 32px; }
.request-equipment[open] > summary { margin-bottom: 12px; }
.request-equipment .suggest-picker { display: grid; gap: 12px; }
.request-equipment .catalog-shortcuts, .request-equipment .suggest-results:not(:empty) { margin-top: 0; }
.selected-products { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.selected-products:empty { display: none; }
.selected-products > li { display: flex; align-items: center; gap: 12px; justify-content: space-between; border: 1px solid var(--line); border-inline-start: 4px solid var(--action); background: var(--surface); border-radius: var(--radius); padding: 8px 12px; }
.selected-products > li > div { min-width: 0; overflow-wrap: anywhere; }
.selected-products small { display: block; color: var(--muted); font-size: 12px; }
.entry-footer { flex: 0 0 auto; border-top: 1px solid var(--line); padding: 12px 16px; background: var(--paper); align-items: center; justify-content: space-between; }
.entry-footer button { min-width: 180px; }
.intake-form > .draft-status { font-size: 12px; padding: 4px 8px; }
.intake-intro .text-button { font-size: 13px; }
.intake-dialog .suggest-option { padding: 8px; }
.workspace-location { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; }
.workspace-location > .ico { color: var(--gold-ink); width: 18px; height: 18px; }
.topbar-divider { height: 20px; width: 1px; background: var(--line); }
.demo-tag { color: var(--muted); background: var(--surface); border: 1px solid var(--line); font-weight: 400; }
.rail-foot strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 8px; }
.rail-foot p { font-size: 12px; line-height: 1.7; }
.desk-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric-card { display: grid; gap: 8px; text-align: left; min-width: 0; padding: 16px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--stage-accent); border-radius: var(--radius); }
.metric-card:hover { background: var(--stage-fill); }
.metric-card[aria-pressed="true"] { border-color: var(--stage-accent); background: color-mix(in srgb, var(--stage-fill) 45%, var(--paper)); }
.metric-label { display: flex; justify-content: space-between; align-items: start; gap: 8px; font-size: 13px; font-weight: 700; }
.metric-label .ico { color: var(--stage-ink); width: 18px; height: 18px; }
.metric-value { font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; }
.metric-hint { font-size: 12px; line-height: 1.4; color: var(--muted); }
.deal-filters { gap: 8px; padding-top: 4px; }
.field.mobile-filter { display: none; }
.deal-filters .chip { min-height: 40px; border-color: var(--line); background: var(--paper); color: var(--muted); font-size: 13px; }
.deal-filters .chip:hover, .deal-filters .chip[aria-pressed="true"] { background: var(--stage-fill); border-color: var(--stage-accent); color: var(--stage-ink); }
.deal-row .client strong { font-size: 15px; font-weight: 700; }
.deal-row .next strong { font-size: 14px; font-weight: 600; }
.deal-row[data-tone="won"] .client strong, .deal-row[data-tone="lost"] .client strong { color: var(--muted); }
.money-grid > .grand-total { background: var(--ink); color: var(--paper); border-color: var(--ink); border-top: 3px solid var(--gold); }
.payment-total { background: var(--ink); color: var(--paper); border-top: 3px solid var(--gold); }
.quote-total .muted, .quote-total .hint { color: var(--line); }
.next-box { padding: 20px; }
.next-box .row > .stack > p { font-size: 18px; font-weight: 700; }
.input::placeholder { color: var(--muted); opacity: 1; }
.input { font-weight: 400; }
.request-option input:checked + span { background: var(--action); color: var(--paper); }
.request-option input:focus-visible + span { outline-color: var(--gold-ink); }
.power-shortcuts .chip[aria-pressed="true"] { background: var(--action); color: var(--paper); }
.intake-dialog .dialog-head { border-top: 3px solid var(--gold); }
@media (max-width: 1100px) {
  .desk-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .workspace-location { gap: 8px; }
  .topbar { padding: 8px 16px; }
  .desk-metrics { gap: 8px; }
  .metric-card { padding: 12px; gap: 8px; }
  .metric-value { font-size: 28px; }
  .metric-label { font-size: 12px; }
  .metric-hint { font-size: 11px; }
  .next-box { padding: 16px; }
  .deal-filters, .metric-hint { display: none; }
  .field.mobile-filter { display: grid; flex-basis: 100%; font-size: 13px; }
}
@media (max-width: 380px) {
  .metric-label .ico { display: none; }
  .workspace-location > .ico, .topbar-divider { display: none; }
  .workspace-location { gap: 12px; }
}
@media (max-width: 700px) {
  .request-builder { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .intake-dialog .dialog-body, .intake-dialog .dialog-head { padding: 12px; }
  .intake-dialog .entry-footer { padding: 12px; }
  .entry-footer > .hint { display: none; }
  .entry-footer button { width: 100%; }
}
.report-tools {
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px;
}
.report-tools [data-dictation-status]:empty { display: none; }
.report-tools details > :not(summary) { margin-block-start: 12px; }
.report-tools ol, .crm-guide { padding-inline-start: 24px; }
.photo-queue {display:grid;gap:10px;min-width:0;padding:16px;border:1px solid #cdded8;border-radius:16px;background:#f3f7f5;color:var(--ink)}
.photo-queue[hidden] {display:none}
.photo-queue .hint {margin:0}
.photo-queue ul {list-style:none;padding:0;margin:0}
.photo-queue li {display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px 0;overflow-wrap:anywhere}
.photo-queue li + li {border-top:1px solid #d8e3df}
.photo-queue img {width:48px;height:48px;object-fit:cover;border-radius:9px}
.photo-queue li .hint {grid-column:2/-1;margin-top:-6px}
.photo-queue > .button {justify-self:start}
[data-photo-feedback] ul {margin:6px 0 0;padding-left:1.15rem;font-weight:400}
.photo-picker:focus-within{outline:3px solid #316b86;outline-offset:2px}
.button.camera-picker{display:none}
@media(any-pointer:coarse){.button.camera-picker{display:inline-flex}}
.deposit-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(7.5rem, 100%), 1fr)); gap: .65rem; }
.deposit-months .field, .deposit-months input { min-width: 0; width: 100%; }
