/* TradeVerge by VergeKits: "workshop precision". Warm ivory and deep charcoal, VergeKits gold, steel-slate accent. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/Inter-700.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/Inter-800.woff2") format("woff2"); }

:root {
  --bg: #F6F3EE; --surface: #FFFFFF; --raised: #EFEBE3; --hair: rgba(28,25,23,.08); --hair2: rgba(28,25,23,.14);
  --text: #1C1917; --text2: #57534E; --charcoal: #1C1917; --charcoal2: #292524; --steel: #3D4F5F; --steel-t: #3D4F5F;
  --gold: #C9973A; --gold-t: #8A6416; --gold-soft: rgba(201,151,58,.14);
  --ok: #1FA67A; --ok-t: #126B4E; --ok-bg: #E3F4EC; --due: #E9A23B; --due-t: #84500A; --due-bg: #FBEFD9;
  --over: #D9534F; --over-t: #A8322E; --over-bg: #FBE6E5; --draft: #8B95A7; --draft-t: #4B5563; --draft-bg: #ECEEF2; --info: #3B82C4; --info-t: #245C91; --info-bg: #E3EEF8;
  --s1: #3D4F5F; --s2: #C9973A; --s3: #D9534F; --s4: #1FA67A;
  --side: #1C1917; --side-t: #E7E5E4; --side-t2: #A8A29E;
  --in-bg: #FFFFFF; --in-border: rgba(28,25,23,.22);
  --shadow: 0 1px 2px rgba(28,25,23,.04), 0 8px 28px -12px rgba(28,25,23,.18);
  --shadow-lg: 0 24px 60px -20px rgba(28,25,23,.35);
  --r1: 10px; --r2: 14px; --r3: 20px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", Roboto, sans-serif;
  --serif: "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --t-press: 140ms; --t-panel: 240ms;
  --dock-h: 74px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0C0F14; --surface: #141A22; --raised: #1C2430; --hair: rgba(243,241,236,.08); --hair2: rgba(243,241,236,.14);
  --text: #F3F1EC; --text2: #A8A29E; --steel-t: #9FB3C4;
  --gold-t: #E6B85C; --gold-soft: rgba(230,184,92,.14);
  --ok-t: #5FD3A8; --ok-bg: rgba(31,166,122,.16); --due-t: #F2C27A; --due-bg: rgba(233,162,59,.16); --over-t: #F29A97; --over-bg: rgba(217,83,79,.18);
  --draft-t: #C3CAD6; --draft-bg: rgba(139,149,167,.18); --info-t: #8DBCE8; --info-bg: rgba(59,130,196,.18);
  --s1: #8FA6BA; --s2: #E6B85C; --s3: #F07C78; --s4: #3CC495;
  --side: #090B0F; --in-bg: #0F141B; --in-border: rgba(243,241,236,.2);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6); --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--sans); font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; min-height: 100vh; min-height: 100dvh; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0 0 .6em; }
button, input, select, textarea { font: inherit; color: inherit; }
.serif { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
.num, .mono, table, .kpi-v { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--text2); } .sm { font-size: 13.5px; } .xs { font-size: 12px; } .center { text-align: center; }
.lead { font-size: 16px; }
.gold-t { color: var(--gold-t); } .red-t { color: var(--over-t); font-weight: 600; } .amber { color: var(--due-t); }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--gold-t); margin: 0 0 6px; display: flex; gap: 6px; align-items: center; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: #1C1917; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { left: 12px; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.inl { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- splash */
#splash { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: radial-gradient(800px 400px at 50% 0%, rgba(201,151,58,.18), transparent 60%), #1C1917; color: #F3F1EC; transition: opacity .35s; }
#splash.out { opacity: 0; pointer-events: none; }
.sp-in { display: grid; justify-items: center; gap: 6px; }
.sp-in img { border-radius: 50%; box-shadow: 0 0 0 2px rgba(231,193,113,.5), 0 16px 50px -10px rgba(201,151,58,.6); animation: sp 1.2s ease-in-out infinite alternate; }
.sp-in b { font-size: 22px; margin-top: 10px; letter-spacing: -.01em; } .sp-in small { color: #E7C171; letter-spacing: .16em; text-transform: uppercase; font-size: 11px; font-weight: 700; }
@keyframes sp { from { transform: scale(.97); } to { transform: scale(1.02); } }
.nojs { max-width: 420px; margin: 15vh auto; text-align: center; padding: 20px; }
.nojs img { border-radius: 50%; }

/* ---------- app shell */
.side { display: none; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); background: var(--bg); border-bottom: 1px solid var(--hair); }
.top-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-logo { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(201,151,58,.55); }
.top-title { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-r { display: flex; align-items: center; gap: 8px; }
.top .search { display: none; }
.top .new-q { display: none; }
.main { padding: 16px max(16px, env(safe-area-inset-right)) calc(var(--dock-h) + 96px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); max-width: 1320px; margin: 0 auto; outline: none; }
body.has-toast .main { padding-bottom: calc(var(--dock-h) + 170px + env(safe-area-inset-bottom)); }
.foot-disc { margin: 28px 0 0; font-size: 12px; color: var(--text2); text-align: center; }

/* phone dock: a solid band. Content never shows through, around or under it (covers Safari and Firefox toolbar gaps). */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--bg); padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); border-top: 1px solid var(--hair); transform: translateZ(0); }
.dock::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 200px; background: var(--bg); }
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--charcoal); border-radius: 18px; box-shadow: 0 10px 24px -12px rgba(28,25,23,.55); padding: 4px; max-width: 560px; margin: 0 auto; }
[data-theme="dark"] .tabs { background: var(--raised); box-shadow: 0 10px 24px -12px rgba(0,0,0,.8); border: 1px solid var(--hair2); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; min-width: 44px; padding: 4px 2px; border-radius: 14px; text-decoration: none; color: #D6D3D1; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; transition: background var(--t-press), color var(--t-press); }
.tab .ic { width: 22px; height: 22px; }
.tab.on { color: #1C1917; background: var(--gold); }
.tab:active { transform: scale(.96); }
.fab { position: fixed; z-index: 41; right: max(16px, env(safe-area-inset-right)); bottom: calc(var(--dock-h) + 14px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 20px; border: 0; background: linear-gradient(140deg, #E2B866, #C9973A 55%, #A87B27); color: #1C1917; box-shadow: 0 14px 30px -10px rgba(138,100,22,.7), inset 0 1px 0 rgba(255,255,255,.4); display: grid; place-items: center; cursor: pointer; transition: transform var(--t-press); }
.fab .ic { width: 28px; height: 28px; stroke-width: 2; }
.fab:active { transform: scale(.94); }
body.no-fab .fab { display: none; }
.m-only { display: inline-flex; }

/* ---------- desktop */
@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: auto auto 1fr; min-height: 100vh; }
  .side { display: flex; flex-direction: column; grid-row: 1 / span 3; position: sticky; top: 0; height: 100vh; background: var(--side); color: var(--side-t); padding: 20px 14px; overflow-y: auto; }
  .side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
  .side-brand .logo { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(231,193,113,.6), 0 8px 20px -8px rgba(201,151,58,.6); }
  .side-brand b { display: block; font-size: 17px; color: #fff; } .side-brand small { color: #E7C171; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
  .nav { display: flex; flex-direction: column; gap: 2px; }
  .nav-i { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; text-decoration: none; color: var(--side-t); font-weight: 500; position: relative; transition: background var(--t-press); }
  .nav-i .ic { color: var(--side-t2); }
  .nav-i:hover { background: rgba(255,255,255,.06); }
  .nav-i.on { background: rgba(201,151,58,.16); color: #fff; }
  .nav-i.on .ic { color: #E7C171; }
  .nav-i.on::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--gold); }
  .badge { margin-left: auto; font-style: normal; background: var(--gold); color: #1C1917; font-size: 12px; font-weight: 800; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px; }
  .side-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 2px; border-top: 1px solid rgba(255,255,255,.08); }
  .side-link { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: var(--side-t2); font-size: 14px; }
  .side-link:hover { color: #fff; background: rgba(255,255,255,.05); }
  .save { display: flex; align-items: center; gap: 8px; color: var(--side-t2); font-size: 12.5px; padding: 10px 12px 0; }
  .save .ic { width: 16px; height: 16px; color: var(--ok); }
  .save.pulse .ic { animation: tick .6s; }
  .top { grid-column: 2; padding: 14px 28px; }
  .top-logo, .top .m-only { display: none; }
  .top .search { display: block; position: relative; width: min(420px, 38vw); }
  .top .new-q { display: inline-flex; }
  .banner-slot { grid-column: 2; }
  .main { grid-column: 2; padding: 24px 28px 96px; width: 100%; }
  body.has-toast .main { padding-bottom: 140px; }
  .dock, .fab { display: none; }
}
@keyframes tick { 50% { transform: scale(1.3); } }

/* ---------- search */
.search .si { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text2); width: 18px; height: 18px; }
.search input { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--hair2); background: var(--surface); padding: 0 14px 0 38px; }
.search-res { position: absolute; top: 50px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--hair2); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; max-height: 60vh; overflow: auto; z-index: 50; }
.sr-i { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; text-decoration: none; min-height: 44px; }
.sr-i:hover, .sr-i:focus { background: var(--raised); }
.sr-i b { display: block; font-size: 14px; } .sr-i small { color: var(--text2); font-size: 12.5px; }
.sr-none { padding: 12px; color: var(--text2); }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--hair2); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14.5px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform var(--t-press), background var(--t-press), border-color var(--t-press), box-shadow var(--t-press); }
.btn:hover { border-color: var(--gold); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--charcoal); color: #fff; border-color: var(--charcoal); box-shadow: 0 6px 16px -8px rgba(28,25,23,.6); }
.btn.primary .ic { color: #E7C171; }
[data-theme="dark"] .btn.primary { background: var(--gold); color: #1C1917; border-color: var(--gold); }
[data-theme="dark"] .btn.primary .ic { color: #1C1917; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--raised); border-color: transparent; }
.btn.danger { background: var(--over); border-color: var(--over); color: #fff; }
.danger-t { color: var(--over-t); }
.btn.sm { min-height: 44px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn.icon { padding: 0; width: 44px; }
.btn.lg { min-height: 52px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.link { font-size: 13.5px; font-weight: 600; color: var(--gold-t); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.link:hover { text-decoration: underline; }
.actbar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -2px 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
@media (min-width: 900px) { .actbar { flex-wrap: wrap; overflow: visible; } }

/* ---------- banners */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r2); margin: 12px 16px 0; background: var(--gold-soft); border: 1px solid rgba(201,151,58,.35); }
.banner p { margin: 0; flex: 1; font-size: 14px; }
.banner > .ic { color: var(--gold-t); }
.banner.b-warn { background: var(--over-bg); border-color: rgba(217,83,79,.35); } .banner.b-warn > .ic { color: var(--over-t); }
.banner.b-info { background: var(--info-bg); border-color: rgba(59,130,196,.3); margin: 0 0 14px; } .banner.b-info > .ic { color: var(--info-t); }
@media (min-width: 900px) { .banner-slot .banner { margin: 14px 28px 0; } }
@media (max-width: 560px) { .banner { flex-wrap: wrap; } .banner p { flex-basis: calc(100% - 40px); } }

/* ---------- page */
.page.enter { animation: enter var(--t-panel) cubic-bezier(.2,.8,.2,1); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.page-head .back { margin-left: -8px; }
.ph-t { flex: 1; min-width: 200px; }
.ph-t h1 { font-size: 26px; font-weight: 750; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-t p { margin: 4px 0 0; color: var(--text2); }
.ph-t p a { color: var(--gold-t); }
.ph-a { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 900px) { .ph-t h1 { font-size: 30px; } }

/* ---------- cards */
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r3); box-shadow: var(--shadow); padding: 18px; margin: 0 0 16px; position: relative; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 10px; flex-wrap: wrap; }
.card-h h2, .card-t { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-t { margin: 0 0 12px; }
.card-t .ic { color: var(--gold-t); }
.h3 { font-size: 15px; font-weight: 700; margin: 18px 0 8px; }
.grid2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid2 > .card { margin: 0; }
.grid2 + .card, .grid2 + .grid2 { margin-top: 16px; }
@media (min-width: 1000px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr) 360px; } .sticky { position: sticky; top: 90px; } }
.gold-edge { border-top: 3px solid var(--gold); }

/* ---------- home */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 18px; }
.hello h1 { font-size: 28px; line-height: 1.15; }
.hello p.muted { margin: 6px 0 0; }
@media (min-width: 900px) { .hello h1 { font-size: 36px; } }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .kpis:not(.mini):not(.k4) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpis.mini { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kpi { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r2); padding: 14px 14px 12px; box-shadow: var(--shadow); text-decoration: none; position: relative; overflow: hidden; min-width: 0; transition: transform var(--t-press), border-color var(--t-press); }
a.kpi:hover, a.kpi:focus-visible { border-color: rgba(201,151,58,.5); }
a.kpi::after, .card::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; background: var(--gold); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform var(--t-panel); }
a.kpi:hover::after, a.kpi:focus-visible::after, .card:focus-within::after { transform: scaleX(1); }
.kpi-ic { position: absolute; right: 12px; top: 12px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--raised); color: var(--steel-t); }
.kpi-ic .ic { width: 18px; height: 18px; }
.kpi-l { font-size: 12.5px; font-weight: 600; color: var(--text2); padding-right: 36px; }
.kpi-v { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; word-break: break-word; }
.kpi-s { font-size: 12px; color: var(--text2); }
.kpi.k-ok .kpi-ic { color: var(--ok-t); background: var(--ok-bg); }
.kpi.k-over .kpi-ic { color: var(--over-t); background: var(--over-bg); } .kpi.k-over .kpi-s { color: var(--over-t); font-weight: 600; }
.kpi.k-gold .kpi-ic { color: var(--gold-t); background: var(--gold-soft); } .kpi.k-gold { border-top: 2px solid var(--gold); }
@media (min-width: 900px) { .kpi-v { font-size: 28px; } }
.pipe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(84px, 1fr)); gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.pipe-i { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--raised); text-decoration: none; min-height: 64px; border-bottom: 3px solid var(--draft); transition: transform var(--t-press); }
.pipe-i:hover { transform: translateY(-1px); }
.pipe-i b { font-family: var(--serif); font-size: 22px; font-weight: 600; } .pipe-i span { font-size: 12px; color: var(--text2); font-weight: 600; white-space: nowrap; }
.pipe-i.s1 { border-color: var(--due); } .pipe-i.s2 { border-color: var(--steel); } .pipe-i.s3 { border-color: var(--info); } .pipe-i.s4 { border-color: var(--gold); } .pipe-i.s5 { border-color: var(--ok); } .pipe-i.s6 { border-color: var(--over); }

