    :root {
      --bg: #080c10;
      --surface: #0e1520;
      --surface2: #141e2d;
      --border: rgba(100,140,200,.13);
      --border2: rgba(100,140,200,.22);
      --text: #dce8f5;
      --muted: #6b84a0;
      --accent: #4f9cf9;
      --accent2: #7ec8e3;
      --urgent0: #ff6b6b;
      --urgent1: #ff9f43;
      --urgent2: #ffd166;
      --urgent3: #06d6a0;
      --mono: 'DM Mono', monospace;
      --display: 'Syne', sans-serif;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    html { scroll-behavior: smooth; }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: var(--mono);
      min-height: 100vh;
      overflow-x: hidden;
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background-image:
        linear-gradient(rgba(79,156,249,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79,156,249,.03) 1px, transparent 1px);
      background-size: 40px 40px;
      pointer-events: none;
      z-index: 0;
    }

    .wrap {
      position: relative;
      z-index: 1;
      max-width: 1280px;
      margin: 0 auto;
      padding: 0 20px;
    }

    /* ===== HEADER ===== */
    header {
      padding: 32px 0 20px;
      border-bottom: 1px solid var(--border);
    }

    .header-inner {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }

    .logo-block h1 {
      font-family: var(--display);
      font-size: clamp(20px, 3.5vw, 30px);
      font-weight: 800;
      letter-spacing: -0.5px;
      line-height: 1;
    }

    .logo-block h1 span { color: var(--accent); }

    .logo-block .tagline {
      margin-top: 6px;
      font-size: 11px;
      color: var(--muted);
      letter-spacing: .6px;
      text-transform: uppercase;
    }

    .header-nav { display: flex; align-items: center; flex-wrap: wrap; }
    .nav-link {
      font-size: 11px;
      letter-spacing: .5px;
      text-transform: uppercase;
      color: var(--muted);
      text-decoration: none;
      padding: 4px 14px;
      transition: color .15s;
    }
    .nav-link + .nav-link { border-left: 1px solid var(--border); }
    .nav-link:hover { color: var(--text); }
    .nav-link[aria-current="page"] { color: var(--accent); }

    /* ===== TOOLBAR ===== */
    .toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 16px 0;
      border-bottom: 1px solid var(--border);
      flex-wrap: wrap;
    }

    .nav-controls {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .ctrl-btn {
      background: none;
      border: 1px solid var(--border2);
      color: var(--muted);
      font-family: var(--mono);
      font-size: 13px;
      padding: 6px 11px;
      border-radius: 7px;
      cursor: pointer;
      transition: all .15s;
      line-height: 1;
    }

    .ctrl-btn:hover { color: var(--text); border-color: rgba(100,140,200,.4); }

    .ctrl-btn.today {
      font-size: 11px;
      letter-spacing: .4px;
      text-transform: uppercase;
    }

    .period-label {
      font-family: var(--display);
      font-size: 16px;
      font-weight: 700;
      min-width: 200px;
      text-align: center;
    }

    .view-tabs {
      display: flex;
      gap: 4px;
    }

    .view-tab {
      background: none;
      border: 1px solid var(--border2);
      color: var(--muted);
      font-family: var(--mono);
      font-size: 11px;
      letter-spacing: .5px;
      text-transform: uppercase;
      padding: 6px 13px;
      border-radius: 7px;
      cursor: pointer;
      transition: all .15s;
    }

    .view-tab:hover { color: var(--text); }

    .view-tab.active {
      background: rgba(79,156,249,.12);
      border-color: rgba(79,156,249,.35);
      color: var(--accent);
    }

    /* ===== STATUS BAR ===== */
    .status-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 0;
      font-size: 11px;
      color: var(--muted);
      border-bottom: 1px solid var(--border);
    }

    .status-dot {
      width: 6px; height: 6px;
      border-radius: 50%;
      background: var(--urgent3);
      box-shadow: 0 0 6px var(--urgent3);
      animation: pulse 2.5s ease-in-out infinite;
    }

    @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

    /* ===== CALENDAR WRAPPER ===== */
    .cal-wrap {
      margin-top: 16px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: rgba(14,21,32,.4);
      overflow: hidden;
    }

    .day-header {
      padding: 9px 10px;
      font-size: 10px;
      letter-spacing: .8px;
      text-transform: uppercase;
      color: var(--muted);
      text-align: center;
      border-right: 1px solid var(--border);
      border-bottom: 1px solid var(--border2);
      background: rgba(8,12,16,.97);
      position: sticky;
      top: 0;
      z-index: 4;
    }

    .day-header:last-child { border-right: none; }

    /* ===== GRID ===== */
    .cal-grid {
      display: grid;
    }

    /* ===== CELL ===== */
    .cal-cell {
      border-right: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      padding: 8px;
      min-height: 90px;
      vertical-align: top;
      position: relative;
    }

    .cal-cell:last-child,
    .cal-cell:nth-child(7n) { border-right: none; }

    .cal-cell.other-month { opacity: .35; }

    .cal-cell.today-cell .cell-num {
      background: var(--accent);
      color: #fff;
      border-radius: 50%;
      width: 22px;
      height: 22px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .cell-num {
      font-size: 11px;
      color: var(--muted);
      margin-bottom: 6px;
      line-height: 1;
      width: 22px;
      height: 22px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .cell-events {
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    /* ===== TICKER CHIP ===== */
    .ticker-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 7px;
      border-radius: 5px;
      font-size: 10px;
      font-weight: 500;
      font-family: var(--display);
      cursor: pointer;
      border: 1px solid transparent;
      transition: filter .12s, transform .1s;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      line-height: 1.4;
    }

    .ticker-chip:hover {
      filter: brightness(1.2);
      transform: translateY(-1px);
    }

    .ticker-chip.projected {
      border-style: dashed;
      opacity: .72;
    }

    .ticker-chip.projected:hover { opacity: 1; }

    .more-chip {
      font-size: 10px;
      color: var(--muted);
      padding: 1px 4px;
      cursor: pointer;
      letter-spacing: .2px;
    }

    .more-chip:hover { color: var(--text); }

    /* ===== EXPAND OVERLAY ===== */
    .cell-expand-overlay {
      position: absolute;
      z-index: 100;
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-radius: 10px;
      box-shadow: 0 16px 48px rgba(0,0,0,.6);
      padding: 10px;
      min-width: 140px;
      max-width: 220px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      pointer-events: all;
    }

    .overlay-close {
      align-self: flex-end;
      background: none;
      border: none;
      color: var(--muted);
      font-size: 11px;
      cursor: pointer;
      padding: 0 2px;
      line-height: 1;
      margin-bottom: 2px;
    }
    .overlay-close:hover { color: var(--text); }

    /* ===== WEEK VIEW ===== */
    .week-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
    }

    .week-cell {
      border-right: 1px solid var(--border);
      border-bottom: none;
      padding: 12px 10px;
      min-height: 300px;
    }

    .week-cell:last-child { border-right: none; }

    .week-cell .cell-num {
      font-size: 13px;
      margin-bottom: 10px;
      width: 26px;
      height: 26px;
    }

    .week-cell.today-cell .cell-num {
      background: var(--accent);
      color: #fff;
      border-radius: 50%;
    }

    .week-cell .ticker-chip {
      font-size: 11px;
      padding: 3px 9px;
    }

    /* ===== QUARTER VIEW ===== */
    .quarter-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
    }

    .quarter-month {
      border-right: 1px solid var(--border);
      padding: 0;
    }

    .quarter-month:last-child { border-right: none; }

    .quarter-month-title {
      font-family: var(--display);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: .8px;
      text-transform: uppercase;
      color: var(--muted);
      padding: 12px 12px 8px;
      border-bottom: 1px solid var(--border);
    }

    .quarter-day-headers {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      border-bottom: 1px solid var(--border);
    }

    .quarter-day-header {
      font-size: 9px;
      letter-spacing: .5px;
      text-transform: uppercase;
      color: var(--muted);
      text-align: center;
      padding: 5px 2px;
      border-right: 1px solid var(--border);
      opacity: .6;
    }

    .quarter-day-header:last-child { border-right: none; }

    .quarter-mini-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
    }

    .quarter-cell {
      border-right: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      padding: 3px 2px;
      min-height: 52px;
      position: relative;
    }

    .quarter-cell:nth-child(7n) { border-right: none; }
    .quarter-cell.other-month { opacity: .25; }

    .quarter-cell .cell-num {
      font-size: 9px;
      width: 16px;
      height: 16px;
      margin-bottom: 3px;
    }

    .quarter-cell.today-cell .cell-num {
      background: var(--accent);
      color: #fff;
      border-radius: 50%;
      font-size: 9px;
    }

    .quarter-cell .ticker-chip {
      font-size: 9px;
      padding: 1px 4px;
      border-radius: 3px;
    }

    /* ===== POPUP MODAL ===== */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.6);
      backdrop-filter: blur(4px);
      z-index: 300;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      opacity: 0;
      pointer-events: none;
      transition: opacity .18s;
    }

    .modal-backdrop.open {
      opacity: 1;
      pointer-events: all;
    }

    /* Tile-style popup */
    .fund-popup {
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 12px;
      box-shadow: 0 24px 64px rgba(0,0,0,.6);
      width: 100%;
      max-width: 380px;
      padding: 0;
      transform: translateY(10px);
      transition: transform .18s;
      overflow: hidden;
      position: relative;
    }

    .modal-backdrop.open .fund-popup {
      transform: translateY(0);
    }

    .popup-accent-bar {
      height: 3px;
      width: 100%;
    }

    .popup-inner {
      padding: 20px 22px 18px;
    }

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

    .popup-tickers {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      align-items: center;
    }

    .popup-ticker {
      font-family: var(--display);
      font-size: 18px;
      font-weight: 700;
      color: var(--text);
      letter-spacing: -.3px;
      line-height: 1;
      text-decoration: none;
    }

    .popup-ticker:hover { text-decoration: underline; }

    .popup-ticker-sep {
      color: var(--muted);
      font-size: 13px;
      opacity: .5;
      font-family: var(--mono);
    }

    .popup-days-badge {
      flex-shrink: 0;
      font-size: 11px;
      font-weight: 500;
      padding: 3px 10px;
      border-radius: 999px;
      background: rgba(255,255,255,.05);
      letter-spacing: .3px;
      white-space: nowrap;
    }

    .popup-fund-name {
      font-size: 12px;
      color: var(--muted);
      line-height: 1.4;
      margin-bottom: 14px;
    }

    .popup-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding-top: 12px;
      border-top: 1px solid var(--border);
    }

    .popup-date {
      font-size: 13px;
      font-weight: 500;
      color: var(--text);
      letter-spacing: .3px;
    }

    .popup-cik {
      font-size: 11px;
      color: var(--muted);
    }

    .popup-cik a { color: inherit; text-decoration: none; }
    .popup-cik a:hover { color: var(--accent2); }

    .popup-notes {
      margin-top: 10px;
      font-size: 11px;
      color: var(--muted);
      line-height: 1.5;
      border-top: 1px solid var(--border);
      padding-top: 10px;
    }

    .popup-close {
      position: absolute;
      top: 14px;
      right: 14px;
      background: none;
      border: none;
      color: var(--muted);
      font-size: 16px;
      cursor: pointer;
      padding: 2px 5px;
      border-radius: 5px;
      transition: color .12s, background .12s;
      z-index: 1;
    }

    .popup-close:hover { color: var(--text); background: rgba(255,255,255,.06); }

    /* ===== FOOTER ===== */
    footer {
      border-top: 1px solid var(--border);
      padding: 16px 0 28px;
      font-size: 11px;
      color: var(--muted);
      line-height: 1.6;
      opacity: .7;
      margin-top: 16px;
      display: flex;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    footer a { color: inherit; text-decoration: underline; }

    /* ===== LOADING / ERROR ===== */
    .cal-placeholder {
      padding: 60px 20px;
      text-align: center;
      color: var(--muted);
      font-size: 13px;
    }

    .cal-placeholder.loading::after {
      content: '';
      display: inline-block;
      width: 14px; height: 14px;
      border: 2px solid var(--border);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin .7s linear infinite;
      margin-left: 10px;
      vertical-align: middle;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    @media (max-width: 700px) {
      .quarter-grid { grid-template-columns: 1fr; }
      .quarter-month { border-right: none; border-bottom: 1px solid var(--border); }
      .period-label { min-width: 120px; font-size: 13px; }
    }
