/* OsMike web starter — service layer. Loads after tokens.css (canonical, vendored) and theme.css (dark).
   Rule: no colour literals below except the namespaced extension tokens in this first block (design lint). */
:root { --site-error:#C6402E; --site-sel:rgba(124,124,255,.12); --site-shadow:rgba(23,19,14,.25); --site-rest:rgba(23,19,14,.02); --site-good:#2E7D4F; --site-warn:#B26A00; }
html[data-theme="dark"] { --site-error:#ff8f7a; --site-sel:rgba(124,124,255,.22); --site-shadow:rgba(0,0,0,.6); --site-rest:rgba(0,0,0,.2); --site-good:#7fd39d; --site-warn:#f0b357; }

@font-face { font-family:"Fraunces"; src:url("/static/fonts/fraunces.woff2") format("woff2"); font-weight:300 600; font-style:normal; font-display:swap; }
@font-face { font-family:"Manrope"; src:url("/static/fonts/manrope.woff2") format("woff2"); font-weight:400 700; font-style:normal; font-display:swap; }

*, *::before, *::after { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--ink); font:400 17px/1.6 var(--sans); min-height:100vh; display:flex; flex-direction:column; }
img, svg { max-width:100%; }
a { color:var(--ink); text-underline-offset:3px; }
h1, h2, h3 { font-family:var(--disp); font-weight:400; line-height:1.15; margin:0 0 12px; letter-spacing:-.01em; }
p { margin:0 0 12px; }
.muted { color:var(--muted); }
.small { font-size:15px; }
.lede { font-size:17px; max-width:62ch; }
.eyebrow { font-size:14px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin:0 0 4px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.skip { position:absolute; left:16px; top:-60px; background:var(--card); padding:8px 16px; border-radius:12px; z-index:10; }
.skip:focus { top:8px; }

:focus-visible { outline:2px solid var(--ink); outline-offset:2px; }

/* Header */
.top { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; max-width:1120px; width:100%; margin:0 auto; }
.brand { display:inline-flex; align-items:center; gap:10px; text-decoration:none; font-weight:700; min-height:44px; min-width:0; }
.mark { width:22px; height:22px; border-radius:7px; background:var(--grad); flex:none; }
.wordmark { overflow-wrap:anywhere; }
.account { position:relative; }
.account summary { list-style:none; display:flex; align-items:center; gap:8px; min-height:44px; padding:4px 12px 4px 4px; border-radius:999px; border:1px solid var(--muted); cursor:pointer; font-weight:600; font-size:16px; max-width:60vw; }
.account summary::-webkit-details-marker { display:none; }
.who { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.avatar { width:34px; height:34px; border-radius:999px; display:grid; place-items:center; background:var(--ink); color:var(--bg); font-size:15px; flex:none; }
.menu { position:absolute; right:0; top:calc(100% + 8px); background:var(--card); border:1px solid var(--line); border-radius:16px; padding:8px; min-width:240px; box-shadow:0 26px 50px -34px var(--site-shadow); z-index:5; }
.menu a, .menu .linkish { display:flex; align-items:center; min-height:44px; padding:0 12px; border-radius:12px; text-decoration:none; width:100%; font:600 16px var(--sans); color:var(--ink); }
.menu a:hover, .menu .linkish:hover { background:var(--site-sel); }
.menu form { margin:0; }
.menu-id { padding:8px 12px; margin:0 0 4px; border-bottom:1px solid var(--line); display:flex; flex-direction:column; }
.menu-id span { color:var(--muted); font-size:15px; overflow-wrap:anywhere; }
.linkish { background:none; border:0; cursor:pointer; text-align:left; }

/* Layout */
.wrap { flex:1; width:100%; max-width:1120px; margin:0 auto; padding:16px 16px 48px; }
.page-title { font-size:clamp(32px,5vw,44px); }
.card-title { font-size:26px; }
.grid { display:grid; gap:24px; grid-template-columns:minmax(0,1fr); margin-top:24px; }
@media (min-width:850px) { .grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } .wrap { padding:32px 24px 64px; } }
.grid > *, .row, .share-main { min-width:0; }
.card { background:var(--card); border:1px solid var(--line); border-radius:22px; padding:24px; box-shadow:0 1px 0 var(--site-rest); }
@media (min-width:600px) { .card { padding:32px; } }
.narrow { max-width:560px; }
.stack { display:flex; flex-direction:column; gap:8px; }
.stack .btn { align-self:flex-start; margin-top:8px; }
.crumbs { margin:0 0 12px; }
.crumbs a { display:inline-flex; min-height:44px; align-items:center; }
.content { white-space:pre-wrap; overflow-wrap:anywhere; margin:12px 0 24px; }
.actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:0; }
.actions form { margin:0; }

/* Controls */
label { font-weight:600; font-size:16px; }
input, textarea, select { font:400 16px/1.5 var(--sans); color:var(--ink); background:var(--card); border:1px solid var(--muted); border-radius:12px; padding:12px 16px; width:100%; min-height:44px; }
textarea { resize:vertical; }
input[aria-invalid="true"] { border-color:var(--site-error); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:12px 28px; border-radius:999px; font:600 16px/1.2 var(--sans); text-decoration:none; cursor:pointer; border:1px solid var(--ink); }
.btn.primary { background:var(--ink); color:var(--bg); box-shadow:0 10px 30px -12px var(--site-shadow); }
.btn.secondary { background:transparent; color:var(--ink); }
.btn.danger { color:var(--site-error); border-color:var(--site-error); }
.btn.wide { width:100%; margin:12px 0 16px; }
.btn[aria-busy="true"], .btn:disabled { opacity:.65; cursor:progress; }
.error { color:var(--site-error); font-weight:600; display:flex; gap:8px; align-items:baseline; }
.error span { display:inline-grid; place-items:center; width:20px; height:20px; border-radius:999px; border:2px solid currentColor; font-size:13px; flex:none; }
.notice { background:var(--site-sel); border-radius:12px; padding:12px 16px; }
.badge { display:inline-block; font-size:14px; font-weight:600; padding:2px 10px; border-radius:999px; border:1px solid var(--muted); color:var(--muted); }
.badge.live { color:var(--ink); border-color:var(--ink); }

/* Lists */
.rows { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.row { display:flex; flex-direction:column; gap:2px; padding:12px 16px; border-radius:16px; border:1px solid var(--line); text-decoration:none; min-height:44px; }
a.row:hover { background:var(--site-sel); }
.row-title { font-weight:600; overflow-wrap:anywhere; }
.share { gap:12px; }
.share.revoked { opacity:.75; }
.share-main { display:flex; flex-direction:column; gap:6px; align-items:flex-start; }
.share-actions { display:flex; gap:12px; flex-wrap:wrap; }
.share-actions form { margin:0; }
.url { font-size:15px; }
@media (min-width:850px) { .share { flex-direction:row; align-items:flex-end; justify-content:space-between; } .share-main { flex:1; } }
.empty { padding:24px 0 8px; }
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:16px; margin:0; }
.stats dt { color:var(--muted); font-size:15px; } .stats dd { margin:0; font:400 40px/1.1 var(--disp); }

/* Login composition (account-style, warm) */
.auth { max-width:420px; margin:48px auto 0; position:relative; box-shadow:0 26px 50px -34px var(--site-shadow); }
.auth h1 { font-size:32px; }
.dawn { position:fixed; inset:-30vh -10vw auto; height:70vh; background:radial-gradient(60% 60% at 30% 40%, color-mix(in srgb, var(--coral) 22%, transparent), transparent 70%), radial-gradient(50% 50% at 75% 30%, color-mix(in srgb, var(--peri) 18%, transparent), transparent 70%); pointer-events:none; z-index:-1; }

.foot { max-width:1120px; width:100%; margin:0 auto; padding:16px; color:var(--muted); font-size:15px; }
.foot a { color:var(--muted); }

/* ---- CRM + contracts ---- */
.sprite { position:absolute; width:0; height:0; overflow:hidden; }
.i { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:none; vertical-align:-4px; }
.top { flex-wrap:wrap; }
.mainnav { display:flex; gap:4px; flex-wrap:wrap; flex:1; margin-left:12px; }
.mainnav a { white-space:nowrap; display:inline-flex; align-items:center; min-height:40px; padding:0 14px; border-radius:999px; text-decoration:none; font-weight:600; font-size:15px; color:var(--muted); }
.mainnav a:hover { background:var(--site-sel); color:var(--ink); }
.mainnav a[aria-current="page"] { background:var(--ink); color:var(--bg); }
@media (max-width:720px) { .mainnav { order:3; flex:0 0 100%; margin:0; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; } .mainnav::-webkit-scrollbar { display:none; } }
.row.line > a.fileline { flex-direction:row; align-items:center; gap:8px; }
.btn.sm { min-height:36px; padding:6px 16px; font-size:15px; }
.card-title.sm { font-size:20px; display:flex; align-items:center; gap:8px; }
.card { padding:20px; }
@media (min-width:600px) { .card { padding:24px; } }
.head-row { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; margin-bottom:12px; }
.head-row .page-title { margin:0; }
.find { display:flex; gap:8px; flex-wrap:wrap; }
.find input { width:min(320px,60vw); }
.find select { width:auto; }
.cols2 { display:grid; gap:16px; grid-template-columns:minmax(0,1fr); }
@media (min-width:850px) { .cols2 { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } }
.row.line { flex-direction:row; align-items:center; gap:12px; padding:10px 12px; }
.row.line > a, .grow { min-width:0; flex:1; display:flex; flex-direction:column; text-decoration:none; overflow-wrap:anywhere; }
.row.line form { margin:0; }
.row.line select { width:auto; min-height:36px; padding:4px 10px; font-size:14px; }
.av { width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:var(--site-sel); font:600 18px var(--sans); flex:none; }
.av.big { width:64px; height:64px; border-radius:18px; font-size:28px; }
.tick { width:32px; height:32px; border-radius:999px; border:1.5px solid var(--muted); background:none; display:grid; place-items:center; cursor:pointer; color:var(--muted); padding:0; }
.tick:hover { border-color:var(--site-good); color:var(--site-good); }
.late { color:var(--site-error); font-weight:700; }
.add-card { margin-bottom:16px; }
.add-card > summary { list-style:none; display:inline-flex; }
.add-card > summary::-webkit-details-marker { display:none; }
.add-card[open] > summary { margin-bottom:12px; }
.row2 { display:grid; gap:8px; grid-template-columns:minmax(0,1fr); }
.row3 { display:grid; gap:8px; grid-template-columns:minmax(0,1fr); }
@media (min-width:600px) { .row2 { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } .row3 { grid-template-columns:repeat(3,minmax(0,1fr)); } }
.row2 label, .row3 label, .stack > label:has(input,select,textarea) { display:flex; flex-direction:column; gap:4px; }
.lookup { position:relative; }
.lookup-list { position:absolute; left:0; right:0; top:calc(100% + 4px); background:var(--card); border:1px solid var(--line); border-radius:14px; list-style:none; margin:0; padding:6px; z-index:20; box-shadow:0 20px 40px -24px var(--site-shadow); max-height:320px; overflow:auto; }
.lookup-list li { padding:8px 12px; border-radius:10px; cursor:pointer; display:flex; flex-direction:column; }
.lookup-list li:hover, .lookup-list li[aria-selected="true"] { background:var(--site-sel); }
.badge.st-customer, .badge.cs-active, .badge.cs-signed { color:var(--site-good); border-color:var(--site-good); }
.badge.cs-sent { color:var(--site-warn); border-color:var(--site-warn); }
.badge.cs-declined, .badge.cs-cancelled { color:var(--site-error); border-color:var(--site-error); }
.badge.st-lead { color:var(--ink); border-color:var(--ink); }
.cust { gap:6px; }
.cust-head { display:flex; gap:16px; align-items:center; margin-bottom:12px; flex-wrap:wrap; }
.cust-head .page-title { margin:0 0 4px; font-size:clamp(28px,4vw,38px); }
.cust-head p { margin:0; }
.actbar { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 16px; }
.actbar form { margin:0; }
.act { display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:6px 14px; border-radius:999px; border:1px solid var(--line); background:var(--card); color:var(--ink); font:600 15px var(--sans); cursor:pointer; text-decoration:none; }
.act:hover { border-color:var(--ink); }
.cust-grid { display:grid; gap:16px; grid-template-columns:minmax(0,1fr); }
@media (min-width:950px) { .cust-grid { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); } }
.side, .stackgap { display:flex; flex-direction:column; gap:16px; min-width:0; }
.timeline { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.tl { display:flex; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.tl:last-child { border-bottom:0; }
.tl.future strong { color:var(--ink); }
.tl-ic { width:34px; height:34px; border-radius:10px; background:var(--site-sel); display:grid; place-items:center; flex:none; }
.tl-ic.big { width:64px; height:64px; border-radius:18px; }
.tl-ic.big .i { width:32px; height:32px; }
.tl-top { display:flex; justify-content:space-between; gap:8px; }
.tl-body { white-space:pre-wrap; overflow-wrap:anywhere; font-size:15px; margin-top:2px; }
.k-mail .tl-body { color:var(--muted); }
.mini { margin-top:10px; }
.mini > summary { cursor:pointer; font-weight:600; font-size:15px; display:inline-flex; align-items:center; gap:6px; min-height:40px; }
.mini[open] > summary { margin-bottom:8px; }
details.card.mini { margin-top:0; }
.inline { display:inline; margin:0; }
.dlg { border:1px solid var(--line); border-radius:20px; padding:20px; background:var(--card); color:var(--ink); width:min(480px,calc(100vw - 32px)); box-shadow:0 30px 70px -30px var(--site-shadow); }
.dlg::backdrop { background:var(--site-shadow); }
.dlg-head { display:flex; justify-content:space-between; align-items:center; }
.dlg-head h2 { font-size:22px; margin:0; }
.dlg-foot { display:flex; justify-content:flex-end; gap:8px; margin-top:8px; }
.dlg-foot .btn { margin-top:0; align-self:auto; }
.ib { width:36px; height:36px; border-radius:999px; border:0; background:none; display:grid; place-items:center; cursor:pointer; color:var(--ink); padding:0; }
.ib:hover { background:var(--site-sel); }
.ib.xs { width:22px; height:22px; } .ib.xs .i { width:14px; height:14px; }
.check { display:flex; align-items:center; gap:8px; font-weight:400; }
.check input { width:auto; min-height:0; }
.who { border:1px solid var(--line); border-radius:14px; padding:10px 12px; margin:0; display:flex; flex-direction:column; gap:6px; }
.who legend { font-weight:600; font-size:15px; padding:0 4px; }
.seg { display:flex; gap:16px; }
.seg label { display:flex; gap:6px; align-items:center; font-weight:400; }
.seg input { width:auto; min-height:0; }
.board { display:grid; gap:12px; grid-auto-flow:column; grid-auto-columns:minmax(220px,1fr); overflow-x:auto; padding-bottom:8px; }
.lane { background:var(--site-rest); border:1px solid var(--line); border-radius:18px; padding:12px; min-height:200px; }
.lane.over { border-color:var(--ink); background:var(--site-sel); }
.lane-h { font:600 16px var(--sans); margin:0 0 4px; display:flex; justify-content:space-between; }
.lane-sum { margin:0 0 6px; }
.lane-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.deal { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:10px 12px; display:flex; flex-direction:column; gap:2px; cursor:grab; }
.deal a { text-decoration:none; }
.deal.dragging { opacity:.5; }
.deal-move { margin:6px 0 0; }
.deal-move select { min-height:32px; padding:2px 8px; font-size:14px; }
.js .deal-move { display:none; }
.grp { border-bottom:1px solid var(--line); padding:8px 0 12px; }
.chips { list-style:none; padding:0; margin:6px 0; display:flex; flex-wrap:wrap; gap:6px; }
.chip { display:inline-flex; align-items:center; gap:4px; border:1px solid var(--line); border-radius:999px; padding:2px 4px 2px 12px; font-size:14px; }
.inline-add { display:flex; gap:8px; }
.inline-add input { min-height:36px; padding:6px 12px; }
.gap { margin-top:20px; }
.tabs { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:12px; }
.tabs a { padding:6px 14px; border-radius:999px; text-decoration:none; font-size:15px; font-weight:600; color:var(--muted); border:1px solid var(--line); }
.tabs a[aria-current="page"] { color:var(--bg); background:var(--ink); border-color:var(--ink); }
.tablewrap { overflow-x:auto; background:var(--card); border:1px solid var(--line); border-radius:18px; }
table.list { width:100%; border-collapse:collapse; font-size:15px; }
table.list th { text-align:left; font-weight:600; color:var(--muted); padding:10px 14px; border-bottom:1px solid var(--line); white-space:nowrap; }
table.list td { padding:10px 14px; border-bottom:1px solid var(--line); }
table.list tr:last-child td { border-bottom:0; }
table.list .num { text-align:right; white-space:nowrap; }
table.list a { text-decoration:none; }
.kv { margin:0; display:flex; flex-direction:column; gap:6px; }
.kv div { display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); padding:4px 0; }
.kv dt { color:var(--muted); } .kv dd { margin:0; font-weight:600; }
.linkbox { font-size:13px; padding:6px 10px; min-height:32px; margin-top:4px; }
.narrowish { max-width:720px; }
.signer { margin-bottom:6px; }

@media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }
