/* ============================================================
   PINTEAN OS — shell styles  v1
   Board (100svh) · header · drawer · rails · stage · status bar
   Loaded only on index.html.
   ============================================================ */

/* ---- Per-tool story: only the active app's story shows below the board ---- */
.os-story { display: none; }
.os-story.story-active { display: block; }

/* ---- Board frame ---- */
.os-board {
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
  z-index: 2;
}

/* ---- Header (slim, 56px) — 3-column grid: logo | centered tool dropdown | lang/about ---- */
.os-header {
  flex: 0 0 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 70;
  background: var(--bg);
}
.os-header .logo-img { height: 24px; }
/* gold hairline breathing under the header */
.os-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 8%, var(--gold-border) 50%, transparent 92%);
  opacity: 0.7;
  pointer-events: none;
}
.os-header-left { justify-self: start; display: flex; align-items: center; gap: 14px; min-width: 0; }
.os-header-center { justify-self: center; }

/* ---- "Choose tool" dropdown ----
   Moved to style.css (shared) so About/Blog/Contact's page-picker
   can reuse the exact same component instead of a lookalike copy. See
   style.css's ".td dropdown component" section. */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.os-header-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}
/* responsive.css hides the generic .lang-toggle and .page-nav below
   1100px for the marketing-page hamburger nav — the OS-board has no
   hamburger fallback, so its own RO/EN switch and page-picker need to
   stay visible there, hence the extra .os-header-right specificity. */
.os-header-right .lang-toggle { display: flex; }
.os-header-right .page-nav { display: block; }
.os-lang .lang-btn { font-size: 0.62rem; padding: 5px 8px; }
/* ---- Board body: stage only, centered — tool switching lives in the
   header's "Alege tool" dropdown ---- */
.os-main {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
  min-height: 0;
  /* ambient depth — the signature dual glow, very faint */
  background:
    radial-gradient(ellipse 640px 420px at 76% 12%, rgba(201, 168, 76, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 560px 400px at 16% 92%, rgba(61, 142, 240, 0.04) 0%, transparent 70%);
}

/* Center stage — no side rails anymore, so cap width and center it
   instead of letting content stretch edge to edge */
.os-stage {
  width: 100%;
  max-width: 760px;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 26px 26px;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-2) transparent;
}
.os-stage::-webkit-scrollbar { width: 8px; }
.os-stage::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 4px; }
.os-stage::-webkit-scrollbar-track { background: transparent; }
.os-stage-tag {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-left: 14px;
  border-left: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.os-app {
  display: none;
  flex: 1;
  position: relative;
  background: linear-gradient(180deg, rgba(24, 33, 58, 0.55) 0%, var(--surface) 140px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  min-height: 0;
  overflow: hidden;
}
/* gradient hairline across the top of the active panel */
.os-app::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border) 35%, var(--blue-border) 65%, transparent);
  pointer-events: none;
}
.os-app.active { display: block; animation: os-fade 0.15s ease; }
@keyframes os-fade { from { opacity: 0; } to { opacity: 1; } }
.os-app-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.os-app-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.os-badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  padding: 3px 10px;
  border-radius: var(--r-full);
}
.os-badge-free { color: var(--green); background: var(--green-dim); border-color: rgba(34, 197, 94, 0.25); }
.os-badge-live { color: var(--green); background: var(--green-dim); border-color: rgba(34, 197, 94, 0.25); }
.os-app-cta { margin-top: 22px; }
/* journal demo: mentor-insight teaser + feature strip */
.tj-mentor {
  margin-top: 18px;
  padding: 13px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.tj-mentor-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--text-2);
}
.tj-features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 14px;
}
.tj-features li {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--text-3);
}
.tj-features li::before { content: '✓ '; color: var(--green); }

/* ---- Journal demo: launch animation embed — the real Claude-Design
   video (React/JSX, self-contained), isolated inside an iframe so its
   own React/Babel never touch the main site's JS. Minimal: the outer
   .os-app card is the only frame, the video sits close to its edges. ---- */
/* No card box for the journal panel — the video blends straight into the
   page background instead of sitting inside a bordered/shadowed frame. */
