/* Transport Tool Hub - the premium kit (Philip, 13 Nov 2026: "fancy, professional, hi-tech").
   Loaded after style.css: it keeps style.css's colour tokens (light / dark / colour-blind / contrast and a company's
   branding still work) and adds the scales and the components every new page uses:
   page header, KPI tiles, tinted cards, chips, sticky data tables, drawers, hover cards, toasts, skeletons, icons,
   the phone bottom bar. Motion is quick (150-200 ms) and off under Reduce motion. Never colour alone: every status
   chip carries an emoji or a symbol too. */

:root {
  /* type */
  --font: "Inter", "Inter Variable", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --fs-xs: .72rem; --fs-sm: .82rem; --fs-md: .94rem; --fs-lg: 1.08rem; --fs-xl: 1.35rem; --fs-2xl: 1.75rem; --fs-3xl: 2rem;
  /* space, radius, shadow, motion */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(15, 30, 50, .06);
  --sh-2: 0 1px 2px rgba(15, 30, 50, .05), 0 4px 14px rgba(15, 30, 50, .06);
  --sh-3: 0 2px 6px rgba(15, 30, 50, .08), 0 16px 40px rgba(15, 30, 50, .14);
  --ease: cubic-bezier(.2, .7, .2, 1); --t-fast: 150ms; --t-med: 200ms;
  /* status hues (chips, card edges); each has a symbol too */
  --hue-red: #d13b45; --hue-orange: #e08a1e; --hue-yellow: #c9a400; --hue-green: #23955a; --hue-teal: #0f8b8d;
  --hue-blue: #2f6fd1; --hue-violet: #7a52c7; --hue-grey: #7b8794;
  font-family: var(--font);
  font-feature-settings: "cv11", "ss01";
}
body { font-family: var(--font); -webkit-font-smoothing: antialiased; }
.num, td.num, .tnum { font-variant-numeric: tabular-nums; }

/* ---- icons (inline SVG, _ui.html icon()) ---- */
.i { width: 1.1em; height: 1.1em; flex: 0 0 auto; vertical-align: -.18em; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-lg { width: 22px; height: 22px; }

/* ---- page header ---- */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-4);
  padding-bottom: var(--sp-4); margin-bottom: var(--sp-5); border-bottom: 1px solid var(--line); }
.ph-title { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin: 0; font-size: var(--fs-2xl);
  font-weight: 750; letter-spacing: -.02em; line-height: 1.15; }
.ph-sub { margin: 6px 0 0; color: var(--muted); font-size: var(--fs-md); max-width: 70ch; }
.ph-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; justify-content: flex-end; }
.ph-actions form { margin: 0; }

/* ---- KPI tiles (links or buttons that filter) ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
.kpi { position: relative; display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px 12px;
  box-shadow: var(--sh-1); cursor: pointer; overflow: hidden;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast); }
a.kpi:hover, button.kpi:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--k, var(--accent)); opacity: .9; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); color: var(--muted);
  font-size: var(--fs-sm); font-weight: 600; }
.kpi-top .i { color: var(--k, var(--accent)); }
.kpi-n { font-size: var(--fs-3xl); font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-sub { font-size: var(--fs-xs); color: var(--muted); }
.kpi.on, .kpi[aria-pressed=true] { border-color: var(--k, var(--accent)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--k, var(--accent)) 35%, transparent), var(--sh-2); }
.kpi.on .kpi-top, .kpi[aria-pressed=true] .kpi-top { color: var(--ink); }
.k-red { --k: var(--hue-red); } .k-orange { --k: var(--hue-orange); } .k-green { --k: var(--hue-green); }
.k-blue { --k: var(--hue-blue); } .k-violet { --k: var(--hue-violet); } .k-grey { --k: var(--hue-grey); } .k-teal { --k: var(--hue-teal); }

/* ---- cards ---- */
.tcard { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--sh-1); margin-bottom: var(--sp-3);
  border-left: 4px solid var(--tint, var(--line)); }
