/* Lucid Phase 1 foundations are supplied by assets/lucid.css. */
/* ============================================================
   TYPE · Semantic scale  (web · 1.25 ratio)
   Apply via class OR copy the values onto your element.
   ============================================================ */
.t-display-xl { font-family: var(--f-display); font-size: 96px; font-weight: 500; line-height: 0.92; letter-spacing: -0.042em; }
.t-display-l  { font-family: var(--f-display); font-size: 64px; font-weight: 500; line-height: 0.95; letter-spacing: -0.035em; }
.t-display-m  { font-family: var(--f-display); font-size: 44px; font-weight: 500; line-height: 1.00; letter-spacing: -0.03em;  }
.t-headline   { font-family: var(--f-display); font-size: 28px; font-weight: 500; line-height: 1.10; letter-spacing: -0.025em; }
.t-title      { font-family: var(--f-display); font-size: 20px; font-weight: 500; line-height: 1.20; letter-spacing: -0.018em; }
.t-body       { font-family: var(--f-body);    font-size: 15px; font-weight: 400; line-height: 1.50; letter-spacing: 0;        }
.t-caption    { font-family: var(--f-body);    font-size: 12px; font-weight: 500; line-height: 1.40; letter-spacing: 0;        }

/* Voice — pull-quotes and manifesto moments. Same family as everything else;
   the voice comes from scale and color, not from a different font. */
.t-voice-xl   { font-family: var(--f-display); font-size: 96px; font-weight: 500; line-height: 1.02; letter-spacing: -0.028em; }
.t-voice      { font-family: var(--f-display); font-size: 32px; font-weight: 500; line-height: 1.20; letter-spacing: -0.018em; }
.t-voice-s    { font-family: var(--f-display); font-size: 22px; font-weight: 500; line-height: 1.35; letter-spacing: -0.012em; }

/* Labels in caps — Inter Tight, tracked. (No mono.) */
.t-mono-label { font-family: var(--f-display); font-size: 11px; font-weight: 500; line-height: 1.40; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* Data — numbers only. Tabular always on. */
.t-mono-data  { font-family: var(--f-mono);    font-size: 14px; font-weight: 500; line-height: 1.30; letter-spacing: -0.005em; font-variant-numeric: tabular-nums; }

/* Headline accent (replaces the old one-italic-word). Same family, colored. */
.t-accent {
  color: var(--accent);
  letter-spacing: inherit;
}

/* ============================================================
   SPACING & RADII  (no rounded corners by default — the brand is sharp)
   ============================================================ */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --radius-0: 0;        /* default · everything sharp */
  --radius-pill: 999px; /* pulse dots, status dots, toggles only */

  --hair: 1px;          /* hairline · the unit of the system */
  --rule-style: solid;

  /* Cubic-out / linear only · no bounces */
  --ease: cubic-bezier(0.16, 1, 0.30, 1);
  --dur-1: 120ms;
  --dur-2: 240ms;
  --dur-3: 320ms;  /* the seam-draw duration */
}

/* ============================================================
   GLOBAL BASELINE
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "ss02";
  transition: background-color var(--dur-2) ease, color var(--dur-2) ease;
}

/* Tabular numerals everywhere numbers matter */
.num, .t-mono-data { font-variant-numeric: tabular-nums; }

/* Belt-and-braces: nothing in the system uses italic. */
em, i { font-style: normal; }


/* ===================== */

/* ============================================================
   Yoshi motion vocabulary

   Five named motions. Linear or cubic-out only.
   Nothing bounces. Nothing overshoots.
   Import into any HTML alongside colors_and_type.css.
   ============================================================ */

/* 01 · The seam draws — the hairline crosses left→right at approval. */
@keyframes yo-seam-draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.yo-seam-draw {
  display: block;
  height: 1px;
  background: var(--accent);
  transform-origin: left center;
  animation: yo-seam-draw var(--dur-3, 320ms) linear forwards;
}
.yo-seam-draw[data-loop="1"] {
  animation: yo-seam-draw 1.8s linear infinite;
}

/* 02 · Pulse — the LIVE dot, the active automation, the pending row. */
@keyframes yo-pulse {
  0%, 100% { transform: scale(1);    opacity: 1;    box-shadow: 0 0 0 0 var(--accent); }
  50%      { transform: scale(1.18); opacity: 0.7;  box-shadow: 0 0 0 5px rgba(0,0,0,0); }
}
.yo-pulse { animation: yo-pulse 2.4s ease-in-out infinite; border-radius: 999px; }

