/* ============================================================
   CtrlShift — B1 "Night Signal" platform skin
   Dark restyle of every plat-* / val-* / deal-* / nda-* / policy
   component from features.css. Pairs with b1.css (loaded first).
   Contract: selectors and DOM produced by valuation.js,
   opportunities.js, nda.js, nda-page.js and compliance.js are
   UNCHANGED — this file only re-themes them.
   ============================================================ */

/* ── Legacy-token compatibility layer ─────────────────────────
   The frozen platform JS emits inline styles that reference the
   old tokens.css variables (--sp-*, --fs-*, --fg-*, …). Map them
   onto the B1 night palette so those inline styles keep working. */
:root {
  /* Ink / surfaces */
  --fg:           var(--ink);
  --fg-muted:     var(--ink-muted);
  --fg-subtle:    var(--ink-subtle);
  --fg-on-dark:   var(--ink);
  --fg-link:      var(--lumen-bright);
  --bg:           var(--surface-1);
  --bg-soft:      var(--surface-2);
  --bg-dark:      var(--void);
  --bg-emphasis:  var(--cs-blue);
  --line:         var(--hairline);
  --line-strong:  var(--hairline-strong);
  --cs-graphite:      var(--surface-3);
  --cs-graphite-soft: var(--surface-2);
  --cs-graphite-line: var(--hairline-strong);
  --cs-charcoal:      var(--ink-muted);
  --cs-white:         var(--ink);
  --cs-blue-hover:    #0A5BA6;
  --cs-overlay: rgba(6, 11, 20, .72);

  /* Status (dark-legible) */
  --cs-status-error:      #E4695C;
  --cs-status-error-soft: rgba(228, 105, 92, .10);
  --cs-status-warn:       #E2B93B;
  --cs-status-warn-soft:  rgba(226, 185, 59, .10);
  --cs-status-pos:        var(--signal-bright);
  --cs-status-pos-soft:   var(--signal-dim);

  /* Type scale */
  --font-en-display: var(--font-disp);
  --font-en-subhead: var(--font-disp);
  --fs-display: 64px;   --lh-display: 1.05;  --tr-display: -0.02em;
  --fs-h1:      48px;   --lh-h1:      1.10;  --tr-h1:      -0.018em;
  --fs-h2:      36px;   --lh-h2:      1.15;  --tr-h2:      -0.014em;
  --fs-h3:      24px;   --lh-h3:      1.25;  --tr-h3:      -0.008em;
  --fs-h4:      20px;   --lh-h4:      1.30;  --tr-h4:      -0.005em;
  --fs-body:    16px;   --lh-body:    1.55;  --tr-body:     0;
  --fs-small:   14px;   --lh-small:   1.50;
  --fs-micro:   12px;   --lh-micro:   1.40;  --tr-micro:    0.04em;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 500;   /* B1 whisper-weight: cap at medium */
  --fw-bold:     600;

  /* Rhythm / shape */
  --sp-1:  4px;   --sp-2:  8px;   --sp-3:  12px;  --sp-4:  16px;
  --sp-5:  24px;  --sp-6:  32px;  --sp-7:  48px;  --sp-8:  64px;
  --sp-9:  96px;  --sp-10: 128px;
  --r-0: 0px;  --r-1: 0px;  --r-2: 0px;  --r-3: 0px; /* cards sharp */
  --bw-hair: 1px;
  --bw-cta:  1px;
  --ease-standard: cubic-bezier(0.2, 0.0, 0.2, 1);
  --dur-fast:  120ms;
  --dur-base:  180ms;
  --dur-slow:  240ms;
  --container:        1280px;
  --container-narrow: 960px;
  --gutter:           var(--page-pad);
  --nav-h:            76px;
}
@media (max-width: 768px) {
  :root {
    --fs-display: 40px;  --lh-display: 1.08;
    --fs-h1:      32px;  --lh-h1:      1.15;
    --fs-h2:      26px;  --lh-h2:      1.20;
    --fs-h3:      20px;  --lh-h3:      1.30;
    --fs-h4:      18px;  --lh-h4:      1.35;
    --sp-10: 80px;  --sp-9: 64px;
  }
}

/* The platform JS toggles the [hidden] attribute on grid/flex nodes;
   this rule existed in features.css and MUST survive the re-skin. */
[hidden] { display: none !important; }

