/* Lighthand design system v3: calm, precise, premium. Loaded after styles.css on every page; it re-skins every shared class.
   Principles: one accent colour, hairline borders instead of heavy shadows, generous space, quiet typography with
   strong numbers, line icons (never emoji) in chrome, and the same handful of components everywhere. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&display=swap");

:root {
  --brand: #16213E;   /* ink */
  --brand-2: #5AA9F6; /* sky */
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 7%, white);
  --brand-tint: color-mix(in srgb, var(--brand) 12%, white);
  --brand-line: color-mix(in srgb, var(--brand) 28%, white);
  --brand-deep: color-mix(in srgb, var(--brand) 82%, black);
  --grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  --bg: #f7f7f5;
  --panel: #ffffff;
  --subtle: #fbfbfa;
  --ink: #15171c;
  --ink-2: #3d4250;
  --muted: #6b7180;
  --faint: #9aa0ad;
  --line: #e9e9e6;
  --line-2: #dedfdb;
  --ok: #0f8a5f; --ok-soft: #e8f6ef;
  --warn: #a15c07; --warn-soft: #fdf4e3;
  --bad: #c8312b; --bad-soft: #fdecea;
  --night: #15171c;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(21,23,28,.04);
  --shadow-md: 0 2px 6px rgba(21,23,28,.05), 0 8px 24px rgba(21,23,28,.05);
  --shadow-lg: 0 12px 40px rgba(21,23,28,.14);
  --glow: none;
  --ring: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "cv11", "ss01";
}
html, body { background: var(--bg); color: var(--ink); }
body { font-size: 14.5px; line-height: 1.55; letter-spacing: -.003em; }
h1 { font-size: 26px; font-weight: 650; letter-spacing: -.025em; }
h2 { font-size: 18px; font-weight: 650; letter-spacing: -.015em; }
h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
a { color: var(--brand); }
.eyebrow { font-size: 11px; letter-spacing: .1em; font-weight: 600; color: var(--muted); }
::selection { background: var(--brand-tint); }
.ico { flex: none; vertical-align: -3px; }
.num, .v { font-variant-numeric: tabular-nums; }