/* 03 · Numbers tick — character-level fade, never odometer-spin. */
@keyframes yo-tick {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}
.yo-tick { display: inline-block; animation: yo-tick 280ms cubic-bezier(0.16, 1, 0.30, 1); }

/* 04 · Enter-from-below — for briefs, cards, suggested prompts. */
@keyframes yo-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.yo-enter { animation: yo-enter 400ms cubic-bezier(0.16, 1, 0.30, 1) both; }
.yo-enter[data-delay="1"] { animation-delay: 80ms;  }
.yo-enter[data-delay="2"] { animation-delay: 160ms; }
.yo-enter[data-delay="3"] { animation-delay: 240ms; }
.yo-enter[data-delay="4"] { animation-delay: 320ms; }
.yo-enter[data-delay="5"] { animation-delay: 400ms; }
.yo-enter[data-delay="6"] { animation-delay: 480ms; }
.yo-enter[data-delay="7"] { animation-delay: 560ms; }
.yo-enter[data-delay="8"] { animation-delay: 640ms; }

/* 05 · Focus opens — the propose→execute overlay. */
@keyframes yo-focus-backdrop {
  from { opacity: 0; backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); }
  to   { opacity: 1; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
}
@keyframes yo-focus-card {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
.yo-focus-backdrop { animation: yo-focus-backdrop 240ms cubic-bezier(0.16, 1, 0.30, 1) both; }
.yo-focus-card     { animation: yo-focus-card     320ms cubic-bezier(0.16, 1, 0.30, 1) both; }

/* 06 · Checkpoint fade-in — used in onboarding building step. */
@keyframes yo-checkpoint {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0);    }
}
.yo-checkpoint { animation: yo-checkpoint 320ms cubic-bezier(0.16, 1, 0.30, 1) both; }

/* 07 · Marquee — the Bloomberg-style ticker. */
@keyframes yo-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.yo-marquee-track {
  display: flex; align-items: center; width: max-content;
  animation: yo-marquee 90s linear infinite;
  will-change: transform;
}
.yo-marquee-track:hover { animation-play-state: paused; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .yo-seam-draw, .yo-pulse, .yo-tick, .yo-enter, .yo-focus-backdrop, .yo-focus-card, .yo-checkpoint, .yo-marquee-track {
    animation: none !important;
  }
}