/* ── Legacy .btn system (emitted by the frozen JS) ────────────
   Same names, B1 shapes: pills, lime strictly for the key action. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-en); font-size: 14px; font-weight: 500;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out),
              background .25s, border-color .25s, color .25s;
}
html[lang="ar"] .btn { font-family: var(--font-ar); }
.btn-lg { padding: 14px 30px; font-size: 15px; }
.btn-primary { background: var(--ink); color: var(--void); font-weight: 600; }
.btn-primary:hover { background: #fff; transform: translateY(-2px); }
.btn-lime { background: var(--signal); color: var(--void); font-weight: 600; }
.btn-lime:hover { background: var(--signal-bright); box-shadow: 0 0 32px var(--signal-glow); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hairline-strong); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--signal-dim); border-color: var(--signal); }

/* ── Shared shell ─────────────────────────────────────────── */
.plat-page { background: transparent; min-height: 60vh; padding-bottom: var(--sp-9); }
.plat-wrap { max-width: var(--container-narrow); margin-inline: auto; padding-inline: var(--gutter); }
.plat-wide { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* Page hero — plat-hero recast in the B1 page-hero language.
   (Pages also carry .b1-page-hero for the radial glow + nav offset.) */
.plat-hero { background: transparent; border-bottom: 1px solid var(--hairline); }
/* generous hero rhythm matching .b1-page-hero on the content pages —
   the pages use bare .plat-hero, so target it directly */
.plat-hero { padding-top: calc(var(--nav-h) + clamp(64px, 9vw, 120px)); padding-bottom: clamp(44px, 6vw, 80px); }
.plat-banner + .plat-hero { padding-top: clamp(48px, 7vw, 96px); }
.plat-hero .eyebrow {
  font-family: var(--font-mono); font-size: var(--text-mono);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--signal); font-weight: 400;
  display: flex; align-items: center; gap: 12px;
}
.plat-hero .eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--signal); opacity: .7; }
html[lang="ar"] .plat-hero .eyebrow { font-family: var(--font-ar); letter-spacing: .06em; font-size: 13px; }
.plat-hero h1 {
  font-family: var(--font-disp); font-weight: 400;
  color: var(--ink);
  font-size: clamp(34px, 4.6vw, 62px); line-height: 1.06; letter-spacing: -.025em;
  max-width: 22ch;
  margin: 22px 0 18px;
}
.plat-hero p { color: var(--ink-muted); font-size: var(--text-lede); line-height: 1.55; max-width: 62ch; margin: 0; }
html[lang="ar"] .plat-hero h1, html[lang="ar"] .plat-hero p,
[dir="rtl"] .plat-hero h1, [dir="rtl"] .plat-hero p { font-family: var(--font-ar); letter-spacing: 0; }

/* Indicative / status banners — dark strip, mono signal text */
.plat-banner {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: 10px var(--sp-4); text-align: center;
}
html[lang="ar"] .plat-banner { font-family: var(--font-ar); letter-spacing: .04em; font-size: 12.5px; }
.plat-banner-info {
  margin-top: var(--nav-h); /* clears the fixed B1 nav */
  background: var(--surface-1);
  color: var(--signal);
  border-bottom: 1px solid var(--hairline);
}
.plat-banner-demo { background: var(--surface-2); color: var(--ink-muted); border-bottom: 1px solid var(--hairline-strong); }

/* Generic small-section wrapper kept from old markup */
.section-sm { padding-block: clamp(36px, 5vw, 64px) 0; }

/* ── Cards / panels ───────────────────────────────────────── */
.plat-card { background: var(--surface-1); border: 1px solid var(--hairline-strong); border-radius: 0; }
.plat-card + .plat-card { margin-top: var(--sp-5); }
.plat-card-head { padding: var(--sp-5) var(--sp-6) var(--sp-4); border-bottom: 1px solid var(--hairline); }
.plat-card-head h2 { font-family: var(--font-disp); font-weight: 400; font-size: clamp(19px, 2vw, 24px); letter-spacing: -.015em; color: var(--ink); margin: 0 0 var(--sp-1); }
.plat-card-head p { font-size: var(--fs-small); color: var(--ink-subtle); margin: 0; }
.plat-card-body { padding: var(--sp-6); }
html[lang="ar"] .plat-card-head h2, [dir="rtl"] .plat-card-head h2 { font-family: var(--font-ar); letter-spacing: 0; }