.os-app[data-app="journal"] {
  background: none;
  border: none;
  box-shadow: none;
  padding: 6px 4px 4px;
}
.os-app[data-app="journal"] .os-app-head {
  margin-bottom: 8px;
  justify-content: center;
}
.os-app[data-app="journal"] .os-app-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
}
.os-app[data-app="journal"]::before { display: none; }
/* Full-bleed video — position:fixed so it escapes .os-stage's clipping
   (overflow-y:auto on that element forces overflow-x to compute as
   'auto' too per the CSS overflow spec, which silently clips any
   negative-margin breakout — fixed positioning sidesteps that entirely).
   It stays correctly hidden when another app is active because its
   ancestor .os-app gets display:none, which hides fixed descendants too.
   `top` is set from JS (main.js) to sit right below the title, exactly
   where it already sat in normal flow. */
.tj-launch-wrap {
  position: fixed;
  left: 6px;
  right: 6px;
  top: 60px;
  height: calc(100svh - 74px);
  z-index: 2;
}
/* Next-level blend: no card box, no hard rectangle — a soft radial mask
   feathers the video's own edges into transparency, so the page's own
   background shows through the fade instead of meeting a crisp border.
   The background color also matches the page exactly (not the video's
   own near-black) so nothing "seams" even before the fade kicks in. */
.tj-launch {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  -webkit-mask-image: radial-gradient(ellipse 92% 90% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 92% 90% at 50% 50%, #000 62%, transparent 100%);
}
.tj-launch-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: var(--bg);
}
/* Space reservation for the fixed, edge-to-edge mobile video below — see
   the @media block underneath. Hidden by default (desktop doesn't need
   it: .os-board is a hard 100svh there, never collapses). */
.tj-launch-spacer { display: none; }
@media (max-width: 900px) {
  /* Below 900px js/main.js loads the portrait (720×1280 = 9:16) mobile-
     native loop instead of the 16:9 desktop one, so the box matches that
     ratio too. Stay position:fixed (escapes .os-stage/.os-app padding+
     overflow:hidden, same trick as desktop) and drive height from the
     video's own ratio instead of a viewport-height calc() so width and
     height scale together with zero letterboxing — left/right:0 pushes
     it fully edge-to-edge. True phone-shaped viewports (narrower than
     9:16) never hit a height limit here — the (min-aspect-ratio) block
     below handles the wider ones separately. */
  .tj-launch-wrap {
    left: 0;
    right: 0;
    top: 60px;
    height: auto;
    aspect-ratio: 9 / 16;
  }
  /* position:fixed takes the video out of flow, so .os-board (mobile:
     height:auto:min-height:0 — see Responsive section) collapses to
     near-nothing and the story section below rides up, overlapping the
     still-visible fixed video. This spacer reserves the same height
     (100vw-based, matching the fixed box's own width) in normal flow so
     .os-board and everything after it accounts for the video properly. */
  .tj-launch-spacer {
    display: block;
    height: calc(100vw * 16 / 9);
  }
}
@media (max-width: 900px) and (min-aspect-ratio: 9 / 16) {
  /* Landscape phones and tablets-in-portrait are wider (relative to
     their height) than a 9:16 box — a naive width-driven height here
     would blow past the viewport. Mixing a definite width (left+right:0)
     with aspect-ratio AND max-height makes browsers shrink the WIDTH
     instead of letterboxing (leaves a bare gap on one side), so swap to
     an explicit width instead: max-height then clamps height only, and
     the video's own internal contain-fit scaling letterboxes top/bottom
     in the same bg color (invisible seam) rather than overflowing. */
  .tj-launch-wrap {
    right: auto;
    width: 100vw;
    max-height: calc(100svh - 80px);
  }
  .tj-launch-spacer {
    height: min(calc(100vw * 16 / 9), calc(100svh - 80px));
  }
}

/* DCA planner demo: ledger status pills */
.dca-done {
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--green);
}
.dca-plan {
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--text-3);
}
/* trading plan demo: setup name pill */
.plan-tag {
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: 0.01em;
}

/* ============================================================
   Story visuals — with-vs-without contrast per tool
   ============================================================ */