/* ---------- lists and rows */
.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--hair); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; min-height: 56px; text-decoration: none; border-radius: 10px; }
a.row:hover { background: var(--raised); }
.list.tight .row { min-height: 48px; padding: 6px 2px; }
.row-ic { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--raised); color: var(--steel-t); }
.row-ic.t-over { background: var(--over-bg); color: var(--over-t); } .row-ic.t-due { background: var(--due-bg); color: var(--due-t); } .row-ic.t-ok { background: var(--ok-bg); color: var(--ok-t); }
.row-m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-m b { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; } .row-m small { color: var(--text2); font-size: 12.5px; }
.row-v { font-weight: 700; font-size: 14.5px; text-align: right; display: flex; flex-direction: column; }
.row-v small { font-weight: 500; color: var(--text2); font-size: 11.5px; }
.chev { color: var(--text2); width: 16px; height: 16px; }
.pad { padding: 12px; }

/* ---------- pills, chips, segmented */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border-radius: 13px; font-size: 12.5px; font-weight: 700; white-space: nowrap; text-decoration: none; vertical-align: middle; letter-spacing: 0; }
.pill .pi { width: 13px; height: 13px; stroke-width: 2.2; }
.p-ok { background: var(--ok-bg); color: var(--ok-t); } .p-due { background: var(--due-bg); color: var(--due-t); } .p-over { background: var(--over-bg); color: var(--over-t); }
.p-draft { background: var(--draft-bg); color: var(--draft-t); } .p-info { background: var(--info-bg); color: var(--info-t); }
.ph-t h1 .pill { font-family: var(--sans); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--hair2); background: var(--surface); text-decoration: none; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.chip .ic { width: 14px; height: 14px; }
.chip.on { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
[data-theme="dark"] .chip.on { background: var(--gold); color: #1C1917; border-color: var(--gold); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.toolbar .chips { padding-bottom: 2px; }
.seg { display: inline-flex; background: var(--raised); border-radius: 12px; padding: 3px; gap: 2px; margin: 0 0 12px; flex-wrap: wrap; }
.seg button, .seg a { min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; color: var(--text2); }
.seg .on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(28,25,23,.15); }
.seg .ic { width: 16px; height: 16px; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.tags em { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 8px; background: var(--raised); color: var(--text2); }

/* ---------- tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--hair2); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl.rows tbody tr { cursor: pointer; transition: background var(--t-press); }
.tbl.rows tbody tr:hover, .tbl.rows tbody tr:focus-visible { background: var(--raised); }
.tbl.rows td { padding: 12px; }
.tbl tr.inactive { opacity: .55; }
.tbl tfoot th { border-top: 1px solid var(--hair2); border-bottom: 0; color: var(--text); font-size: 13px; }
.cell-sub { display: block; font-size: 12.5px; color: var(--text2); font-weight: 400; }
.cell-ic { float: left; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--raised); color: var(--steel-t); margin: 2px 10px 0 0; }
.cell-ic .ic { width: 18px; height: 18px; }
.show-s { display: none; }
@media (max-width: 640px) { .hide-s { display: none; } .show-s { display: block; } .tbl.rows td, .tbl th { padding-left: 10px; padding-right: 10px; } .cell-ic { display: none; } }
@media (max-width: 900px) { .hide-m { display: none; } }
.tbl.cmp th[scope] { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--text); border-bottom: 1px solid var(--hair); }
.tbl.cmp tr.b th, .tbl.cmp tr.b td { font-weight: 700; }
.tbl.sc td:first-child { width: 36px; color: var(--text2); }
.tbl .in { min-width: 0; }

/* ---------- forms */
.fgrid { display: grid; gap: 12px 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span2 { grid-column: span 2; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 600; color: var(--text2); }
.field > label small { font-weight: 500; opacity: .85; }
.in { width: 100%; min-height: 44px; border-radius: 11px; border: 1px solid var(--in-border); background: var(--in-bg); padding: 10px 12px; font-size: 16px; line-height: 1.3; transition: border-color var(--t-press), box-shadow var(--t-press); -webkit-appearance: none; appearance: none; }
select.in { padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--text2) 50%), linear-gradient(135deg, var(--text2) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
textarea.in { resize: vertical; min-height: 72px; }
.in:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.in.num { text-align: right; font-variant-numeric: tabular-nums; }
.in.ro { display: flex; align-items: center; background: var(--raised); border-color: transparent; }
.in[aria-invalid="true"] { border-color: var(--over); box-shadow: 0 0 0 4px var(--over-bg); }
.err { color: var(--over-t); font-size: 13px; font-weight: 600; }
.affix { display: flex; align-items: stretch; border: 1px solid var(--in-border); border-radius: 11px; background: var(--in-bg); overflow: hidden; }
.affix:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.affix .in { border: 0; box-shadow: none !important; border-radius: 0; min-width: 0; }
.affix .ax { display: grid; place-items: center; padding: 0 10px; background: var(--raised); color: var(--text2); font-weight: 600; font-size: 14px; min-width: 36px; }
.with-btn { display: flex; gap: 8px; } .with-btn select { flex: 1; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--gold); }
.in.w5 { width: 84px; }

/* ---------- line editor */
.lines { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; container-type: inline-size; }
.ln { display: grid; grid-template-columns: 36px minmax(0, 1fr) 44px; grid-template-areas: "k d x" "k q a" "k r t"; gap: 8px 10px; padding: 10px; border: 1px solid var(--hair); border-radius: 14px; background: var(--surface); align-items: center; }
.ln-k { grid-area: k; align-self: start; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--raised); color: var(--steel-t); }
.k-material .ln-k { color: var(--gold-t); background: var(--gold-soft); } .k-discount .ln-k, .k-retainage .ln-k { color: var(--over-t); background: var(--over-bg); } .k-progress .ln-k { color: var(--info-t); background: var(--info-bg); }
.ln-d { grid-area: d; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ln-hint { color: var(--text2); font-size: 12px; }
.ln-cost { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text2); } .ln-cost .in { max-width: 130px; min-height: 40px; }
.ln-q { grid-area: q; display: flex; align-items: center; gap: 6px; } .ln-q .in { max-width: 96px; min-width: 56px; } .ln-q em { font-style: normal; color: var(--text2); font-size: 13px; white-space: nowrap; }
.ln-r { grid-area: r; display: flex; align-items: center; gap: 6px; } .ln-r .in { max-width: 130px; }
.ln-cap { font-size: 12px; color: var(--text2); font-weight: 600; min-width: 34px; }
.ln-tx { grid-area: t; display: flex; align-items: center; gap: 6px; justify-self: end; font-size: 12.5px; color: var(--text2); min-height: 44px; cursor: pointer; }
.ln-tx input { width: 20px; height: 20px; accent-color: var(--gold); }
.ln-a { grid-area: a; justify-self: end; font-weight: 700; font-size: 15px; }
.ln-x { grid-area: x; justify-self: end; color: var(--text2); }
.ln-empty { padding: 16px; text-align: center; color: var(--text2); border: 1px dashed var(--hair2); border-radius: 14px; }
@container (min-width: 620px) {
  .ln { grid-template-columns: 36px minmax(0, 1fr) 112px 118px 58px 100px 44px; grid-template-areas: "k d q r t a x"; padding: 8px 10px; gap: 8px; }
  .ln-cap { display: none; }
  .ln-q .in { max-width: 80px; }
}
.ln-add { display: flex; gap: 8px; flex-wrap: wrap; }
.lines.locked .ln { opacity: .9; }

/* ---------- totals */
.totals { margin: 0; display: grid; gap: 0; }
.totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--hair); }
.totals dt { color: var(--text2); font-size: 14px; display: flex; flex-direction: column; } .totals dt small { font-size: 12px; }
.totals dd { margin: 0; font-weight: 600; text-align: right; }
.totals .sub dt { color: var(--text); font-weight: 600; }
.totals .grand { border-bottom: 0; border-top: 2px solid var(--text); margin-top: 6px; padding-top: 10px; }
.totals .grand dt { color: var(--text); font-weight: 700; font-size: 15px; } .totals .grand dd { font-size: 26px; }
.totals .dep { border-top: 1px solid var(--hair2); }
.totals.small dd { font-size: 14px; } .totals.small > div { padding: 5px 0; }
.totals.bal { margin-top: 14px; padding-top: 6px; border-top: 1px solid var(--hair2); }
.internal { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--raised); }
.internal.warn { background: var(--due-bg); }
.internal .eyebrow { color: var(--text2); }
.flag { display: inline-flex; align-items: center; gap: 4px; color: var(--due-t); font-size: 12px; font-weight: 700; }
.flag .ic { width: 14px; height: 14px; }
.flag-row { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--due-bg); color: var(--due-t); font-weight: 600; font-size: 14px; margin: 0 0 10px; }
.dep-edit { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--hair2); }
.dep-edit .seg { margin-bottom: 8px; }
.kv { margin: 0; display: grid; gap: 10px; } .kv div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; } .kv dt { color: var(--text2); display: flex; gap: 6px; align-items: center; font-size: 13.5px; } .kv dd { margin: 0; }
.kv dt .ic { width: 16px; height: 16px; }