/* ── Stepper (valuation) ──────────────────────────────────── */
.plat-stepper {
  background: rgba(6, 11, 20, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block: 1px solid var(--hairline);
  position: sticky; top: var(--nav-h); z-index: 80;
}
.plat-stepper-inner { max-width: var(--container-narrow); margin-inline: auto; padding-inline: var(--gutter); display: flex; }
.plat-step {
  flex: 1; display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) 0; position: relative; cursor: pointer;
  background: none; border: 0; font: inherit; text-align: start; color: var(--ink);
}
.plat-step:not(:last-child)::after { content: ''; position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); width: 1px; height: 26px; background: var(--hairline); }
.plat-step-num {
  width: 28px; height: 28px; border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  flex-shrink: 0;
  border: 1px solid var(--hairline-strong);
  color: var(--ink-subtle); background: transparent;
  transition: background .25s, border-color .25s, color .25s, box-shadow .25s;
}
.plat-step.active .plat-step-num { background: var(--signal); color: var(--void); border-color: var(--signal); font-weight: 600; box-shadow: 0 0 18px var(--signal-dim); }
.plat-step.done .plat-step-num { background: var(--signal-dim); color: var(--signal-bright); border-color: rgba(163, 189, 24, .4); }
.plat-step-label { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.plat-step.pending .plat-step-label { color: var(--ink-subtle); }
.plat-step-sub { font-size: 11.5px; color: var(--ink-subtle); }
.plat-step-text { display: flex; flex-direction: column; line-height: 1.3; gap: 1px; min-width: 0; }
@media (max-width: 720px) {
  .plat-step-text { display: none; }
  .plat-stepper-inner { gap: var(--sp-3); justify-content: center; }
  .plat-step { flex: 0 0 auto; }
  .plat-step:not(:last-child)::after { display: none; }
}

/* Persistent caveat strip (every valuation step) */
.val-caveat {
  background: var(--surface-1);
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-subtle);
  font-size: var(--fs-micro); line-height: var(--lh-small);
  text-align: center; padding: var(--sp-2) var(--sp-4);
}
.val-caveat b { color: var(--ink-muted); font-weight: 500; }
html[lang="ar"] .val-caveat, [dir="rtl"] .val-caveat { font-family: var(--font-ar); }

/* ── Forms ────────────────────────────────────────────────── */
.plat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4) var(--sp-5); }
.plat-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .plat-grid { grid-template-columns: 1fr; } .plat-grid .span-2 { grid-column: span 1; } }
.plat-field { display: flex; flex-direction: column; gap: 9px; }
.plat-field label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  color: var(--ink-subtle); letter-spacing: .14em; text-transform: uppercase;
}
html[lang="ar"] .plat-field label { font-family: var(--font-ar); letter-spacing: .03em; font-size: 12.5px; }
.plat-field label .req { color: var(--signal); }
.plat-field label .hint { font-weight: 400; color: var(--ink-subtle); text-transform: none; letter-spacing: 0; font-family: var(--font-en); }
html[lang="ar"] .plat-field label .hint { font-family: var(--font-ar); }
.plat-input, .plat-select, .plat-textarea {
  font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-input);
  padding: 13px 15px; width: 100%; box-sizing: border-box;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.plat-select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2397A2B4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-inline-end: 38px;
}
html[dir="rtl"] .plat-select { background-position: left 14px center; }
.plat-select option { background: var(--surface-2); color: var(--ink); }
.plat-input::placeholder, .plat-textarea::placeholder { color: var(--ink-subtle); }
.plat-input:focus, .plat-select:focus, .plat-textarea:focus {
  outline: none; border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-dim);
  background: var(--surface-2);
}
.plat-prefix {
  display: flex; align-items: stretch;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-input);
  overflow: hidden;
  background: var(--surface-1);
  transition: border-color .25s, box-shadow .25s;
}
.plat-prefix:focus-within { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-dim); }
.plat-prefix-tag {
  padding: 13px 14px; background: var(--surface-2);
  border-inline-end: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
  color: var(--ink-muted); white-space: nowrap;
  display: flex; align-items: center;
}
.plat-prefix input { flex: 1; min-width: 0; border: 0; padding: 13px 15px; font: inherit; font-size: 15px; color: var(--ink); background: transparent; }
.plat-prefix input::placeholder { color: var(--ink-subtle); }
.plat-prefix input:focus { outline: none; }
[dir="rtl"] .plat-input, [dir="rtl"] .plat-select, [dir="rtl"] .plat-textarea { font-family: var(--font-ar); }

/* Pills / multi-select */
.plat-pills { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.plat-pill {
  padding: 8px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  font-size: 13.5px; color: var(--ink-muted);
  cursor: pointer; background: transparent; user-select: none;
  font-family: inherit;
  transition: border-color .25s, color .25s, background .25s;
}
.plat-pill:hover { border-color: var(--ink); color: var(--ink); }
.plat-pill.selected { background: var(--ink); border-color: var(--ink); color: var(--void); font-weight: 600; }

/* Quality sliders */
.plat-rate-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) 0; border-bottom: 1px solid var(--hairline); }
.plat-rate-row:last-child { border-bottom: 0; }
.plat-rate-label { font-size: 15px; color: var(--ink); font-weight: 500; }
.plat-rate-sub { font-size: 13px; color: var(--ink-subtle); margin-top: 3px; line-height: 1.5; }
.plat-rate-opts { display: flex; gap: 6px; flex-shrink: 0; }
.plat-rate-opt {
  width: 34px; height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  background: transparent;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-subtle); cursor: pointer;
  transition: border-color .25s, color .25s, background .25s;
}
.plat-rate-opt:hover { border-color: var(--ink); color: var(--ink); }
.plat-rate-opt.selected { background: var(--ink); border-color: var(--ink); color: var(--void); font-weight: 600; }

