/* Midnight Ember tokens (Ember Loop spec 7.1-7.4). The only file allowed to hold colour literals.
   Dark is the default theme (:root); light is :root[data-theme="light"]. Load first, before every other stylesheet. */

/* ---------- fonts (self-hosted, OFL: fonts/OFL.txt). U+20B9 (₹) lives only in latin-ext, so all four files ship. ---------- */
@font-face{font-family:'Inter Variable';font-style:normal;font-display:swap;font-weight:100 900;src:url(fonts/inter-latin-wght-normal.woff2) format('woff2-variations'),url(fonts/inter-latin-wght-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Inter Variable';font-style:normal;font-display:swap;font-weight:100 900;src:url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations'),url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Space Grotesk Variable';font-style:normal;font-display:swap;font-weight:300 700;src:url(fonts/space-grotesk-latin-wght-normal.woff2) format('woff2-variations'),url(fonts/space-grotesk-latin-wght-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Space Grotesk Variable';font-style:normal;font-display:swap;font-weight:300 700;src:url(fonts/space-grotesk-latin-ext-wght-normal.woff2) format('woff2-variations'),url(fonts/space-grotesk-latin-ext-wght-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

/* ---------- primitives (theme-independent) ---------- */
:root{
 --ink-950:#0b0b0d;--ink-900:#141417;--ink-850:#1a1a20;--ink-800:#1f1f26;--ink-700:#2a2a32;--ink-600:#383840;--ink-500:#4a4a53;
 --ember-300:#ffb488;--ember-400:#ff8f4d;--ember-500:#ff6a1a;--ember-600:#ff7d33;--ember-700:#ff9152;
 --cream-50:#fbfbfc;--cream-100:#ececef;--cream-300:#cbcbd2;--cream-400:#9c9ca6;--cream-500:#8f8f99;--cream-600:#898993;
 --font:'Inter Variable','Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
 --font-display:'Space Grotesk Variable','Space Grotesk','Inter Variable',system-ui,sans-serif;
 --font-mono:ui-monospace,SFMono-Regular,Menlo,monospace;
 --r-xs:6px;--r-sm:8px;--r:12px;--r-lg:16px;--r-sheet:24px;--r-pill:999px;
 --ease-out-soft:cubic-bezier(.21,1.02,.73,1);--ease-spring:cubic-bezier(.34,1.56,.64,1);
 --dur-press:90ms;--dur-quick:180ms;--dur-view:260ms;--dur-sheet:300ms;
 --z-sticky:20;--z-rail:30;--z-topbar:40;--z-scrim:55;--z-drawer:60;--z-fab:70;--z-menu:80;--z-banner:110;--z-toast:120;
 /* the Cortex ember halo (A7.2): Midnight Ember tones only, both themes */
 --halo-ember:#ff6a1a;--halo-hi:#ff9152;--halo-gold:#ffc46b;--halo-rose:#ff5c8a;
 --select-arrow-inset:12px;--select-arrow-space:36px;
 --accent:#ff6a1a;--accent-hover:#ff7d33;--accent-active:#ff9152;--on-accent:#141417;
 --av-0:#e8a33d;--av-1:#e0455f;--av-2:#2fb884;--av-3:#4a8ff0;--av-4:#a273ef;--av-5:#22b3b0;--av-6:#ef6f92;--av-7:#d98032;--on-av:#141417;
 --whatsapp:#25d366;--on-whatsapp:#141417;--badge:#d62828;--on-badge:#ffffff;--toast-success:#34d399;--on-toast-success:#141417;
 /* Playbook charts (semantic aliases, both themes): actual is info and solid, plan is muted and dashed, so the two read
    apart without colour; status marks use success / warn / danger. Orange is never a chart series (Ember Means Act). */
 --chart-actual:var(--info);--chart-plan:var(--muted);--chart-grid:var(--line);--chart-band:var(--line-soft);--chart-today:var(--text-2);
}

/* ---------- dark: Midnight Ember (default) ---------- */
:root,:root[data-theme="dark"]{color-scheme:dark;
 --bg:#141417;--column:#1a1a20;--well:#1a1a20;--surface:#1f1f26;--raised:#2a2a32;--raised-2:#383840;
 --text-strong:#fbfbfc;--text:#ececef;--text-2:#cbcbd2;--muted:#9c9ca6;--hint:#8f8f99;
 --line:rgba(251,251,252,.08);--line-soft:rgba(251,251,252,.05);--line-strong:rgba(251,251,252,.15);--hairline:rgba(255,255,255,.07);--line-input:#6b6b75;
 --accent-text:#ff9152;--accent-text-hover:#ffb488;--accent-icon:#ff6a1a;--accent-tint:rgba(255,106,26,.15);--accent-tint-soft:rgba(255,106,26,.08);--accent-border:rgba(255,106,26,.6);--focus-ring:#ff6a1a;
 --success:#34d399;--success-tint:rgba(52,211,153,.12);--danger:#ff5a5a;--danger-tint:rgba(255,90,90,.10);--warn:#fbbf24;--warn-tint:rgba(251,191,36,.10);--info:#6ea2f5;--info-tint:rgba(110,162,245,.12);
 --whatsapp-text:#25d366;--whatsapp-tint:rgba(37,211,102,.12);
 /* the lead's WhatsApp chat (public/chat.css): a wall a step below the page, their bubbles a step above the surface, ours a
    deep WhatsApp green; ours carry their own time tone; read ticks and template buttons share one cool accent (never orange) */
 --lightbox-bg:#0b0b0d;--lightbox-bar:rgba(255,255,255,.06);--lightbox-text:#f2f2f4;
 --chat-wall:#111114;--bubble-in:#24242c;--bubble-in-line:rgba(255,255,255,.06);--bubble-out:#163a2a;--bubble-out-line:rgba(37,211,102,.16);--bubble-out-meta:#9fc4b0;--chat-accent:#53bdeb;
 --av-none:#383840;--av-none-text:#ececef;--switch-knob:#fbfbfc;
 --scrim:rgba(5,5,7,.62);--scrim-panel:rgba(5,5,7,.40);--topbar-bg:rgba(20,20,23,.88);--tabbar-bg:rgba(20,20,23,.94);
 --surface-sheen:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.008));
 --ember-wash:rgba(255,60,0,.08); /* the deep-red second glow of the page background (dark only) */
 --wordmark-1:#ff9152;--wordmark-2:#ff6a1a;--wordmark-3:#ff4d00; /* the login wordmark gradient (spec 5.12: login only) */
 --wordmark-gradient:linear-gradient(90deg,var(--wordmark-1),var(--wordmark-2) 55%,var(--wordmark-3));
 --page-glow:radial-gradient(760px 460px at 85% -8%,rgba(255,106,26,.16),transparent 60%),radial-gradient(680px 480px at -10% 12%,var(--ember-wash),transparent 55%);
 --shadow-card:0 1px 2px rgba(0,0,0,.4),0 10px 30px -18px rgba(0,0,0,.7);--shadow-pop:0 25px 50px -12px rgba(0,0,0,.6);
 --glow-accent:0 4px 20px rgba(255,106,26,.45);--glow-ember:0 0 0 1px rgba(255,106,26,.3),0 6px 26px -6px rgba(255,106,26,.55);
 --select-arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%239c9ca6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 --select-arrow-accent:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23ff9152' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 --int-hot:#ff6a1a;--int-warm:#fbbf24;--int-cold:#4a8ff0;--int-chilled:#8fb3cc;--int-hot-glow:0 0 6px rgba(255,106,26,.6);
 /* stages (7.3, dark): dot/edge, text, tag (dot at 14%) */
 --st-lead:#8f8f99;--st-lead-text:#cbcbd2;--st-lead-tag:rgba(143,143,153,.14);
 --st-callback:#4a8ff0;--st-callback-text:#7fb0f7;--st-callback-tag:rgba(74,143,240,.14);
 --st-dnp:#7d8fb8;--st-dnp-text:#a9b6d6;--st-dnp-tag:rgba(125,143,184,.14);
 --st-demoscheduled:#a273ef;--st-demoscheduled-text:#c2a3f7;--st-demoscheduled-tag:rgba(162,115,239,.14);
 --st-demodone:#c3a6ff;--st-demodone-text:#d6c4ff;--st-demodone-tag:rgba(195,166,255,.14);
 --st-trial:#22b3b0;--st-trial-text:#4fd1cc;--st-trial-tag:rgba(34,179,176,.14);
 --st-negotiation:#e8a33d;--st-negotiation-text:#f0bb63;--st-negotiation-tag:rgba(232,163,61,.14);
 --st-stuck:#ef6f92;--st-stuck-text:#f593ad;--st-stuck-tag:rgba(239,111,146,.14);
 --st-ghosting:#9a90b8;--st-ghosting-text:#bcb4d4;--st-ghosting-tag:rgba(154,144,184,.14);
 --st-won:#34d399;--st-won-text:#5ee0ae;--st-won-tag:rgba(52,211,153,.14);
 --st-lost:#ff5a5a;--st-lost-text:#ff8585;--st-lost-tag:rgba(255,90,90,.14);
 --st-baddata:#8f8f99;--st-baddata-text:#b4b4bd;--st-baddata-tag:rgba(143,143,153,.14);
}

/* ---------- light (opt-in via the theme toggle; the public booking page is pinned here) ---------- */
:root[data-theme="light"]{color-scheme:light;
 --bg:#f6f6f8;--column:#ededf1;--well:#fbfbfc;--surface:#ffffff;--raised:#ececef;--raised-2:#e4e4e8;
 --text-strong:#141417;--text:#1f1f26;--text-2:#4a4a53;--muted:#5c5c66;--hint:#676771;
 --line:rgba(20,20,23,.10);--line-soft:rgba(20,20,23,.06);--line-strong:rgba(20,20,23,.20);--hairline:rgba(20,20,23,.08);--line-input:#84848e;
 --accent-text:#b34400;--accent-text-hover:#9a3a05;--accent-icon:#b34400;--accent-tint:rgba(255,106,26,.10);--accent-tint-soft:rgba(255,106,26,.06);--accent-border:rgba(217,82,10,.55);--focus-ring:#d9520a;
 --success:#047857;--success-tint:rgba(4,120,87,.10);--danger:#c81e1e;--danger-tint:rgba(200,30,30,.08);--warn:#92400e;--warn-tint:rgba(146,64,14,.08);--info:#1f5fc9;--info-tint:rgba(31,95,201,.08);
 --whatsapp-text:#0b7a3e;--whatsapp-tint:rgba(11,122,62,.08);
 --lightbox-bg:#0b0b0d;--lightbox-bar:rgba(255,255,255,.06);--lightbox-text:#f2f2f4;
 --chat-wall:#efeff2;--bubble-in:#ffffff;--bubble-in-line:rgba(20,20,23,.08);--bubble-out:#d9f4e1;--bubble-out-line:rgba(11,122,62,.14);--bubble-out-meta:#3d5e4b;--chat-accent:#0a6ea6;
 --av-none:#e4e4e8;--av-none-text:#4a4a53;--switch-knob:#ffffff;
 --scrim:rgba(20,20,23,.40);--scrim-panel:rgba(20,20,23,.28);--topbar-bg:rgba(255,255,255,.88);--tabbar-bg:rgba(255,255,255,.94);
 --surface-sheen:none;--page-glow:radial-gradient(760px 460px at 85% -8%,rgba(255,106,26,.08),transparent 60%);
 --wordmark-1:#d9520a;--wordmark-2:#b34400;--wordmark-3:#9a3a05; /* burnt in light: the fill orange is 2.87:1 on white */
 --wordmark-gradient:linear-gradient(90deg,var(--wordmark-1),var(--wordmark-2) 55%,var(--wordmark-3));
 --shadow-card:0 1px 2px rgba(20,20,23,.06),0 10px 30px -18px rgba(20,20,23,.22);--shadow-pop:0 24px 48px -12px rgba(20,20,23,.22);
 --glow-accent:0 4px 16px rgba(255,106,26,.30);--glow-ember:0 0 0 1px rgba(255,106,26,.35),0 6px 20px -6px rgba(255,106,26,.35);
 --select-arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%235c5c66' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 --select-arrow-accent:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23b34400' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 --int-hot:#d9480f;--int-warm:#b7791f;--int-cold:#2563eb;--int-chilled:#5b7a93;--int-hot-glow:none;
 /* stages (7.3, light): text = dot, tag = dot at 10% */
 --st-lead:#5c5c66;--st-lead-text:#5c5c66;--st-lead-tag:rgba(92,92,102,.10);
 --st-callback:#1f5fc9;--st-callback-text:#1f5fc9;--st-callback-tag:rgba(31,95,201,.10);
 --st-dnp:#4a5f8f;--st-dnp-text:#4a5f8f;--st-dnp-tag:rgba(74,95,143,.10);
 --st-demoscheduled:#6d3fd6;--st-demoscheduled-text:#6d3fd6;--st-demoscheduled-tag:rgba(109,63,214,.10);
 --st-demodone:#4c22a8;--st-demodone-text:#4c22a8;--st-demodone-tag:rgba(76,34,168,.10);
 --st-trial:#0a6f6c;--st-trial-text:#0a6f6c;--st-trial-tag:rgba(10,111,108,.10);
 --st-negotiation:#946000;--st-negotiation-text:#946000;--st-negotiation-tag:rgba(148,96,0,.10);
 --st-stuck:#c0305a;--st-stuck-text:#c0305a;--st-stuck-tag:rgba(192,48,90,.10);
 --st-ghosting:#655a86;--st-ghosting-text:#655a86;--st-ghosting-tag:rgba(101,90,134,.10);
 --st-won:#047857;--st-won-text:#047857;--st-won-tag:rgba(4,120,87,.10);
 --st-lost:#c8242f;--st-lost-text:#c8242f;--st-lost-tag:rgba(200,36,47,.10);
 --st-baddata:#6b6b73;--st-baddata-text:#6b6b73;--st-baddata-tag:rgba(107,107,115,.10);
}

/* ---------- base ---------- */
html{background:var(--bg)}
body{font-family:var(--font);color:var(--text);background:var(--page-glow),var(--bg);background-repeat:no-repeat;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;accent-color:var(--accent)}
:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}
::selection{background:var(--accent-tint);color:var(--text-strong)}
.surface{background:var(--surface-sheen),var(--surface);border:1px solid var(--hairline);box-shadow:var(--shadow-card);border-radius:var(--r-lg)}
.tnum{font-variant-numeric:tabular-nums}

/* ---------- stage marks (7.3). app.js cls() gives the key ("Bad Data" -> BadData).
   .st-<Key> sets --stage / --stage-text / --stage-tag; a role class says how the mark uses them.
   Stage identity is a dot, a tag or stage-name text, never a side stripe or a thick border on a rounded column (DESIGN.md No-Stripe Rule, A6). ---------- */
.st-Lead{--stage:var(--st-lead);--stage-text:var(--st-lead-text);--stage-tag:var(--st-lead-tag)}
.st-CallBack{--stage:var(--st-callback);--stage-text:var(--st-callback-text);--stage-tag:var(--st-callback-tag)}
.st-DNP{--stage:var(--st-dnp);--stage-text:var(--st-dnp-text);--stage-tag:var(--st-dnp-tag)}
.st-DemoScheduled{--stage:var(--st-demoscheduled);--stage-text:var(--st-demoscheduled-text);--stage-tag:var(--st-demoscheduled-tag)}
.st-DemoDone{--stage:var(--st-demodone);--stage-text:var(--st-demodone-text);--stage-tag:var(--st-demodone-tag)}
.st-Trial{--stage:var(--st-trial);--stage-text:var(--st-trial-text);--stage-tag:var(--st-trial-tag)}
.st-Negotiation{--stage:var(--st-negotiation);--stage-text:var(--st-negotiation-text);--stage-tag:var(--st-negotiation-tag)}
.st-Stuck{--stage:var(--st-stuck);--stage-text:var(--st-stuck-text);--stage-tag:var(--st-stuck-tag)}
.st-Ghosting{--stage:var(--st-ghosting);--stage-text:var(--st-ghosting-text);--stage-tag:var(--st-ghosting-tag)}
.st-Won{--stage:var(--st-won);--stage-text:var(--st-won-text);--stage-tag:var(--st-won-tag)}
.st-Lost{--stage:var(--st-lost);--stage-text:var(--st-lost-text);--stage-tag:var(--st-lost-tag)}
.st-BadData{--stage:var(--st-baddata);--stage-text:var(--st-baddata-text);--stage-tag:var(--st-baddata-tag)}
.stage-dot{display:inline-block;flex:none;width:8px;height:8px;border-radius:50%;background:var(--stage,var(--st-lead))}
.stage-name{color:var(--stage-text,var(--text-2))}
.stage-tag{display:inline-block;white-space:nowrap;background:var(--stage-tag,var(--raised));color:var(--stage-text,var(--text-2));border-radius:var(--r-pill);font:600 11px/16px var(--font);padding:2px 8px}
.stage-fill{background:var(--stage,var(--st-lead))}
/* Bad Data is the neutral grey of Lead plus a 1px dashed outline, so the two never read as the same stage */
.st-BadData:is(.stage-tag,.stage-control):not(:focus-visible){outline:1px dashed var(--stage);outline-offset:-1px}
.st-BadData.stage-dot{outline:1px dashed var(--stage);outline-offset:1px}