.tcard[style*="--tint"] { background: linear-gradient(90deg, color-mix(in srgb, var(--tint) 7%, var(--panel)), var(--panel) 45%); }
.tcard-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); justify-content: space-between; }
.tcard-title { font-weight: 700; font-size: var(--fs-lg); margin: 0; }
.tcard-meta { color: var(--muted); font-size: var(--fs-sm); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1);
  margin-bottom: var(--sp-4); }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel > header h2 { margin: 0; font-size: var(--fs-lg); display: flex; align-items: center; gap: 8px; }
.panel > .panel-body { padding: 16px; }

/* ---- chips (emoji / icon + colour; × to remove) ---- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; font-size: var(--fs-xs); font-weight: 600;
  line-height: 1; padding: 5px 9px; border-radius: var(--r-pill); white-space: nowrap;
  color: color-mix(in srgb, var(--c, var(--hue-grey)) 80%, var(--ink));
  background: color-mix(in srgb, var(--c, var(--hue-grey)) 13%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--c, var(--hue-grey)) 30%, transparent); }
.chip form { display: inline; margin: 0; }
.chip button { all: unset; cursor: pointer; opacity: .6; padding: 0 0 0 2px; font-weight: 800; }
.chip button:hover { opacity: 1; }
.chip-add select { font-size: var(--fs-xs); padding: 3px 6px; border-radius: var(--r-pill); }

/* ---- data tables: sticky header, hover, empty state ---- */
.dt-wrap { overflow: auto; max-height: min(72vh, 900px); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.dt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-md); }
.dt th { position: sticky; top: 0; z-index: 1; background: var(--panel-2); text-align: left; font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 9px 12px;
  border-bottom: 1px solid var(--line); }
.dt td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.dt tr:last-child td { border-bottom: 0; }
.dt tbody tr { transition: background var(--t-fast); }
.dt tbody tr:hover td { background: var(--hover); }
.empty-state { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty-state .i { width: 34px; height: 34px; color: var(--faint-ink); display: block; margin: 0 auto 8px; }

/* ---- group headings (group by) ---- */
.grp { display: flex; align-items: baseline; gap: 10px; margin: var(--sp-5) 0 var(--sp-2); font-size: var(--fs-md);
  font-weight: 750; }
.grp small { color: var(--muted); font-weight: 600; }

/* ---- toolbar (search, filters, group by, view switch) ---- */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-4); }
.toolbar input[type=search] { flex: 1 1 240px; min-width: 0; padding-left: 34px;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237b8794' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 11px 50% no-repeat; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg a, .seg button { all: unset; cursor: pointer; padding: 7px 12px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.seg a + a, .seg button + button { border-left: 1px solid var(--line-strong); }
.seg .on, .seg [aria-pressed=true] { background: var(--accent-soft); color: var(--accent-text); }

/* ---- select-and-act bar ---- */
.actbar { position: sticky; bottom: 12px; z-index: 6; display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center;
  background: var(--brand-2); color: var(--on-brand); padding: 10px 14px; border-radius: var(--r-lg); box-shadow: var(--sh-3);
  margin-top: var(--sp-4); }
.actbar[hidden] { display: none; }
.actbar .btn { background: rgba(255,255,255,.08); color: var(--on-brand); border-color: rgba(255,255,255,.25); }

/* ---- drawer (side panel) ---- */
dialog.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(560px, 100vw); border: 0; padding: 0;
  background: var(--panel); color: var(--ink); box-shadow: var(--sh-3); }
dialog.drawer::backdrop { background: rgba(8, 18, 30, .45); }
dialog.drawer[open] { animation: drawer-in var(--t-med) var(--ease); }
.drawer-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px 18px; background: var(--panel); border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: var(--fs-lg); }
.drawer-body { padding: 18px; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- hover cards (data-hover="#id" or [data-hovercard] with a <template>) ---- */
.hovercard { position: absolute; z-index: 50; width: min(360px, 92vw); background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-3); padding: 12px 14px; font-size: var(--fs-sm);
  animation: pop var(--t-fast) var(--ease); }