/* Nav buttons */
.plat-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-top: var(--sp-5); }
.plat-nav .step-count {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-subtle);
}
html[lang="ar"] .plat-nav .step-count { font-family: var(--font-ar); letter-spacing: .04em; font-size: 12.5px; }

/* ── Consent block (compliance.js) ────────────────────────── */
.cs-consent { border: 1px solid var(--hairline-strong); border-radius: 0; padding: var(--sp-5); background: var(--surface-2); }
.cs-consent-notice { font-size: var(--fs-small); color: var(--ink-muted); margin: 0 0 var(--sp-3); line-height: var(--lh-small); }
.cs-consent-link { color: var(--lumen-bright); text-decoration: underline; text-underline-offset: 3px; }
.cs-consent-link:hover { color: var(--ink); }
.cs-consent-row { display: flex; align-items: flex-start; gap: var(--sp-3); margin-top: var(--sp-3); cursor: pointer; }
.cs-consent-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--signal); flex-shrink: 0; }
.cs-consent-label { font-size: var(--fs-small); color: var(--ink); line-height: var(--lh-small); }
.cs-consent-error { display: none; color: var(--cs-status-error); font-size: var(--fs-micro); margin-top: var(--sp-2); }
.cs-consent.has-error .cs-consent-error { display: block; }
.cs-consent.has-error { border-color: var(--cs-status-error); }
[dir="rtl"] .cs-consent-notice, [dir="rtl"] .cs-consent-label { font-family: var(--font-ar); }

/* ── Disclaimer block ─────────────────────────────────────── */
.plat-disclaimer {
  display: block;
  border: 1px solid var(--hairline-strong);
  border-inline-start: 3px solid var(--signal);
  border-radius: 0;
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface-1);
}
.plat-disclaimer, .plat-disclaimer p { font-size: var(--fs-small); color: var(--ink-muted); line-height: var(--lh-body); margin: 0; }
[dir="rtl"] .plat-disclaimer, [dir="rtl"] .plat-disclaimer p { font-family: var(--font-ar); }

/* ── Results (valuation) — luminous instrument readout ────── */
.res-range { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
@media (max-width: 640px) { .res-range { grid-template-columns: 1fr; } }
.res-card {
  border: 1px solid var(--hairline-strong);
  border-radius: 0;
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
  background: rgba(6, 11, 20, .45);
}
.res-card.featured {
  background: linear-gradient(180deg, rgba(163, 189, 24, .10), rgba(163, 189, 24, .03));
  border-color: rgba(163, 189, 24, .45);
  box-shadow: 0 0 34px rgba(163, 189, 24, .08), inset 0 1px 0 rgba(199, 227, 43, .18);
}
.res-card-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-subtle); margin-bottom: var(--sp-3);
}
html[lang="ar"] .res-card-label { font-family: var(--font-ar); letter-spacing: .04em; }
.res-card-value {
  font-family: var(--font-disp);
  font-size: clamp(24px, 2.8vw, 34px); font-weight: 400;
  letter-spacing: -.02em;
  color: var(--ink); line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.res-card.featured .res-card-value { color: var(--signal-bright); text-shadow: 0 0 26px var(--signal-glow); }
.res-card-sub { font-size: var(--fs-micro); color: var(--ink-subtle); margin-top: var(--sp-2); }

.plat-twocol { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); margin-top: var(--sp-5); }
@media (max-width: 720px) { .plat-twocol { grid-template-columns: 1fr; } }
.band-line { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3) 0; border-bottom: 1px solid var(--hairline); font-size: var(--fs-small); }
.band-line:last-child { border-bottom: 0; }
.band-line b { color: var(--ink); font-weight: 500; }
.band-line span { color: var(--ink-muted); }

.improve-item { display: flex; gap: var(--sp-4); padding: var(--sp-4) 0; border-bottom: 1px solid var(--hairline); }
.improve-item:last-child { border-bottom: 0; }
.improve-num {
  width: 28px; height: 28px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono); font-size: 11px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.improve-title { font-size: var(--fs-small); font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.improve-desc { font-size: var(--fs-small); color: var(--ink-muted); line-height: var(--lh-small); align-self: center; }

/* Locked / withheld rows */
.locked-row { position: relative; border: 1px dashed var(--hairline-strong); border-radius: 0; padding: var(--sp-4) var(--sp-5); margin-top: var(--sp-3); overflow: hidden; background: rgba(6, 11, 20, .4); }
.locked-row .locked-fake { filter: blur(5px); user-select: none; pointer-events: none; color: var(--ink-subtle); font-size: var(--fs-small); font-family: var(--font-mono); }
.locked-tag {
  display: inline-flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2);
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: .1em; text-transform: uppercase; color: var(--lumen-bright);
}
html[lang="ar"] .locked-tag { font-family: var(--font-ar); letter-spacing: .03em; }
.locked-tag svg { width: 13px; height: 13px; }