/* ---------- buttons */
.btn { height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  font-weight: 550; font-size: 13.5px; box-shadow: 0 1px 1px rgba(21,23,28,.04); transition: background .12s, border-color .12s, box-shadow .12s, transform .06s; }
.btn:hover { background: var(--subtle); border-color: #cfd0cb; text-decoration: none; }
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px color-mix(in srgb, var(--brand) 30%, transparent), inset 0 1px 0 rgba(255,255,255,.14); }
.btn.primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); filter: none; transform: none; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); }
.btn.danger { color: var(--bad); border-color: #f1c9c6; background: #fff; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(21,23,28,.05); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn.xl { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 13px; }
.btn:disabled { opacity: .45; }
.btn .ico { margin: 0 -2px; }

/* ---------- inputs */
label { font-weight: 550; font-size: 13px; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=month], input[type=date], input[type=time], input[type=tel], input[type=search], select, textarea {
  font-size: 14.5px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; min-height: 40px; box-shadow: 0 1px 1px rgba(21,23,28,.03); }
input:hover, select:hover, textarea:hover { border-color: #cfd0cb; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: var(--ring); }
::placeholder { color: var(--faint); }
.help { color: var(--muted); }
.check { border-color: var(--line); border-radius: 12px; padding: 11px 13px; }
.check.on { border-color: var(--brand-line); background: var(--brand-soft); }
.switch span { background: #d6d7d2; }
.switch input:checked + span { background: var(--brand); }

/* ---------- surfaces */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.card h3 { font-size: 15px; }
.card-title { margin-bottom: 14px; }
.card-title h3 { display: flex; align-items: center; gap: 8px; }
.pill { background: #f0f0ed; color: var(--ink-2); font-weight: 550; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn, .pill.warm { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }
.notice { border-radius: 12px; background: var(--warn-soft); color: #6b4106; border: 1px solid #f3e1bd; font-size: 13.5px; padding: 11px 14px; }
.notice.info { background: var(--brand-soft); color: var(--ink-2); border-color: var(--brand-tint); }
.notice.bad { background: var(--bad-soft); color: #7a1f1a; border-color: #f4cfcb; }
.notice.ok { background: var(--ok-soft); color: #0b5a3e; border-color: #c9eadb; }
.empty { padding: 44px 20px; }
.empty .big { font-size: 0; margin-bottom: 10px; }
.empty .big::before { content: ""; display: inline-block; width: 44px; height: 44px; border-radius: 14px; background: var(--brand-soft); border: 1px solid var(--brand-tint); }
.empty h3 { color: var(--ink); }
hr { border-top-color: var(--line); }

/* ---------- stat tiles: one quiet pattern everywhere */
.kpi, .ap-stat, .hero-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; color: var(--ink); }
.kpi .v, .ap-stat .v, .hero-stat .v, .brief-metric .v { font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1.15; color: var(--ink); }
.kpi .l, .ap-stat .l, .hero-stat .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi .ic { background: var(--brand-soft); color: var(--brand); border-radius: 10px; }
.kpi.hero, .ap-stat.brand { background: var(--panel); border-color: var(--brand-line); box-shadow: inset 0 3px 0 var(--brand), var(--shadow); color: var(--ink); }
.kpi.hero .l, .kpi.hero .d, .ap-stat.brand .l { color: var(--muted); }
.ap-stat.brand .v { color: var(--brand); }
.ap-stat.ok .v { color: var(--ok); }

/* ---------- hero: light and calm, numbers do the talking */
.hero-panel { background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-md); border-radius: 22px; padding: 28px 30px;
  background-image: radial-gradient(600px 220px at 100% -20%, var(--brand-soft), transparent 70%); }
.hero-panel h1, .hero-panel h2 { color: var(--ink); }
.hero-panel p { color: var(--muted); }
.hero-panel .eyebrow { color: var(--brand) !important; }
.hero-panel .btn:not(.primary) { background: #fff; color: var(--ink); border-color: var(--line-2); }
.hero-panel [style*="color:#cbd5e1"], .hero-panel [style*="color: #cbd5e1"] { color: var(--muted) !important; }
.hero-panel [style*="color:#94a3b8"] { color: var(--faint) !important; }
.hero-stats { gap: 12px; }
.hero-stat { background: var(--subtle); box-shadow: none; backdrop-filter: none; }
.hero-stat .l { color: var(--muted); }
.ap-hero { background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-md); background-image: radial-gradient(700px 300px at 100% -10%, var(--brand-soft), transparent 70%); }
.ap-hero h1 { color: var(--ink); font-weight: 650; letter-spacing: -.03em; }
.ap-hero p { color: var(--muted); }
.ap-hero .eyebrow { color: var(--brand) !important; }
.ap-hero input { border: 1px solid var(--line-2) !important; }
.ap-note a { color: var(--brand); }
.sc-meter { background: #ecece8; height: 10px; }
.sc-meter > div { background: var(--brand); }

/* ---------- tables */
table.t { font-size: 13.5px; }
table.t th { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px 12px; background: transparent; }
table.t td { padding: 12px; border-bottom: 1px solid var(--line); }
table.t tr:hover td { background: var(--subtle); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- app shell: a light, quiet sidebar */
.shell { grid-template-columns: 248px minmax(0, 1fr); }
.side { background: var(--subtle); color: var(--ink-2); border-right: 1px solid var(--line); padding: 16px 12px 14px; }
.side .logo { color: var(--ink); font-weight: 650; font-size: 15.5px; padding: 2px 8px 16px; gap: 10px; }
.mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); color: #fff; font-size: 14px; }
.side .sect { color: var(--faint); font-size: 10.5px; letter-spacing: .1em; font-weight: 600; padding: 18px 10px 6px; }
.side a.nav { color: var(--ink-2); font-weight: 500; font-size: 13.5px; padding: 7px 10px; border-radius: 9px; gap: 10px; }
.side a.nav .ic { width: 18px; display: grid; place-items: center; color: var(--muted); }
.side a.nav:hover { background: rgba(21,23,28,.045); color: var(--ink); }
.side a.nav.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(21,23,28,.06); }
.side a.nav.on .ic { color: var(--brand); }
.side a.nav .count { background: var(--brand); color: #fff; font-weight: 600; font-size: 11px; }
.side .foot { border-top: 1px solid var(--line); color: var(--muted); padding: 12px 10px 2px; font-size: 12.5px; }
.side .foot a { color: var(--ink-2) !important; }
.side .cta .btn { width: 100%; }
.side .who { display: flex; align-items: center; gap: 10px; }
.side .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; font-weight: 650; font-size: 12px; flex: none; }
.main { padding: 30px 40px 80px; max-width: 1240px; }
.topbar { margin-bottom: 22px; align-items: flex-end; }
.topbar h1 { display: flex; align-items: center; gap: 10px; margin: 0; }
.topbar p { margin-top: 6px; font-size: 14px; }
.crumbs { font-size: 12.5px; }
.crumbs a { color: var(--muted); }
.subnav { display: flex; gap: 4px; margin: -6px 0 22px; padding: 4px; background: #efefec; border-radius: 12px; width: max-content; max-width: 100%; overflow-x: auto; }
.subnav a { padding: 6px 13px; border-radius: 9px; font-size: 13px; font-weight: 550; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.subnav a:hover { color: var(--ink); text-decoration: none; }
.subnav a.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(21,23,28,.08); }
.tabs { border-bottom-color: var(--line); }
.tabs a { font-weight: 550; font-size: 13.5px; }
.tabs a.on { border-color: var(--brand); }

/* demo / status banner: a slim notice, not a black bar */
.banner { background: var(--warn-soft); color: #6b4106; border-bottom: 1px solid #f3e1bd; padding: 7px 40px; font-size: 12.5px; }
.banner a { color: #6b4106; font-weight: 600; text-decoration: underline; }

/* ---------- phone: app-like bottom tabs, a sheet for everything else */
.tabbar { display: none; }
@media (max-width: 880px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; top: 0; left: 0; height: 100vh; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .main { padding: 18px 16px 96px; }
  .menu-btn { display: none !important; }
  .side { width: 288px; background: var(--panel); }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: rgba(255,255,255,.94); backdrop-filter: saturate(1.6) blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 550; color: var(--muted); background: none; border: 0; font-family: inherit; padding: 4px 0; cursor: pointer; position: relative; }
  .tabbar a.on { color: var(--brand); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .dot { position: absolute; top: 0; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 10px; display: grid; place-items: center; }
  .scrim { position: fixed; inset: 0; background: rgba(21,23,28,.3); z-index: 39; }
  h1 { font-size: 22px; }
  .topbar { align-items: flex-start; }
  .banner { padding: 7px 16px; }
  .hero-panel { padding: 22px 18px; border-radius: 18px; }
  .card { padding: 18px; }
  .subnav { width: auto; }
}

/* ---------- tiles & icons inside content */
.tile { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand-tint); border-radius: 12px; width: 40px; height: 40px; font-size: 20px; }
.tile.lg { width: 52px; height: 52px; border-radius: 15px; }
.tile.sm { width: 32px; height: 32px; border-radius: 10px; }
.tile .ico { width: 55%; height: 55%; }
.opp { padding: 12px 0; align-items: center; }
.opp .k { width: 34px; height: 34px; border-radius: 10px; background: var(--subtle); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); font-size: 16px; flex: none; }
.feed-row .k, .ap-log-row .k { color: var(--muted); display: grid; place-items: center; }
.feed-row:hover, .staff-row:hover, .ap-log-row[data-p]:hover { background: var(--subtle); }
.sol-card { border-top: 1px solid var(--line); }
.sol-card:hover, .tool-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--line-2); }
.sol-card.picked { box-shadow: 0 0 0 2px var(--brand), var(--shadow-md); }
.ticks li::before { content: ""; width: 14px; height: 14px; top: 7px; left: 0; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f8a5f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/10px no-repeat; }

/* ---------- chips, steps, choices */
.chip { border: 1px solid var(--line-2); font-weight: 550; font-size: 13px; height: 32px; padding: 0 12px; }
.chip.on { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand); }
.steps .s { background: #efefec; }
.steps .s.on { background: var(--brand); box-shadow: none; }
.choice { border: 1px solid var(--line-2); border-radius: 12px; }
.choice.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: var(--ring); }
.sdot.on { box-shadow: var(--ring); }
.drop { background: var(--subtle); border-color: var(--line-2); }

/* ---------- autopilot board */
.ap-col { background: #f0f0ed; border-radius: 14px; }
.ap-card { border-radius: 10px; box-shadow: 0 1px 1px rgba(21,23,28,.04); }
.ap-inbox { border-color: #f3e1bd; background: #fffcf5; }
.ap-msg.in { background: var(--brand-soft); border-color: var(--brand-tint); }

/* ---------- output, chat, modals, toast */
.output { border-radius: var(--radius-lg); padding: 24px 28px; box-shadow: var(--shadow); }
.md blockquote { background: var(--subtle); border-left-color: var(--brand-line); }
.md pre, code.snippet { background: #1b1d23; }
.bubble.user { background: var(--brand); }
.chat { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.chat .msgs { background: var(--subtle); }
.modal-bg { background: rgba(21,23,28,.38); backdrop-filter: blur(2px); }
.modal { border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px; }
.modal .x { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.modal .x:hover { background: rgba(21,23,28,.06); }
#toast { background: var(--ink); border-radius: 12px; font-weight: 500; font-size: 13.5px; padding: 11px 16px; }
.bars .b, .hbar > div { background: var(--brand); }
.hbar { background: #ecece8; }
.spinner { border-color: var(--brand-tint); border-top-color: var(--brand); }

/* ---------- auth */
.auth-wrap { background: var(--bg); background-image: radial-gradient(800px 400px at 50% -10%, var(--brand-soft), transparent 70%); }
.auth .logo { color: var(--ink); }

/* ---------- documents (proposal, invoice, contract, report) */
.doc-head { background: var(--panel); color: var(--ink); border-bottom: 1px solid var(--line); background-image: radial-gradient(600px 240px at 100% -20%, var(--brand-soft), transparent 70%); }
.doc-head h1 { color: var(--ink); }
.doc-head p, .doc-head [style*="color:#cbd5e1"] { color: var(--muted) !important; }
.doc-head .eyebrow, .doc-head [style*="color:#c4b5fd"] { color: var(--brand) !important; }
.doc-card { border: 1px solid var(--line); box-shadow: var(--shadow-md); }

/* small helpers for page rebuilds */
.stack { display: flex; flex-direction: column; gap: 14px; }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--subtle); }
.list-row .meta { color: var(--muted); font-size: 12.5px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-title h2 { margin: 0; font-size: 16px; }
.lead { font-size: 15.5px; color: var(--ink-2); }
.kbd { font: 12px ui-monospace, Menlo, monospace; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--subtle); }

/* ---------- QA pass: the sidebar fits under the demo banner, so its footer is never cut off */
@media (min-width: 881px) {
  .banner { position: sticky; top: 0; z-index: 30; height: 34px; box-sizing: border-box; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; }
  .banner > span { overflow: hidden; text-overflow: ellipsis; }
  .banner ~ .shell .side { top: 34px; height: calc(100vh - 34px); }
}
/* one accent colour: the old gradient text becomes plain brand ink */
.grad-text { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--brand); }
.pill.dark { background: var(--ink); }

/* the hidden attribute always wins over display rules (e.g. .grid) */
[hidden] { display: none !important; }

/* ======================================================================================================
   v4 "warm colleagues" layer: friendly, human and confident. Off-white canvas, charcoal ink, one warm accent,
   pill buttons, extra-bold tight headlines with a highlighter word, numbered section labels, dark bands,
   big soft rounded cards, and AI staff shown as named colleagues (see web/js/personas.js and docs/DESIGN.md).
   ====================================================================================================== */
:root {
  /* Brand palette: ink, sky & sand (see docs/DESIGN.md) */
  --brand: #16213E;       /* ink: buttons, links, active states */
  --brand-2: #5AA9F6;     /* sky: accents, charts, highlights on dark */
  --sky: #5AA9F6; --sky-deep: #2F7FD8; --sand: #E9B872; --paper: #F7F9FC;
  --hl: #F3D9A8;          /* sand highlighter behind one key word */
  --teal: #20b2a8; --blue: #3b8ef0; --sun: #E9B872;
  --bg: #F7F9FC;
  --subtle: #EEF2F8;
  --ink: #16213E;
  --ink-2: #2B3550;
  --muted: #5B6478;
  --faint: #8C93A3;
  --line: #E3E8F0;
  --line-2: #D5DCE7;
  --band: #2e2e2e;        /* dark section bands */
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  font-family: Figtree, Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
body { font-size: 15px; letter-spacing: 0; }
h1, h2 { font-weight: 800; letter-spacing: -.035em; }
h1 { font-size: 30px; line-height: 1.08; }
h2 { font-size: 20px; line-height: 1.15; }
h3 { font-weight: 700; letter-spacing: -.01em; }
.eyebrow { font-size: 12px; letter-spacing: .14em; font-weight: 700; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.eyebrow[data-n]::before { content: attr(data-n); width: auto; height: auto; background: none; color: var(--brand); font-weight: 700; }
mark.hl, .hl { background: linear-gradient(transparent 12%, var(--hl) 12%, var(--hl) 92%, transparent 92%); color: inherit; padding: 0 .08em; border-radius: 2px; }

/* pill buttons */
.btn { border-radius: 999px; height: 40px; padding: 0 18px; font-weight: 600; font-size: 14px; }
.btn.sm { height: 32px; padding: 0 13px; border-radius: 999px; font-size: 13px; }
.btn.lg { height: 50px; padding: 0 26px; border-radius: 999px; font-size: 16px; }
.btn.xl { height: 58px; padding: 0 32px; border-radius: 999px; font-size: 17px; }
.btn.primary { box-shadow: 0 1px 2px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn.dark { background: var(--band); border-color: var(--band); }
.chip { border-radius: 999px; }
.chip.arrow::after { content: "→"; margin-left: 6px; color: var(--muted); }

/* soft, generous surfaces */
.card { border-radius: var(--radius-lg); padding: 24px; }
.hero-panel, .ap-hero { border-radius: var(--radius-xl); }
.kpi, .ap-stat, .hero-stat { border-radius: var(--radius); }
.modal { border-radius: var(--radius-lg); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=month], input[type=date], input[type=time], input[type=tel], input[type=search], select, textarea { border-radius: 12px; min-height: 44px; }
.side a.nav { border-radius: 999px; padding: 8px 12px; }
.side a.nav.on { box-shadow: 0 0 0 1px var(--line-2); }
.subnav { border-radius: 999px; }
.subnav a { border-radius: 999px; }
.mark { border-radius: 10px; background: var(--brand); }

/* dark band sections (public pages and big moments in the app) */
.band { background: var(--band); color: #f4f3ef; }
.band h1, .band h2, .band h3 { color: #fff; }
.band p, .band .muted { color: #cfcdc6; }
.band .eyebrow { color: #e9e7e0; }
.band .card { background: #383836; border-color: #464643; color: #f4f3ef; }

/* named AI colleagues */
.persona { display: inline-flex; align-items: center; gap: 10px; }
.avatar-ai { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 16px; color: #fff;
  background: var(--pc, var(--brand)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.12), 0 0 0 3px #fff, 0 0 0 4px var(--line); position: relative; }
.avatar-ai.sm { width: 30px; height: 30px; font-size: 12.5px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12), 0 0 0 2px #fff; }
.avatar-ai.lg { width: 56px; height: 56px; font-size: 22px; }
.avatar-ai.has-face { overflow: visible; }
.avatar-ai > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; display: block; }
.avatar-ai .on { z-index: 1;  position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.ai-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--brand-line); color: var(--brand); background: var(--brand-soft); }
/* a team-chat style update stream */
.chatfeed { display: flex; flex-direction: column; gap: 10px; }
.chatmsg { display: flex; gap: 12px; align-items: flex-start; }
.chatmsg .bubble2 { background: var(--panel); border: 1px solid var(--line); border-radius: 4px 18px 18px 18px; padding: 10px 14px; max-width: 760px; }
.chatmsg .who { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.chatmsg .who time { font-weight: 500; color: var(--faint); font-size: 12px; }
.chatmsg .txt { font-size: 14.5px; color: var(--ink); margin-top: 2px; }
.chatmsg .acts { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ======================================================================================================
   v5 blend: Apple-style structure and scale + warm colleagues. Computer-first product: show desktop/laptop
   browser windows, never phones. Centered heroes, very large tight headlines, generous air, sticky frosted
   local nav, white / #f5f5f7 alternating sections, one bold full-width colour band per page at most.
   ====================================================================================================== */
:root {
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --faint: #86868b;
  --bg: #ffffff;
  --subtle: #f5f5f7;
  --line: #e8e8ed;
  --line-2: #d2d2d7;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Figtree", "Segoe UI", Roboto, Arial, sans-serif;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Figtree", "Segoe UI", Roboto, Arial, sans-serif;
}
body { font-size: 15px; letter-spacing: -.011em; }
h1, h2, .display { font-family: var(--display); font-weight: 700; letter-spacing: -.028em; }
.display-xl { font-family: var(--display); font-weight: 700; font-size: clamp(44px, 6vw, 80px); line-height: 1.05; letter-spacing: -.035em; }
.display-lg { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.07; letter-spacing: -.03em; }
.lede { font-family: var(--display); font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.section { padding: clamp(80px, 10vw, 150px) 0; }
.section.alt { background: var(--subtle); }
.center { text-align: center; }
.wrap-wide { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 32px; }
/* sticky frosted local nav */
.localnav { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.72); backdrop-filter: saturate(1.8) blur(20px); border-bottom: 1px solid rgba(0,0,0,.08); }
.localnav .in { max-width: 1180px; margin: 0 auto; padding: 0 32px; height: 52px; display: flex; align-items: center; gap: 24px; }
.localnav .title { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -.02em; color: var(--ink); margin-right: auto; }
.localnav a { color: var(--ink-2); font-size: 13px; }
/* computer window mockups for product shots */
.window { border-radius: 14px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.06); overflow: hidden; }
.window .bar { height: 34px; background: #f2f2f4; border-bottom: 1px solid #e3e3e8; display: flex; align-items: center; gap: 7px; padding: 0 12px; }
.window .bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; display: block; }
.window .bar i:nth-child(2) { background: #febc2e; } .window .bar i:nth-child(3) { background: #28c840; }
.window .bar .url { margin: 0 auto; font-size: 11.5px; color: var(--muted); background: #fff; border: 1px solid #e3e3e8; border-radius: 7px; padding: 2px 40px; }
.laptop { position: relative; padding: 14px 14px 0; background: #1d1d1f; border-radius: 18px 18px 0 0; }
.laptop::after { content: ""; position: absolute; left: -7%; right: -7%; bottom: -16px; height: 16px; background: linear-gradient(#d2d2d7, #a1a1a6); border-radius: 0 0 14px 14px; }
.app-icon { width: 84px; height: 84px; border-radius: 20px; display: grid; place-items: center; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04); margin: 0 auto 14px; color: var(--brand); }
.kicker { font-family: var(--display); font-weight: 600; font-size: 21px; color: var(--brand); letter-spacing: -.01em; }
/* the app shell on computers: a little more air, larger page titles */
.main { padding: 36px 48px 80px; }
.topbar h1 { font-size: 32px; }
.mark.lh, .p-logo .mark.lh { background: none; box-shadow: none; color: var(--ink, #16213E); border-radius: 0; padding: 0; }
.mark.lh svg { display: block; width: 100%; height: 100%; }

/* "Call Ava": a live browser call (web/js/browsercall.js) on the Phone page and the audit page */
.bcall { display: flex; flex-direction: column; gap: 6px; }
.bcall-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bcall-go { display: inline-flex; align-items: center; gap: 8px; }
.bcall-status { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bcall[data-state="live"] .bcall-status { color: var(--ok); font-weight: 600; }
.bcall[data-state="live"] .bcall-status::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; animation: bcall-pulse 1.4s ease-in-out infinite; }
.bcall-ai { font-size: 12px; color: var(--muted); }
.bcall-note { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
@keyframes bcall-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .bcall[data-state="live"] .bcall-status::before { animation: none; } }
/* "Install Lighthand on this computer" in the sidebar */
.side .install-app { display: flex; align-items: center; gap: 8px; width: calc(100% - 16px); margin: 12px 8px 0; padding: 9px 12px; border: 1px dashed var(--line-2, #D5DCE7); border-radius: 10px; background: var(--paper, #F7F9FC); color: var(--ink, #16213E); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.side .install-app:hover { border-style: solid; border-color: var(--sky-deep, #2F7FD8); color: var(--sky-deep, #2F7FD8); }