/* ===================== */


  html, body {
    margin: 0; padding: 0; height: 100%;
    background: #0a0a08;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  #stage {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: #ffffff;
  }
  /* The device frame is sized in px; #scaler transform-scales it to fit. */
  #scaler { transform-origin: center center; }

  .bezel {
    width: 390px; height: 844px;
    background: #070705;
    border: 11px solid #1b1b18;
    border-radius: 56px;
    box-shadow:
      0 8px 60px -12px rgba(0,0,0,0.7),
      0 0 0 2px #2a2a26,
      inset 0 0 0 1.5px #000;
    position: relative;
    overflow: hidden;
  }
  /* The screen: data-palette lives here so theme swaps everything inside. */
  .screen {
    position: absolute; inset: 0;
    background: var(--bg);
    color: var(--ink);
    border-radius: 45px;
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: background-color 280ms ease, color 280ms ease;
  }
  .screen * { box-sizing: border-box; }

  /* Dynamic Island */
  .island {
    position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
    width: 116px; height: 32px; background: #000; border-radius: 20px; z-index: 200;
    pointer-events: none;
  }

  /* status bar */
  .statusbar {
    flex: none; height: 50px;
    padding: 16px 30px 0;
    display: flex; align-items: flex-start; justify-content: space-between;
    font-family: var(--f-display); font-size: 14px; font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
    z-index: 50;
  }
  .statusbar .sb-right { display: flex; gap: 6px; align-items: center; }

  /* scroll regions */
  .scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
  .scroll::-webkit-scrollbar { width: 0; height: 0; }

  /* inner, height-locked lists (recent activity / automations) — scroll within
     a fixed window so the section header stays put. Thin scrollbar hints more. */
  .vlist { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .vlist::-webkit-scrollbar { width: 3px; }
  .vlist::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 999px; }
  .vlist::-webkit-scrollbar-track { background: transparent; }
  /* horizontal carousel — hide scrollbar */
  .hcar { -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .hcar::-webkit-scrollbar { display: none; }

  /* tab bar */
  .tabbar {
    flex: none;
    border-top: 1px solid var(--rule);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    padding: 9px 8px 26px;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
    z-index: 200;
  }
  .tab {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 4px 0 0; cursor: pointer; position: relative;
    background: none; border: none; -webkit-tap-highlight-color: transparent;
  }
  .tab .tlabel {
    font-family: var(--f-display); font-size: 9px; letter-spacing: 0.05em;
    font-weight: 500; text-transform: uppercase;
  }

  /* view stack: pushed views slide in from the right */
  .viewport { position: relative; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }

  @keyframes push-in   { from { transform: translateX(32px); }   to { transform: translateX(0); } }
  @keyframes push-out  { from { transform: translateX(0); }      to { transform: translateX(-22%); opacity: 0.6; } }
  @keyframes sheet-in  { from { transform: translateY(26px); }    to { transform: translateY(0); } }
  @keyframes scrim-in  { from { opacity: 0; }                    to { opacity: 1; } }
  @keyframes fade-swap { from { opacity: 0; }                    to { opacity: 1; } }
  @keyframes count-up  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes ring-out  { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(2.4); opacity: 0; } }
  @keyframes check-draw { to { stroke-dashoffset: 0; } }

  .push-enter { animation: push-in 320ms cubic-bezier(0.16,1,0.30,1) both; }
  .tab-swap   { animation: fade-swap 260ms ease both; }

  /* generic pressable */
  .press { transition: transform 120ms var(--ease), background-color 160ms ease, border-color 160ms ease, opacity 160ms ease; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .press:active { transform: translateY(0.5px); opacity: 0.9; }

  /* hide number spinners */
  input { font-family: inherit; }
  button { font-family: inherit; color: inherit; }

  /* Semantic P/L colors — sage gains / terracotta losses, harmonious with
     the brand. Amber/sage --accent stays reserved for agent + approval signal. */
  :root, [data-palette="bone"] { --accent-pos: #4a6b3f; --signal-neg: #a8503a; --signal-danger: #962f24; --hold-accent: #4a6b3f; }


  /* Allocation category colors — three clearly distinct hues per palette
     (blue / green / warm), tuned for contrast on each background. */
  :root, [data-palette="bone"] { --alloc-cash: #5b7a99; --alloc-invest: #4a6b3f; --alloc-crypto: #b06a3c; }


  /* Override the design-system entrance keyframes to be TRANSFORM-ONLY.
     Rationale: opacity-from-0 + fill:both strands content invisible if the
     animation clock is paused (backgrounded tab). Transform-only means the
     slide is pure enhancement — content is always visible. */
  @keyframes yo-enter      { from { transform: translateY(9px); }  to { transform: translateY(0); } }
  @keyframes yo-checkpoint { from { transform: translateX(-5px); } to { transform: translateX(0); } }
  @keyframes count-up      { from { transform: translateY(7px); }  to { transform: translateY(0); } }
  /* tab content swap: transform-only so the active tab is never stranded
     invisible if the page loads in a backgrounded (clock-paused) tab. */
  @keyframes fade-swap     { from { transform: translateY(5px); }  to { transform: translateY(0); } }

  /* marker invitation pulse — opacity only (safe when the clock is paused). */
  @keyframes yo-mk-pulse { 0%, 100% { opacity: 0.18; } 50% { opacity: 0.6; } }
  .yo-mk-pulse { animation: yo-mk-pulse 2.1s ease-in-out infinite; }
  /* blinking text caret for the amount entry field */
  @keyframes yo-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
  .yo-caret { animation: yo-blink 1.06s steps(1, end) infinite; }

  /* live balance tick — a subtle char-fade on each discrete substitution. */
  @keyframes yo-tickfade { from { opacity: 0.5; } to { opacity: 1; } }

  /* Soft corners only on inputs and small controls that opt in explicitly
     (buttons, segmented controls, tiles, chat bubbles carry their own radius).
     Big bordered boxes — proposal/agent cards — stay square per the brand. */
  #root input { border-radius: 10px; }

  /* Account section cards: inner rows divide with hairlines; last row drops
     its border so it sits flush inside the rounded card. */
  .acct-card > *:last-child { border-bottom: none !important; }

  /* tunable range slider (automation caps) */
  .yo-range { -webkit-appearance: none; appearance: none; width: 100%; height: 3px; background: var(--rule-2); border-radius: 999px; outline: none; padding: 0; }
  .yo-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 999px; background: var(--accent); cursor: pointer; border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); }
  .yo-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 999px; background: var(--accent); cursor: pointer; border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); }
  .yo-range:disabled { opacity: 0.4; }
  .yo-range:disabled::-webkit-slider-thumb { background: var(--ink-3); box-shadow: 0 0 0 1px var(--ink-3); cursor: default; }