/* Chart / Text toggle (on the results readout) */
.val-toggle { display: inline-flex; border: 1px solid var(--hairline-strong); border-radius: var(--radius-pill); overflow: hidden; padding: 3px; gap: 2px; background: rgba(6, 11, 20, .5); }
.val-toggle button {
  background: transparent; color: var(--ink-subtle); border: 0;
  padding: 5px 16px; font: inherit; font-size: 13px; cursor: pointer;
  border-radius: var(--radius-pill);
  transition: background .25s, color .25s;
}
.val-toggle button:hover { color: var(--ink); }
.val-toggle button.active { background: var(--ink); color: var(--void); font-weight: 600; }

/* Demoted multiple-band chip */
.band-chip {
  display: inline-flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  font-size: var(--fs-micro); color: var(--ink-subtle);
}
.band-chip b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

/* Football field (SVG on the dark readout) */
.ff-wrap { width: 100%; overflow-x: auto; }
.ff-svg { width: 100%; min-width: 520px; height: auto; display: block; }
.ff-axis { stroke: rgba(226, 234, 245, .28); stroke-width: 1; }
.ff-tick { fill: var(--ink-subtle); font-size: 10px; font-family: var(--font-mono); }
.ff-rowlabel { fill: rgba(234, 240, 248, .85); font-size: 11px; font-weight: 500; }
.ff-bar-today { fill: rgba(46, 124, 214, .28); stroke: var(--lumen-blue); stroke-width: 1; }
.ff-bar-prep { fill: rgba(163, 189, 24, .14); stroke: var(--signal); stroke-width: 1; }
.ff-marker { fill: rgba(234, 240, 248, .85); }
.ff-marker-base { fill: var(--signal); stroke: var(--void); stroke-width: 1; }
.ff-mlabel { fill: var(--ink-muted); font-size: 9px; font-family: var(--font-mono); }

/* Hook band (up-to-30%) */
.val-hook {
  position: relative;
  background: linear-gradient(165deg, rgba(20, 36, 60, .55), rgba(10, 19, 34, .85));
  border: 1px solid var(--hairline-strong);
  border-radius: 0;
  padding: clamp(26px, 3.6vw, 44px);
  margin-top: var(--sp-5);
  overflow: hidden;
}
.val-hook::after {
  content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(163, 189, 24, .5), transparent);
}
.val-hook .eyebrow {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--signal); font-weight: 400;
  display: flex; align-items: center; gap: 12px;
}
.val-hook .eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--signal); opacity: .7; }
html[lang="ar"] .val-hook .eyebrow { font-family: var(--font-ar); letter-spacing: .05em; }
.val-hook h3 {
  font-family: var(--font-disp); font-weight: 400;
  color: var(--ink);
  font-size: clamp(21px, 2.6vw, 30px); line-height: 1.2; letter-spacing: -.02em;
  margin: var(--sp-3) 0 var(--sp-3); max-width: 26ch;
}
.val-hook p { color: var(--ink-muted); font-size: 15px; margin: 0 0 var(--sp-4); max-width: 64ch; line-height: 1.65; }
.val-hook .val-hook-fine { color: var(--ink-subtle); font-size: var(--fs-micro); line-height: var(--lh-small); margin-top: var(--sp-3); max-width: 70ch; }
[dir="rtl"] .val-hook h3, [dir="rtl"] .val-hook p, [dir="rtl"] .val-hook .val-hook-fine { font-family: var(--font-ar); letter-spacing: 0; }

/* Roadmap (where you are → next steps) */
.rm-step { display: flex; gap: var(--sp-4); padding: var(--sp-4) 0; border-bottom: 1px solid var(--hairline); }
.rm-step:last-child { border-bottom: 0; }
.rm-dot {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-subtle); background: transparent;
  transition: border-color .25s, color .25s;
}
.rm-step.current .rm-dot { background: var(--signal); color: var(--void); border-color: var(--signal); font-weight: 600; box-shadow: 0 0 18px var(--signal-dim); }
.rm-step.current .rm-title { color: var(--ink); }
.rm-title { font-size: var(--fs-small); font-weight: 500; color: var(--ink); }
.rm-desc { font-size: var(--fs-small); color: var(--ink-subtle); margin-top: 2px; line-height: var(--lh-small); }
.rm-here {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 400;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--signal); margin-bottom: 3px;
}
html[lang="ar"] .rm-here { font-family: var(--font-ar); letter-spacing: .04em; }
[dir="rtl"] .rm-title, [dir="rtl"] .rm-desc { font-family: var(--font-ar); }

