/* ============================================================
   PVT PLN — Private Plane · Cultural Operating System
   Shared design system. Two surfaces from one token set:
   night cabin (default, dark) + daylight cabin (.daylight, light).
   Grounded in the live marketing-launch.css brand tokens, elevated.
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500;600&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;1,9..144,300;1,9..144,400;1,9..144,500&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   TOKENS — night cabin (default)
   ============================================================ */
:root {
  /* Ink (backgrounds) */
  --ink-0: #050a0e;
  --ink-1: #07101a;
  --ink-2: #0c1620;
  --ink-3: #131e2a;
  --ink-4: #1a2632;
  --ink-line: rgba(247, 236, 216, 0.08);
  --ink-line-strong: rgba(247, 236, 216, 0.18);

  /* Cream (text) */
  --cream-100: #f7ecd8;
  --cream-80: rgba(247, 236, 216, 0.78);
  --cream-60: rgba(247, 236, 216, 0.58);
  --cream-40: rgba(247, 236, 216, 0.38);
  --cream-20: rgba(247, 236, 216, 0.18);

  /* Gold (accent) */
  --gold-100: #d4a851;
  --gold-90: #c39645;
  --gold-30: rgba(212, 168, 81, 0.32);
  --gold-15: rgba(212, 168, 81, 0.15);
  --gold-08: rgba(212, 168, 81, 0.08);

  /* Status */
  --teal: #2a6968;
  --green: #7cd6a0;
  --green-15: rgba(124, 214, 160, 0.15);
  --amber: #e6c061;
  --amber-15: rgba(230, 192, 97, 0.15);
  --blue: #6fb5d8;
  --blue-15: rgba(74, 156, 201, 0.10);
  --red-soft: #d97a6a;
  --red-soft-15: rgba(217, 122, 106, 0.15);

  /* Semantic surface aliases (remapped in .daylight) */
  --bg: var(--ink-1);
  --surface-0: var(--ink-0);
  --surface-1: var(--ink-2);
  --surface-2: var(--ink-3);
  --surface-3: var(--ink-4);
  --line: var(--ink-line);
  --line-strong: var(--ink-line-strong);
  --text: var(--cream-100);
  --text-80: var(--cream-80);
  --text-60: var(--cream-60);
  --text-40: var(--cream-40);
  --text-20: var(--cream-20);

  /* Geometry + motion */
  --max: 1360px;
  --gutter: 56px;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --ease: cubic-bezier(.7, 0, .3, 1);
  --ease-out: cubic-bezier(.2, .7, .2, 1);

  --shadow-card: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 30px 60px -20px rgba(0, 0, 0, 0.6);

  /* Fonts */
  --f-display: "Outfit", system-ui, sans-serif;
  --f-serif: "Fraunces", Georgia, serif;
  --f-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ============================================================
   TOKENS — daylight cabin (light, for dense workspace/console)
   "Warm paper, deep ink." Same gold accent, inverted ink/cream.
   ============================================================ */
.daylight {
  /* "Cool Linen · Dimmed" — refined warm light, neutral charcoal text (no brown).
     Dimmed, not glaring; creams nudged very slightly brighter. */
  --ink-0: #f4f1ea;   /* inset / inputs */
  --ink-1: #ebe7de;   /* page */
  --ink-2: #f8f5ee;   /* card */
  --ink-3: #e4dfd4;   /* raised / header strips */
  --ink-4: #d5d0c3;   /* deepest light tier */
  --ink-line: rgba(38, 38, 32, 0.13);
  --ink-line-strong: rgba(38, 38, 32, 0.23);

  --cream-100: #232a2f;   /* primary ink text — neutral charcoal */
  --cream-80: rgba(35, 42, 47, 0.82);
  --cream-60: rgba(35, 42, 47, 0.56);
  --cream-40: rgba(35, 42, 47, 0.40);
  --cream-20: rgba(35, 42, 47, 0.15);

  --gold-100: #9b7322;   /* deeper gold for AA on the linen paper */
  --gold-90: #835f1a;
  --gold-30: rgba(155, 115, 34, 0.30);
  --gold-15: rgba(155, 115, 34, 0.14);
  --gold-08: rgba(155, 115, 34, 0.07);

  --green: #2f8f5b;
  --green-15: rgba(47, 143, 91, 0.14);
  --amber: #b07f1c;
  --amber-15: rgba(176, 127, 28, 0.14);
  --blue: #2f7da3;
  --blue-15: rgba(47, 125, 163, 0.10);
  --red-soft: #c0533f;
  --red-soft-15: rgba(192, 83, 63, 0.12);

  --bg: var(--ink-1);
  --surface-0: var(--ink-0);
  --surface-1: var(--ink-2);
  --surface-2: var(--ink-3);
  --surface-3: var(--ink-4);
  --line: var(--ink-line);
  --line-strong: var(--ink-line-strong);
  --text: var(--cream-100);
  --text-80: var(--cream-80);
  --text-60: var(--cream-60);
  --text-40: var(--cream-40);
  --text-20: var(--cream-20);

  --shadow-card: 0 24px 50px -28px rgba(20, 32, 44, 0.30);
  --shadow-pop: 0 30px 60px -20px rgba(20, 32, 44, 0.28);
}

/* ============================================================
   BASE
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--gold-30); color: var(--text); }

/* ============================================================
   Branded scrollbars — global, both cabins.
   Slim gold pill, inset via transparent border + padding-box clip,
   deepens to full gold on hover. Firefox via scrollbar-color.
   ============================================================ */
* { scrollbar-width: thin; scrollbar-color: var(--gold-30) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gold-30); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-100); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); position: relative; }
@media (max-width: 720px) { :root { --gutter: 22px; } }

