
    :root {
      --bg: #0e1117;
      --panel: #161b22;
      --border: #2a2f3a;
      --text: #e6edf3;
      --muted: #8b949e;

      --green: #2ecc71;
      --red: #e74c3c;
      --yellow: #f1c40f;
      --blue: #3498db;

      --shadow: 0 10px 30px rgba(0,0,0,0.35);
    }

    * { box-sizing: border-box; font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif; }
    body { margin: 0; background: var(--bg); color: var(--text); }
    .container { max-width: 1300px; margin: 0 auto; padding: 24px; }

    h1 { font-size: 24px; margin: 0 0 6px 0; }
    .subtitle { color: var(--muted); font-size: 14px; margin-bottom: 12px; }

    /* ===== Top bar ===== */
    .topbar {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 16px;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 18px;
    }
    .meta {
      font-size: 12px;
      color: var(--muted);
      line-height: 1.35;
    }
    .meta strong { color: var(--text); font-weight: 600; }

    .btn {
      border: 1px solid var(--border);
      background: rgba(255,255,255,0.03);
      color: var(--text);
      padding: 8px 12px;
      border-radius: 10px;
      font-size: 12px;
      cursor: pointer;
      user-select: none;
    }
    .btn:hover { border-color: rgba(255,255,255,0.12); }
    .btn:active { transform: translateY(1px); }

    /* ===== Tooltip ===== */
    .has-tip {
      position: relative;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: help;
      outline: none;
    }

    .info-dot {
      width: 16px;
      height: 16px;
      border-radius: 999px;
      border: 1px solid var(--border);
      color: var(--muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      line-height: 1;
      user-select: none;
      flex: 0 0 auto;
    }

    .tip {
      position: absolute;
      left: 0;
      top: 120%;
      min-width: 280px;
      max-width: 420px;
      background: #0b0f15;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 10px 12px;
      color: var(--text);
      font-size: 12px;
      line-height: 1.4;
      box-shadow: var(--shadow);
      opacity: 0;
      transform: translateY(-6px);
      pointer-events: none;
      transition: opacity 150ms ease, transform 150ms ease;
      z-index: 50;
    }

    .has-tip:hover .tip,
    .has-tip:focus .tip,
    .has-tip:focus-within .tip {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }

    /* ===== Top Summary ===== */
    .summary {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 16px;
      margin-bottom: 14px;
    }

    .card {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 16px;
    }

    .card h3 {
      font-size: 13px;
      color: var(--muted);
      margin: 0 0 6px 0;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .value { font-size: 22px; font-weight: 700; margin-top: 2px; }
    .badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; margin-top: 8px; border: 1px solid rgba(255,255,255,0.06); }

    .risk-on { background: rgba(46, 204, 113, 0.15); color: var(--green); }
    .risk-off { background: rgba(231, 76, 60, 0.15); color: var(--red); }
    .neutral { background: rgba(241, 196, 15, 0.15); color: var(--yellow); }

    /* ===== Legend ===== */
    .legend {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 14px;
      margin-bottom: 26px;
    }

    .legend .card { padding: 14px 16px; }
    .legend-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
    }

    .legend-title strong {
      font-size: 13px;
      color: var(--muted);
      font-weight: 700;
      letter-spacing: 0.2px;
    }

    .legend-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 8px 0;
      border-bottom: 1px solid rgba(42,47,58,0.6);
      font-size: 13px;
    }
    .legend-row:last-child { border-bottom: none; }

    .pill {
      font-size: 12px;
      padding: 3px 10px;
      border-radius: 999px;
      border: 1px solid var(--border);
      color: var(--text);
      background: rgba(255,255,255,0.03);
      white-space: nowrap;
    }
    .pill.low { color: var(--yellow); }
    .pill.med { color: var(--blue); }
    .pill.high { color: var(--green); }
    .pill.extreme { color: var(--red); }

    /* ===== Sections ===== */
    .section { margin-bottom: 32px; }
    .section h2 {
      font-size: 18px;
      margin: 0 0 12px 0;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      gap: 10px;
    }

    /* ===== Macro Grid ===== */
    .macro-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 14px;
    }

    .macro-item {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 14px;
    }

    .macro-item .label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      color: var(--muted);
      margin-bottom: 6px;
    }

    .macro-item strong { font-size: 16px; display: block; font-weight: 700; }

    /* ===== Yield Curve Chart ===== */
    .chart-wrap {
      display: grid;
      grid-template-columns: 1.2fr 0.8fr;
      gap: 14px;
      align-items: stretch;
    }
    @media (max-width: 900px) {
      .chart-wrap { grid-template-columns: 1fr; }
    }

    .chart-card {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 14px 14px 10px 14px;
    }

    .chart-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 10px;
    }

    .chart-title {
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .chart-meta {
      text-align: right;
      font-size: 12px;
      color: var(--muted);
      line-height: 1.35;
    }

    canvas {
      width: 100%;
      height: 240px;
      display: block;
      border-radius: 10px;
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(42,47,58,0.8);
    }

    .curve-stats {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
    }

    .stat {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 14px;
    }

    .stat .k { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
    .stat .v { font-size: 16px; font-weight: 800; }
    .stat .hint { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.35; }

    /* ===== Asset Table ===== */
    table {
      width: 100%;
      border-collapse: collapse;
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 10px;
      overflow: hidden;
    }

    th, td {
      padding: 12px 14px;
      text-align: left;
      border-bottom: 1px solid var(--border);
      font-size: 14px;
      vertical-align: top;
    }

    th { color: var(--muted); font-weight: 600; user-select: none; }
    tr:last-child td { border-bottom: none; }

    .bias-long { color: var(--green); font-weight: 700; }
    .bias-short { color: var(--red); font-weight: 700; }
    .bias-neutral { color: var(--yellow); font-weight: 700; }

    .conviction { font-weight: 800; }
    .gate-yes { color: var(--green); font-weight: 800; }
    .gate-no { color: var(--muted); font-weight: 800; }

    .footer {
      margin-top: 40px;
      font-size: 12px;
      color: var(--muted);
      text-align: center;
    }