.hovercard h4 { margin: 0 0 6px; font-size: var(--fs-md); }
.hovercard ul { margin: 0; padding-left: 18px; }
@keyframes pop { from { transform: translateY(4px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- toasts (the page's flash messages, top right; stay readable without JS) ---- */
.toasts { position: fixed; z-index: 60; top: 76px; right: 16px; display: flex; flex-direction: column; gap: 8px;
  width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--sh-3);
  border-left: 4px solid var(--hue-green); animation: pop var(--t-med) var(--ease); }
.toast.error { border-left-color: var(--hue-red); } .toast.warn { border-left-color: var(--hue-orange); }
.toast.info { border-left-color: var(--hue-blue); }
.toast button { all: unset; cursor: pointer; margin-left: auto; color: var(--muted); font-weight: 800; padding: 0 2px; }
.toast.leaving { opacity: 0; transform: translateY(-4px); transition: all var(--t-med) var(--ease); }

/* ---- skeleton loading ---- */
.skeleton { display: block; height: 1em; border-radius: 6px; background: linear-gradient(90deg, var(--subtle), var(--hover-strong), var(--subtle));
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---- masked money with a reveal ---- */
.masked { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); letter-spacing: .1em; }
.masked form { display: inline; margin: 0; }
.reveal { all: unset; cursor: pointer; color: var(--accent-text); display: inline-flex; }
.reveal:focus-visible { outline: 2px solid var(--focus); border-radius: 4px; }

/* ---- the "clocked in" bar, the clock control ---- */
.clockbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: var(--sp-4);
  border-radius: var(--r-md); background: color-mix(in srgb, var(--hue-green) 12%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--hue-green) 35%, transparent); }
.clockbar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hue-green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hue-green) 25%, transparent);
  animation: pulse 2s ease-in-out infinite; }
.clockbar form { margin: 0 0 0 auto; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }

/* ---- phone bottom bar (consultancy) ---- */
.bottombar { display: none; }
@media (max-width: 760px) {
  .bottombar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(10, 20, 30, .08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottombar a, .bottombar button { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: .68rem; font-weight: 600; color: var(--muted); padding: 6px 2px; min-height: 44px; justify-content: center; }
  .bottombar .on { color: var(--accent-text); }
  .bottombar .i { width: 22px; height: 22px; }
  body.has-bottombar { padding-bottom: 76px; }
  .ph-title { font-size: var(--fs-xl); }
  .kpi-n { font-size: var(--fs-2xl); }
  .btn { min-height: 42px; }
}

/* ---- motion off ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
html[data-motion=reduce] *, html[data-motion=reduce] *::before, html[data-motion=reduce] *::after { animation: none !important; transition: none !important; }

/* ---- colour-blind: the symbol carries the meaning, colours step back ---- */
html[data-cvd=on] .kpi::before { opacity: .5; }

/* ---- the whole site picks up the kit's polish ---- */
.card, .stat, .settings-nav-toggle { border-radius: var(--r-lg); }
.card { box-shadow: var(--sh-1); }
.stat { position: relative; overflow: hidden; box-shadow: var(--sh-1); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); opacity: .75; }
a.stat:hover { transform: translateY(-1px); box-shadow: var(--sh-2); text-decoration: none; }
.stat strong { font-size: 1.6rem; letter-spacing: -.02em; }
.settings-title h1 { font-size: var(--fs-2xl); letter-spacing: -.02em; font-weight: 750; }
.table th { letter-spacing: .04em; }
.btn { transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.btn:active { transform: translateY(1px); }
.btn .i { margin-right: 1px; }
.pill { letter-spacing: .01em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- the area's menu in the top bar on phones (Philip 13 Nov 2026: next to Overview, Tools, Consultancy) ---- */
.mainnav .nav-menu { display: none; }
@media (max-width: 760px) {
  .mainnav .nav-menu { display: inline-flex; align-items: center; gap: 6px; color: var(--on-brand); font-weight: 600;
    background: rgba(127,127,127,.22); }
}

/* ---- clock in / out ---- */
.clockbar-warn { background: color-mix(in srgb, var(--hue-orange) 14%, var(--panel)); border-color: color-mix(in srgb, var(--hue-orange) 40%, transparent); }
.clockbar-warn .dot { background: var(--hue-orange); }
.clockbar > .btn { margin-left: auto; }
.btn-big { padding: 13px 22px; font-size: 1.02rem; border-radius: 12px; }
.clock-panel .panel-body { font-size: var(--fs-md); }
.cons-price { font-size: var(--fs-md); margin: 0 0 12px; }
.masked-field { display: flex; gap: 8px; align-items: center; min-height: 38px; }
.topclock { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  color: var(--on-brand); background: rgba(35, 149, 90, .35); border: 1px solid rgba(120, 220, 160, .45); white-space: nowrap; }
.topclock:hover { text-decoration: none; background: rgba(35, 149, 90, .5); }
.topclock .dot { width: 8px; height: 8px; border-radius: 50%; background: #5ee39a; }
@media (max-width: 760px) { .topclock span.long { display: none; } }

/* ---- the partner area ---- */
.pswitch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--sp-4); }
.pchip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-weight: 600; font-size: var(--fs-sm); box-shadow: var(--sh-1); }
.pchip:hover { text-decoration: none; border-color: var(--pb, var(--accent)); }
.pchip.on { border-color: var(--pb, var(--accent)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pb, var(--accent)) 35%, transparent); }
.pchip-add { padding: 6px 12px; color: var(--accent-text); }
.pmark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--pb, var(--brand));
  color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .02em; }
.pmark.big { width: 34px; height: 34px; font-size: .8rem; border-radius: 10px; }
.ptabs a .count { margin-left: 4px; }
.viewas-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.req-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-5); align-items: start; }
@media (max-width: 1100px) { .req-layout { grid-template-columns: minmax(0, 1fr); } }
.req-main, .req-side { min-width: 0; }
.ptabs { overflow-x: auto; flex-wrap: nowrap; }
.kpi { min-width: 0; }
.req-side .panel-body .row .field { flex: 1 1 140px; }
.kpis-tight { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.kpis-tight .kpi { padding: 10px 12px 9px; }
.kpis-tight .kpi-n { font-size: var(--fs-2xl); }
.req .tcard-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-md); }
.req .star { color: var(--hue-orange); font-size: 1.1em; }
.req .sel input { width: 17px; height: 17px; margin: 0 4px 0 0; vertical-align: -3px; }
.req-sel { display: flex; gap: 6px; flex-wrap: wrap; }
.req-sel form { margin: 0; }
.req-sel select { padding: 5px 8px; font-size: var(--fs-sm); font-weight: 600; border-radius: 8px; }
.req-chips { margin-top: 8px; }
.chip-add { display: inline-block; }
.chip-add > summary { list-style: none; cursor: pointer; }
.chip-add > summary::-webkit-details-marker { display: none; }
.chip-add[open] form { margin-top: 6px; }
.req-refs { margin: 8px 0 0; font-size: var(--fs-sm); }
.req-body { margin-top: 8px; }
.req-body > summary { cursor: pointer; color: var(--accent-text); font-weight: 600; font-size: var(--fs-sm); }
.req-body h4 { margin: 10px 0 4px; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.req-body ul { margin: 0; padding-left: 20px; }
.req-jobs { margin: 8px 0 0; font-size: var(--fs-sm); }
.flash-target { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent), var(--sh-2); }
.ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: var(--sp-4); align-items: start; }
.pfacts { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; margin: 0; }
.pfacts dt { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.pfacts dd { margin: 0; }
@media (max-width: 640px) { .pfacts { grid-template-columns: 1fr; } .pfacts dd { margin-bottom: 6px; } }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
.prod p { margin: 6px 0; font-size: var(--fs-sm); }
.prod-icon { font-size: 1.3em; }
.prod .cons-add { border-top: 0; padding: 8px 0 0; }
.vis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; }
.emoji-pick { font-size: 1.05rem; }
.inline-form { display: inline; margin: 0; }
.req-refs code, .req-body code, .req-body li { overflow-wrap: anywhere; word-break: break-word; }