/* shared two-account contrast (DCA + edge) */
.vs-wrap { display: flex; flex-direction: column; gap: 16px; }
.vs-market {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.vs-market.on { opacity: 1; transform: none; }
.vs-spark { width: 130px; height: 40px; flex-shrink: 0; }
.vs-market-cap {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-3);
  letter-spacing: 0.03em;
}
.vs-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vs-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top-width: 2px;
  border-radius: var(--r-md);
  min-height: 158px;
}
.vs-bad  { border-top-color: var(--red); }
.vs-good { border-top-color: var(--gold); }
.vs-col-hd {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-1);
}
.vs-x { color: var(--red); }
.vs-check { color: var(--gold); }

/* buy chips (DCA) */
.vs-buys {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16,1,0.3,1);
}
.vs-buys.on { opacity: 1; transform: none; }
.vs-buy {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-sm);
  padding: 3px 8px;
}
.vb-red { color: var(--red); background: var(--red-dim); border-color: rgba(239,68,68,0.3); }
.vs-buy-note {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-3);
  letter-spacing: 0.03em;
  margin-top: 2px;
}

/* trade dots (edge) */
.vs-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16,1,0.3,1);
}
.vs-dots.on { opacity: 1; transform: none; }
.vd { width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); }
.vd-gold { background: var(--gold); box-shadow: 0 0 6px var(--gold-glow); }