/* ============================================================
   TYPE
   ============================================================ */
.mono { font-family: var(--f-mono); }
.serif { font-family: var(--f-serif); font-style: italic; }

.eyebrow { font-family: var(--f-body); font-size: 11px; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; color: var(--text-40); margin: 0; }
.eyebrow-gold { font-family: var(--f-body); font-size: 11px; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold-100); margin: 0; }
.eyebrow .num, .eyebrow-gold .num { font-family: var(--f-mono); }

.display { font-family: var(--f-display); font-weight: 300; line-height: 0.98; letter-spacing: -0.036em; color: var(--text); margin: 0; }
.display em, .section-title em, h1 em, h2 em, h3 em { font-family: var(--f-serif); font-style: italic; font-weight: 400; }
.gold { color: var(--gold-100); }

h2.section-title { font-family: var(--f-display); font-weight: 300; font-size: 56px; line-height: 1.02; letter-spacing: -0.035em; color: var(--text); margin: 0; max-width: 18ch; }
@media (max-width: 720px) { h2.section-title { font-size: 38px; } }

.body-lg { font-size: 17px; line-height: 1.55; color: var(--text-80); margin: 0; max-width: 52ch; }
.body { font-size: 14px; line-height: 1.6; color: var(--text-80); margin: 0; }
.body-sm { font-size: 13px; line-height: 1.55; color: var(--text-60); margin: 0; }

/* ============================================================
   TRUTH LABELS — the canonical honesty vocabulary
   ============================================================ */