/* ---- partner API reference (consult/partner.html API / Models tabs) ---- */
.api-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--sp-4); }
.health-line { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.hdot { width: 12px; height: 12px; border-radius: 50%; background: var(--hue-grey, #9aa); flex: none; cursor: help; }
.hdot.ok { background: var(--hue-green, #2a9d5b); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hue-green, #2a9d5b) 20%, transparent); }
.hdot.bad { background: var(--hue-red, #d33); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hue-red, #d33) 20%, transparent); }
.kpis-tight { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.api-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--sp-5); align-items: start; margin-top: var(--sp-4); }
@media (max-width: 900px) { .api-layout { grid-template-columns: minmax(0, 1fr); } .api-menu { position: static; max-height: 240px; } }
.api-menu { position: sticky; top: 70px; max-height: calc(100dvh - 90px); overflow: auto; display: grid; gap: 10px; }
.api-secs, .api-secs ul { list-style: none; margin: 0; padding: 0; }
.api-secs ul { padding-left: 14px; }
.api-secs button { all: unset; cursor: pointer; display: flex; justify-content: space-between; gap: 6px; width: 100%; box-sizing: border-box;
  padding: 4px 8px; border-radius: 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.api-secs button:hover { background: var(--hover); }
.api-secs button.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.api-list .toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.api-list .toolbar input, .toolbar [data-model-q] { flex: 1; min-width: 0; }
details.ep { border: 1px solid var(--line); border-radius: var(--r-md, 8px); background: var(--panel); margin-bottom: 6px; }
details.ep.dep { opacity: .7; }
details.ep > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; list-style: none; }
details.ep > summary::-webkit-details-marker { display: none; }
details.ep[open] > summary { border-bottom: 1px solid var(--line); }
.ep-path { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.ep-sum { color: var(--muted); font-size: var(--fs-sm); flex: 1 1 200px; min-width: 0; }
.ep-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ep-body { padding: 10px 12px; display: grid; gap: 10px; min-width: 0; }
.ep-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: center; }
.ep-h { margin: 6px 0 0; font-size: var(--fs-sm); display: flex; align-items: center; gap: 6px; }
.meth { display: inline-block; min-width: 52px; text-align: center; font: 700 .72rem/1 ui-monospace, Menlo, monospace; padding: 5px 6px;
  border-radius: 5px; color: #fff; background: var(--hue-grey, #789); }
.meth.m-get { background: var(--hue-blue, #2f6fdb); } .meth.m-post { background: var(--hue-green, #2a9d5b); }
.meth.m-put { background: var(--hue-orange, #d9822b); } .meth.m-delete { background: var(--hue-red, #d33); }
.meth.m-model { background: var(--hue-violet, #7a5cd6); }
details.sample > summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; }
.try { border-top: 1px dashed var(--line); padding-top: 8px; display: grid; gap: 8px; }
.try-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.try-grid label, .try label { display: grid; gap: 3px; font-size: var(--fs-sm); }
.try [data-try-call] { overflow-wrap: anywhere; }
.try-result pre.code { max-height: 360px; }
.ep-body pre.code { white-space: pre-wrap; overflow-wrap: anywhere; }
details.ep { scroll-margin-top: 84px; }

/* ---- docs watch + ☆ Watch (P6) ---- */
.watch-btn.on { color: var(--hue-orange); border-color: color-mix(in srgb, var(--hue-orange) 45%, transparent); }
.watch-form { display: inline; }
.w-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--sp-3, 12px); padding: 12px; }
.w-card { border: 1px solid var(--line); border-left: 4px solid var(--hue-blue); border-radius: var(--r-md, 8px); padding: 12px 14px; background: var(--panel); display: grid; gap: 6px; min-width: 0; }
.w-card.changed { border-left-color: var(--hue-green); }
.w-card h3 { margin: 0; font-size: var(--fs-md, 1rem); overflow-wrap: anywhere; }
.w-card p { margin: 0; }
.w-dg { background: var(--accent-soft); border-radius: 6px; padding: 6px 8px; }
.w-hits { list-style: none; margin: 0; padding: 0; }
.w-hits li { padding: 8px 14px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.w-hits li.dep, .wb.dep { opacity: .65; }
.w-blocks { display: grid; gap: 6px; min-width: 0; }
.wb { position: relative; min-width: 0; overflow-wrap: anywhere; }
.wb p { margin: 0; }
.wb.new { background: color-mix(in srgb, var(--hue-green) 9%, transparent); border-radius: 6px; padding: 4px 8px; }
.wb.dep { border-left: 3px solid var(--hue-grey); padding-left: 8px; }
.wb-tag { float: right; font-size: var(--fs-xs, .75rem); color: var(--muted); }
.wb-h { font-weight: 700; margin-top: 10px; }
.wb-h1, .wb-h2 { font-size: 1.15rem; } .wb-h3 { font-size: 1.02rem; }
.wb-li { padding-left: 10px; }
.wb pre.code { white-space: pre-wrap; }
.w-gone-h { margin: 18px 0 4px; font-size: var(--fs-md, 1rem); border-top: 1px dashed var(--line); padding-top: 12px; }
.watchlist li { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.watchlist .new-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hue-orange); display: inline-block; }

/* ---- jobs board (P8) ---- */
.jobs-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.jobs-filter input[type=search] { flex: 1 1 260px; min-width: 0; }
.jobs-filter select { max-width: 200px; }
.jcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.jcard { display: grid; gap: 8px; }
.jcard .tcard-title { font-size: var(--fs-md, 1rem); }
.jfoot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--ink-2); }
.jfoot .jprice { margin-left: auto; }
.jbudget { font-weight: 600; } .jb-warn { color: var(--hue-orange); } .jb-over { color: var(--hue-red); }
.jgroup { margin-bottom: 18px; }
.jgroup-h { font-size: var(--fs-md, 1rem); margin: 18px 0 8px; display: flex; gap: 8px; align-items: center; }
.pickbar { position: sticky; top: 70px; z-index: 5; display: flex; gap: 10px; align-items: center; background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.cons-st.chip { white-space: nowrap; }
.kpi-n.kpi-n-sm { font-size: var(--fs-lg, 1.15rem); line-height: 1.5; }
a.kpi { text-decoration: none; }
.job-reqs { margin: 4px 0 14px; }
.job-grid .panel { margin-bottom: var(--sp-4, 16px); }

/* ---- customer pages (P9): the quote as a document, sign-off ---- */
.quote-doc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg, 12px); padding: 32px 36px; margin: 0 0 18px; box-shadow: var(--sh-2, 0 8px 24px rgba(0,0,0,.06)); }
.qd-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-bottom: 3px solid var(--brand, #12324f); padding-bottom: 18px; }
.qd-brand { font-size: 1.4rem; font-weight: 750; letter-spacing: -.01em; color: var(--brand, #12324f); }
.qd-title { font-size: 1.6rem; font-weight: 800; letter-spacing: .14em; color: var(--accent-text, #0f8b8d); text-align: right; }
.qd-meta table { border-collapse: collapse; margin-left: auto; }
.qd-meta th { text-align: right; color: var(--muted); font-weight: 500; padding: 2px 10px 2px 0; font-size: var(--fs-sm); }
.qd-meta td { padding: 2px 0; font-variant-numeric: tabular-nums; }
.qd-for { display: grid; gap: 2px; margin: 20px 0; }
.qd-for strong { font-size: 1.15rem; }
.qd-lines { width: 100%; border-collapse: collapse; }
.qd-lines th { text-align: left; font-size: var(--fs-xs, .75rem); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line-strong); padding: 8px; }
.qd-lines td { border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
.qd-lines .num { text-align: right; font-variant-numeric: tabular-nums; }
.qd-lines tfoot td { border-bottom: 0; border-top: 2px solid var(--line-strong); font-size: 1.05rem; }
.qd-foot { margin-top: 22px; }
@media (max-width: 640px) { .quote-doc { padding: 18px 14px; } .qd-lines { font-size: .88rem; } .qd-title { text-align: left; } .qd-meta table { margin-left: 0; } }
@media print {
  .topbar, .no-print, .settings-side, .cons-side, .page-head .actions, .ph .row, .crumbs, nav, .bottombar, .clockbar, .flash { display: none !important; }
  body { background: #fff; }
  .quote-doc { border: 0; box-shadow: none; padding: 0; }
}
.signoff-wrap { max-width: 640px; margin: 28px auto; display: grid; gap: 16px; }
.signoff-head { display: flex; gap: 16px; align-items: center; }
.signoff-logo { max-height: 56px; max-width: 160px; }
.signoff-head h1 { margin: 2px 0; }
.signoff-lead { font-size: 1.1rem; }
.signoff-problem summary { cursor: pointer; }
.work-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.work-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.work-cards { margin-top: 14px; }
.qd-scroll { overflow-x: auto; } .quote-doc { min-width: 0; }
.quote-doc { box-sizing: border-box; max-width: 100%; overflow: hidden; } .qd-scroll { max-width: 100%; }