/* ---------- labor */
.rate-hero { text-align: center; padding: 6px 0 14px; border-bottom: 1px solid var(--hair2); margin-bottom: 8px; }
.rate-hero .big { font-size: 46px; margin: 4px 0; line-height: 1.1; } .rate-hero .big small { font-size: 16px; color: var(--text2); font-family: var(--sans); font-weight: 500; }
.oh-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.oh { display: grid; grid-template-columns: minmax(0, 1fr) 150px 44px; gap: 8px; align-items: center; }
.oh-tot { display: flex; justify-content: space-between; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--hair2); font-weight: 600; }
.tbl.roles .in { max-width: 160px; margin-left: auto; }
.tbl.roles td:first-child .in { max-width: none; margin: 0; }

/* ---------- week */
.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.day { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r2); padding: 10px; min-height: 110px; }
.day.wkend { background: var(--raised); }
.day.today { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.day h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.day h3 b { color: var(--text); font-size: 13px; letter-spacing: 0; text-transform: none; } .day h3 em { font-style: normal; color: var(--gold-t); }
.wk-job { display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 10px; background: var(--raised); text-decoration: none; margin-bottom: 6px; border-left: 3px solid var(--steel); min-height: 44px; }
.day.wkend .wk-job { background: var(--surface); }
.wk-job .ic { width: 16px; height: 16px; color: var(--steel-t); } .wk-job b { display: block; font-size: 12.5px; line-height: 1.25; } .wk-job small { color: var(--text2); font-size: 11.5px; }

/* ---------- progress */
.tbl.ms td { padding: 8px 6px; } .tbl.ms .in { min-height: 40px; }
.retain { margin-top: 12px; border-top: 1px solid var(--hair); padding-top: 10px; }
.retain summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }

/* ---------- clients */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ccard { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r2); background: var(--surface); border: 1px solid var(--hair); box-shadow: var(--shadow); text-decoration: none; min-height: 72px; transition: border-color var(--t-press); }
.ccard:hover { border-color: rgba(201,151,58,.55); }
.avatar { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--charcoal); color: #E7C171; font-weight: 700; font-size: 15px; }
[data-theme="dark"] .avatar { background: var(--raised); }
.search-inline { position: relative; flex: 1; min-width: 200px; max-width: 460px; } .search-inline .si { position: absolute; left: 12px; top: 13px; width: 18px; height: 18px; color: var(--text2); } .search-inline .in { padding-left: 38px; }

/* ---------- photos */
.photos { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.photos figure { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--hair); background: var(--raised); }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; opacity: 0; transition: opacity .3s; background: var(--raised); }
.photos img.in { opacity: 1; }
.photos figcaption { padding: 8px; display: grid; grid-template-columns: 1fr 44px; gap: 4px; align-items: center; }
.photos figcaption .in { grid-column: 1 / span 2; font-size: 14px; min-height: 40px; }
.photos small { color: var(--text2); font-size: 12px; padding-left: 4px; }

/* ---------- charts */
.chart { margin: 0; }
.chart figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.chart h3 { font-size: 15px; font-weight: 700; }
.card > .chart figcaption h3 { font-size: 17px; }
.chart-svg svg { width: 100%; height: auto; display: block; }
.grid { stroke: var(--hair2); stroke-width: 1; } .zero { stroke: var(--text2); stroke-width: 1; }
.ax-t { fill: var(--text2); font-size: 12px; font-family: var(--sans); } .ax-t.lab { fill: var(--text); font-weight: 600; font-size: 13px; } .ax-t.val { fill: var(--text); font-weight: 700; }
.bar { fill: var(--s1); }
.bar.s2 { fill: var(--s2); } .bar.s3 { fill: var(--s3); } .bar.s4 { fill: var(--s4); } .bar.neg { fill: var(--s3); }
.bar.st0 { fill: var(--draft); } .bar.st1 { fill: var(--due); } .bar.st2 { fill: var(--steel); } .bar.st3 { fill: var(--info); } .bar.st4 { fill: var(--gold); } .bar.st5 { fill: var(--ok); } .bar.st6 { fill: var(--over); }
[data-theme="dark"] .bar.st2 { fill: #8FA6BA; }
.chart.go .bar { animation: grow .7s cubic-bezier(.2,.8,.2,1) both; }
.chart.go .bar.h { animation-name: growx; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text2); margin: 0 0 4px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--s1); vertical-align: -1px; } .legend i.s2 { background: var(--s2); }
.donut .d-bg { fill: none; stroke: var(--raised); stroke-width: 20; } .donut .d-fg { fill: none; stroke: var(--ok); stroke-width: 20; stroke-linecap: round; }
.donut .d-v { font-size: 30px; fill: var(--text); } .dot-ok { fill: var(--ok); } .dot-bad { fill: var(--over); }
.chart.go .donut .d-fg { animation: fade .7s both; }
@keyframes fade { from { opacity: 0; } }
.chart-t { overflow-x: auto; }

/* ---------- empty states */
.empty { text-align: center; padding: 22px 16px; display: grid; justify-items: center; gap: 6px; }
.empty-art svg { width: 150px; height: 112px; }
.ea-disc { fill: var(--gold-soft); } .ea-floor { fill: var(--hair2); } .ea-gold { fill: var(--gold); } .ea-ic { stroke: var(--charcoal); }
[data-theme="dark"] .ea-ic { stroke: var(--text); }
.empty h3 { font-size: 17px; } .empty p { color: var(--text2); max-width: 380px; margin: 0 0 8px; }

/* ---------- sheets (bottom sheet on phone, dialog on desktop) */
.sheet-back { position: fixed; inset: 0; z-index: 70; background: rgba(12,15,20,.48); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity var(--t-panel); }
.sheet-back.in { opacity: 1; } .sheet-back.out { opacity: 0; }
.sheet { width: 100%; max-height: 90vh; max-height: 90dvh; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateY(24px); transition: transform var(--t-panel) cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
.sheet-back.in .sheet { transform: none; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 6px 20px; }
.sheet-h h2 { font-size: 19px; font-weight: 700; }
.sheet-b { padding: 8px 20px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-f { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 20px 16px; border-top: 1px solid var(--hair); background: var(--surface); border-radius: 0 0 22px 22px; }
@media (min-width: 700px) { .sheet-back { align-items: center; padding: 24px; } .sheet { max-width: 520px; border-radius: 22px; padding-bottom: 0; } .sheet.wide { max-width: 760px; } }
.pick-top { display: grid; grid-template-columns: 1fr 150px; gap: 8px; margin-bottom: 8px; position: sticky; top: -8px; background: var(--surface); padding: 8px 0; z-index: 1; }
.pick-list { list-style: none; margin: 0; padding: 0; }
.pick { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; border: 0; background: transparent; text-align: left; cursor: pointer; min-height: 56px; text-decoration: none; }
.pick:hover { background: var(--raised); } .pick.added { background: var(--ok-bg); }
.pick .num small { color: var(--text2); font-weight: 400; }
.fab-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fab-i { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--hair); background: var(--surface); font-weight: 600; font-size: 16px; cursor: pointer; }
.fab-i .ic { color: var(--gold-t); width: 22px; height: 22px; }
.calc-out { margin-top: 12px; padding: 12px; background: var(--raised); border-radius: 12px; }

/* ---------- toasts (above the dock, left of the + button, never over buttons) */
.toasts { position: fixed; z-index: 60; left: max(12px, env(safe-area-inset-left)); right: calc(88px + env(safe-area-inset-right)); bottom: calc(var(--dock-h) + 16px + env(safe-area-inset-bottom)); display: grid; gap: 8px; pointer-events: none; }
@media (min-width: 900px) { .toasts { left: 272px; right: auto; bottom: 20px; width: min(460px, calc(100vw - 300px)); } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; min-height: 52px; border-radius: 14px; background: var(--charcoal); color: #F3F1EC; box-shadow: var(--shadow-lg); font-size: 14px; animation: tin var(--t-panel) cubic-bezier(.2,.8,.2,1); }
[data-theme="dark"] .toast { background: #26303D; }
.toast span { flex: 1; } .toast .ti { color: #E7C171; } .toast.t-warn .ti { color: #F29A97; }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(231,193,113,.5); background: transparent; color: #E7C171; font-weight: 700; cursor: pointer; }
.toast-btn .ic { width: 16px; height: 16px; }
.toast-x { width: 40px; height: 40px; border: 0; background: transparent; color: #A8A29E; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }

/* ---------- welcome, onboarding, about, more, settings */
.welcome { max-width: 640px; margin: 6vh auto 0; text-align: center; display: grid; justify-items: center; gap: 8px; }
.wl-logo, .ob-logo { width: 84px; height: 84px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(201,151,58,.5), 0 18px 40px -14px rgba(201,151,58,.7); }
.welcome h1 { font-size: 34px; }
.wl-choices { display: grid; gap: 12px; width: 100%; margin: 18px 0 8px; }
@media (min-width: 620px) { .wl-choices { grid-template-columns: 1fr 1fr; } }
.wl-c { display: grid; gap: 6px; justify-items: start; text-align: left; padding: 20px; border-radius: 18px; border: 1px solid var(--hair2); background: var(--surface); cursor: pointer; box-shadow: var(--shadow); transition: transform var(--t-press), border-color var(--t-press); }
.wl-c:hover { border-color: var(--gold); transform: translateY(-2px); }
.wl-c .ic { width: 28px; height: 28px; color: var(--gold-t); } .wl-c b { font-size: 18px; } .wl-c span { color: var(--text2); font-size: 14px; }
.wl-c.primary { background: var(--charcoal); color: #fff; border-color: var(--charcoal); } .wl-c.primary span { color: #D6D3D1; } .wl-c.primary .ic { color: #E7C171; }
.onb { max-width: 620px; margin: 2vh auto 0; padding: 24px; }
.onb .ob-logo { width: 56px; height: 56px; display: block; margin: 0 auto 10px; }
.onb h1 { font-size: 28px; margin: 14px 0 6px; }
.steps { list-style: none; display: flex; gap: 8px; justify-content: center; padding: 0; margin: 0; }
.steps li span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--raised); font-weight: 700; color: var(--text2); }
.steps li.on span { background: var(--charcoal); color: #E7C171; } .steps li.done span { background: var(--gold); color: #1C1917; }
.ob-f { display: flex; justify-content: space-between; margin: 20px 0 10px; }
.ob-rate { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--gold-soft); } .ob-rate b { font-size: 26px; }
.about { max-width: 640px; margin: 0 auto; text-align: center; padding: 28px 22px; }
.about-logo { border-radius: 50%; box-shadow: 0 0 0 2px rgba(201,151,58,.55), 0 20px 50px -16px rgba(201,151,58,.65); }
.about h1 { font-size: 40px; margin: 4px 0; } .about .eyebrow { justify-content: center; margin-top: 14px; }
.tagline { font-family: var(--serif); font-size: 19px; font-style: italic; }
.disc { display: flex; gap: 10px; text-align: left; padding: 14px; border-radius: 14px; background: var(--raised); margin: 16px 0; } .disc .ic { color: var(--gold-t); } .disc p { margin: 0; }
.bul { text-align: left; padding-left: 20px; } .bul li { margin: 4px 0; }
.more-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.more-grid a { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r2); background: var(--surface); border: 1px solid var(--hair); box-shadow: var(--shadow); text-decoration: none; min-height: 110px; }
.more-grid .ic { width: 26px; height: 26px; color: var(--gold-t); } .more-grid b { display: block; } .more-grid small { color: var(--text2); font-size: 12.5px; }
.settings .card { scroll-margin-top: 90px; }
.meter { height: 10px; border-radius: 5px; background: var(--raised); overflow: hidden; margin: 8px 0 6px; } .meter span { display: block; height: 100%; background: var(--gold); border-radius: 5px; transition: width .7s; min-width: 3px; }
.logo-up { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .biz-logo { max-height: 56px; max-width: 180px; border-radius: 8px; background: #fff; padding: 4px; }
.lic .vka-dev { background: var(--raised) !important; color: var(--text); border-color: var(--hair2) !important; }
.lic .vka-dev small { color: var(--text2) !important; }
.lic .vka-ghost { color: var(--text) !important; border-color: var(--hair2) !important; height: 48px; }
.sc-hero { display: flex; gap: 14px; align-items: center; } .sc-hero > .ic { width: 40px; height: 40px; } .sc-hero.ok > .ic { color: var(--ok-t); } .sc-hero.warn > .ic { color: var(--due-t); }
.sc-hero h2 { font-size: 20px; } .sc-hero p { margin: 4px 0 0; }
.fu { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; } .fu .row { flex: 1 1 320px; } .fu-a { display: flex; gap: 6px; flex-wrap: wrap; }
details.card > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- documents */
.doc-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; } .doc-bar .seg { margin: 0; }
.doc-tip { margin-bottom: 14px; }
.doc { --text: #1C1917; --text2: #57534E; --hair: rgba(28,25,23,.1); --hair2: rgba(28,25,23,.2); background: #fff; color: #1C1917; max-width: 820px; margin: 0 auto; padding: 44px 48px; border-radius: 6px; box-shadow: var(--shadow-lg); position: relative; font-size: 13.5px; }
.doc.paper-a4 { max-width: 794px; } .doc.paper-letter { max-width: 816px; }
@media (max-width: 640px) { .doc { padding: 22px 18px; } }
.d-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 3px solid #1C1917; }
.d-biz { display: flex; gap: 12px; } .d-logo { max-height: 64px; max-width: 160px; object-fit: contain; }
.d-name { font-size: 18px; } .d-biz p { margin: 2px 0; color: #57534E; font-size: 12.5px; }
.d-title { text-align: right; } .d-title h1 { font-size: 32px; letter-spacing: .02em; color: #1C1917; }
.d-title dl { margin: 8px 0 0; display: grid; gap: 2px; } .d-title dl div { display: flex; gap: 10px; justify-content: flex-end; font-size: 12.5px; } .d-title dt { color: #57534E; } .d-title dd { margin: 0; font-weight: 600; min-width: 90px; }
.d-parties { display: flex; gap: 40px; flex-wrap: wrap; margin: 18px 0; } .d-parties h2, .d-scope h2, .d-h { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: #8A6416; margin: 0 0 6px; } .d-parties p { margin: 2px 0; }
.d-scope { margin: 8px 0 16px; padding: 12px 14px; background: #F6F3EE; border-radius: 6px; } .d-scope h2 { color: #1C1917; font-size: 14px; letter-spacing: 0; text-transform: none; }
.d-lines { width: 100%; border-collapse: collapse; margin: 10px 0; }
.d-lines thead { display: table-header-group; }
.d-lines th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #57534E; border-bottom: 1.5px solid #1C1917; padding: 8px 6px; }
.d-lines td { padding: 8px 6px; border-bottom: 1px solid rgba(28,25,23,.1); vertical-align: top; } .d-lines td small { color: #57534E; }
.d-lines .r { text-align: right; } .d-lines tr { break-inside: avoid; }
.d-totals { margin: 12px 0 0 auto; max-width: 340px; break-inside: avoid; } .d-totals div { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid rgba(28,25,23,.08); } .d-totals dt { color: #57534E; } .d-totals dd { margin: 0; font-weight: 600; }
.d-totals .g { border-top: 2px solid #1C1917; border-bottom: 0; padding-top: 8px; margin-top: 4px; } .d-totals .g dt { color: #1C1917; font-weight: 700; } .d-totals .g dd { font-size: 18px; font-weight: 700; }
.d-foot { margin-top: 26px; padding-top: 12px; border-top: 1px solid rgba(28,25,23,.15); font-size: 12px; color: #57534E; break-inside: avoid; } .d-disc { font-style: italic; } .d-made { color: #8A6416; font-weight: 600; }
.d-stamp { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800; letter-spacing: .18em; color: #A8322E; border: 1.5px solid #A8322E; padding: 3px 10px; border-radius: 4px; }
.d-paid { position: absolute; top: 120px; right: 60px; transform: rotate(-12deg); font-size: 34px; font-weight: 800; letter-spacing: .2em; color: rgba(18,107,78,.85); border: 3px solid rgba(18,107,78,.85); padding: 2px 14px; border-radius: 8px; }
.d-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; } .d-sign div { border-top: 1px solid #1C1917; padding-top: 4px; font-size: 12px; color: #57534E; min-height: 40px; }

/* ---------- print: light theme forced, no navigation */
@media print {
  :root, [data-theme="dark"] { --bg: #fff; --surface: #fff; --text: #1C1917; --text2: #57534E; color-scheme: light; }
  html, body { background: #fff !important; color: #1C1917; }
  .side, .top, .dock, .fab, .toasts, .banner-slot, .no-print, .foot-disc, .skip, #splash { display: none !important; }
  .app { display: block; } .main { padding: 0 !important; max-width: none; }
  .doc { box-shadow: none; padding: 0; max-width: none; border-radius: 0; font-size: 11pt; }
  .page.enter { animation: none; }
  a { text-decoration: none; }
}

/* ---------- screenshot mode and reduced motion */
.shot *, .shot *::before, .shot *::after { animation: none !important; transition: none !important; }
.shot .photos img { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 360px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .kpis { gap: 8px; } .kpi { padding: 12px 10px 10px; } .kpi-v { font-size: 20px; } .kpi-ic { display: none; } .kpi-l { padding-right: 0; }
  .tab { font-size: 10.5px; } .ph-t h1 { font-size: 23px; } .hello h1 { font-size: 24px; }
}

/* ---------- narrow phones: tables and key-value lists wrap instead of pushing the page sideways */
.card:has(.tbl:not(.rows)) { overflow-x: auto; }
.kv div > * { min-width: 0; } .kv dd { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .tbl th { white-space: normal; letter-spacing: .03em; }
  .tbl.cmp th[scope] { white-space: normal; }
  .tbl td, .tbl th { padding-left: 8px; padding-right: 8px; }
  .tbl.roles .in { max-width: 104px; }
  .kv div { grid-template-columns: 92px 1fr; }
  .oh { grid-template-columns: minmax(0, 1fr) 128px 44px; }
}
@media (max-width: 1099px) { .page-labor .split-side { order: -1; } }
@media (max-width: 400px) { .doc { padding: 16px 10px; font-size: 12px; } .d-lines th, .d-lines td { padding: 6px 3px; } .d-lines th { letter-spacing: .02em; } .d-title h1 { font-size: 26px; } }