.truth-label { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; padding: 5px 10px; border-radius: 4px; border: 1px solid var(--line); background: var(--gold-08); color: var(--text-80); white-space: nowrap; }
.truth-label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--text-40); flex-shrink: 0; }
.truth-label.tl-now      { color: var(--green); border-color: var(--green-15); background: var(--green-15); }
.truth-label.tl-now::before      { background: var(--green); box-shadow: 0 0 8px var(--green); }
.truth-label.tl-soon     { color: var(--text); border-color: var(--text-20); }
.truth-label.tl-soon::before     { background: var(--text-60); }
.truth-label.tl-roadmap  { color: var(--text-60); border-color: var(--text-20); }
.truth-label.tl-roadmap::before  { background: var(--text-40); }
.truth-label.tl-by-request,
.truth-label.tl-reviewed { color: var(--text-80); border-color: var(--text-20); }
.truth-label.tl-by-request::before, .truth-label.tl-reviewed::before { background: var(--text-60); }
.truth-label.tl-apply, .truth-label.tl-preview { color: var(--text); border-color: var(--text-20); }
.truth-label.tl-apply::before    { background: var(--text); }
.truth-label.tl-preview::before  { background: var(--text-80); }
.truth-label.tl-limited, .truth-label.tl-member { color: var(--gold-100); border-color: var(--gold-30); background: var(--gold-08); }
.truth-label.tl-limited::before  { background: var(--gold-100); }
.truth-label.tl-member::before   { background: var(--gold-100); box-shadow: 0 0 8px var(--gold-100); }
.truth-label.tl-legal, .truth-label.tl-rights, .truth-label.tl-release { color: var(--amber); border-color: rgba(230,192,97,0.35); background: var(--amber-15); }
.truth-label.tl-legal::before, .truth-label.tl-rights::before, .truth-label.tl-release::before { background: var(--amber); }
.truth-label.tl-enterprise { color: var(--blue); border-color: rgba(111,181,216,0.35); background: var(--blue-15); }
.truth-label.tl-enterprise::before { background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.truth-label-row { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ============================================================
   BUTTONS
   ============================================================ */
.cta { display: inline-flex; align-items: center; gap: 12px; padding: 13px 22px; border-radius: 999px; font-family: var(--f-body); font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; transition: all .25s var(--ease); border: 1px solid transparent; white-space: nowrap; }
.cta-primary { background: var(--gold-100); color: #050a0e; border-color: var(--gold-100); }
.cta-primary:hover { background: var(--gold-90); transform: translateY(-1px); }
.cta-ghost { background: transparent; color: var(--text); border-color: var(--text-20); }
.cta-ghost:hover { border-color: var(--text-80); }
.cta-light { background: transparent; color: var(--cream-100); border-color: var(--cream-40); }
.cta-light:hover { background: var(--cream-20); border-color: var(--cream-100); color: var(--cream-100); }
.cta-text { background: transparent; color: var(--text-60); border-color: transparent; padding: 13px 6px; }
.cta-text:hover { color: var(--gold-100); }
.cta .arrow { font-family: var(--f-display); font-weight: 300; transition: transform .25s var(--ease); }
.cta:hover .arrow { transform: translateX(3px); }
.cta-sm { padding: 9px 15px; font-size: 11px; }

/* Plain control buttons (workspace) */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-1); color: var(--text); font-family: var(--f-body); font-size: 13px; font-weight: 500; transition: all .15s ease; }
.btn:hover { border-color: var(--gold-30); }
.btn-gold { background: var(--gold-100); color: #050a0e; border-color: var(--gold-100); font-weight: 600; }
.btn-gold:hover { background: var(--gold-90); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 10px; font-size: 12px; }

/* ============================================================
   CARDS / SURFACES
   ============================================================ */
.card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 28px; }
.hairline { height: 1px; background: var(--line); border: none; margin: 0; }
.rule-gold { height: 1px; background: linear-gradient(90deg, var(--gold-100), transparent); border: none; }

/* Numbered section eyebrow helper */
.sec-eyebrow { display: inline-flex; align-items: baseline; gap: 10px; }
.sec-eyebrow .n { font-family: var(--f-mono); color: var(--gold-100); }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-40); }
.input, .select, .textarea {
  background: var(--surface-0); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 11px 14px; color: var(--text); font-family: var(--f-body); font-size: 14px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease; width: 100%;
}
.daylight .input, .daylight .select, .daylight .textarea { background: var(--ink-0); }
.input::placeholder, .textarea::placeholder { color: var(--text-40); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold-30); box-shadow: 0 0 0 3px var(--gold-08); }