/* ---------- interest dots (7.4): 8px; Hot glows in dark only; unrated is a ring on the input boundary ---------- */
.dot{display:inline-block;flex:none;width:8px;height:8px;border-radius:50%}
.int-Hot{background:var(--int-hot);box-shadow:var(--int-hot-glow)}
.int-Warm{background:var(--int-warm)}
.int-Cold{background:var(--int-cold)}
.int-Chilled{background:var(--int-chilled)}
.int-none{background:transparent;box-shadow:inset 0 0 0 1.5px var(--line-input)}

/* ---------- avatars (7.4): tone by sorted team order (app.js avatar()), ink initials; unassigned is av-none ---------- */
.avatar{display:inline-grid;place-items:center;flex:none;width:26px;height:26px;border-radius:var(--r-pill);background:var(--av,var(--av-none));color:var(--on-av);font:600 11px/1 var(--font);letter-spacing:.01em;vertical-align:middle;user-select:none}
.avatar[data-unassigned]{background:var(--av-none);color:var(--av-none-text)}

/* ---------- due tones (Day.dueInfo().tone) ---------- */
.tone-danger{color:var(--danger)}
.tone-accent{color:var(--accent-text)}
.tone-muted{color:var(--muted)}
.tone-faint{color:var(--hint)}

/* ---------- motion ("hot metal": transform and opacity, plus the one settle glow) ---------- */
@keyframes fade-in{from{opacity:0}to{opacity:1}}
@keyframes fade-up{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes pop-in{from{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}
@keyframes nav-pop{from{transform:scale(.8)}to{transform:scale(1)}}
@keyframes sheet-in{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:translateY(0)}}
@keyframes toast-in{from{opacity:0;transform:translateY(-16px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes toast-check-pop{from{transform:scale(0)}to{transform:scale(1)}}
@keyframes settle-scale{from{transform:scale(1.02)}to{transform:scale(1)}}
@keyframes settle-glow{from{box-shadow:var(--glow-ember)}to{box-shadow:var(--shadow-card)}}
@keyframes shimmer{from{background-position:-200% 0}to{background-position:200% 0}}
.fade-in{animation:fade-in var(--dur-quick) ease-out both}
.fade-up{animation:fade-up 350ms var(--ease-out-soft) both}
.pop-in{animation:pop-in 240ms var(--ease-spring) both}
.badge-pop{animation:pop-in 260ms var(--ease-spring) both}
.nav-pop{animation:nav-pop 280ms var(--ease-spring) both}
.sheet-in{animation:sheet-in var(--dur-sheet) var(--ease-out-soft) both}
.toast-in{animation:toast-in 320ms var(--ease-out-soft) both} /* an entrance: no overshoot (A6) */
.toast-check{animation:toast-check-pop 400ms var(--ease-out-soft) 100ms both}
.settle{animation:settle-scale 260ms var(--ease-spring),settle-glow 600ms var(--ease-out-soft)}
.skeleton{background:linear-gradient(90deg,var(--raised) 25%,var(--raised-2) 50%,var(--raised) 75%);background-size:200% 100%;border-radius:var(--r-sm);animation:shimmer 1.8s linear infinite}

/* Reduced motion: one contract for the whole app. Decorative entrances, pops, glows and shimmer stop;
   press feedback (scale .97) and spinners stay, because they are information, not decoration. */
@media (prefers-reduced-motion:reduce){
 .fade-in,.fade-up,.pop-in,.badge-pop,.nav-pop,.sheet-in,.toast-in,.toast-check,.settle,.skeleton{animation:none}
 /* html-prefixed so it outranks the equal-specificity transitions declared later in styles.css/workflows.css */
 html :is(.drawer,.scrim,.followup-reminder,.card){animation:none;transition:none}
 html .card:hover{transform:none}
}