/* ── Marketplace ──────────────────────────────────────────── */
.deal-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.deal-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.deal-filter {
  padding: 8px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  font-size: 13px; color: var(--ink-muted);
  background: transparent; cursor: pointer; font-family: inherit;
  transition: border-color .25s, color .25s, background .25s;
}
.deal-filter:hover { border-color: var(--ink); color: var(--ink); }
.deal-filter.active { background: var(--ink); color: var(--void); border-color: var(--ink); font-weight: 600; }
.deal-viewtoggle {
  margin-inline-start: auto; display: inline-flex;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill); overflow: hidden; padding: 3px; gap: 2px;
}
.deal-viewtoggle button {
  background: transparent; border: 0; padding: 5px 14px;
  font: inherit; font-size: 13px; color: var(--ink-subtle); cursor: pointer;
  border-radius: var(--radius-pill);
  transition: background .25s, color .25s;
}
.deal-viewtoggle button:hover { color: var(--ink); }
.deal-viewtoggle button.active { background: var(--ink); color: var(--void); font-weight: 600; }

.deal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
@media (max-width: 900px) { .deal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .deal-grid { grid-template-columns: 1fr; } }
.deal-card {
  border: 1px solid var(--hairline-strong); border-radius: 0;
  background: var(--surface-1);
  padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-3);
  transition: transform .35s var(--ease-out), border-color .3s, background .3s, box-shadow .35s;
}
.deal-card-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.deal-code { font-family: var(--font-disp); font-size: clamp(19px, 2vw, 23px); color: var(--ink); font-weight: 400; letter-spacing: -.015em; }
[dir="rtl"] .deal-code { font-family: var(--font-ar); letter-spacing: 0; }
.deal-ref {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-subtle);
  margin-top: 3px; letter-spacing: .1em; text-transform: uppercase;
}
.deal-cat {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--signal); font-weight: 400;
  border: 1px solid rgba(163, 189, 24, .3); border-radius: var(--radius-pill);
  padding: 5px 12px; white-space: nowrap;
}
html[lang="ar"] .deal-cat { font-family: var(--font-ar); letter-spacing: .03em; }
.deal-meta { display: flex; flex-direction: column; gap: var(--sp-2); font-size: var(--fs-small); color: var(--ink-muted); }
.deal-meta-row { display: flex; justify-content: space-between; gap: var(--sp-3); border-bottom: 1px solid var(--hairline); padding-bottom: var(--sp-2); }
.deal-meta-row:last-of-type { border-bottom: 0; }
.deal-meta-row b { color: var(--ink); font-weight: 500; }
.deal-tag {
  align-self: flex-start; font-family: var(--font-mono); font-size: 10.5px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong); color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: .08em;
}
.deal-locked { font-size: var(--fs-micro); color: var(--ink-subtle); display: flex; align-items: center; gap: var(--sp-2); }
.deal-curated-note {
  font-size: var(--fs-small); color: var(--ink-muted); line-height: 1.6;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-inline-start: 3px solid var(--signal);
  border-radius: 0; padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-6);
}

/* Tile alignment — pin "View more" to the bottom */
.deal-grid .deal-card { height: 100%; }
.deal-grid .deal-card .btn { margin-top: auto; align-self: start; }

/* List view — one row per listing */
.deal-list { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
.deal-list .deal-card { flex-direction: row; align-items: center; flex-wrap: wrap; gap: var(--sp-5); }
.deal-list .deal-card-top { flex-direction: column; align-items: flex-start; gap: 6px; min-width: 150px; }
.deal-list .deal-meta { flex: 1; flex-direction: row; flex-wrap: wrap; gap: var(--sp-5); }
.deal-list .deal-meta-row { border-bottom: 0; padding-bottom: 0; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 90px; }
.deal-list .deal-card .btn { flex-shrink: 0; }
@media (max-width: 680px) { .deal-list .deal-card { flex-direction: column; align-items: stretch; } .deal-list .deal-meta { flex-direction: column; } }

/* Blind teaser */
.teaser-anon { font-size: var(--fs-micro); color: var(--ink-subtle); line-height: var(--lh-small); }
.teaser-h {
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-muted); margin: var(--sp-4) 0 var(--sp-2);
}
html[lang="ar"] .teaser-h { font-family: var(--font-ar); letter-spacing: .04em; font-size: 12.5px; }
.teaser-p { font-size: var(--fs-body); color: var(--ink-muted); line-height: var(--lh-body); }
.teaser-proj { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }
.teaser-proj .chip {
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  padding: 7px 14px; font-size: 13px; color: var(--ink-muted);
}
.teaser-proj .chip b { color: var(--signal-bright); font-weight: 500; font-variant-numeric: tabular-nums; }
[dir="rtl"] .teaser-anon, [dir="rtl"] .teaser-h, [dir="rtl"] .teaser-p { font-family: var(--font-ar); }