/* Segmented control */
.segctrl { display: inline-flex; gap: 3px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.segctrl button { background: transparent; border: none; padding: 6px 13px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-60); border-radius: 5px; transition: all .15s ease; }
.segctrl button.on { background: var(--surface-0); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.daylight .segctrl button.on { background: var(--ink-0); }

/* Toggle */
.toggle { width: 38px; height: 21px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong); position: relative; transition: all .2s ease; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--text-60); transition: all .2s var(--ease); }
.toggle.on { background: var(--gold-15); border-color: var(--gold-30); }
.toggle.on::after { left: 19px; background: var(--gold-100); }

/* ============================================================
   CHIPS / BADGES / AVATARS
   ============================================================ */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--text-80); }
.chip.on { background: var(--gold-15); border-color: var(--gold-30); color: var(--gold-100); }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-size: 13px; font-weight: 500; color: var(--cream-100); background: linear-gradient(135deg, #2a3a4a, #1a2632); border: 1px solid var(--ink-line-strong); flex-shrink: 0; }
.avatar.gold { background: linear-gradient(135deg, var(--gold-100), var(--gold-90)); color: #050a0e; border: none; }
.avatar.teal { background: linear-gradient(135deg, #2a6968, #1f4d4c); color: #f7ecd8; border: none; }
.avatar.warm { background: linear-gradient(135deg, #6e4737, #4a2f25); color: #f7ecd8; border: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }

/* Pulse dot */
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-100); box-shadow: 0 0 12px var(--gold-100); animation: pulse 2.6s ease-in-out infinite; }
.pulse-dot.green { background: var(--green); box-shadow: 0 0 12px var(--green); }
@keyframes pulse { 50% { box-shadow: 0 0 20px currentColor; transform: scale(1.18); } }

/* ============================================================
   DATA TABLE (workspace-grade)
   ============================================================ */
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtable thead th { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-40); text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); font-weight: 400; white-space: nowrap; }
.dtable tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--text-80); vertical-align: middle; }
.dtable tbody tr { transition: background .12s ease; }
.dtable tbody tr:hover { background: var(--gold-08); }
.dtable tbody tr:last-child td { border-bottom: none; }
.dtable .t-name { color: var(--text); font-weight: 500; }
.dtable .num { font-family: var(--f-mono); }

/* Status pills */
.spill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; }
.spill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.spill.live { background: var(--green-15); color: var(--green); }
.spill.draft { background: var(--gold-08); color: var(--text-60); }
.spill.review { background: var(--amber-15); color: var(--amber); }
.spill.risk { background: var(--red-soft-15); color: var(--red-soft); }
.spill.confirmed { background: var(--gold-15); color: var(--gold-100); }

/* ============================================================
   STAT TILES + SPARK + KPI
   ============================================================ */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.stat { background: var(--surface-2); padding: 16px 18px; }
.stat .s-lbl { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-40); }
.stat .s-val { font-family: var(--f-display); font-weight: 300; font-size: 30px; color: var(--text); letter-spacing: -0.02em; margin-top: 6px; line-height: 1; }
.stat .s-val em { font-family: var(--f-serif); font-style: italic; color: var(--gold-100); }
.stat .s-foot { font-family: var(--f-mono); font-size: 10px; color: var(--text-60); margin-top: 6px; }
.delta { font-family: var(--f-mono); font-size: 11px; font-weight: 500; color: var(--gold-100); }
.delta.up { color: var(--green); }
.delta.down { color: var(--red-soft); }

/* ============================================================
   APP CHROME (nav rails, top bars) — used by workspace + dashboards
   ============================================================ */
.brand-mark { display: inline-flex; align-items: center; gap: 11px; }
.brand-ring { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.brand-ring img { width: 100%; height: 100%; object-fit: contain; }

/* Real PP emblem: emblem-dark.png is the black monogram. Invert it to white on
   dark surfaces; leave it black on the daylight cabin. Single source of truth. */
.emblem { filter: brightness(0) invert(1); }
.daylight .emblem { filter: none; }
.wordmark-img { height: 18px; width: auto; filter: brightness(0) invert(1); }
.daylight .wordmark-img { filter: none; }
.brand-name { font-family: var(--f-display); font-weight: 400; font-size: 14px; letter-spacing: 0.26em; text-transform: uppercase; }
.brand-sub { font-family: var(--f-mono); font-size: 8.5px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--text-40); }