/* average label (DCA) */
.vs-avg {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 0;
  border-top: 1px dashed var(--border-2);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.vs-avg.on { opacity: 1; }
.vs-avg-bad  { color: var(--red); }
.vs-avg-good { color: var(--gold); }

/* outcome (both) */
.vs-res {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.vs-res.on { opacity: 1; transform: none; }
.vs-res strong { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; }
.vs-res span { font-family: var(--font-mono); font-size: 0.58rem; color: var(--text-3); letter-spacing: 0.04em; }
.vr-red strong   { color: var(--red); }
.vr-green strong { color: var(--green); }

/* edge definer header (plan) */
.edge-def {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-md);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.edge-def.on { opacity: 1; transform: none; }
.edge-def-lbl {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}
.plan-chip {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-full);
  padding: 5px 12px;
}

/* reduced-motion static fallback */
.scrolly-static .vs-market,
.scrolly-static .vs-buys,
.scrolly-static .vs-dots,
.scrolly-static .vs-avg,
.scrolly-static .vs-res,
.scrolly-static .edge-def {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (max-width: 768px) {
  .vs-cols { grid-template-columns: 1fr; }
  .vs-col { min-height: 0; }
  .vs-spark { width: 96px; }
}

/* ---- Status bar ---- */
/* Scroll cue — sits at the very bottom of the board, centered. Two chevrons,
   one trailing the other, pulsing downward — no label, purely a motion cue. */
.os-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 3;
  width: 20px;
  height: 26px;
  pointer-events: none;
}
.os-scroll-hint-chev {
  position: absolute;
  left: 50%;
  top: 0;
  width: 15px;
  height: 15px;
  transform: translateX(-50%);
  color: var(--gold);
  opacity: 0;
  animation: os-scroll-hint-pulse 1.9s ease-in-out infinite;
}
.os-scroll-hint-chev--back {
  animation-delay: 0.45s;
}
@keyframes os-scroll-hint-pulse {
  0%   { transform: translate(-50%, -3px); opacity: 0; }
  35%  { opacity: 0.9; }
  75%  { opacity: 0.35; }
  100% { transform: translate(-50%, 11px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .os-scroll-hint-chev { animation: none; opacity: 0.7; }
  .os-scroll-hint-chev--back { opacity: 0.35; }
}

/* ---- App 1: Trading Journal (demo) ---- */
.tj-spark-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.tj-spark { display: block; width: 100%; height: 48px; overflow: visible; }
.tj-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.tj-kpi {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.25s ease;
}
.tj-kpi:hover { border-color: var(--gold-border); }
.tj-kpi-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
}
.tj-kpi-lbl {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.tj-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.tj-table th {
  text-align: left;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--border-2);
}
.tj-table tbody tr { transition: background 0.15s ease; }
.tj-table tbody tr:hover { background: rgba(255, 255, 255, 0.022); }
.tj-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
/* Journal demo only: R is the number a trader scans for first — give it weight */
.os-app[data-app="journal"] .tj-r { font-size: 0.78rem; }
.tj-dir {
  display: inline-block;
  width: 20px;
  text-align: center;
  font-weight: 700;
  border-radius: 3px;
  font-size: 0.62rem;
  padding: 2px 0;
}
.tj-long  { color: var(--green); background: var(--green-dim); }
.tj-short { color: var(--red);   background: var(--red-dim); }
.tj-r { font-weight: 700; }
.tj-win  { color: var(--gold); }
.tj-loss { color: var(--text-3); }
.tj-emo {
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 2px 9px;
}
.tj-emo-bad  { color: var(--red);   border-color: rgba(239, 68, 68, 0.3); }
.tj-emo-good { color: var(--green); border-color: rgba(34, 197, 94, 0.3); }

/* ---- App 2: Calculators hub (reuses ws-* styles from animations.css) ---- */
.os-calc-fields { max-width: 460px; }
.os-calc-out { max-width: 460px; margin-top: 18px; }
.calc-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.calc-tab {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.calc-tab:hover { color: var(--text-1); }
.calc-tab.active {
  color: var(--gold);
  background: var(--gold-dim);
  border-color: var(--gold-border);
}
.calc-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.calc-pane { display: none; }
.calc-pane.active { display: block; animation: os-fade 0.15s ease; }
.calc-table-wrap { max-width: 460px; margin-top: 18px; overflow-x: auto; }
.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}
.calc-table th {
  text-align: left;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-2);
}
.calc-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
.calc-gold { color: var(--gold); font-weight: 700; }
.calc-note {
  max-width: 460px;
  margin-top: 16px;
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--text-3);
  padding: 12px 14px;
  background: var(--bg-2);
  border-left: 2px solid var(--gold-border);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* ---- App 3: Market sessions ---- */
.ms-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.ms-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
}
.ms-card.open { border-color: rgba(34, 197, 94, 0.3); }
.ms-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ms-city { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; color: var(--text-1); }
.ms-card .sc-status { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; color: var(--red); }
.ms-card.open .sc-status { color: var(--green); }
.ms-name { font-size: 0.68rem; color: var(--text-2); }
.ms-hours { font-size: 0.6rem; color: var(--text-3); letter-spacing: 0.04em; }
.ms-count { font-size: 0.62rem; color: var(--text-3); letter-spacing: 0.03em; margin-top: 4px; }
.ms-card.open .ms-count { color: var(--green); }
.ms-day { margin-bottom: 18px; }
.ms-day-lanes {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 0;
}
.ms-lane { display: flex; align-items: center; gap: 10px; }
.ms-lane-lbl {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-3);
  width: 30px;
  flex-shrink: 0;
}
.ms-lane-track {
  position: relative;
  flex: 1;
  height: 8px;
  background: var(--bg-2);
  border-radius: var(--r-full);
  overflow: hidden;
}
.ms-span {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(201, 168, 76, 0.35);
  border-radius: var(--r-full);
}
.ms-now {
  position: absolute;
  top: 6px;
  bottom: 6px;
  /* 40px = lane label width + gap; --nowp is the 0..1 day fraction set by JS */
  left: calc(40px + (100% - 40px) * var(--nowp, 0));
  width: 2px;
  background: var(--gold);
  border-radius: 1px;
  pointer-events: none;
  /* gold "now" marker breathes — only while the Sessions app is visible */
  animation: ms-breathe 2s ease-in-out infinite;
}
@keyframes ms-breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
.ms-card { transition: border-color 0.25s ease; }
.ms-card:hover { border-color: var(--border-2); }
.ms-card.open:hover { border-color: rgba(34, 197, 94, 0.45); }
.ms-day-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  color: var(--text-3);
  letter-spacing: 0.06em;
  padding-left: 40px;
}
.ms-local {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.ms-local .sc-time { color: var(--text-1); font-size: 0.85rem; font-variant-numeric: tabular-nums; }

/* ---- App 4: Research feed ---- */
.os-feed { flex: none; }
.os-feed-hook { color: var(--text-3); }

/* ---- Mobile language switcher (compact ".td" dropdown, current
   language + chevron, replaces the always-visible RO/EN pair below
   768px — see the mobile Responsive block for the trigger/menu sizing
   and the swap with .lang-toggle) ---- */
.lang-td { display: none; }

/* ---- Focus states ---- */
.td-trigger:focus-visible,
.td-item:focus-visible,
.os-tab:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1100px) {
  .os-board { height: auto; min-height: 100svh; }
}