/* Prominent investment box — luminous readout */
.invest-box {
  position: relative;
  border: 1px solid rgba(46, 124, 214, .4);
  border-radius: 0;
  background: linear-gradient(165deg, rgba(20, 36, 60, .5), rgba(10, 19, 34, .8));
  padding: var(--sp-5);
  margin-top: var(--sp-4);
}
.invest-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-subtle);
}
html[lang="ar"] .invest-label { font-family: var(--font-ar); letter-spacing: .04em; }
.invest-amount {
  font-family: var(--font-disp);
  font-size: clamp(28px, 3.4vw, 42px); font-weight: 400;
  letter-spacing: -.02em;
  color: var(--signal-bright);
  text-shadow: 0 0 26px var(--signal-glow);
  line-height: 1.1; margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.invest-stage { font-size: var(--fs-small); color: var(--ink-muted); margin-top: var(--sp-2); }
.invest-seg { display: flex; gap: 4px; margin-top: var(--sp-3); }
.invest-seg-yr { flex: 1; height: 6px; border-radius: var(--radius-pill); background: var(--lumen-blue); opacity: .28; }
.invest-seg-yr:first-child { opacity: .9; }
.invest-seg-label { font-size: var(--fs-micro); color: var(--ink-subtle); margin-top: var(--sp-2); }
[dir="rtl"] .invest-amount, [dir="rtl"] .invest-label, [dir="rtl"] .invest-stage, [dir="rtl"] .invest-seg-label { font-family: var(--font-ar); }

/* Teaser highlights list */
.teaser-highlights { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-1); }
.thl { display: flex; gap: var(--sp-3); align-items: flex-start; font-size: 15px; color: var(--ink-muted); line-height: 1.55; }
.thl-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); margin-top: 8px; flex-shrink: 0; box-shadow: 0 0 8px var(--signal-glow); }
[dir="rtl"] .thl { font-family: var(--font-ar); }

/* Screening state machine (kept for parity) */
.screen-track { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-5) 0; }
.screen-node {
  display: flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-subtle);
  border: 1px solid var(--hairline); border-radius: var(--radius-pill);
  padding: 6px 12px;
}
.screen-node.active { border-color: var(--lumen-blue); color: var(--lumen-bright); }
.screen-node.done { border-color: rgba(163, 189, 24, .45); color: var(--signal-bright); background: var(--signal-dim); }
.screen-node.rejected { border-color: var(--cs-status-error); color: var(--cs-status-error); }

/* Admin / Variant-B config banner */
.config-banner {
  border: 1px solid var(--cs-status-warn);
  background: var(--cs-status-warn-soft);
  color: var(--cs-status-warn);
  border-radius: 0;
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-small); margin: var(--sp-5) 0;
}
.config-banner b { font-weight: 600; }

/* ── NDA two-column ───────────────────────────────────────── */
.nda-doc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--hairline-strong); border-radius: 0; overflow: hidden; background: var(--surface-1); }
.nda-col { padding: var(--sp-6); font-size: var(--fs-small); line-height: 1.7; color: var(--ink-muted); max-height: 60vh; overflow-y: auto; white-space: pre-wrap; }
.nda-col.en { border-inline-end: 1px solid var(--hairline); }
.nda-col.ar { font-family: var(--font-ar); direction: rtl; text-align: right; }
.nda-col h3 { font-family: var(--font-disp); font-size: 15px; color: var(--ink); font-weight: 500; margin: 0 0 var(--sp-3); letter-spacing: 0; }
.nda-col.ar h3 { font-family: var(--font-ar); }
.nda-col::-webkit-scrollbar { width: 10px; }
.nda-col::-webkit-scrollbar-track { background: transparent; }
.nda-col::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 5px; }
@media (max-width: 760px) { .nda-doc { grid-template-columns: 1fr; } .nda-col.en { border-inline-end: 0; border-bottom: 1px solid var(--hairline); } }

/* ── State feedback ───────────────────────────────────────── */
.plat-alert { border-radius: 0; padding: var(--sp-4) var(--sp-5); font-size: var(--fs-small); border: 1px solid var(--hairline-strong); background: var(--surface-1); color: var(--ink-muted); }
.plat-alert-success { border-color: rgba(163, 189, 24, .45); background: var(--signal-dim); color: var(--signal-bright); }
.plat-alert-error { border-color: var(--cs-status-error); background: var(--cs-status-error-soft); color: var(--cs-status-error); }
.plat-alert-rejected { border-color: var(--cs-status-error); background: var(--cs-status-error-soft); color: var(--cs-status-error); }
.plat-alert-info { border-color: var(--lumen-blue); background: rgba(46, 124, 214, .10); color: var(--lumen-bright); }