/* Command-palette kbd */
.kbd { font-family: var(--f-mono); font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--surface-0); border: 1px solid var(--line); color: var(--text-60); }

/* ============================================================
   PHOTO PLACEHOLDER (editorial imagery slots)
   ============================================================ */
.photo { position: relative; overflow: hidden; background:
    radial-gradient(120% 90% at 20% 10%, rgba(212,168,81,0.18), transparent 55%),
    linear-gradient(145deg, #1a2632, #07101a 70%);
  display: grid; place-items: center; }
.photo::after { content: attr(data-label); font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--cream-40); }
.photo.warm { background: radial-gradient(120% 90% at 80% 10%, rgba(212,168,81,0.22), transparent 55%), linear-gradient(145deg, #3a2a1f, #1a1009 70%); }
.photo.teal { background: radial-gradient(120% 90% at 30% 20%, rgba(42,105,104,0.4), transparent 55%), linear-gradient(145deg, #133230, #07151a 70%); }

/* ============================================================
   OUTCLASS ANNOTATION — "beats X by Y" plates
   ============================================================ */
.outclass { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; border: 1px dashed var(--gold-30); background: var(--gold-08); font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--gold-100); }
.outclass b { color: var(--text); font-weight: 600; }
.outclass::before { content: "↗"; font-family: var(--f-display); }

/* ============================================================
   UTILITIES
   ============================================================ */
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; }
.center { display: flex; align-items: center; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; }
.wrap-flex { flex-wrap: wrap; }
.muted { color: var(--text-60); }
.t-mono { font-family: var(--f-mono); }
.fade-up { opacity: 0; transform: translateY(18px); animation: fadeUp .7s var(--ease-out) forwards; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } .fade-up { opacity: 1; transform: none; } }
.hide-mobile { } @media (max-width: 760px) { .hide-mobile { display: none !important; } }

/* ============================================================
   OPERATING-SYSTEM LAYER — the dashboard/console language.
   Structural UX adapted from a best-in-class festival console,
   re-rendered entirely in PVT PLN tokens. Future-forward,
   editorial, restrained. The parent of anything built on it.
   ============================================================ */

/* Ambient backdrop — gold + teal aurora over ink, with a faint grid.
   Reads as a luxury OS, not a flat SaaS panel. */
.os-ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.os-ambient::before { content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 520px at 16% -6%, rgba(212,168,81,0.10), transparent 60%),
    radial-gradient(760px 460px at 92% 8%, rgba(42,105,104,0.12), transparent 62%),
    radial-gradient(680px 520px at 70% 108%, rgba(212,168,81,0.06), transparent 60%); }
.os-ambient::after { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(var(--ink-line) 1px, transparent 1px), linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%); }
.daylight .os-ambient::before {
  background:
    radial-gradient(900px 520px at 16% -6%, rgba(156,108,31,0.12), transparent 60%),
    radial-gradient(760px 460px at 92% 8%, rgba(42,105,104,0.10), transparent 62%); }

