/* Poyiva app stylesheet — extracted from render_page() inline <style> (Phase 2). */
    :root {
      color-scheme: light;
      /* Consolidated onto the design system (poyiva-ds.css `--pd-*`, single source of truth).
         Legacy names are kept as thin aliases so the ~267 existing usages resolve to the DS
         and gain `.pd-dark` theme-awareness for free. Literal fallback = the DS value, so this
         never breaks even if a page skips poyiva-ds.css. Brand-fixed tokens stay literal. */
      --bg: var(--pd-bg, #f6f4ef);
      --bg-2: var(--pd-tint, #f1efe8);
      --ink: var(--pd-ink, #24221f);
      --muted: var(--pd-ink2, #6f6a61);
      --line: var(--pd-line, #e2ddd0);
      --line-strong: var(--pd-line-strong, #bdb5a6);
      --panel: var(--pd-card, #ffffff);
      --subtle: var(--pd-tint, #f1efe8);
      --accent: var(--pd-gold, #c79a32);
      --teal: var(--pd-teal, #0e7c73);
      --blue: var(--pd-blue, #2e6f9e);
      --amber: var(--pd-amber, #a9750d);
      --red: var(--pd-bad, #a5342a);
      --rust: var(--pd-bad, #a5342a);
      --graphite: #141312;   /* fixed dark topbar — intentionally theme-independent */
      --graphite-2: #24221F;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      background: var(--bg);
      color: var(--ink);
      font-family: "Avenir Next", Inter, "Helvetica Neue", Arial, sans-serif;
      font-size: 14px;
      line-height: 1.45;
    }
    header {
      border-bottom: 1px solid rgba(248, 247, 243, 0.10);
      background: var(--graphite);
      color: #F8F7F3;
      position: sticky;
      top: 0;
      z-index: 1;
    }
    .topbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 18px;
      width: 100%;
      margin: 0;
      padding: 12px 18px 12px 8px;
    }
    .brand-lockup { display: flex; align-items: center; gap: 0; min-width: 0; }
    .powered-by-link {
      display: inline-flex;
      align-items: center;
      line-height: 1;
      text-decoration: none;
      white-space: nowrap;
      background: transparent;
      border: 0;
      box-shadow: none;
      padding: 0;
    }
    .powered-by-link span {
      color: inherit;
      display: inline-flex;
      align-items: center;
      font-size: 10px;
      letter-spacing: 0;
    }
    .powered-by-link:hover, .powered-by-link:focus-visible {
      color: #F8F7F3;
      outline: none;
    }
    .powered-by-link img {
      display: block;
      width: 118px;
      height: auto;
      flex: 0 0 auto;
      background: transparent !important;
      border: 0;
      border-radius: 0;
      box-shadow: none;
    }
    .customer-bar {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 14px;
      margin-left: auto;
      min-width: 0;
    }
    .customer-identity {
      display: grid;
      gap: 1px;
      text-align: right;
      color: rgba(248,247,243,0.74);
      line-height: 1.12;
    }
    .customer-identity strong {
      color: #fff;
      font-size: 13px;
      font-weight: 820;
    }
    .customer-identity span {
      font-size: 12px;
      color: rgba(248,247,243,0.68);
    }
    .topbar-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 36px;
      padding: 8px 14px;
      border-radius: 7px;
      border: 1px solid #F8F7F3;
      background: #F8F7F3;
      color: var(--graphite);
      text-decoration: none;
      font-weight: 820;
      white-space: nowrap;
      box-shadow: 0 12px 28px rgba(0,0,0,0.20);
    }
    .topbar-button:hover, .topbar-button:focus-visible {
      outline: none;
      background: #fff;
      border-color: #fff;
    }
    .topbar-button-secondary {
      background: transparent;
      color: #F8F7F3;
      border-color: rgba(248,247,243,0.34);
      box-shadow: none;
    }
    .topbar-button-secondary:hover, .topbar-button-secondary:focus-visible {
      color: var(--graphite);
      background: #F8F7F3;
      border-color: #F8F7F3;
    }
    .product-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
    .product-name {
      font-weight: 750;
      letter-spacing: 0;
      font-size: 18px;
      color: #ffffff;
      line-height: 1;
    }
    .tm {
      font-size: .34em;
      vertical-align: super;
      margin-left: .16em;
      letter-spacing: .04em;
      font-weight: 800;
    }
    .subline { color: #D9D4C7; font-size: 13px; }
    main { max-width: 1320px; margin: 0 auto; padding: 18px 20px 36px; min-width: 0; }
    .grid { display: grid; gap: 14px; min-width: 0; }
    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .panel {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 14px;
      min-width: 0;
      overflow: hidden;
    }
    .grid > *, .workbench-hero > *, .status-board > * { min-width: 0; }
    h1, h2, h3 { margin: 0 0 10px; line-height: 1.18; letter-spacing: 0; }
    h1 { font-size: 22px; }
    h2 { font-size: 16px; }
    h3 { font-size: 14px; color: var(--muted); }
    form { display: grid; grid-template-columns: 2fr 1.2fr 0.8fr 0.8fr auto; gap: 10px; align-items: end; }
    label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
    input, button, select, textarea {
      font: inherit;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: #fff;
      color: var(--ink);
      min-height: 36px;
      padding: 7px 9px;
    }
    input[type=file] { padding: 6px; }
    button, .button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      background: var(--blue);
      color: #fff;
      border-color: var(--blue);
      font-weight: 650;
      text-decoration: none;
      white-space: nowrap;
      max-width: 100%;
    }
    .button.secondary { background: #fff; color: var(--blue); }
    header .button.secondary { background: #F8F7F3; color: var(--graphite); border-color: #F8F7F3; }
    .button.ghost { background: var(--subtle); color: var(--ink); border-color: var(--line); }
    header .button.ghost { background: transparent; color: #F8F7F3; border-color: rgba(248,247,243,0.22); }
    body:has(.launch-screen) {
      background: #070a0d;
      overflow-x: hidden;
    }
    body:has(.launch-screen) main {
      max-width: none;
      width: 100%;
      margin: 0;
      padding: 0;
    }
    body:has(.launch-screen) .topbar { justify-content: space-between; }
    body:has(.import-screen) {
      background: #06090b;
      overflow-x: hidden;
    }
    body:has(.import-screen) main {
      max-width: none;
      width: 100%;
      margin: 0;
      padding: 0;
    }
    body:has(.import-screen) .topbar { justify-content: space-between; }
    body:has(.directory-screen) {
      background: #030607;
      color: #f7f3e8;
      overflow: hidden;
    }
    body:has(.directory-screen) main {
      max-width: none;
      width: 100%;
      margin: 0;
      padding: 0;
    }
    body:has(.directory-screen) .topbar {
      justify-content: space-between;
      background: rgba(3, 6, 7, 0.97);
      border-bottom-color: rgba(255,255,255,0.12);
    }
    body:has(.module-landing) {
      background: #030607;
      color: #f7f3e8;
      overflow-x: hidden;
    }
    body:has(.module-landing) main {
      max-width: none;
      width: 100%;
      margin: 0;
      padding: 0;
    }
    body:has(.module-landing) .topbar {
      background: rgba(3, 6, 7, 0.97);
      border-bottom-color: rgba(255,255,255,0.12);
    }
    .metric {
      display: grid;
      gap: 4px;
      min-height: 72px;
    }
    .metric-value { font-size: 24px; font-weight: 750; }
    .metric-label { color: var(--muted); font-size: 12px; }
    .status { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-weight: 650; font-size: 12px; }
    .status.ok { background: #e6f4ef; color: #0f5f55; }
    .status.warn { background: #fff4df; color: #8a4d00; }
    .status.err { background: #fde8ee; color: #991b3d; }
    .status.info { background: #e6eef5; color: #1f5d84; }
    .module-card { display: grid; gap: 10px; align-content: start; }
    .module-card h2 { border-left: 3px solid var(--accent); padding-left: 9px; }
    .module-meta { display: flex; gap: 6px; flex-wrap: wrap; }
    .evidence-contract {
      display: grid;
      gap: 8px;
      border: 1px solid rgba(14,124,115,0.28);
      border-left: 4px solid var(--teal);
      border-radius: 8px;
      background: rgba(255,255,255,0.92);
      color: var(--ink);
      padding: 12px 14px;
      margin: 12px 0;
    }
    .evidence-contract span {
      color: var(--teal);
      font-size: 11px;
      font-weight: 820;
      text-transform: uppercase;
    }
    .evidence-contract strong { font-size: 14px; }
    .evidence-contract ul { margin: 0; padding-left: 18px; color: var(--muted); }
    .property-picker { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
    .property-picker a {
      display: inline-flex;
      align-items: center;
      min-height: 30px;
      padding: 5px 8px;
      border: 1px solid var(--line);
      border-radius: 6px;
      color: var(--ink);
      background: #fff;
      text-decoration: none;
      font-weight: 650;
      font-size: 12px;
    }
    .property-picker a.selected { background: var(--blue); border-color: var(--blue); color: #fff; }
    .capability-list { display: grid; gap: 8px; }
    .capability {
      border-top: 1px solid var(--line);
      padding-top: 8px;
      display: grid;
      gap: 5px;
    }
    .capability:first-child { border-top: 0; padding-top: 0; }
    .capability-title { font-weight: 700; }
    .two-col { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 14px; }
    .genealogy-chain { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
    .genealogy-node {
      border: 1px solid var(--line);
      background: var(--subtle);
      border-radius: 6px;
      padding: 6px 8px;
      font-weight: 650;
      font-size: 12px;
    }
    .arrow { color: var(--muted); font-weight: 700; }
    table { width: 100%; border-collapse: collapse; font-size: 12px; }
    th, td { border-bottom: 1px solid var(--line); padding: 6px 7px; text-align: left; vertical-align: top; }
    th { color: var(--muted); font-weight: 700; background: #fbfaf7; position: sticky; top: 0; }
    .table-wrap { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
    .chart-wrap { min-height: 300px; }
    svg { width: 100%; height: auto; display: block; }
    .muted { color: var(--muted); }
    .eyebrow { color: var(--teal); font-size: 12px; font-weight: 760; text-transform: uppercase; letter-spacing: 0; }
    .workbench-hero {
      background: linear-gradient(135deg, #ffffff 0%, #F8F7F3 58%, #EEE9DD 100%);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 18px;
      display: grid;
      grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
      gap: 18px;
      align-items: stretch;
      min-width: 0;
    }
    .hero-title { font-size: 26px; margin-bottom: 8px; }
    .hero-copy { max-width: 780px; color: var(--muted); }
    .action-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
    .status-board { display: grid; gap: 10px; align-content: start; min-width: 0; }
    .status-tile {
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 12px;
      display: grid;
      gap: 4px;
      width: 100%;
      min-width: 0;
    }
    .status-tile strong { font-size: 18px; }
    .status-tile strong, .status-tile span, .unit-pill, td, th, code { overflow-wrap: anywhere; }
    .workflow-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
    body:has(.rheology-dashboard-screen) {
      background: #050808;
      color: #f7f3e8;
      overflow-x: hidden;
    }
    body:has(.rheology-dashboard-screen) main {
      max-width: none;
      width: 100%;
      margin: 0;
      padding: 0;
    }
    body:has(.rheology-dashboard-screen) .topbar {
      background: rgba(3, 6, 7, 0.98);
      border-bottom-color: rgba(255,255,255,0.12);
    }
    .rheology-dashboard-screen {
      min-height: calc(100vh - 61px);
      padding: 20px;
      background:
        linear-gradient(90deg, rgba(3, 6, 7, 0.94), rgba(3, 6, 7, 0.72)),
        linear-gradient(90deg, rgba(199,154,50,0.07) 1px, transparent 1px),
        linear-gradient(0deg, rgba(14,124,115,0.06) 1px, transparent 1px),
        #081012;
      background-size: auto, 84px 84px, 84px 84px, auto;
    }
    .rheo-dashboard-shell {
      width: min(100%, 1580px);
      margin: 0 auto;
      display: grid;
      grid-template-columns: minmax(238px, 280px) minmax(0, 1fr);
      gap: 18px;
      align-items: start;
    }
    .rheo-left-pane {
      position: sticky;
      top: 82px;
      display: grid;
      gap: 16px;
      padding: 16px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 8px;
      background:
        linear-gradient(180deg, rgba(9, 14, 16, 0.94), rgba(6, 10, 12, 0.82)),
        rgba(7, 12, 13, 0.86);
      box-shadow: 0 18px 54px rgba(0,0,0,0.28);
    }
    .rheo-workspace-card {
      display: grid;
      gap: 3px;
      padding-bottom: 14px;
      border-bottom: 1px solid rgba(255,255,255,0.10);
    }
    .rheo-workspace-card span {
      color: rgba(247,243,232,0.48);
      font-size: 11px;
      font-weight: 820;
      text-transform: uppercase;
    }
    .rheo-workspace-card strong {
      color: #fff;
      font-size: 17px;
      line-height: 1.1;
    }
    .rheo-workspace-card small {
      color: rgba(247,243,232,0.58);
      font-size: 12px;
    }
    .rheo-back-button,
    .rheo-side-link {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-height: 42px;
      padding: 9px 11px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 8px;
      background: rgba(255,255,255,0.035);
      color: rgba(247,243,232,0.88);
      text-decoration: none;
      font-weight: 800;
    }
    .rheo-back-button:hover,
    .rheo-back-button:focus-visible,
    .rheo-side-link:hover,
    .rheo-side-link:focus-visible {
      outline: none;
      border-color: rgba(199,154,50,0.72);
      background: rgba(199,154,50,0.14);
      color: #fff;
      box-shadow: 0 0 0 1px rgba(199,154,50,0.18), 0 0 24px rgba(199,154,50,0.10);
    }
    .rheo-nav {
      display: grid;
      gap: 8px;
    }
    .rheo-nav-label {
      color: rgba(247,243,232,0.46);
      font-size: 11px;
      font-weight: 820;
      text-transform: uppercase;
    }
    .rheo-nav a {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 9px;
      align-items: center;
      min-height: 42px;
      padding: 8px 10px;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 8px;
      background: rgba(255,255,255,0.02);
      color: rgba(247,243,232,0.80);
      text-decoration: none;
      font-weight: 760;
    }
    .rheo-nav a::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 999px;
      background: rgba(159,239,202,0.64);
      box-shadow: 0 0 14px rgba(14,124,115,0.45);
    }
    .rheo-nav a:hover,
    .rheo-nav a:focus-visible {
      outline: none;
      color: #fff;
      border-color: rgba(14,124,115,0.58);
      background: rgba(14,124,115,0.12);
    }
    .rheo-main {
      min-width: 0;
      display: grid;
      gap: 16px;
    }
    .rheo-page-head {
      min-height: 174px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 18px;
      align-items: end;
      padding: 24px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 8px;
      color: #f7f3e8;
      background:
        linear-gradient(90deg, rgba(3,6,7,0.95), rgba(3,6,7,0.70)),
        linear-gradient(135deg, rgba(14,124,115,0.22), transparent 44%),
        rgba(7,12,13,0.88);
      box-shadow: 0 24px 56px rgba(0,0,0,0.20);
    }
    .rheo-breadcrumb {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      align-items: center;
      margin: 0 0 10px;
      color: rgba(247,243,232,0.62);
      font-size: 12px;
      font-weight: 860;
      text-transform: uppercase;
    }
    .rheo-breadcrumb a {
      color: rgba(247,243,232,0.84);
      text-decoration: none;
    }
    .rheo-breadcrumb a:hover,
    .rheo-breadcrumb a:focus-visible {
      color: #fff;
      outline: none;
    }
    .rheo-page-head h1 {
      color: #fff;
      font-size: clamp(34px, 4vw, 54px);
      line-height: 0.98;
      margin: 0 0 10px;
    }
    .rheo-page-head p {
      margin: 0;
      max-width: 780px;
      color: rgba(247,243,232,0.78);
      font-size: 15px;
    }
    .rheo-head-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .rheo-head-actions .button {
      min-height: 40px;
      border-radius: 8px;
    }
    .rheo-identity-bar {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 10px;
    }
    .rheo-identity-item,
    .rheo-preview-marker {
      min-height: 78px;
      display: grid;
      gap: 4px;
      align-content: center;
      padding: 12px 13px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 8px;
      background: rgba(248,247,243,0.96);
      color: var(--ink);
      box-shadow: 0 14px 34px rgba(0,0,0,0.16);
    }
    .rheo-identity-item span,
    .rheo-preview-marker span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 840;
      text-transform: uppercase;
    }
    .rheo-identity-item strong,
    .rheo-preview-marker strong {
      overflow-wrap: anywhere;
      font-size: 14px;
      line-height: 1.18;
    }
    .rheo-preview-marker {
      border-color: rgba(199,154,50,0.62);
      border-left: 4px solid var(--accent);
      background: #fff9e9;
    }
    .rheo-dashboard-strip {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }
    .rheo-kpi {
      min-height: 102px;
      padding: 14px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 8px;
      background: rgba(248,247,243,0.97);
      color: var(--ink);
      display: grid;
      gap: 5px;
      align-content: start;
      box-shadow: 0 14px 34px rgba(0,0,0,0.18);
    }
    .rheo-kpi span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 840;
      text-transform: uppercase;
    }
    .rheo-kpi strong {
      font-size: 24px;
      line-height: 1.05;
      overflow-wrap: anywhere;
    }
    .rheo-kpi small {
      color: var(--muted);
      font-size: 12px;
    }
    .rheo-kpi.ok { border-top: 4px solid var(--teal); }
    .rheo-kpi.warn { border-top: 4px solid var(--accent); }
    .rheo-kpi.err { border-top: 4px solid var(--rust); }
    .rheo-section-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
      gap: 14px;
      align-items: start;
    }
    .rheo-section-stack {
      display: grid;
      gap: 14px;
      min-width: 0;
    }
    .rheo-main .panel {
      color: var(--ink);
      box-shadow: 0 16px 38px rgba(0,0,0,0.15);
    }
    .rheo-main .panel h2,
    .rheo-main .panel h3,
    .rheo-main .step strong {
      color: var(--ink);
    }
    .rheo-main .workflow-strip .step {
      color: var(--ink);
      background: rgba(248,247,243,0.97);
    }
    .rheo-anchor {
      scroll-margin-top: 92px;
      min-width: 0;
    }
    .rheo-main .view-toggle {
      margin-bottom: 10px;
    }
    .rheo-main .plot-preview {
      min-height: 330px;
    }
    .start-shell { display: grid; gap: 18px; }
    .start-hero {
      display: grid;
      grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
      gap: 16px;
      align-items: stretch;
      min-width: 0;
    }
    .start-intro {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      padding: 18px;
      display: grid;
      align-content: start;
      gap: 12px;
    }
    .start-title { font-size: 28px; margin: 0; }
    .start-copy { max-width: 720px; color: var(--muted); margin: 0; }
    .primary-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .start-action {
      display: grid;
      gap: 7px;
      align-content: start;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      min-height: 142px;
      padding: 14px;
      text-decoration: none;
      color: var(--ink);
    }
    .start-action.primary { border-color: rgba(46,111,158,0.45); box-shadow: inset 0 0 0 1px rgba(46,111,158,0.10); }
    .start-action:hover { border-color: var(--blue); }
    .action-kicker { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: 0; }
    .action-title { font-size: 19px; font-weight: 760; }
    .action-copy { color: var(--muted); }
    .utility-rail {
      display: grid;
      gap: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      padding: 14px;
      align-content: start;
    }
    .utility-link {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      align-items: center;
      min-height: 46px;
      border-top: 1px solid var(--line);
      padding-top: 9px;
      color: var(--ink);
      text-decoration: none;
    }
    .utility-link:first-of-type { border-top: 0; padding-top: 0; }
    .utility-link strong { font-size: 13px; }
    .utility-link span { color: var(--muted); font-size: 12px; }
    .status-pill {
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 3px 7px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 760;
      white-space: nowrap;
    }
    .recent-list {
      display: grid;
      gap: 8px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      padding: 14px;
    }
    .recent-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      border-top: 1px solid var(--line);
      padding-top: 9px;
      color: var(--ink);
      text-decoration: none;
    }
    .recent-row:first-of-type { border-top: 0; padding-top: 0; }
    .recent-row strong { display: block; }
    .quick-strip {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      padding: 10px;
    }
    .quick-strip .button { min-height: 34px; }
    .launch-screen {
      position: relative;
      min-height: calc(100vh - 69px);
      width: 100%;
      margin: 0;
      overflow: hidden;
      isolation: isolate;
      color: #F8F7F3;
      background: #070a0d;
      --logo-travel-x: 0px;
      --logo-travel-y: -42vh;
      --logo-scale: 1.375;
    }
    .launch-screen::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -3;
      background:
        url("/assets/poyiva-launch-poster-dsr-original-with-approved-plate.png?v=approved-plate-1");
      background-size: cover;
      background-position: center;
      transform: none;
    }
    .login-launch::before {
      background:
        url("/assets/poyiva-login-scope-bg-v2.png?v=scope-2");
      background-size: cover;
      background-position: center;
    }
    .launch-screen::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -2;
      background:
        radial-gradient(circle at 73% 24%, rgba(14,124,115,0.28), transparent 34%),
        radial-gradient(circle at 36% 78%, rgba(199,154,50,0.18), transparent 26%),
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.030) 1px, transparent 1px);
      background-size: auto, auto, 72px 72px, 72px 72px;
      mask-image: linear-gradient(90deg, rgba(0,0,0,0.72), rgba(0,0,0,0.15) 70%, rgba(0,0,0,0.42));
      pointer-events: none;
    }
    .launch-loader {
      position: absolute;
      inset: 0;
      z-index: 8;
      overflow: hidden;
      background: #05080a;
      animation: loaderOut 5.4s cubic-bezier(.2,.8,.2,1) forwards;
      pointer-events: none;
    }
    .launch-video {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      z-index: 6;
      opacity: 1;
      filter: saturate(1.04) contrast(1.03);
    }
    .cinema-bg {
      position: absolute;
      inset: 0;
      z-index: 1;
      background:
        url("/assets/poyiva-launch-poster-dsr-original-with-approved-plate.png?v=approved-plate-1");
      background-size: cover;
      background-position: center;
      filter: saturate(1.04) contrast(1.04);
      transform-origin: 50% 50%;
      will-change: transform, filter;
      animation: cinematicCamera 5.4s cubic-bezier(.18,.86,.22,1) forwards;
    }
    .login-launch .cinema-bg {
      background:
        url("/assets/poyiva-login-scope-bg-v2.png?v=scope-2");
      background-size: cover;
      background-position: center;
    }
    .cinema-vignette {
      position: absolute;
      inset: 0;
      z-index: 3;
      background:
        radial-gradient(circle at 72% 38%, rgba(86,180,233,0.28), transparent 22%),
        radial-gradient(circle at 76% 72%, rgba(199,154,50,0.24), transparent 24%),
        linear-gradient(0deg, rgba(5,8,10,0.82), transparent 44%, rgba(5,8,10,0.72));
      animation: cinematicGlow 5.4s ease-out forwards;
    }
    .cinema-scan {
      position: absolute;
      z-index: 4;
      top: -12%;
      bottom: -12%;
      width: 19%;
      left: -24%;
      background: linear-gradient(90deg, transparent, rgba(86,180,233,0.22), rgba(248,247,243,0.12), transparent);
      filter: blur(1px);
      transform: skewX(-16deg);
      animation: cinematicScan 3.4s cubic-bezier(.42,0,.18,1) forwards;
    }
    .cinema-probe {
      position: absolute;
      z-index: 5;
      right: clamp(80px, 18vw, 300px);
      top: clamp(155px, 25vh, 275px);
      width: 104px;
      height: 104px;
      border: 1px solid rgba(86,180,233,0.58);
      border-radius: 999px;
      opacity: 0;
      box-shadow:
        0 0 28px rgba(86,180,233,0.28),
        inset 0 0 22px rgba(86,180,233,0.12);
      animation: probePulse 3.2s ease-out .42s forwards;
    }
    .cinema-probe::before, .cinema-probe::after {
      content: "";
      position: absolute;
      inset: 16px;
      border: 1px solid rgba(199,154,50,0.42);
      border-radius: inherit;
    }
    .cinema-probe::after {
      inset: -18px;
      border-color: rgba(86,180,233,0.18);
    }
    .cinema-logo {
      position: absolute;
      z-index: 5;
      left: clamp(24px, 5vw, 72px);
      bottom: clamp(28px, 6vw, 80px);
      display: flex;
      align-items: center;
      gap: 14px;
      opacity: 0;
      transform: translate3d(0, 18px, 0) scale(.98);
      transform-origin: left top;
      will-change: transform, opacity, filter;
      animation: cinemaLogoMerge 5.4s cubic-bezier(.18,.86,.22,1) forwards;
    }
    .cinema-logo strong {
      display: block;
      color: #fff;
      font-size: clamp(30px, 4.1vw, 58px);
      line-height: 1;
      letter-spacing: 0;
      white-space: nowrap;
    }
    .loader-line {
      position: absolute;
      z-index: 7;
      left: clamp(24px, 5vw, 72px);
      right: clamp(24px, 5vw, 72px);
      bottom: 18px;
      height: 2px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(248,247,243,0.16);
    }
    .loader-line span {
      display: block;
      height: 100%;
      width: 72%;
      border-radius: inherit;
      background: linear-gradient(90deg, #0E7C73, #56B4E9, #C79A32);
      animation: loaderLine 3.85s cubic-bezier(.42,0,.18,1) forwards;
    }
    .launch-content {
      position: relative;
      min-height: calc(100vh - 69px);
      display: grid;
      grid-template-columns: minmax(320px, 0.86fr) minmax(280px, 0.44fr);
      gap: 22px;
      align-items: center;
      padding: clamp(28px, 5vw, 72px);
    }
    .launch-back {
      position: absolute;
      z-index: 9;
      top: clamp(18px, 3vw, 34px);
      right: clamp(18px, 4vw, 56px);
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 38px;
      padding: 8px 12px;
      border: 1px solid rgba(248,247,243,0.18);
      border-radius: 8px;
      color: #F8F7F3;
      background: rgba(8,12,15,0.52);
      backdrop-filter: blur(16px);
      text-decoration: none;
      font-weight: 760;
      box-shadow: 0 14px 40px rgba(0,0,0,0.22);
    }
    .launch-back:hover, .launch-back:focus-visible {
      border-color: rgba(248,247,243,0.42);
      outline: none;
    }
    .launch-copy {
      max-width: 680px;
      display: grid;
      gap: 18px;
      animation: launchRise .8s ease-out .55s both;
    }
    .launch-kicker {
      display: inline-flex;
      width: fit-content;
      align-items: center;
      gap: 8px;
      border: 1px solid rgba(248,247,243,0.18);
      border-radius: 999px;
      background: rgba(8,12,15,0.46);
      color: rgba(248,247,243,0.84);
      backdrop-filter: blur(14px);
      padding: 6px 10px;
      font-size: 12px;
      font-weight: 760;
    }
    .live-dot {
      width: 8px;
      height: 8px;
      border-radius: 999px;
      background: #0E7C73;
      box-shadow: 0 0 0 6px rgba(14,124,115,0.18);
    }
    .launch-title {
      margin: 0;
      max-width: none;
      color: #fff;
      font-size: clamp(38px, 5.8vw, 78px);
      line-height: 1;
      letter-spacing: 0;
      text-shadow: 0 20px 60px rgba(0,0,0,0.36);
      user-select: none;
      white-space: nowrap;
    }
    .launch-title .tm, .cinema-logo .tm { font-size: .18em; margin-left: .08em; }
    .launch-subtitle {
      margin: 0;
      max-width: 520px;
      color: rgba(248,247,243,0.74);
      font-size: clamp(16px, 1.8vw, 21px);
      line-height: 1.35;
    }
    .launch-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 220px));
      gap: 12px;
      margin-top: 4px;
    }
    .launch-action {
      position: relative;
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 12px;
      align-items: center;
      min-height: 92px;
      border: 1px solid rgba(248,247,243,0.16);
      border-radius: 8px;
      padding: 16px;
      color: #F8F7F3;
      text-decoration: none;
      background: rgba(20,24,27,0.54);
      backdrop-filter: blur(18px);
      box-shadow: 0 18px 50px rgba(0,0,0,0.20);
      transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
    }
    .launch-action.primary {
      background: linear-gradient(135deg, rgba(46,111,158,0.82), rgba(14,124,115,0.70));
      border-color: rgba(86,180,233,0.42);
      box-shadow: 0 24px 70px rgba(14,124,115,0.22);
    }
    .launch-action:hover, .launch-action:focus-visible {
      transform: translateY(-3px);
      border-color: rgba(248,247,243,0.44);
      box-shadow: 0 28px 74px rgba(0,0,0,0.34);
      outline: none;
    }
    .launch-action:active { transform: translateY(-1px) scale(.99); }
    .action-icon {
      width: 38px;
      height: 38px;
      border-radius: 8px;
      display: grid;
      place-items: center;
      background: rgba(248,247,243,0.12);
      color: #fff;
    }
    .launch-action strong { display: block; font-size: 18px; line-height: 1.1; }
    .launch-action small { color: rgba(248,247,243,0.66); font-weight: 650; }
    .login-form {
      width: min(510px, 100%);
      display: grid;
      gap: 12px;
      margin-top: 2px;
    }
    .login-fields {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }
    .login-field {
      display: grid;
      gap: 6px;
      color: rgba(248,247,243,0.70);
      font-size: 12px;
      font-weight: 720;
    }
    .login-field input {
      width: 100%;
      min-height: 52px;
      border-radius: 8px;
      border-color: rgba(248,247,243,0.18);
      background: rgba(20,24,27,0.54);
      color: #fff;
      backdrop-filter: blur(18px);
      box-shadow: 0 18px 50px rgba(0,0,0,0.20);
      padding: 11px 13px;
    }
    .login-field input:focus {
      border-color: rgba(86,180,233,0.56);
      outline: none;
      box-shadow: 0 0 0 3px rgba(86,180,233,0.14), 0 18px 50px rgba(0,0,0,0.22);
    }
    .login-submit {
      min-height: 58px;
      border-radius: 8px;
      border-color: rgba(86,180,233,0.42);
      background: linear-gradient(135deg, rgba(46,111,158,0.88), rgba(14,124,115,0.76));
      color: #fff;
      box-shadow: 0 24px 70px rgba(14,124,115,0.22);
      cursor: pointer;
    }
    .login-submit:hover, .login-submit:focus-visible {
      border-color: rgba(248,247,243,0.44);
      box-shadow: 0 28px 74px rgba(0,0,0,0.34);
      outline: none;
      transform: translateY(-2px);
    }
    .login-note {
      margin: 0;
      color: rgba(248,247,243,0.58);
      font-size: 12px;
    }
    .login-dialog {
      width: min(430px, calc(100vw - 34px));
      border: 0;
      border-radius: 8px;
      padding: 0;
      color: var(--ink);
      background: transparent;
      box-shadow: 0 28px 90px rgba(0,0,0,0.48);
    }
    .login-dialog::backdrop {
      background: rgba(0,0,0,0.48);
      backdrop-filter: blur(3px);
    }
    .login-card {
      display: grid;
      grid-template-columns: 1fr;
      gap: 14px;
      align-items: stretch;
      margin: 0;
      padding: 22px;
      border-radius: 8px;
      background: #fff;
      border: 1px solid rgba(217,212,199,0.92);
      box-sizing: border-box;
    }
    .login-card h2 {
      margin: 0;
      font-size: 24px;
      line-height: 1.1;
      color: var(--ink);
    }
    .login-card p {
      margin: 0;
      color: var(--muted);
      line-height: 1.45;
    }
    .login-card .modal-kicker {
      color: var(--teal);
      font-size: 12px;
      font-weight: 850;
      text-transform: uppercase;
    }
    .login-card label {
      display: grid;
      gap: 6px;
      color: var(--ink);
      font-size: 12px;
      font-weight: 780;
    }
    .login-card input {
      width: 100%;
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: 6px;
      padding: 10px 11px;
      color: var(--ink);
      background: #fffdf8;
    }
    .login-card input:focus {
      border-color: var(--accent);
      outline: none;
      box-shadow: 0 0 0 3px rgba(199,154,50,0.18);
    }
    .login-card .login-submit {
      width: 100%;
      min-height: 44px;
      border-radius: 6px;
      border: 0;
      background: #111;
      color: #fff;
      box-shadow: none;
      transform: none;
    }
    .login-card .login-submit:hover,
    .login-card .login-submit:focus-visible {
      transform: none;
      box-shadow: 0 0 0 3px rgba(17,17,17,0.14);
    }
    .login-card .login-cancel {
      width: 100%;
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: #fff;
      color: var(--ink);
      font-weight: 780;
      cursor: pointer;
    }
    .launch-side {
      align-self: end;
      display: grid;
      gap: 10px;
      animation: launchRise .8s ease-out .72s both;
    }
    .sample-tile {
      display: grid;
      gap: 5px;
      border: 1px solid rgba(248,247,243,0.14);
      border-radius: 8px;
      background: rgba(8,12,15,0.46);
      color: #F8F7F3;
      text-decoration: none;
      backdrop-filter: blur(16px);
      padding: 13px;
      transition: transform .18s ease, border-color .18s ease, background .18s ease;
    }
    .sample-tile:hover, .sample-tile:focus-visible {
      transform: translateY(-2px);
      border-color: rgba(199,154,50,0.56);
      background: rgba(8,12,15,0.62);
      outline: none;
    }
    .sample-tile span { color: rgba(248,247,243,0.58); font-size: 12px; }
    .launch-dock {
      position: absolute;
      left: clamp(20px, 5vw, 72px);
      right: clamp(20px, 5vw, 72px);
      bottom: 24px;
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 10px;
      animation: launchRise .8s ease-out .86s both;
    }
    .dock-item {
      position: relative;
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 9px;
      align-items: center;
      min-height: 54px;
      border: 1px solid rgba(248,247,243,0.12);
      border-radius: 8px;
      background: rgba(8,12,15,0.42);
      color: rgba(248,247,243,0.88);
      text-decoration: none;
      backdrop-filter: blur(14px);
      padding: 10px;
      transition: transform .18s ease, border-color .18s ease, background .18s ease;
    }
    .dock-item:hover, .dock-item:focus-visible {
      transform: translateY(-2px);
      border-color: rgba(86,180,233,0.42);
      background: rgba(8,12,15,0.60);
      outline: none;
    }
    .dock-item.planned { opacity: .72; }
    .dock-icon {
      width: 28px;
      height: 28px;
      border-radius: 7px;
      display: grid;
      place-items: center;
      background: rgba(248,247,243,0.10);
    }
    .dock-item strong { font-size: 13px; }
    .dock-item em {
      font-style: normal;
      border: 1px solid rgba(248,247,243,0.16);
      border-radius: 999px;
      padding: 2px 7px;
      color: rgba(248,247,243,0.64);
      font-size: 11px;
      font-weight: 760;
    }
    .dock-item[data-tip]::after {
      content: attr(data-tip);
      position: absolute;
      left: 10px;
      right: 10px;
      bottom: calc(100% + 8px);
      opacity: 0;
      transform: translateY(4px);
      pointer-events: none;
      border: 1px solid rgba(248,247,243,0.13);
      border-radius: 8px;
      background: rgba(6,9,11,0.92);
      color: rgba(248,247,243,0.82);
      padding: 8px 9px;
      font-size: 12px;
      line-height: 1.3;
      box-shadow: 0 18px 45px rgba(0,0,0,0.35);
      transition: opacity .18s ease, transform .18s ease;
    }
    .dock-item[data-tip]:hover::after, .dock-item[data-tip]:focus-visible::after {
      opacity: 1;
      transform: translateY(0);
    }
    .import-screen {
      position: relative;
      min-height: calc(100vh - 69px);
      width: 100%;
      color: #F8F7F3;
      background: #06090b;
      overflow: hidden;
      isolation: isolate;
    }
    .import-screen::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -2;
      background:
        linear-gradient(90deg, rgba(4,7,9,0.96) 0%, rgba(4,7,9,0.76) 44%, rgba(4,7,9,0.22) 74%, rgba(4,7,9,0.62) 100%),
        linear-gradient(0deg, rgba(4,7,9,0.84), rgba(4,7,9,0.08) 48%, rgba(4,7,9,0.62)),
        url("/assets/poyiva-import-bg.png");
      background-size: cover;
      background-position: center;
    }
    .import-screen::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      pointer-events: none;
      background:
        radial-gradient(circle at 72% 24%, rgba(14,124,115,0.20), transparent 30%),
        radial-gradient(circle at 70% 78%, rgba(199,154,50,0.16), transparent 28%),
        linear-gradient(rgba(255,255,255,0.030) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.024) 1px, transparent 1px);
      background-size: auto, auto, 72px 72px, 72px 72px;
      opacity: .76;
    }
    .import-shell {
      min-height: calc(100vh - 69px);
      display: grid;
      align-items: center;
      padding: clamp(22px, 5vw, 72px);
    }
    .import-card {
      width: min(620px, 100%);
      display: grid;
      gap: 18px;
      border: 1px solid rgba(248,247,243,0.16);
      border-radius: 8px;
      background: rgba(7,12,15,0.70);
      box-shadow: 0 28px 90px rgba(0,0,0,0.34);
      backdrop-filter: blur(18px);
      padding: clamp(20px, 3.2vw, 34px);
    }
    .import-card h1 {
      margin: 0;
      color: #fff;
      font-size: clamp(34px, 5vw, 62px);
      line-height: .96;
    }
    .import-card p {
      margin: 0;
      max-width: 520px;
      color: rgba(248,247,243,0.74);
      font-size: 15px;
    }
    .import-kicker {
      display: inline-flex;
      width: fit-content;
      align-items: center;
      gap: 8px;
      color: rgba(248,247,243,0.84);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: .08em;
    }
    .import-path {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      color: rgba(248,247,243,0.60);
      font-size: 12px;
    }
    .import-path span {
      border: 1px solid rgba(248,247,243,0.14);
      border-radius: 999px;
      padding: 4px 8px;
      background: rgba(248,247,243,0.06);
    }
    .import-form {
      display: grid;
      grid-template-columns: 1fr;
      gap: 14px;
      align-items: stretch;
    }
    .import-field-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 12px;
    }
    .import-form label {
      color: rgba(248,247,243,0.70);
      font-size: 12px;
      font-weight: 650;
    }
    .import-form input,
    .import-form select {
      width: 100%;
      border-color: rgba(248,247,243,0.18);
      background: rgba(248,247,243,0.08);
      color: #fff;
      min-height: 44px;
    }
    .import-form select option { color: var(--ink); background: #fff; }
    .import-form input::file-selector-button {
      border: 0;
      border-radius: 6px;
      background: rgba(248,247,243,0.16);
      color: #fff;
      font: inherit;
      font-weight: 700;
      padding: 7px 10px;
      margin-right: 10px;
    }
    .import-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: space-between;
      align-items: center;
      padding-top: 2px;
    }
    .import-actions .button,
    .import-actions button {
      min-height: 46px;
      border-radius: 8px;
      padding: 10px 16px;
    }
    .import-actions .button {
      background: rgba(248,247,243,0.08);
      color: #F8F7F3;
      border-color: rgba(248,247,243,0.18);
    }
    .import-actions button {
      background: linear-gradient(135deg, #0E7C73, #2E6F9E);
      border-color: rgba(86,180,233,0.26);
      box-shadow: 0 14px 36px rgba(14,124,115,0.22);
    }
    .review-gate {
      display: grid;
      gap: 16px;
    }
    .review-hero {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 18px;
      align-items: end;
      border: 1px solid var(--line);
      border-radius: 8px;
      background:
        linear-gradient(135deg, rgba(255,255,255,0.96), rgba(241,238,230,0.94)),
        url("/assets/poyiva-import-bg.png");
      background-size: cover;
      background-position: center;
      padding: 18px;
      overflow: hidden;
    }
    .review-hero h1 { font-size: 30px; }
    .gate-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      justify-content: flex-end;
      max-width: 560px;
    }
    .gate-actions.static { display: flex; }
    .gate-actions input[type="hidden"] { display: none; }
    .override-reason {
      flex: 1 1 100%;
      display: grid;
      gap: 5px;
      color: var(--muted);
      font-weight: 700;
    }
    .override-reason textarea {
      width: 100%;
      min-height: 76px;
      resize: vertical;
      background: rgba(255,255,255,0.92);
    }
    .review-file-grid { grid-template-columns: 1fr; }
    .review-file-card {
      display: grid;
      gap: 12px;
      border-top: 4px solid var(--teal);
    }
    .review-file-card.warning { border-top-color: var(--accent); }
    .review-file-card.error { border-top-color: var(--rust); }
    .review-card-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: start;
    }
    .review-card-head h2 { margin-bottom: 4px; }
    .review-chip-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
    }
    .review-chip {
      display: inline-flex;
      align-items: center;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 4px 8px;
      background: var(--subtle);
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      overflow-wrap: anywhere;
    }
    .intake-structure {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      align-items: center;
      margin-bottom: 10px;
    }
    .intake-node {
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--subtle);
      padding: 5px 9px;
      font-weight: 750;
      font-size: 12px;
    }
    .issue-list {
      display: grid;
      gap: 6px;
      margin-top: 4px;
    }
    .issue {
      border-left: 3px solid var(--accent);
      padding: 6px 8px;
      background: #fffaf0;
      color: var(--muted);
      font-size: 12px;
    }
    .issue.error {
      border-left-color: var(--rust);
      background: #fff8fa;
    }
    .directory-screen {
      position: relative;
      min-height: calc(100vh - 69px);
      padding: 0;
      overflow: hidden;
      isolation: isolate;
      color: #f7f3e8;
      background: #020506;
    }
    .directory-screen::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 2;
      background:
        linear-gradient(90deg, rgba(0,0,0,0.68), transparent 31%, transparent 76%, rgba(0,0,0,0.22)),
        linear-gradient(180deg, rgba(0,0,0,0.34), transparent 26%, rgba(0,0,0,0.2));
      pointer-events: none;
    }
    .directory-shell {
      position: relative;
      width: 100%;
      min-height: calc(100vh - 69px);
      overflow: hidden;
    }
    .directory-head {
      position: absolute;
      z-index: 4;
      left: clamp(24px, 4vw, 64px);
      top: clamp(18px, 4vh, 38px);
      max-width: 340px;
      display: grid;
      gap: 6px;
      padding: 12px 14px;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 8px;
      background: linear-gradient(135deg, rgba(5,7,7,0.86), rgba(5,7,7,0.46));
      backdrop-filter: blur(2px);
    }
    .directory-breadcrumb {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      color: rgba(234,232,226,0.78);
      font-size: 12px;
      font-weight: 760;
      text-transform: uppercase;
    }
    .directory-title {
      margin: 0;
      color: #fff;
      font-size: clamp(28px, 3vw, 42px);
      line-height: 1.02;
      letter-spacing: 0;
    }
    .directory-title .tm {
      margin-left: .08em;
      font-size: .18em;
      vertical-align: super;
      letter-spacing: 0;
      font-weight: 800;
    }
    .directory-map {
      position: absolute;
      inset: 0;
      min-height: calc(100vh - 69px);
      border: 0;
      border-radius: 0;
      overflow: hidden;
      background: #020506;
      box-shadow: none;
      isolation: isolate;
    }
    .directory-art {
      position: absolute;
      inset: 0;
      z-index: 1;
      width: 100%;
      height: 100%;
      display: block;
    }
    .directory-art image {
      pointer-events: none;
    }
    .map-scan-field {
      opacity: 0;
      transform-box: fill-box;
      transform-origin: center;
      pointer-events: none;
      transition: opacity 180ms ease;
      mix-blend-mode: screen;
    }
    .scan-link {
      opacity: 0;
      fill: none;
      stroke: url(#directoryScanLink);
      stroke-width: 2.2;
      stroke-linecap: round;
      stroke-dasharray: 9 12;
      vector-effect: non-scaling-stroke;
      pointer-events: none;
      mix-blend-mode: screen;
      filter:
        drop-shadow(0 0 5px rgba(215,255,240,0.82))
        drop-shadow(0 0 18px rgba(105,218,172,0.44));
      transition: opacity 140ms ease;
      animation: scanLinkFlow 1200ms linear infinite;
    }
    .scan-link.is-visible {
      opacity: .92;
    }
    .map-scan-field.is-visible {
      opacity: 1;
    }
    .scan-bloom {
      fill: url(#directoryScanBloom);
      filter:
        blur(1px)
        drop-shadow(0 0 18px rgba(105,218,172,0.72))
        drop-shadow(0 0 40px rgba(14,124,115,0.34));
      animation: scanPulse 1700ms ease-in-out infinite;
    }
    .scan-core {
      fill: url(#directoryScanCore);
      opacity: .88;
      filter:
        drop-shadow(0 0 10px rgba(215,255,240,0.9))
        drop-shadow(0 0 26px rgba(105,218,172,0.52));
      animation: scanCorePulse 900ms ease-in-out infinite alternate;
    }
    .scan-orbit {
      fill: none;
      stroke: rgba(154,255,224,0.68);
      stroke-width: 2.1;
      stroke-dasharray: 28 16 8 16;
      vector-effect: non-scaling-stroke;
      filter:
        drop-shadow(0 0 6px rgba(105,218,172,0.7))
        drop-shadow(0 0 18px rgba(14,124,115,0.42));
      animation: scanOrbit 2600ms linear infinite;
    }
    .scan-orbit.outer {
      stroke: rgba(199,154,50,0.52);
      stroke-width: 1.6;
      stroke-dasharray: 16 18;
      animation-duration: 3900ms;
      animation-direction: reverse;
    }
    .scan-brackets {
      fill: none;
      stroke: rgba(215,255,240,0.92);
      stroke-width: 2.3;
      stroke-linecap: round;
      stroke-linejoin: round;
      vector-effect: non-scaling-stroke;
      filter:
        drop-shadow(0 0 5px rgba(191,255,233,0.72))
        drop-shadow(0 0 15px rgba(105,218,172,0.42));
      animation: scanPulse 1400ms ease-in-out infinite;
    }
    .scan-crosshair {
      fill: none;
      stroke: rgba(215,255,240,0.72);
      stroke-width: 1.4;
      stroke-linecap: round;
      vector-effect: non-scaling-stroke;
      filter: drop-shadow(0 0 8px rgba(105,218,172,0.62));
    }
    .scan-sweep {
      stroke: url(#directoryScanSweep);
      stroke-width: 18;
      stroke-linecap: round;
      vector-effect: non-scaling-stroke;
      opacity: .86;
      filter: blur(.25px);
      animation: scanSweep 1100ms ease-in-out infinite;
    }
    .scan-node {
      fill: #d7fff0;
      filter:
        drop-shadow(0 0 6px rgba(215,255,240,0.9))
        drop-shadow(0 0 14px rgba(105,218,172,0.62));
      animation: scanNode 1600ms ease-in-out infinite;
    }
    .scan-node.node-b {
      animation-delay: -520ms;
    }
    .scan-node.node-c {
      animation-delay: -980ms;
    }
    .map-hitpath {
      outline: none;
      -webkit-tap-highlight-color: transparent;
    }
    .map-hitpath:focus,
    .map-hitpath:focus-visible,
    .map-hitpath:active {
      outline: none;
    }
    .map-hitpath path {
      fill: rgba(255,255,255,0.001);
      stroke: rgba(255,255,255,0);
      pointer-events: fill;
      outline: none;
      transition: fill 160ms ease;
      vector-effect: non-scaling-stroke;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .map-hitpath.enabled path {
      cursor: pointer;
    }
    .map-hitpath.disabled path {
      cursor: default;
    }
    .map-hitpath.is-active path,
    .map-hitpath:hover path,
    .map-hitpath:focus-visible path {
      fill: rgba(105,218,172,0.012);
    }
    .map-hitpath.enabled.is-active path,
    .map-hitpath.enabled:hover path,
    .map-hitpath.enabled:focus-visible path {
      fill: rgba(105,218,172,0.018);
    }
    .directory-hover-panel {
      opacity: 0;
      transform: translateY(12px);
      transition: opacity 160ms ease, transform 160ms ease;
      pointer-events: none;
    }
    .directory-hover-panel.is-visible {
      opacity: 1;
      transform: translateY(0);
    }
    .map-hover-card {
      box-sizing: border-box;
      width: 100%;
      height: 100%;
      padding: 24px 22px;
      border: 1px solid rgba(128,255,217,0.36);
      border-radius: 8px;
      background:
        linear-gradient(145deg, rgba(2,11,12,0.94), rgba(5,22,22,0.86));
      box-shadow:
        0 0 0 1px rgba(105,218,172,0.1),
        0 20px 62px rgba(0,0,0,0.44),
        0 0 38px rgba(14,124,115,0.24);
      color: rgba(247,243,232,0.8);
      font-family: var(--font-display);
      line-height: 1.26;
    }
    .map-hover-card span {
      display: block;
      margin-bottom: 9px;
      color: #b6f1dc;
      font-size: 12px;
      font-weight: 900;
      letter-spacing: .04em;
      text-transform: uppercase;
    }
    .map-hover-card strong {
      display: block;
      margin-bottom: 12px;
      color: #fff;
      font-size: 28px;
      line-height: 1.02;
    }
    .map-hover-card small {
      display: block;
      color: rgba(247,243,232,0.78);
      font-size: 14px;
      line-height: 1.35;
    }
    .map-caption {
      position: absolute;
      z-index: 4;
      left: clamp(20px, 3vw, 40px);
      bottom: clamp(18px, 3vw, 34px);
      width: min(360px, calc(100% - 40px));
      color: rgba(247,243,232,0.74);
      font-size: 13px;
      line-height: 1.45;
    }
    .map-caption strong {
      display: block;
      color: #fff;
      font-size: 15px;
      margin-bottom: 4px;
    }
    @keyframes scanPulse {
      0%, 100% { opacity: .78; }
      50% { opacity: 1; }
    }
    @keyframes scanCorePulse {
      from { transform: scale(.86); opacity: .62; }
      to { transform: scale(1.08); opacity: .94; }
    }
    @keyframes scanOrbit {
      to { stroke-dashoffset: -132; }
    }
    @keyframes scanSweep {
      0% { transform: translateY(-48px); opacity: 0; }
      24% { opacity: .78; }
      70% { opacity: .58; }
      100% { transform: translateY(48px); opacity: 0; }
    }
    @keyframes scanNode {
      0%, 100% { opacity: .35; transform: scale(.72); }
      45% { opacity: 1; transform: scale(1.16); }
    }
    @keyframes scanLinkFlow {
      to { stroke-dashoffset: -42; }
    }
    @media (prefers-reduced-motion: reduce) {
      .scan-link,
      .scan-bloom,
      .scan-core,
      .scan-orbit,
      .scan-brackets,
      .scan-sweep,
      .scan-node {
        animation: none;
      }
    }
    .directory-mobile-tiles {
      display: none;
    }
    .directory-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(210px, 1fr));
      gap: 14px;
      align-items: stretch;
    }
    .directory-tile {
      min-height: 194px;
      padding: 18px;
      border: 1px solid rgba(255,255,255,0.16);
      border-radius: 8px;
      background: rgba(7,12,13,0.72);
      color: rgba(247,243,232,0.78);
      text-align: left;
      text-decoration: none;
      display: grid;
      grid-template-rows: auto auto auto 1fr;
      gap: 9px;
      box-shadow: 0 16px 46px rgba(0,0,0,0.22);
      transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
    }
    .directory-tile.enabled {
      border-color: rgba(199,154,50,0.52);
      background:
        linear-gradient(135deg, rgba(14,124,115,0.34), rgba(7,12,13,0.78) 58%),
        rgba(7,12,13,0.72);
    }
    .directory-tile.enabled:hover, .directory-tile.enabled:focus-visible {
      border-color: #69daac;
      color: #fff;
      outline: none;
      transform: translateY(-2px);
      box-shadow:
        0 0 0 1px rgba(105,218,172,0.24),
        0 22px 70px rgba(0,0,0,0.36),
        0 0 46px rgba(14,124,115,0.24);
    }
    .directory-tile.coming-soon {
      opacity: .64;
      cursor: default;
    }
    .directory-state {
      justify-self: start;
      display: inline-flex;
      align-items: center;
      min-height: 24px;
      padding: 3px 8px;
      border-radius: 999px;
      background: rgba(255,255,255,0.10);
      border: 1px solid rgba(255,255,255,0.16);
      color: rgba(247,243,232,0.88);
      font-size: 11px;
      font-weight: 820;
      text-transform: uppercase;
    }
    .directory-state.active { background: rgba(14,124,115,0.24); color: #e9fffb; }
    .directory-state.preview { background: rgba(199,154,50,0.24); color: #fff4d2; }
    .directory-state.planned { background: rgba(255,255,255,0.08); color: rgba(247,243,232,0.72); }
    .directory-visual {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 4px;
    }
    .directory-icon {
      width: 44px;
      height: 44px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
        rgba(9,14,16,0.92);
      color: rgba(234,208,140,0.92);
    }
    .directory-icon svg {
      width: 21px;
      height: 21px;
      display: block;
    }
    .directory-arrow {
      color: rgba(255,255,255,0.38);
      transition: transform 180ms ease, color 180ms ease;
    }
    .directory-tile.enabled:hover .directory-arrow,
    .directory-tile.enabled:focus-visible .directory-arrow {
      color: #9befca;
      transform: translateX(3px);
    }
    .directory-meta {
      color: rgba(234,208,140,0.88);
      font-size: 12px;
      font-weight: 850;
      text-transform: uppercase;
    }
    .directory-tile strong {
      color: #fff;
      font-size: 22px;
      line-height: 1.1;
    }
    .directory-tile small {
      color: rgba(247,243,232,0.68);
      font-size: 14px;
      line-height: 1.42;
    }
    @keyframes loaderLine {
      from { transform: translateX(-78%); }
      to { transform: translateX(142%); }
    }
    @keyframes loaderOut {
      0%, 84% { opacity: 1; }
      100% { opacity: 0; visibility: hidden; }
    }
    @keyframes cinematicCamera {
      from { transform: scale(1.09) translate3d(1.7%, .55%, 0); filter: saturate(1.0) contrast(1.0); }
      to { transform: scale(1) translate3d(0, 0, 0); filter: saturate(1.04) contrast(1.04); }
    }
    @keyframes cinematicGlow {
      0% { opacity: .20; }
      34% { opacity: .92; }
      68% { opacity: .54; }
      100% { opacity: .20; }
    }
    @keyframes cinematicScan {
      0% { left: -24%; opacity: 0; }
      18% { opacity: .95; }
      78% { left: 112%; opacity: .42; }
      100% { left: 124%; opacity: 0; }
    }
    @keyframes probePulse {
      0% { opacity: 0; transform: scale(.58) translateY(-22px); }
      24% { opacity: .94; transform: scale(1) translateY(0); }
      52% { opacity: .64; transform: scale(1.34) translateY(5px); }
      100% { opacity: 0; transform: scale(1.85) translateY(9px); }
    }
    @keyframes cinemaLogoMerge {
      0%, 24% {
        opacity: 0;
        transform: translate3d(0, 18px, 0) scale(.98);
        filter: blur(5px);
      }
      38% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0);
      }
      58% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0);
      }
      88% {
        opacity: 1;
        transform: translate3d(var(--logo-travel-x), var(--logo-travel-y), 0) scale(var(--logo-scale));
        filter: blur(0);
      }
      100% {
        opacity: 0;
        transform: translate3d(var(--logo-travel-x), var(--logo-travel-y), 0) scale(var(--logo-scale));
        filter: blur(.6px);
      }
    }
    @keyframes launchRise {
      from { opacity: 0; transform: translateY(14px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @media (prefers-reduced-motion: reduce) {
      .launch-screen::before, .launch-loader, .loader-line span, .launch-copy, .launch-side, .launch-dock,
      .cinema-bg, .cinema-vignette, .cinema-scan, .cinema-probe, .cinema-logo {
        animation: none;
      }
      .launch-loader { display: none; }
    }
    .module-landing {
      position: relative;
      min-height: calc(100vh - 69px);
      color: #f7f3e8;
      background:
        linear-gradient(90deg, rgba(1,4,5,0.94) 0%, rgba(1,4,5,0.78) 38%, rgba(1,4,5,0.40) 100%),
        url("/assets/poyiva-import-bg.png") center / cover no-repeat;
      overflow: hidden;
      isolation: isolate;
    }
    .module-landing::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      pointer-events: none;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent 18%),
        radial-gradient(circle at 18% 22%, rgba(14,124,115,0.22), transparent 30%),
        radial-gradient(circle at 76% 18%, rgba(199,154,50,0.16), transparent 26%),
        linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
      background-size: auto, auto, auto, 72px 72px, 72px 72px;
      opacity: .88;
    }
    .module-shell {
      width: min(1220px, calc(100% - 40px));
      margin: 0 auto;
      display: grid;
      gap: 24px;
      padding: clamp(30px, 5vw, 72px) 0 clamp(42px, 7vw, 84px);
    }
    .module-hero {
      min-height: clamp(420px, 58vh, 640px);
      display: grid;
      grid-template-columns: minmax(0, .92fr) minmax(300px, .56fr);
      gap: clamp(22px, 4vw, 54px);
      align-items: center;
    }
    .module-hero-copy {
      display: grid;
      gap: 16px;
      max-width: 760px;
    }
    .module-breadcrumb-dark {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      color: rgba(234,232,226,0.78);
      font-size: 12px;
      font-weight: 760;
      text-transform: uppercase;
    }
    .module-hero h1 {
      margin: 0;
      color: #fff;
      font-size: clamp(46px, 7vw, 92px);
      line-height: .94;
      letter-spacing: 0;
      text-shadow: 0 20px 60px rgba(0,0,0,0.34);
    }
    .module-hero p {
      margin: 0;
      max-width: 660px;
      color: rgba(247,243,232,0.76);
      font-size: clamp(16px, 1.8vw, 21px);
      line-height: 1.42;
    }
    .module-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: center;
      margin-top: 4px;
    }
    .module-action {
      min-height: 46px;
      border-radius: 8px;
      padding: 10px 15px;
      border: 1px solid rgba(248,247,243,0.18);
      background: rgba(248,247,243,0.08);
      color: #f7f3e8;
      text-decoration: none;
      font-weight: 760;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .module-action.primary {
      background: linear-gradient(135deg, rgba(46,111,158,0.88), rgba(14,124,115,0.76));
      border-color: rgba(86,180,233,0.42);
      box-shadow: 0 20px 55px rgba(14,124,115,0.22);
    }
    .module-action:hover, .module-action:focus-visible {
      border-color: rgba(105,218,172,0.62);
      outline: none;
      transform: translateY(-1px);
    }
    .module-status-stack {
      display: grid;
      gap: 12px;
    }
    .module-status-card {
      border: 1px solid rgba(255,255,255,0.16);
      border-radius: 8px;
      background: rgba(7,12,13,0.72);
      color: rgba(247,243,232,0.74);
      padding: 16px;
      box-shadow: 0 16px 46px rgba(0,0,0,0.22);
      backdrop-filter: blur(14px);
    }
    .module-status-card span {
      display: block;
      color: rgba(234,208,140,0.88);
      font-size: 12px;
      font-weight: 850;
      text-transform: uppercase;
      margin-bottom: 6px;
    }
    .module-status-card strong {
      display: block;
      color: #fff;
      font-size: 24px;
      line-height: 1.08;
      margin-bottom: 6px;
    }
    .module-section {
      display: grid;
      gap: 14px;
    }
    .module-section h2 {
      color: #fff;
      font-size: clamp(24px, 3vw, 38px);
      margin: 0;
    }
    .module-grid-panel {
      display: grid;
      grid-template-columns: repeat(4, minmax(200px, 1fr));
      gap: 14px;
    }
    .module-panel {
      min-height: 178px;
      border: 1px solid rgba(255,255,255,0.14);
      border-radius: 8px;
      background: rgba(7,12,13,0.70);
      padding: 17px;
      display: grid;
      gap: 9px;
      align-content: start;
      color: rgba(247,243,232,0.72);
    }
    .module-panel span {
      color: rgba(234,208,140,0.88);
      font-size: 12px;
      font-weight: 850;
      text-transform: uppercase;
    }
    .module-panel strong {
      color: #fff;
      font-size: 20px;
      line-height: 1.12;
    }
    .module-panel p {
      margin: 0;
      color: rgba(247,243,232,0.68);
    }
    .module-wide-band {
      border: 1px solid rgba(255,255,255,0.14);
      border-radius: 8px;
      background: linear-gradient(135deg, rgba(14,124,115,0.24), rgba(7,12,13,0.74));
      padding: clamp(18px, 3vw, 28px);
      display: grid;
      grid-template-columns: minmax(220px, .6fr) minmax(0, 1.4fr);
      gap: 20px;
      align-items: start;
    }
    .module-wide-band p {
      margin: 0;
      color: rgba(247,243,232,0.72);
    }
    .module-wide-list {
      display: grid;
      gap: 10px;
    }
    .module-wide-list div {
      display: grid;
      gap: 3px;
      padding-top: 10px;
      border-top: 1px solid rgba(255,255,255,0.12);
    }
    .module-wide-list div:first-child {
      padding-top: 0;
      border-top: 0;
    }
    .module-wide-list strong {
      color: #fff;
    }
    .module-link-row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: center;
    }
    .crude-workbench {
      width: min(100%, 1480px);
      margin: 0 auto;
      padding: 18px;
      display: grid;
      grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
      gap: 18px;
      min-height: calc(100vh - 70px);
    }
    body:has(.crude-workbench) {
      background: #030607;
      overflow-x: hidden;
    }
    body:has(.crude-workbench) main {
      max-width: none;
      width: 100%;
      margin: 0;
      padding: 0;
    }
    body:has(.crude-workbench) .topbar {
      background: rgba(3, 6, 7, 0.97);
      border-bottom-color: rgba(255,255,255,0.12);
    }
    .crude-workbench::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -1;
      background:
        linear-gradient(90deg, rgba(1,4,5,0.94) 0%, rgba(1,4,5,0.82) 42%, rgba(1,4,5,0.62) 100%),
        url("/assets/poyiva-import-bg.png") center / cover no-repeat;
    }
    .crude-control-surface,
    .crude-results-surface {
      min-width: 0;
      background: rgba(255,255,255,0.96);
      border: 1px solid rgba(217,212,199,0.82);
      border-radius: 8px;
      box-shadow: 0 18px 52px rgba(0,0,0,0.24);
    }
    .crude-control-surface {
      padding: 18px;
      max-height: calc(100vh - 106px);
      overflow-y: auto;
    }
    .crude-results-surface {
      padding: 18px;
      max-height: calc(100vh - 106px);
      overflow-y: auto;
      overflow-x: hidden;
    }
    .crude-workbench .section-head,
    .crude-workbench .slate-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 16px;
    }
    .crude-workbench h1,
    .crude-workbench h2 {
      margin: 0;
      font-weight: 760;
      line-height: 1.1;
      color: var(--ink);
    }
    .crude-workbench h1 { font-size: 20px; }
    .crude-workbench h2,
    .crude-workbench .table-title { font-size: 15px; }
    .crude-module-kicker {
      margin-bottom: 14px;
      display: grid;
      gap: 5px;
    }
    .crude-module-kicker span {
      color: var(--teal);
      font-size: 12px;
      font-weight: 850;
      text-transform: uppercase;
    }
    .crude-module-kicker a {
      color: inherit;
      text-decoration: none;
    }
    .crude-module-kicker a:hover, .crude-module-kicker a:focus-visible {
      text-decoration: underline;
      outline: none;
    }
    .crude-module-kicker strong {
      font-size: 26px;
      line-height: 1.04;
    }
    .crude-module-kicker p {
      margin: 0;
      color: var(--muted);
    }
    .crude-status-strip {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
      margin-top: 6px;
    }
    .crude-status-strip span {
      display: inline-flex;
      align-items: center;
      min-height: 26px;
      padding: 4px 8px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255,253,248,0.88);
      color: var(--muted);
      font-size: 12px;
      font-weight: 760;
      text-transform: none;
    }
    .crude-workbench label {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
    }
    .crude-workbench select,
    .crude-workbench input {
      width: 100%;
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fffdf8;
      color: var(--ink);
      padding: 0 12px;
      font: inherit;
    }
    .crude-workbench .target-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      margin-bottom: 14px;
    }
    .crude-workbench .country-field { margin-bottom: 14px; }
    .crude-workbench .primary-action,
    .crude-workbench .secondary-action,
    .crude-workbench .icon-button,
    .crude-workbench .remove-button {
      border: 1px solid transparent;
      border-radius: 8px;
      cursor: pointer;
      font-weight: 740;
    }
    .crude-workbench .primary-action {
      min-width: 132px;
      min-height: 42px;
      padding: 0 16px;
      color: #fff;
      background: var(--teal);
    }
    .crude-workbench .secondary-action {
      min-width: 132px;
      min-height: 42px;
      padding: 0 16px;
      color: var(--ink);
      background: #fffdf8;
      border-color: var(--line);
    }
    .crude-workbench .icon-button,
    .crude-workbench .remove-button {
      display: inline-grid;
      place-items: center;
      width: 36px;
      height: 36px;
      color: var(--ink);
      background: var(--subtle);
      border-color: var(--line);
      font-size: 20px;
    }
    .crude-workbench .remove-button {
      color: var(--rust);
      font-size: 18px;
    }
    .crude-workbench .slate-rows {
      display: grid;
      gap: 10px;
    }
    .crude-workbench .slate-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 96px 36px;
      gap: 8px;
      align-items: end;
    }
    .crude-workbench .optimizer-fields {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }
    .crude-workbench .optimizer-actions {
      display: flex;
      justify-content: flex-end;
      margin-top: 12px;
    }
    .crude-workbench .messages {
      display: grid;
      gap: 8px;
    }
    .crude-workbench .message {
      padding: 10px 12px;
      border-left: 4px solid var(--accent);
      background: #fff7df;
      border-radius: 6px;
      color: #5a3a00;
      font-size: 13px;
    }
    .crude-workbench .message.error {
      border-left-color: var(--rust);
      background: #fff0ea;
      color: #782315;
    }
    .crude-workbench .metrics,
    .crude-workbench .optimizer-panel {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
      gap: 10px;
      margin: 16px 0;
    }
    .crude-workbench .customer-prediction-strip {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin: 14px 0 18px;
    }
    .crude-workbench .optimizer-panel[hidden],
    .crude-workbench .progress-panel[hidden] {
      display: none;
    }
    .crude-workbench .metrics div,
    .crude-workbench .optimizer-panel div,
    .crude-workbench .customer-prediction-strip div {
      min-height: 76px;
      padding: 12px;
      background: #fffdf8;
      border: 1px solid var(--line);
      border-radius: 8px;
    }
    .crude-workbench .metrics span,
    .crude-workbench .optimizer-panel span,
    .crude-workbench .customer-prediction-strip span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      font-weight: 720;
      text-transform: uppercase;
    }
    .crude-workbench .metrics strong,
    .crude-workbench .optimizer-panel strong,
    .crude-workbench .customer-prediction-strip strong {
      display: block;
      margin-top: 8px;
      font-size: 22px;
      line-height: 1.1;
      overflow-wrap: anywhere;
    }
    .crude-workbench .customer-mae {
      display: block;
      color: var(--ink);
      font-weight: 680;
      line-height: 1.25;
    }
    .crude-workbench .progress-panel {
      display: grid;
      gap: 8px;
      margin-top: 10px;
      padding: 10px 12px;
      background: #fffdf8;
      border: 1px solid var(--line);
      border-radius: 8px;
    }
    .crude-workbench .progress-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 760;
      text-transform: uppercase;
    }
    .crude-workbench .progress-track {
      height: 8px;
      overflow: hidden;
      background: var(--subtle);
      border-radius: 999px;
    }
    .crude-workbench .progress-bar {
      width: 0%;
      height: 100%;
      background: linear-gradient(90deg, var(--teal), var(--accent));
      border-radius: inherit;
      transition: width 240ms ease;
    }
    .crude-workbench .table-block {
      margin-top: 16px;
    }
    .crude-workbench .customer-hidden {
      display: none !important;
    }
    .crude-workbench .table-title {
      margin-bottom: 8px;
      font-weight: 760;
      color: var(--ink);
    }
    .crude-workbench .table-wrap {
      width: 100%;
      max-height: none;
      overflow-x: auto;
      overflow-y: visible;
      border: 1px solid var(--line);
      border-radius: 8px;
    }
    .crude-workbench .spec-block .table-wrap {
      max-height: none;
      overflow-y: visible;
    }
    .crude-workbench .spec-block table {
      min-width: 1080px;
    }
    .crude-workbench .spec-block th {
      white-space: nowrap;
    }
    .crude-workbench .spec-block th:nth-child(2),
    .crude-workbench .spec-block td:nth-child(2),
    .crude-workbench .spec-block th:nth-child(3),
    .crude-workbench .spec-block td:nth-child(3),
    .crude-workbench .spec-block th:nth-child(4),
    .crude-workbench .spec-block td:nth-child(4) {
      min-width: 112px;
      white-space: nowrap;
    }
    .crude-workbench .spec-block th:nth-child(5),
    .crude-workbench .spec-block td:nth-child(5) {
      min-width: 220px;
      white-space: nowrap;
    }
    .crude-workbench .spec-block th:nth-child(6),
    .crude-workbench .spec-block td:nth-child(6) {
      min-width: 140px;
      white-space: nowrap;
    }
    .crude-workbench table {
      width: 100%;
      min-width: 820px;
      border-collapse: collapse;
      background: #fff;
    }
    .crude-workbench th,
    .crude-workbench td {
      padding: 10px 12px;
      border-bottom: 1px solid var(--line);
      text-align: left;
      vertical-align: middle;
      font-size: 13px;
    }
    .crude-workbench th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: var(--subtle);
      color: #3f3a33;
      font-size: 12px;
      font-weight: 780;
      text-transform: uppercase;
    }
    .crude-workbench .status {
      display: inline-flex;
      align-items: center;
      min-width: 74px;
      justify-content: center;
      padding: 5px 9px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 780;
      text-transform: uppercase;
    }
    .crude-workbench .status.pass { color: #fff; background: var(--teal); }
    .crude-workbench .status.fail { color: #fff; background: var(--rust); }
    .crude-workbench .status.screening_pass { color: #2f2500; background: #f4d889; }
    .crude-workbench .status.screening_fail { color: #6d1f12; background: #ffd2c6; }
    .crude-workbench .status.qa_review { color: #fff; background: var(--blue); }
    .crude-workbench .status.not_predicted { color: #3f3a33; background: var(--subtle); }
    .crude-workbench .spec-risk-pass td {
      background: #f4fbf8;
      border-bottom-color: #b9ded4;
    }
    .crude-workbench .spec-risk-pass td:first-child {
      box-shadow: inset 4px 0 0 var(--teal);
    }
    .crude-workbench .spec-risk-borderline td {
      background: #fff9e7;
      border-bottom-color: #e6c35b;
    }
    .crude-workbench .spec-risk-borderline td:first-child {
      box-shadow: inset 4px 0 0 #c99b22;
    }
    .crude-workbench .spec-risk-fail td {
      background: #fff0ea;
      border-bottom-color: #e0a18e;
    }
    .crude-workbench .spec-risk-fail td:first-child {
      box-shadow: inset 4px 0 0 var(--rust);
    }
    .crude-workbench .spec-risk-borderline .status.pass,
    .crude-workbench .spec-risk-borderline .status.screening_pass,
    .crude-workbench .spec-risk-borderline .status.qa_review {
      color: #2f2500;
      background: #f4d889;
    }
    .crude-workbench .spec-risk-pass .status.screening_pass {
      color: #fff;
      background: var(--teal);
    }
    .crude-workbench .spec-risk-fail .status.screening_fail {
      color: #fff;
      background: var(--rust);
    }
    .crude-workbench .evidence-main {
      color: var(--ink);
      font-weight: 720;
      line-height: 1.2;
    }
    .crude-workbench .evidence-sub,
    .crude-workbench .prop-code {
      margin-top: 3px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.25;
    }
    .crude-workbench .value-cell {
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .placeholder-page { max-width: 980px; margin: 0 auto; display: grid; gap: 14px; }
    .planned-list { display: grid; gap: 8px; }
    .planned-item { border-top: 1px solid var(--line); padding-top: 8px; }
    .planned-item:first-child { border-top: 0; padding-top: 0; }
    .step {
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 10px;
      min-height: 84px;
      display: grid;
      gap: 6px;
      align-content: start;
    }
    .step-index { width: 24px; height: 24px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--teal); color: #fff; font-weight: 750; font-size: 12px; }
    .view-toggle { display: inline-flex; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
    .view-toggle a { padding: 7px 10px; text-decoration: none; color: var(--ink); font-weight: 700; border-right: 1px solid var(--line); min-width: 0; }
    .view-toggle a:last-child { border-right: 0; }
    .view-toggle a.selected { background: var(--teal); color: #fff; }
    .plot-preview {
      min-height: 280px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background:
        linear-gradient(90deg, rgba(217,212,199,0.42) 1px, transparent 1px),
        linear-gradient(0deg, rgba(217,212,199,0.42) 1px, transparent 1px),
        #fff;
      background-size: 72px 52px;
      overflow: auto;
      padding: 10px;
    }
    .mini-plots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .mini-plot { min-width: 0; }
    .mini-plot h3 { margin: 0 0 6px; color: var(--ink); }
    .plot-caption { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
    .empty-plot { min-height: 236px; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 18px; }
    .legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 999px; margin-right: 5px; background: var(--teal); }
    .legend-dot.raw { background: var(--blue); opacity: 0.55; }
    .lve-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); margin: 4px 0 14px; }
    .lve-tab-button {
      border: 1px solid var(--line);
      border-bottom: 0;
      border-radius: 8px 8px 0 0;
      background: #fff;
      color: var(--ink);
      padding: 9px 12px;
      font-weight: 750;
      cursor: pointer;
    }
    .lve-tab-button.active { background: var(--teal); border-color: var(--teal); color: #fff; }
    .lve-tab-panel { display: none; }
    .lve-tab-panel.active { display: grid; gap: 12px; }
    .plot-workbench { display: grid; gap: 12px; }
    .plot-toolbar {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      padding: 10px;
    }
    .plot-slot {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      padding: 12px;
      display: grid;
      gap: 10px;
    }
    .plot-slot-header { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
    .plot-controls { display: grid; grid-template-columns: repeat(6, minmax(128px, 1fr)); gap: 8px; align-items: end; }
    .plot-controls label, .merge-controls label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
    .plot-controls select, .merge-controls select, .merge-controls input {
      border: 1px solid var(--line);
      border-radius: 6px;
      background: #fff;
      color: var(--ink);
      min-height: 34px;
      padding: 5px 7px;
      font: inherit;
    }
    .plot-temp-filter { display: flex; flex-wrap: wrap; gap: 6px; }
    .plot-temp-filter label {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 4px 8px;
      background: #fff;
      color: var(--ink);
      font-size: 12px;
      font-weight: 700;
    }
    .interactive-chart {
      min-height: 430px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      overflow: auto;
    }
    .interactive-chart svg { min-width: 720px; }
    .chart-note { color: var(--muted); font-size: 12px; }
    .small-button {
      border: 1px solid var(--line);
      border-radius: 6px;
      background: #fff;
      color: var(--ink);
      padding: 6px 9px;
      font-weight: 750;
      cursor: pointer;
    }
    .small-button.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
    .small-button.danger { color: var(--rust); }
    .merge-workbench { display: grid; gap: 12px; }
    .merge-controls { display: grid; grid-template-columns: repeat(5, minmax(132px, 1fr)); gap: 8px; align-items: end; }
    .merge-switches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
    .merge-switch {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 36px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 5px 10px;
      background: #fff;
      color: var(--ink);
      font-size: 12px;
      font-weight: 750;
    }
    .merge-switch input { min-height: auto; padding: 0; }
    .merge-file-row { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .merge-file-drop { border: 1px dashed #BDB5A6; border-radius: 8px; padding: 12px; background: #fff; min-height: 76px; }
    .manual-shift-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .manual-shift-row { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; display: grid; gap: 7px; }
    .manual-shift-row.reference { border-color: var(--teal); background: #f3fbf9; }
    .manual-shift-row.disabled { opacity: 0.58; }
    .manual-shift-row input[type="range"] { width: 100%; }
    .merge-status-box { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px; display: grid; gap: 6px; }
    .draggable-point { cursor: grab; }
    .dragging-active .draggable-point { cursor: grabbing; }
    .check-grid { display: grid; gap: 8px; }
    .check-item { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
    .check-item:first-child { border-top: 0; }
    .check-dot { width: 18px; height: 18px; border-radius: 999px; display: inline-grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; margin-top: 1px; }
    .check-dot.ok { background: var(--teal); }
    .check-dot.warn { background: var(--accent); color: var(--graphite); }
    .check-dot.err { background: var(--rust); }
    .units-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .unit-pill { background: var(--subtle); border: 1px solid var(--line); border-radius: 8px; padding: 9px; }
    .unit-pill strong { display: block; font-size: 14px; }
    .mini-table { width: 100%; border-collapse: collapse; }
    .mini-table th, .mini-table td { position: static; font-size: 12px; }
    .errors { border-color: #f1b7c5; background: #fff8fa; }
    .warning-panel { border-color: rgba(168,72,50,0.48); border-top: 4px solid var(--rust); }
    .warning-panel h2 { color: var(--rust); }
    code { background: var(--subtle); padding: 1px 4px; border-radius: 4px; }
    ul.compact { margin: 0; padding-left: 18px; }
    .rheology-launch::before {
      background:
        url("/assets/poyiva-rheology-entry-bg-v1.png?v=rheo-entry-1");
      background-size: cover;
      background-position: center;
    }
    .rheology-launch::after {
      background:
        linear-gradient(90deg, rgba(4, 7, 8, 0.92) 0%, rgba(4, 7, 8, 0.82) 34%, rgba(4, 7, 8, 0.48) 58%, rgba(4, 7, 8, 0.16) 100%),
        radial-gradient(circle at 78% 34%, rgba(86,180,233,0.18), transparent 18%),
        radial-gradient(circle at 72% 74%, rgba(199,154,50,0.12), transparent 24%),
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
      background-size: auto, auto, auto, 72px 72px, 72px 72px;
      mask-image: none;
    }
    .rheology-launch .launch-loader,
    .rheology-launch .cinema-bg,
    .rheology-launch .cinema-vignette,
    .rheology-launch .cinema-scan,
    .rheology-launch .cinema-probe,
    .rheology-launch .cinema-logo,
    .rheology-launch .loader-line {
      display: none;
    }
    .rheology-launch .launch-content {
      grid-template-columns: minmax(320px, 760px);
      gap: 0;
      align-items: center;
      padding: clamp(74px, 12vh, 136px) clamp(28px, 5vw, 72px) clamp(42px, 7vh, 84px);
    }
    .rheology-launch .launch-copy {
      max-width: 760px;
      gap: 16px;
      animation: none;
      opacity: 1;
      transform: none;
    }
    .rheology-launch .launch-title {
      margin: 0;
      max-width: 660px;
      font-size: clamp(42px, 7vw, 88px);
      line-height: 0.92;
      white-space: nowrap;
      text-shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
    }
    .rheology-launch .launch-tagline {
      margin: 8px 0 0 14px;
      color: rgba(248, 247, 243, 0.96);
      font-size: clamp(24px, 2.65vw, 34px);
      font-weight: 620;
      line-height: 1.1;
    }
    .rheology-launch .launch-tagline span {
      display: block;
    }
    .rheology-launch .launch-subtitle {
      max-width: 660px;
      color: rgba(248, 247, 243, 0.78);
      font-size: clamp(17px, 1.8vw, 22px);
      line-height: 1.35;
    }
    .rheology-launch .launch-actions {
      margin-top: 20px;
    }
    body:has(.rheology-dashboard-screen) {
      background: #040708;
      color: #f7f3e8;
      overflow-x: hidden;
    }
    body:has(.rheology-dashboard-screen) main {
      max-width: none;
      width: 100%;
      margin: 0;
      padding: 0;
    }
    body:has(.rheology-dashboard-screen) .topbar {
      justify-content: space-between;
      background: rgba(3, 6, 7, 0.98);
      border-bottom-color: rgba(255,255,255,0.12);
    }
    .rheology-dashboard-screen {
      position: relative;
      min-height: calc(100vh - 61px);
      padding: 22px 20px 38px;
      isolation: isolate;
    }
    .rheology-dashboard-screen::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -2;
      background:
        linear-gradient(90deg, rgba(4, 8, 9, 0.96), rgba(4, 8, 9, 0.80)),
        url("/assets/poyiva-rheology-workspace-bg-v1.png?v=rheo-workspace-1") center / cover no-repeat;
    }
    .rheology-dashboard-screen::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      background:
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,0.024) 1px, transparent 1px),
        radial-gradient(circle at 18% 20%, rgba(86,180,233,0.14), transparent 24%),
        radial-gradient(circle at 82% 22%, rgba(199,154,50,0.12), transparent 24%);
      background-size: 84px 84px, 84px 84px, auto, auto;
      opacity: 0.9;
      pointer-events: none;
    }
    .rheo-dashboard-shell {
      width: min(100%, 1540px);
      margin: 0 auto;
      display: grid;
      grid-template-columns: minmax(250px, 292px) minmax(0, 1fr);
      gap: 22px;
      align-items: start;
    }
    .rheo-left-pane {
      position: sticky;
      top: 79px;
      display: grid;
      gap: 18px;
      padding: 18px 16px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px;
      background:
        linear-gradient(180deg, rgba(8, 13, 15, 0.92), rgba(6, 9, 11, 0.78)),
        rgba(7, 12, 13, 0.78);
      box-shadow: 0 18px 54px rgba(0,0,0,0.28);
    }
    .rheo-workspace-card {
      gap: 2px;
      padding-bottom: 14px;
      border-bottom: 1px solid rgba(255,255,255,0.10);
    }
    .rheo-workspace-card span {
      color: rgba(247,243,232,0.84);
      font-size: 11px;
      font-weight: 820;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .rheo-workspace-card strong {
      color: #fff;
      font-size: 18px;
      line-height: 1.06;
    }
    .rheo-workspace-card small {
      color: rgba(247,243,232,0.50);
      font-size: 12px;
      line-height: 1.35;
    }
    .rheo-nav-group + .rheo-nav-group {
      margin-top: 2px;
      padding-top: 18px;
      border-top: 1px solid rgba(255,255,255,0.08);
    }
    .rheo-nav-group header {
      display: grid;
      gap: 2px;
      margin-bottom: 10px;
    }
    .rheo-nav-label {
      color: rgba(247,243,232,0.88);
      font-size: 11px;
      font-weight: 820;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .rheo-nav-detail {
      color: rgba(247,243,232,0.44);
      font-size: 12px;
      line-height: 1.3;
    }
    .rheo-nav-list {
      display: grid;
      gap: 8px;
    }
    .rheo-nav-item {
      width: 100%;
      min-height: 60px;
      padding: 10px 12px;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 8px;
      background: rgba(255,255,255,0.02);
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      color: rgba(247,243,232,0.84);
      text-decoration: none;
    }
    .rheo-nav-item:hover,
    .rheo-nav-item:focus-visible {
      background: rgba(199,154,50,0.14);
      border-color: rgba(199,154,50,0.7);
      color: #fff;
      outline: none;
      box-shadow:
        0 0 0 1px rgba(199,154,50,0.18),
        0 0 26px rgba(199,154,50,0.12);
    }
    .rheo-nav-item.selected {
      background: rgba(18, 27, 29, 0.92);
      border-color: rgba(86,180,233,0.46);
      color: #fff;
      box-shadow:
        0 0 0 1px rgba(86,180,233,0.18),
        0 0 30px rgba(86,180,233,0.10);
    }
    .rheo-nav-item.selected .rheo-nav-icon {
      border-color: rgba(86,180,233,0.42);
      background:
        linear-gradient(180deg, rgba(86,180,233,0.12), rgba(255,255,255,0.02)),
        rgba(9,14,16,0.95);
    }
    .rheo-nav-item.disabled {
      opacity: 0.72;
      cursor: default;
    }
    .rheo-nav-item.disabled:hover {
      background: rgba(255,255,255,0.02);
      border-color: rgba(255,255,255,0.08);
      box-shadow: none;
      color: rgba(247,243,232,0.84);
    }
    .rheo-nav-icon {
      width: 38px;
      height: 38px;
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 10px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)),
        rgba(9,14,16,0.9);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    }
    .rheo-nav-icon::before {
      content: "";
      width: 10px;
      height: 10px;
      border-radius: 999px;
      background: rgba(234,208,140,0.9);
      box-shadow: 0 0 12px rgba(199,154,50,0.30);
    }
    .rheo-nav-copy {
      display: grid;
      gap: 2px;
      min-width: 0;
    }
    .rheo-nav-copy strong {
      color: #fff;
      font-size: 15px;
      line-height: 1.1;
    }
    .rheo-nav-copy small {
      color: rgba(247,243,232,0.46);
      font-size: 12px;
      line-height: 1.3;
    }
    .rheo-nav-signal {
      color: rgba(247,243,232,0.72);
      font-size: 12px;
      font-weight: 760;
    }
    .rheo-nav-signal.ok { color: #9befca; }
    .rheo-nav-signal.review { color: #ead08c; }
    .rheo-nav-signal.hold { color: #f0a7a1; }
    .rheo-main {
      min-width: 0;
      display: grid;
      gap: 18px;
    }
    .rheo-page-head {
      min-height: 174px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 18px;
      align-items: end;
      padding: 22px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px;
      color: #f7f3e8;
      background:
        linear-gradient(180deg, rgba(7,12,13,0.92), rgba(7,12,13,0.76)),
        rgba(7,12,13,0.78);
      box-shadow: 0 18px 54px rgba(0,0,0,0.22);
    }
    .rheo-breadcrumb {
      margin: 0 0 10px;
      color: rgba(247,243,232,0.62);
      font-size: 12px;
      font-weight: 860;
      text-transform: uppercase;
    }
    .rheo-breadcrumb a {
      color: rgba(247,243,232,0.84);
      text-decoration: none;
    }
    .rheo-breadcrumb a:hover,
    .rheo-breadcrumb a:focus-visible {
      color: #fff;
      outline: none;
    }
    .rheo-page-head h1 {
      color: #fff;
      font-size: clamp(34px, 4vw, 56px);
      line-height: 0.98;
      margin: 0 0 10px;
    }
    .rheo-page-head p {
      color: rgba(247,243,232,0.74);
      max-width: 820px;
      font-size: 15px;
      line-height: 1.45;
    }
    .rheo-head-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .rheo-inline-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin: 0 0 16px;
    }
    .project-filter-form {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 16px;
    }
    .project-filter-form label,
    .project-import-card label {
      display: grid;
      gap: 6px;
      color: rgba(247,243,232,0.74);
      font-size: 12px;
      font-weight: 760;
    }
    .project-filter-form select,
    .project-import-card input,
    .project-import-card select,
    .project-update-form select {
      width: 100%;
      min-height: 42px;
      border-radius: 8px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(8,13,15,0.86);
      color: #f7f3e8;
      padding: 10px 12px;
      font: inherit;
    }
    .project-update-form .table-wrap {
      margin-bottom: 14px;
    }
    .project-import-card {
      width: min(520px, 100%);
    }
    .inline-check {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: rgba(247,243,232,0.88);
      font-size: 13px;
      font-weight: 700;
    }
    .inline-check input {
      width: 16px;
      height: 16px;
    }
    .rheology-dashboard-screen .button {
      background: #f8f7f3;
      color: #111;
      border-color: #f8f7f3;
    }
    .rheology-dashboard-screen .button.secondary {
      background: rgba(255,255,255,0.02);
      color: #f8f7f3;
      border-color: rgba(255,255,255,0.18);
    }
    .rheo-command-card {
      display: grid;
      gap: 18px;
      padding: 18px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px;
      background:
        linear-gradient(180deg, rgba(7,12,13,0.90), rgba(7,12,13,0.76)),
        rgba(7,12,13,0.78);
      box-shadow: 0 18px 54px rgba(0,0,0,0.22);
    }
    .rheo-command-card.ok { border-color: rgba(105,218,172,0.34); }
    .rheo-command-card.review { border-color: rgba(234,208,140,0.34); }
    .rheo-command-card.hold { border-color: rgba(240,167,161,0.34); }
    .rheo-command-copy {
      display: grid;
      gap: 8px;
    }
    .rheo-command-label,
    .rheo-surface-head span {
      color: rgba(234,208,140,0.84);
      font-size: 11px;
      font-weight: 820;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .rheo-command-copy strong,
    .rheo-surface-head strong {
      color: #fff;
      font-size: 34px;
      line-height: 1.02;
    }
    .rheo-command-copy p {
      margin: 0;
      color: rgba(247,243,232,0.74);
      font-size: 14px;
      line-height: 1.45;
    }
    .rheo-command-stats {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
    }
    .rheo-command-stat {
      padding: 14px 16px;
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 8px;
      background: rgba(255,255,255,0.03);
    }
    .rheo-command-stat span {
      display: block;
      color: rgba(247,243,232,0.56);
      font-size: 11px;
      font-weight: 820;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .rheo-command-stat strong {
      display: block;
      margin-top: 6px;
      color: #fff;
      font-size: 28px;
      line-height: 1;
      overflow-wrap: anywhere;
    }
    .rheo-command-stat.long strong {
      font-size: 15px;
      line-height: 1.3;
      margin-top: 8px;
    }
    .rheo-main details { margin-top: 12px; }
    .rheo-main details summary {
      cursor: pointer;
      color: #6cb6e6;
      font-size: 12.5px;
      font-weight: 600;
      list-style: none;
    }
    .rheo-main details summary::-webkit-details-marker { display: none; }
    .rheo-main details summary::before { content: "\25B8  "; color: rgba(247,243,232,0.4); }
    .rheo-main details[open] summary::before { content: "\25BE  "; }
    .rheo-main details[open] > *:not(summary) { margin-top: 10px; }
    .rheo-command-stat.ok { border-color: rgba(105,218,172,0.30); }
    .rheo-command-stat.review { border-color: rgba(234,208,140,0.30); }
    .rheo-command-stat.hold { border-color: rgba(240,167,161,0.30); }
    .rheo-status-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 12px;
    }
    .rheo-status-card,
    .rheo-preview-card {
      padding: 16px 18px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px;
      background:
        linear-gradient(180deg, rgba(7,12,13,0.88), rgba(7,12,13,0.72)),
        rgba(7,12,13,0.74);
      box-shadow: 0 16px 48px rgba(0,0,0,0.22);
    }
    .rheo-status-card span,
    .rheo-preview-card span {
      display: block;
      color: rgba(247,243,232,0.54);
      font-size: 11px;
      font-weight: 820;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .rheo-status-card strong,
    .rheo-preview-card strong {
      display: block;
      margin-top: 6px;
      color: #fff;
      font-size: 26px;
      line-height: 1.02;
      overflow-wrap: anywhere;
    }
    .rheo-status-card.long strong {
      font-size: 15px;
      line-height: 1.3;
      margin-top: 8px;
    }
    .rheo-status-card p,
    .rheo-preview-card p {
      margin: 10px 0 0;
      color: rgba(247,243,232,0.72);
      font-size: 13px;
      line-height: 1.4;
    }
    .rheo-status-card.ok { border-color: rgba(105,218,172,0.34); }
    .rheo-status-card.review { border-color: rgba(234,208,140,0.34); }
    .rheo-status-card.hold { border-color: rgba(240,167,161,0.34); }
    .rheo-next-panel,
    .rheo-main .panel {
      padding: 18px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px;
      background:
        linear-gradient(180deg, rgba(7,12,13,0.90), rgba(7,12,13,0.76)),
        rgba(7,12,13,0.78);
      color: #f7f3e8;
      box-shadow: 0 18px 54px rgba(0,0,0,0.22);
    }
    .rheo-main .panel h2,
    .rheo-main .panel h3,
    .rheo-main .step strong {
      color: #fff;
    }
    .rheo-main .panel h2 {
      font-size: 22px;
      margin-bottom: 14px;
    }
    .rheo-main .panel h3 {
      color: rgba(247,243,232,0.72);
    }
    .rheo-main .muted,
    .rheo-main .metric-label,
    .rheo-main .plot-caption,
    .rheo-main .chart-note,
    .rheo-main .qa-hint {
      color: rgba(247,243,232,0.62);
    }
    .rheo-main code {
      background: rgba(255,255,255,0.08);
      color: #fff;
    }
    .rheo-main table,
    .rheo-main .mini-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }
    .rheo-main th,
    .rheo-main td {
      border-bottom: 1px solid rgba(255,255,255,0.10);
      padding: 8px 9px;
      text-align: left;
      vertical-align: top;
    }
    .rheo-main th {
      color: rgba(247,243,232,0.58);
      background: rgba(255,255,255,0.03);
      position: sticky;
      top: 0;
    }
    .rheo-main .workflow-strip {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 10px;
    }
    .rheo-main .workflow-strip .step {
      min-height: 118px;
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 8px;
      background: rgba(255,255,255,0.03);
      color: #f7f3e8;
      box-shadow: none;
    }
    .rheo-main .step-index {
      background: #0e7c73;
      box-shadow: 0 0 18px rgba(14,124,115,0.22);
    }
    .rheo-main .status.ok {
      background: rgba(105,218,172,0.12);
      color: #9befca;
    }
    .rheo-main .status.warn {
      background: rgba(234,208,140,0.12);
      color: #ead08c;
    }
    .rheo-main .status.err {
      background: rgba(240,167,161,0.12);
      color: #f0a7a1;
    }
    .rheo-main .status.info {
      background: rgba(86,180,233,0.12);
      color: #9ed6f2;
    }
    .rheo-main .view-toggle {
      background: rgba(255,255,255,0.02);
      border-color: rgba(255,255,255,0.10);
    }
    .rheo-main .view-toggle a {
      color: rgba(247,243,232,0.76);
      border-right-color: rgba(255,255,255,0.10);
    }
    .rheo-main .view-toggle a.selected {
      background: #0e7c73;
      color: #fff;
    }
    .rheo-main .plot-preview,
    .rheo-main .interactive-chart,
    .rheo-main .plot-slot,
    .rheo-main .plot-toolbar,
    .rheo-main .merge-status-box,
    .rheo-main .merge-file-drop,
    .rheo-main .manual-shift-row,
    .rheo-main .small-button,
    .rheo-main .plot-temp-filter label,
    .rheo-main .merge-switch {
      border-color: rgba(255,255,255,0.10);
      background: rgba(255,255,255,0.03);
      color: #f7f3e8;
    }
    .rheo-main .plot-preview {
      background:
        linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,0.05) 1px, transparent 1px),
        rgba(255,255,255,0.03);
      background-size: 72px 52px;
    }
    .rheo-main .mini-plot h3,
    .rheo-main .unit-pill strong,
    .rheo-main .check-item strong {
      color: #fff;
    }
    .rheo-main .check-item {
      border-top-color: rgba(255,255,255,0.10);
    }
    .rheo-main .unit-pill {
      background: rgba(255,255,255,0.03);
      border-color: rgba(255,255,255,0.10);
    }
    .rheo-main .warning-panel {
      border-color: rgba(240,167,161,0.34);
      border-top: 1px solid rgba(240,167,161,0.34);
    }
    .rheo-action-grid,
    .rheo-preview-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }
    .rheo-action-card {
      min-height: 156px;
      padding: 16px;
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 8px;
      background: rgba(255,255,255,0.03);
      color: #f7f3e8;
      text-decoration: none;
      display: grid;
      gap: 8px;
      align-content: start;
      transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
    }
    .rheo-action-card:hover,
    .rheo-action-card:focus-visible {
      outline: none;
      transform: translateY(-1px);
      border-color: rgba(199,154,50,0.72);
      box-shadow:
        0 0 0 1px rgba(199,154,50,0.18),
        0 16px 40px rgba(0,0,0,0.28);
    }
    .rheo-action-card.primary {
      border-color: rgba(86,180,233,0.40);
      background:
        linear-gradient(180deg, rgba(86,180,233,0.18), rgba(255,255,255,0.03) 76%),
        rgba(255,255,255,0.03);
    }
    .rheo-action-kicker {
      color: rgba(234,208,140,0.92);
      font-size: 11px;
      font-weight: 820;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .rheo-action-card strong {
      font-size: 24px;
      line-height: 1.05;
      color: #fff;
    }
    .rheo-action-card p {
      margin: 0;
      color: rgba(247,243,232,0.74);
      font-size: 14px;
      line-height: 1.42;
    }
	    @media (max-width: 980px) {
	      form, .grid-2, .grid-3, .grid-4, .two-col, .workbench-hero, .workflow-strip, .units-grid, .start-hero, .primary-action-grid, .review-hero, .rheo-dashboard-shell, .rheo-page-head, .rheo-section-grid, .rheo-dashboard-strip, .rheo-identity-bar, .rheo-command-stats, .rheo-status-grid, .rheo-action-grid, .rheo-preview-grid { grid-template-columns: 1fr; }
	      .topbar { align-items: flex-start; flex-direction: column; }
	      .product-lockup { padding-left: 0; border-left: 0; }
      .rheology-dashboard-screen { padding: 14px; }
      .rheo-left-pane { position: relative; top: auto; }
      .rheo-nav-list { grid-template-columns: 1fr; }
      .rheo-nav-label { grid-column: 1 / -1; }
      .rheo-head-actions { justify-content: flex-start; }
      .launch-content { grid-template-columns: 1fr; align-items: start; padding-bottom: 170px; }
      .launch-side { align-self: start; max-width: 520px; }
	      .launch-dock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	      .import-field-grid { grid-template-columns: 1fr; }
	      .directory-map {
	        position: absolute;
	        inset: 0;
	        min-height: calc(100vh - 69px);
	        padding: 0;
	        display: block;
	        gap: 0;
	        aspect-ratio: auto;
	        background-position: center;
	      }
	      .directory-map::before, .directory-map::after { opacity: .18; }
	      .directory-art {
	        display: block;
	      }
	      .map-caption {
	        position: relative;
	        left: auto;
	        bottom: auto;
	        width: auto;
	        order: -1;
	      }
	      .directory-mobile-tiles {
	        display: none;
	        grid-template-columns: repeat(2, minmax(210px, 1fr));
	        gap: 12px;
	      }
	      .directory-grid { grid-template-columns: repeat(2, minmax(210px, 1fr)); }
	      .module-hero, .module-wide-band { grid-template-columns: 1fr; }
	      .module-grid-panel { grid-template-columns: repeat(2, minmax(210px, 1fr)); }
      .crude-workbench { grid-template-columns: 1fr; }
      .crude-control-surface, .crude-results-surface { max-height: none; }
      .gate-actions { justify-content: flex-start; }
    }
    @media (max-width: 640px) {
      .topbar { padding: 10px 12px; }
      .customer-bar { gap: 8px; }
      .customer-identity { display: none; }
      .launch-screen { min-height: calc(100vh - 65px); }
      .launch-content { min-height: calc(100vh - 65px); padding: 24px 14px 248px; }
      .cinema-probe { right: 28px; top: 128px; width: 78px; height: 78px; }
      .cinema-logo { left: 18px; bottom: 34px; }
      .launch-actions { grid-template-columns: 1fr; }
      .login-fields { grid-template-columns: 1fr; }
      .launch-dock { grid-template-columns: 1fr; bottom: 14px; left: 14px; right: 14px; }
	      .import-screen { min-height: calc(100vh - 65px); }
	      .import-shell { min-height: calc(100vh - 65px); padding: 18px 14px; align-items: start; }
	      .directory-screen { min-height: calc(100vh - 65px); padding: 0; }
	      .directory-map { min-height: calc(100vh - 65px); padding: 0; }
	      .directory-mobile-tiles { grid-template-columns: 1fr; }
	      .directory-grid { grid-template-columns: 1fr; }
      .module-shell { width: min(100% - 28px, 1220px); padding-top: 24px; }
      .module-hero { min-height: auto; padding: 22px 0; }
      .module-grid-panel { grid-template-columns: 1fr; }
      .module-action { flex: 1 1 100%; }
      .crude-workbench { padding: 10px; }
      .crude-workbench .section-head { align-items: flex-start; flex-direction: column; }
      .crude-workbench .primary-action, .crude-workbench .secondary-action { width: 100%; }
      .crude-workbench .optimizer-actions { justify-content: stretch; }
      .crude-workbench .slate-row { grid-template-columns: minmax(0, 1fr) 82px 36px; }
      .crude-workbench .optimizer-fields, .crude-workbench .optimizer-panel { grid-template-columns: 1fr; }
      .crude-workbench table { min-width: 760px; }
      .import-actions .button, .import-actions button { flex: 1 1 100%; }
      .workbench-hero { padding: 12px; gap: 12px; }
      .rheo-nav { grid-template-columns: 1fr; }
      .rheo-page-head { min-height: auto; padding: 18px; }
      .rheo-page-head h1 { font-size: 34px; }
      .rheo-head-actions .button { flex: 1 1 100%; }
      .action-row { align-items: stretch; }
      .action-row .button { flex: 1 1 100%; white-space: normal; text-align: center; }
      .view-toggle { display: flex; flex-wrap: wrap; overflow: visible; }
      .view-toggle a { flex: 1 1 50%; border-bottom: 1px solid var(--line); text-align: center; }
      .mini-plots { grid-template-columns: 1fr; }
      .plot-controls, .merge-controls, .merge-file-row, .manual-shift-grid { grid-template-columns: 1fr; }
    }

    /* ============================================================
       LIGHT WORKSPACE THEME — flips the dark rheology workspace to
       light for long data sessions. Appended last so it wins the
       cascade over both dark blocks. Scoped to .rheo-* / the
       dashboard screen; the KRIZ|AT top bar is deliberately NOT
       touched, so it stays dark for brand.
       ============================================================ */
    body:has(.rheology-dashboard-screen) { background: #F5F3EE !important; color: var(--ink) !important; }
    .rheology-dashboard-screen::before {
      background: #F5F3EE !important;
    }
    .rheology-dashboard-screen::after {
      background:
        linear-gradient(90deg, rgba(36,34,31,0.035) 1px, transparent 1px),
        linear-gradient(0deg, rgba(36,34,31,0.028) 1px, transparent 1px) !important;
      background-size: 84px 84px, 84px 84px !important;
      opacity: 1 !important;
    }

    /* plain surfaces (no status tone) -> light panel, dark ink */
    .rheo-left-pane,
    .rheo-page-head,
    .rheo-command-card,
    .rheo-main .panel,
    .rheo-preview-card,
    .rheo-action-card {
      background: #FCFBF8 !important;
      border-color: var(--line) !important;
      color: var(--ink) !important;
      box-shadow: 0 1px 2px rgba(36,34,31,.05), 0 10px 28px rgba(36,34,31,.07) !important;
    }

    /* tone-bearing cards -> light bg + dark ink, but keep their tone border */
    .rheo-command-stat, .rheo-status-card { background: #ffffff !important; color: var(--ink) !important; }
    .rheo-command-stat { border-color: var(--line); }
    .rheo-status-card { border-color: var(--line); }

    /* left-nav items */
    .rheo-nav-item, .rheo-side-link, .rheo-back-button {
      background: #ffffff !important; border-color: var(--line) !important; color: var(--ink) !important;
      box-shadow: 0 1px 2px rgba(36,34,31,.05) !important;
    }
    .rheo-nav-item:hover, .rheo-nav-item:focus-visible,
    .rheo-side-link:hover, .rheo-side-link:focus-visible,
    .rheo-back-button:hover, .rheo-back-button:focus-visible {
      background: rgba(199,154,50,0.12) !important; border-color: rgba(199,154,50,0.55) !important;
      color: var(--ink) !important; box-shadow: none !important;
    }
    .rheo-nav-item.selected {
      background: #ffffff !important; border-color: var(--blue) !important; color: var(--ink) !important;
      box-shadow: inset 3px 0 0 var(--blue) !important;
    }
    .rheo-nav-icon,
    .rheo-nav-item.selected .rheo-nav-icon { background: var(--subtle) !important; border-color: var(--line) !important; }

    /* headings -> ink */
    .rheo-page-head h1,
    .rheo-workspace-card strong,
    .rheo-command-copy strong,
    .rheo-command-stat strong,
    .rheo-status-card strong,
    .rheo-preview-card strong,
    .rheo-nav-item strong,
    .rheo-nav-copy strong,
    .rheo-main .panel h2,
    .rheo-main .panel h3,
    .rheo-main .step strong { color: var(--ink) !important; }

    /* secondary text -> muted */
    .rheo-page-head p,
    .rheo-breadcrumb,
    .rheo-breadcrumb a,
    .rheo-workspace-card span,
    .rheo-workspace-card small,
    .rheo-command-label,
    .rheo-command-copy p,
    .rheo-command-stat span,
    .rheo-status-card span,
    .rheo-status-card p,
    .rheo-nav-label,
    .rheo-nav-detail,
    .rheo-nav-copy small,
    .rheo-preview-card span { color: var(--muted) !important; }
    .rheo-breadcrumb a:hover { color: var(--ink) !important; }

    /* tables inside workspace panels */
    .rheo-main table th { background: #faf8f3 !important; color: var(--muted) !important; border-color: var(--line) !important; }
    .rheo-main table td { color: var(--ink) !important; border-bottom-color: var(--line) !important; }

    /* workflow strip */
    .rheo-main .workflow-strip .step { background: #ffffff !important; color: var(--ink) !important; border-color: var(--line) !important; }

    /* the global header{} dark background leaks onto the nav-group <header> elements */
    .rheo-nav-group header { background: transparent !important; }

    /* status chips: the workspace tuned them for dark; restore readable light contrast */
    .rheo-main .status.ok { background: #e6f4ef !important; color: #0f5f55 !important; }
    .rheo-main .status.warn { background: #f6edd6 !important; color: #8a6414 !important; }
    .rheo-main .status.err { background: #f7ded9 !important; color: #b23f31 !important; }
    .rheo-main .status.info { background: #e2eef7 !important; color: #255e86 !important; }
    .rheo-nav-signal.ok { color: #0b665e !important; }
    .rheo-nav-signal.review { color: #8a6414 !important; }
    .rheo-nav-signal.hold { color: #b23f31 !important; }
    .rheo-main .view-toggle { background: #ffffff !important; border-color: var(--line) !important; }

    /* default panel body text -> ink; muted -> muted (workspace had them light) */
    .rheo-main .panel, .rheo-main .panel p, .rheo-main .panel strong,
    .rheo-main .panel li, .rheo-main .panel td, .rheo-main .check-item strong { color: var(--ink) !important; }
    .rheo-main .muted, .rheo-main .panel .muted, .rheo-main .check-item .muted { color: var(--muted) !important; }