/* Loading */
.plat-loading { display: flex; align-items: center; gap: var(--sp-3); color: var(--ink-muted); font-size: var(--fs-small); }
.plat-spinner { width: 18px; height: 18px; border: 2px solid var(--hairline-strong); border-top-color: var(--signal); border-radius: 50%; animation: plat-spin .8s linear infinite; }
@keyframes plat-spin { to { transform: rotate(360deg); } }

/* ── Privacy policy doc — dark prose, hairline-ruled ──────── */
.policy-doc {
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  border-radius: 0;
  padding: clamp(28px, 4.5vw, 56px);
}
.policy-doc h2 {
  font-family: var(--font-disp); font-weight: 400;
  font-size: clamp(19px, 2.1vw, 25px); letter-spacing: -.015em;
  color: var(--ink);
  margin: var(--sp-6) 0 var(--sp-3);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--hairline);
}
.policy-doc h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.policy-doc .lang-en-content > h2:first-child,
.policy-doc .lang-ar-content > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.policy-doc p { font-size: var(--fs-body); color: var(--ink-muted); line-height: 1.7; margin: 0 0 var(--sp-4); }
.policy-doc .meta { font-size: var(--fs-small); color: var(--ink-subtle); font-style: italic; }
[dir="rtl"] .policy-doc, .policy-doc .lang-ar-content { font-family: var(--font-ar); }
.policy-doc .lang-ar-content { text-align: right; }

/* ============================================================
   Motion / effects (transform + opacity + border only)
   ============================================================ */
@keyframes cs-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes cs-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.val-anim { animation: cs-fade-up .4s var(--ease-out) both; }
.res-reveal { animation: cs-fade-up .5s var(--ease-out) both; }

/* Football-field bars grow from the start edge when shown */
.ff-bar-today, .ff-bar-prep { transform-box: fill-box; transform-origin: left center; transform: scaleX(0); }
.ff-svg.ff-grow .ff-bar-today, .ff-svg.ff-grow .ff-bar-prep { transform: scaleX(1); transition: transform .7s var(--ease-out); }

/* Tile hover — hairline warms toward the signal, 2px lift */
.deal-grid .deal-card:hover {
  border-color: rgba(163, 189, 24, .45);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .4), 0 0 34px rgba(163, 189, 24, .05);
}

/* Investment segment bar fills on teaser open */
.invest-seg-yr { transform: scaleX(0); transform-origin: left center; transition: transform .45s var(--ease-standard); }
html[dir="rtl"] .invest-seg-yr { transform-origin: right center; }
.invest-seg.grow .invest-seg-yr { transform: scaleX(1); }
.invest-seg.grow .invest-seg-yr:nth-child(2) { transition-delay: .08s; }
.invest-seg.grow .invest-seg-yr:nth-child(3) { transition-delay: .16s; }
.invest-seg.grow .invest-seg-yr:nth-child(4) { transition-delay: .24s; }
.invest-seg.grow .invest-seg-yr:nth-child(5) { transition-delay: .32s; }
.invest-seg.grow .invest-seg-yr:nth-child(6) { transition-delay: .40s; }

/* Calculating skeleton (pulse) */
.val-skeleton { display: flex; flex-direction: column; gap: var(--sp-4); }
.val-skeleton .skel { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 0; animation: cs-pulse 1.1s ease-in-out infinite; }

/* ── Responsive pass (mirrors features.css behavior) ──────── */
@media (max-width: 760px) {
  .plat-hero h1 { font-size: clamp(28px, 8vw, 36px); }
  .plat-hero.b1-page-hero { padding-top: calc(var(--nav-h) + 48px); padding-bottom: 40px; }
  .plat-banner + .plat-hero.b1-page-hero { padding-top: 40px; }
  .plat-card-head { padding: var(--sp-4) var(--sp-5) var(--sp-3); }
  .plat-card-body { padding: var(--sp-5) var(--sp-4); }
  .plat-nav { flex-wrap: wrap; }
  .plat-rate-row { flex-direction: column; align-items: flex-start; gap: var(--sp-3); }
  .plat-rate-opts { align-self: stretch; justify-content: flex-start; }
  .deal-toolbar { flex-direction: column; align-items: stretch; }
  .deal-viewtoggle { margin-inline-start: 0; align-self: flex-start; }
  .val-hook { padding: var(--sp-5) var(--sp-4); }
  .policy-doc { padding: var(--sp-5) var(--sp-4); }
  .res-card-value { font-size: 26px; }
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .val-anim, .res-reveal, .val-skeleton .skel, .plat-spinner { animation: none !important; }
  .ff-bar-today, .ff-bar-prep, .invest-seg-yr { transform: none !important; transition: none !important; }
  .deal-grid .deal-card:hover, .btn:hover { transform: none; }
}