/* Glyph chip — small rounded accent-tinted icon holder */
.glyph { width: 34px; height: 34px; border-radius: 10px; background: var(--gold-15); color: var(--gold-100); display: grid; place-items: center; flex-shrink: 0; }
.glyph svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.glyph.teal { background: rgba(42,105,104,0.18); color: var(--teal); }
.daylight .glyph.teal { color: #2a6968; }
.glyph.green { background: var(--green-15); color: var(--green); }
.glyph.amber { background: var(--amber-15); color: var(--amber); }

/* KPI card — big editorial number, delta, corner glyph */
.kpi { position: relative; background: var(--surface-1); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 16px; overflow: hidden; min-height: 120px; display: flex; flex-direction: column; }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--gold-100), transparent); opacity: .5; }
.kpi .k-lbl { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-40); }
.kpi .k-num { font-family: var(--f-display); font-weight: 200; font-size: 38px; line-height: 1; letter-spacing: -0.03em; color: var(--text); margin-top: 12px; }
.kpi .k-num em { font-family: var(--f-serif); font-style: italic; font-weight: 300; color: var(--gold-100); }
.kpi .k-num .unit { font-size: 15px; color: var(--text-40); letter-spacing: 0; }
.kpi .k-foot { font-family: var(--f-mono); font-size: 10px; color: var(--text-60); margin-top: auto; padding-top: 12px; }
.kpi .k-glyph { position: absolute; right: 16px; top: 16px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; }

/* Cockpit hero — the command-home headline panel */
.cockpit { position: relative; border-radius: 20px; padding: 30px 32px; overflow: hidden;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-1) 70%);
  border: 1px solid var(--line); }
.cockpit::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 140% at 100% 0%, var(--gold-08), transparent 55%); }
.cockpit > * { position: relative; }
.cockpit .ck-eyebrow { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-100); }
.cockpit .ck-title { font-family: var(--f-display); font-weight: 200; font-size: clamp(30px, 3.4vw, 46px); line-height: 1; letter-spacing: -0.035em; margin: 14px 0 0; max-width: 18ch; }
.cockpit .ck-title em { font-family: var(--f-serif); font-style: italic; font-weight: 300; color: var(--gold-100); }
.cockpit .ck-intro { font-size: 14.5px; line-height: 1.55; color: var(--text-80); max-width: 56ch; margin: 16px 0 0; }
.cockpit .ck-row { display: flex; align-items: center; gap: 14px; margin-top: 24px; flex-wrap: wrap; }

/* Countdown (cockpit) */
.countdown { display: flex; gap: 18px; }
.cd-unit { text-align: center; }
.cd-unit b { font-family: var(--f-display); font-weight: 300; font-size: 36px; letter-spacing: -0.03em; display: block; line-height: 1; color: var(--text); }
.cd-unit span { font-family: var(--f-mono); font-size: 8.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-40); margin-top: 7px; display: block; }
.cockpit-punch { width: 56px; height: 56px; border-radius: 50%; background: var(--gold-100); color: #050a0e; display: grid; place-items: center; border: none; flex-shrink: 0;
  box-shadow: 0 12px 34px -8px var(--gold-30); transition: transform .2s var(--ease); }
.cockpit-punch:hover { transform: scale(1.06); }
.cockpit-punch svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; }