/* Mobile: tool-picker relocates to a bottom bar, drawer sheet */
@media (max-width: 768px) {
  .os-stage { padding: 14px 16px 20px; }
  .os-app { padding: 20px 16px; }
  .os-board { padding-bottom: 60px; min-height: 0; }

  /* Header: logo + dropdown were colliding on narrow phones — the trigger
     was sized for desktop (min-width 236px). Shrink both so the grid
     actually fits inside a ~360-390px viewport. */
  .os-header { padding: 0 14px; }
  .os-header-left .logo-img { height: 19px; }
  .os-stage-tag { display: none; }
  /* Swap "1fr auto 1fr" for "auto minmax(0,1fr) auto": logo and the
     right-side icons size to their own content, and the center dropdown
     gets whatever's left. A bare "1fr" (not minmax(0,1fr)) has an
     automatic MINIMUM equal to its content's min-content size — so a
     long label ("Trading Journal Pro") still forced the track wider
     than the space actually available and overflowed a few px into
     both neighboring columns (logo + the RO/EN/page-nav cluster),
     which is what looked like "overlapping buttons". minmax(0,1fr)
     lets the track actually shrink to 0 so max-width:100% below can
     do its job. */
  .os-header { grid-template-columns: auto minmax(0, 1fr) auto; }
  .os-header-center { min-width: 0; }
  .td-trigger {
    min-width: 0;
    max-width: 100%;
    padding: 7px 12px;
    gap: 6px;
    font-size: 0.6rem;
    letter-spacing: 0.05em;
  }
  .td-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .td-chev { width: 10px; height: 10px; flex-shrink: 0; }
  .os-header-right { gap: 8px; flex-shrink: 0; }
  .os-header-right .page-nav { flex-shrink: 0; }
  .td-trigger.td-icon svg.td-icon-glyph { flex-shrink: 0; }

  /* Language: swap the always-visible RO/EN pair for the compact
     current-language dropdown — one less pair of buttons competing for
     space next to the page-nav icon. */
  .os-header-right .lang-toggle { display: none; }
  .lang-td { display: block; flex-shrink: 0; }
  .td-trigger.td-lang { min-width: 0; padding: 7px 10px; gap: 4px; }
  .lang-td .td-menu { min-width: 0; padding: 6px; }
  .lang-td .td-item { padding: 7px 10px; justify-content: center; }

  /* Tool-picker: relocates from the header center to a fixed bottom bar
     (replacing the old Jurnal/DCA/Plan/Calc/Mai mult strip — three of
     those five buttons were permanently-disabled placeholders, and
     Jurnal/Mai mult just duplicated this exact dropdown from two
     places at once). Same #td element as desktop, still centered in
     the header there — position:fixed here just relocates it, no
     JS/markup changes needed. */
  #td {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    justify-content: center;
    background: rgba(8, 12, 23, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-2);
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  #td .td-trigger {
    width: 100%;
    max-width: 420px;
    font-size: 0.68rem;
    padding: 9px 16px;
  }
  /* Dropdown opens upward from the bottom bar. The desktop rule centers
     it with translateX(-50%) around `left:50%` — left is a fixed 12px
     here instead, so that transform has to be killed too or it shoves
     the whole sheet ~half its width off-screen. Scoped to #td-menu only
     (not the page-nav/lang dropdowns, which stay small anchored
     top-right menus). */
  #td-menu {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 8px);
    min-width: 0;
    transform: translateY(6px);
  }
  #td.open #td-menu { transform: none; }

  .tj-kpis { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .tj-kpi { padding: 9px 10px; }
  .tj-kpi-val { font-size: 0.9rem; }
  .tj-table { font-size: 0.66rem; }
  .ms-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .td-menu, .td-chev { transition: none; }
  .td-item { transition: none; transform: none; opacity: 1; }
  .td.open .td-item { animation: none; }
  .os-app.active { animation: none; }
  .os-tabbar { transition: none; }
  .ms-now { animation: none; }
  .ms-card { transition: none; }
}