/* Journey / handoff stepper */
.journey { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.j-step { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.j-step .j-idx { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em; color: var(--text-40); }
.j-step .j-lbl { font-family: var(--f-display); font-weight: 500; font-size: 13.5px; line-height: 1.05; }
.j-step .j-desc { font-size: 10.5px; color: var(--text-60); line-height: 1.35; }
.j-step.done { opacity: .62; }
.j-step.done .j-idx { color: var(--gold-100); }
.j-step.current { border-color: var(--gold-30); background: linear-gradient(180deg, var(--gold-15), transparent); }
.j-step.current .j-idx { color: var(--gold-100); }
@media (max-width: 980px){ .journey { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3,1fr); } }

/* Tile with corner arrow (module launcher) */
.tile { position: relative; background: var(--surface-1); border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-height: 150px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: transform .2s var(--ease), border-color .2s; }
.tile:hover { transform: translateY(-3px); border-color: var(--gold-30); }
.tile .t-name { font-family: var(--f-display); font-weight: 500; font-size: 17px; letter-spacing: -0.01em; }
.tile .t-desc { font-size: 12.5px; color: var(--text-60); line-height: 1.45; margin-top: auto; max-width: 92%; }
.tile .t-arr { position: absolute; right: 16px; bottom: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; color: var(--text-60); transition: all .2s; }
.tile:hover .t-arr { background: var(--gold-100); color: #050a0e; }

/* ============================================================
   NAVIGATION — tabs (underline + pill), side rail, top bar
   Documented from the live workspace chrome. Token-driven so
   both cabins inherit. Reuse across dashboards + console.
   ============================================================ */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs .tab { padding: 11px 16px; font-family: var(--f-body); font-size: 13px; font-weight: 500; color: var(--text-60); background: transparent; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s ease, border-color .15s ease; }
.tabs .tab:hover { color: var(--text); }
.tabs .tab.on { color: var(--text); border-bottom-color: var(--gold-100); }
.tabs .tab .ct { font-family: var(--f-mono); font-size: 10px; color: var(--text-40); margin-left: 7px; }
.tabs .tab.on .ct { color: var(--gold-100); }

.tabs-pill { display: inline-flex; gap: 3px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.tabs-pill .tab { padding: 7px 16px; border: none; border-radius: 999px; font-family: var(--f-body); font-size: 12px; font-weight: 500; color: var(--text-60); background: transparent; transition: all .15s ease; }
.tabs-pill .tab.on { background: var(--surface-0); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.daylight .tabs-pill .tab.on { background: var(--ink-0); }

/* Side nav rail (dashboard/console) */
.rail { width: 210px; background: var(--surface-1); border-right: 1px solid var(--line); padding: 16px 13px; display: flex; flex-direction: column; }
.rail-grp { font-family: var(--f-mono); font-size: 8.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-40); padding: 14px 11px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--text-60); transition: background .15s, color .15s; cursor: pointer; }
.nav-item:hover { background: var(--gold-08); color: var(--text); }
.nav-item .ni-ic { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; }
.nav-item .ni-ic svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.7; fill: none; }
.nav-item.active { background: var(--gold-15); color: var(--gold-100); }
.nav-item.active .ni-ic { opacity: 1; }
.nav-item .ni-badge { margin-left: auto; font-family: var(--f-mono); font-size: 9px; padding: 1px 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-60); }

/* Top bar */
.topbar-app { height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--surface-1); }

/* ============================================================
   COMMAND PALETTE (⌘K)
   ============================================================ */
.cmdk { background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); width: 100%; max-width: 480px; overflow: hidden; }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cmdk-input svg { width: 17px; height: 17px; stroke: var(--text-40); stroke-width: 1.8; fill: none; flex-shrink: 0; }
.cmdk-input input { background: transparent; border: none; outline: none; color: var(--text); font-family: var(--f-body); font-size: 15px; flex: 1; }
.cmdk-input input::placeholder { color: var(--text-40); }
.cmdk-grp { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-40); padding: 13px 18px 5px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; font-size: 13.5px; color: var(--text-80); cursor: pointer; }
.cmdk-item .ck-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-60); flex-shrink: 0; }
.cmdk-item .ck-ic svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.7; fill: none; }
.cmdk-item.on { background: var(--gold-08); color: var(--text); }
.cmdk-item.on .ck-ic { background: var(--gold-15); color: var(--gold-100); }
.cmdk-item .ck-kind { margin-left: auto; font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-40); }

/* ============================================================
   MODAL + DRAWER shells
   ============================================================ */
.scrim { position: absolute; inset: 0; background: rgba(5,10,14,0.6); backdrop-filter: blur(3px); }
.daylight .scrim { background: rgba(35,42,47,0.32); }
.modal-card { background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); width: 100%; max-width: 440px; overflow: hidden; }
.modal-card .m-head, .drawer .m-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-card .m-head h4, .drawer .m-head h4 { font-family: var(--f-display); font-weight: 500; font-size: 17px; margin: 0; letter-spacing: -0.01em; }
.modal-card .m-body, .drawer .m-body { padding: 22px; }
.modal-card .m-foot, .drawer .m-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); }
.drawer { background: var(--surface-1); border-left: 1px solid var(--line-strong); box-shadow: var(--shadow-pop); width: 380px; height: 100%; display: flex; flex-direction: column; }
.x-btn { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--text-60); border: 1px solid var(--line); background: transparent; transition: all .15s; }
.x-btn:hover { border-color: var(--gold-30); color: var(--text); }

/* ============================================================
   TOASTS
   ============================================================ */
.toast-stack { display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--surface-1); border: 1px solid var(--line-strong); box-shadow: var(--shadow-card); max-width: 380px; }
.toast .t-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; font-size: 14px; }
.toast.ok .t-ic { background: var(--green-15); color: var(--green); }
.toast.warn .t-ic { background: var(--amber-15); color: var(--amber); }
.toast.err .t-ic { background: var(--red-soft-15); color: var(--red-soft); }
.toast.info .t-ic { background: var(--gold-15); color: var(--gold-100); }
.toast .t-title { font-weight: 600; font-size: 13.5px; color: var(--text); }
.toast .t-msg { font-size: 12.5px; color: var(--text-60); margin-top: 2px; line-height: 1.4; }

/* ============================================================
   CHARTS / SPARKLINES — hand-built SVG/CSS, no third-party leak.
   Wrap any live chart in a pp-chart element; never expose lib classes.
   ============================================================ */
pp-chart { display: block; position: relative; }
.spark { display: block; width: 100%; height: 44px; overflow: visible; }
.spark .ln { fill: none; stroke: var(--gold-100); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark .ar { stroke: none; opacity: .18; }
.spark .dot { fill: var(--gold-100); }
.barmini { display: flex; align-items: flex-end; gap: 5px; height: 64px; }
.barmini i { flex: 1; background: var(--gold-30); border-radius: 3px 3px 0 0; min-width: 4px; transition: background .2s; }
.barmini i.hi { background: var(--gold-100); }
.ring { position: relative; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold-100) calc(var(--p,70) * 1%), var(--surface-3) 0); }
.ring::before { content: ""; position: absolute; width: 54px; height: 54px; border-radius: 50%; background: var(--surface-1); }
.ring b { position: relative; font-family: var(--f-mono); font-size: 14px; color: var(--text); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-60); }
.legend span::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--gold-100); }
.legend span.teal::before { background: var(--teal); }
.legend span.green::before { background: var(--green); }

/* ============================================================
   PROFILE / OBJECT CARD — the reusable artist/person/object row
   ============================================================ */
.obj-card { display: flex; gap: 14px; align-items: center; padding: 15px 16px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s; }
.obj-card:hover { border-color: var(--gold-30); }
.obj-card .oc-meta { min-width: 0; flex: 1; }
.obj-card .oc-meta b { font-family: var(--f-display); font-weight: 500; font-size: 15px; display: block; letter-spacing: -0.01em; }
.obj-card .oc-meta .oc-sub { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-40); margin-top: 3px; display: block; }

/* ============================================================
   EMPTY / LOADING / ERROR STATES
   ============================================================ */
.state { text-align: center; padding: 44px 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.state .s-ic { width: 46px; height: 46px; margin: 0 auto 16px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-40); }
.state .s-ic svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.state.err .s-ic { background: var(--red-soft-15); color: var(--red-soft); }
.state h4 { font-family: var(--f-display); font-weight: 500; font-size: 18px; margin: 0 0 7px; letter-spacing: -0.01em; }
.state p { font-size: 13px; color: var(--text-60); margin: 0 auto 18px; max-width: 38ch; line-height: 1.5; }
.state .s-cta { display: flex; gap: 10px; justify-content: center; }

/* Skeleton loaders */
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.5s ease infinite; border-radius: 6px; }
.skel.line { height: 12px; }
.skel.circle { border-radius: 50%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ============================================================
   SPACING SCALE reference (4px base) — utility paddings/stacks
   ============================================================ */
.stack > * + * { margin-top: var(--stack-gap, 16px); }
.swatch-token { width: 100%; height: 40px; border-radius: var(--radius-sm); background: var(--gold-15); border: 1px solid var(--gold-30); }
