*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body { padding-top: 72px; }
    section[id], div[id], header[id], main[id] { scroll-margin-top: 134px; }

    :root {
      --bg:        #fafaf7;
      --white:     #ffffff;
      --paper:     #ffffff;
      --ink:       #0f2638;
      --mid:       #1f2937;
      --light:     #718096;
      --rule:      #e5e7eb;
      --accent:    #1a3a52;
      --blue:      #1a3a52;
      --blue-dark: #122a3d;
      --blue-deep: #0c1f2e;
      --gold:      #b86b34;
      --gold-light:#d68a52;
      --gold-soft: #f4ede0;
      --green:     #2d4a3e;
      --tag-bg:    #f0f4f8;

      /* Investor directory tokens (recolored from purple → EC blue/terracotta) */
      --id-primary:        #1a3a52;
      --id-primary-dark:   #0c1f2e;
      --id-primary-light:  #2d5577;
      --id-primary-muted:  #e6edf3;
      --id-accent:         #b86b34;
      --id-accent-dark:    #9a5727;
      --id-accent-soft:    #f4ede0;
      --gray-50:  #f9f9f7;
      --gray-100: #f1efe8;
      --gray-200: #e0dcd2;
      --gray-400: #9b9588;
      --gray-600: #5c574c;
      --gray-800: #0f2638;
      --shadow-sm: 0 1px 3px rgba(15,38,56,0.08);
      --shadow-md: 0 4px 12px rgba(15,38,56,0.1);
      --shadow-lg: 0 10px 24px rgba(15,38,56,0.14);
      --radius: 6px;
      --radius-sm: 4px;
    }

    html { scroll-behavior: smooth; }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--bg);
      color: var(--ink);
      font-size: 16px;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
    }

    a { color: inherit; text-decoration: none; }

    /* ── Hero ── */
    .id-hero {
      background: var(--id-primary);
      color: var(--white);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-align: center;
      padding: 2.75rem 1.5rem 0;
      position: relative;
      overflow: hidden;
    }

    .id-hero-inner {
      max-width: 900px;
      margin: 0 auto;
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 1.25rem;
      padding-bottom: 1.5rem;
      position: relative;
      z-index: 1;
    }

    .id-hero-eyebrow {
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.72);
    }

    .id-hero h1 {
      font-family: 'Newsreader', serif;
      font-size: clamp(2.2rem, 4vw, 3.25rem);
      font-weight: 400;
      line-height: 1.1;
      letter-spacing: -0.02em;
    }

    .id-hero p {
      font-size: 1rem;
      max-width: 580px;
      line-height: 1.7;
      color: rgba(255,255,255,0.78);
    }

    .id-ticker-wrap {
      width: calc(100% + 6rem);
      margin-left: -3rem;
      margin-right: -3rem;
      background: rgba(0,0,0,0.32);
      border-top: 1px solid rgba(255,255,255,0.1);
      overflow: hidden;
      padding: 0;
      position: relative;
      margin-top: auto;
      z-index: 1;
    }

    .id-ticker-track {
      display: flex;
      width: max-content;
      animation: idTicker 50s linear infinite;
    }

    .id-ticker-track:hover { animation-play-state: paused; }

    @keyframes idTicker {
      0%   { transform: translateX(0); }
      100% { transform: translateX(-50%); }
    }

    .id-ticker-item {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.9rem 2.2rem;
      white-space: nowrap;
    }

    .id-ticker-divider {
      width: 1px;
      height: 26px;
      background: rgba(255,255,255,0.18);
      flex-shrink: 0;
      align-self: center;
    }

    .id-ticker-value {
      font-size: 1.25rem;
      font-weight: 800;
      color: var(--white);
      letter-spacing: -0.02em;
    }

    .id-ticker-label {
      font-size: 0.68rem;
      font-weight: 600;
      color: rgba(255,255,255,0.55);
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }

    /* ── Filter bar ── */
    .id-filter-bar {
      background: var(--white);
      border-bottom: 1px solid var(--gray-200);
      padding: 1rem 2.5rem;
      position: sticky;
      top: 72px;
      z-index: 45;
    }

    .id-filter-inner {
      max-width: 1400px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      gap: 1.25rem;
    }

    .id-filter-group-left {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex-shrink: 0;
    }

    .id-filter-group-right {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      margin-left: auto;
    }

    .id-filter-chips {
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
      align-items: center;
    }

    .id-chip {
      padding: 7px 16px;
      border-radius: var(--radius);
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      border: 1px solid var(--gray-200);
      background: var(--white);
      color: var(--gray-600);
      transition: all 0.15s;
      white-space: nowrap;
      letter-spacing: 0.01em;
      font-family: 'Inter', sans-serif;
    }

    .id-chip:hover {
      border-color: var(--id-accent);
      color: var(--id-accent);
      background: var(--id-accent-soft);
    }

    .id-chip.active {
      background: var(--id-accent);
      border-color: var(--id-accent);
      color: var(--white);
    }

    .id-clear-btn {
      padding: 7px 16px;
      border-radius: var(--radius);
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      border: 1px solid var(--gray-200);
      background: transparent;
      color: var(--gray-400);
      transition: all 0.15s;
      white-space: nowrap;
      flex-shrink: 0;
      font-family: 'Inter', sans-serif;
    }

    .id-clear-btn:hover { border-color: var(--id-accent); color: var(--id-accent); }

    .id-sector-dropdown-wrapper {
      position: relative;
      flex-shrink: 0;
    }

    .id-sector-btn {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 7px 18px;
      border-radius: 24px;
      font-size: 0.82rem;
      font-weight: 700;
      cursor: pointer;
      border: 2px solid var(--id-primary);
      background: var(--id-primary);
      color: var(--white);
      transition: all 0.15s;
      white-space: nowrap;
      user-select: none;
      letter-spacing: 0.01em;
      font-family: 'Inter', sans-serif;
    }

    .id-sector-btn:hover {
      background: var(--id-primary-dark);
      border-color: var(--id-primary-dark);
    }

    .id-sector-btn.has-selection {
      background: var(--id-primary-dark);
      border-color: var(--id-primary-dark);
    }

    .id-sector-btn .id-sector-caret {
      font-size: 0.65rem;
      transition: transform 0.2s;
      opacity: 0.85;
    }

    .id-sector-btn.open .id-sector-caret { transform: rotate(180deg); }

    .id-sector-menu {
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      min-width: 240px;
      background: var(--white);
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      box-shadow: var(--shadow-lg);
      z-index: 200;
      overflow: hidden;
      display: none;
    }

    .id-sector-menu.open { display: block; }

    .id-sector-menu-header {
      padding: 10px 14px 8px;
      font-size: 0.67rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--gray-400);
      border-bottom: 1px solid var(--gray-100);
    }

    .id-sector-option {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      padding: 9px 14px;
      cursor: pointer;
      font-size: 0.83rem;
      color: var(--gray-800);
      transition: background 0.12s;
      border-bottom: 1px solid var(--gray-100);
    }

    .id-sector-option:last-of-type { border-bottom: none; }
    .id-sector-option:hover { background: var(--id-primary-muted); }

    .id-sector-option input[type="checkbox"] {
      accent-color: var(--id-primary);
      width: 14px;
      height: 14px;
      flex-shrink: 0;
      cursor: pointer;
    }

    .id-sector-option.checked { background: var(--id-primary-muted); }
    .id-sector-option.checked .id-sector-option-label { color: var(--id-primary-dark); font-weight: 600; }

    .id-sector-clear-row {
      padding: 8px 14px;
      display: flex;
      justify-content: flex-end;
      border-top: 1px solid var(--gray-100);
      background: var(--gray-50);
    }

    .id-sector-clear-link {
      font-size: 0.75rem;
      color: var(--id-accent);
      cursor: pointer;
      font-weight: 600;
      background: none;
      border: none;
      padding: 0;
      font-family: 'Inter', sans-serif;
    }

    .id-sector-clear-link:hover { text-decoration: underline; }

    /* Search */
    .id-search-wrapper {
      position: relative;
      min-width: 200px;
      max-width: 260px;
    }

    .id-search-icon {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--gray-400);
      pointer-events: none;
    }

    .id-search-input {
      width: 100%;
      padding: 7px 14px 7px 34px;
      border-radius: 6px;
      border: 1.5px solid var(--gray-200);
      background: var(--white);
      color: var(--gray-800);
      font-size: 0.82rem;
      outline: none;
      transition: border-color 0.15s;
      font-family: 'Inter', sans-serif;
    }

    .id-search-input::placeholder { color: var(--gray-400); }
    .id-search-input:focus { border-color: var(--id-primary); }

    .id-result-count {
      font-size: 0.75rem;
      color: var(--gray-400);
      white-space: nowrap;
      flex-shrink: 0;
    }

    .id-autocomplete-dropdown {
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      right: 0;
      background: var(--white);
      border-radius: var(--radius-sm);
      box-shadow: var(--shadow-lg);
      overflow: hidden;
      z-index: 200;
      max-height: 320px;
      overflow-y: auto;
      display: none;
    }
    .id-autocomplete-dropdown.open { display: block; }

    .id-ac-item {
      padding: 11px 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 10px;
      border-bottom: 1px solid var(--gray-100);
      transition: background 0.15s;
      color: var(--gray-800);
      font-size: 0.88rem;
    }

    .id-ac-item:last-child { border-bottom: none; }
    .id-ac-item:hover, .id-ac-item.active { background: var(--id-primary-muted); }
    .id-ac-item .id-ac-name { font-weight: 600; }
    .id-ac-item .id-ac-meta { font-size: 0.75rem; color: var(--gray-400); margin-left: auto; }

    /* ── Main grid ── */
    .id-main {
      max-width: 1280px;
      margin: 0 auto;
      padding: 2rem;
    }

    .id-section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 1.5rem;
    }

    .id-section-title {
      font-size: 1.1rem;
      font-weight: 700;
      color: var(--gray-800);
      font-family: 'Inter', sans-serif;
    }

    .id-section-title span {
      font-weight: 400;
      color: var(--gray-400);
      font-size: 0.9rem;
      margin-left: 0.5rem;
    }

    .id-firms-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
      gap: 1rem;
    }

    .id-firm-card {
      background: var(--white);
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-sm);
      padding: 1.25rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      transition: box-shadow 0.2s, border-color 0.2s;
    }

    .id-firm-card:hover {
      border-color: var(--gray-400);
    }

    .id-firm-card.highlight {
      border-color: var(--id-accent);
      box-shadow: 0 0 0 3px rgba(184,107,52,0.18);
    }

    .id-card-header {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }

    .id-card-firm-name {
      font-family: 'Newsreader', serif;
      font-size: 1.25rem;
      font-weight: 600;
      color: var(--id-primary);
      line-height: 1.3;
      margin: 0;
      letter-spacing: -0.005em;
    }

    .id-card-location {
      font-size: 13px;
      color: var(--gray-600);
      font-family: 'Inter', sans-serif;
    }

    .id-card-details {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      font-size: 13px;
      color: var(--gray-800);
    }

    .id-card-details span {
      background: var(--id-accent-soft);
      color: var(--id-accent-dark);
      padding: 3px 10px;
      border-radius: 4px;
      font-weight: 500;
    }

    .id-card-body {
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
      flex: 1;
    }

    .id-card-description {
      font-size: 14px;
      line-height: 1.7;
      color: var(--gray-600);
    }

    .id-card-description.collapsed {
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .id-read-more-btn {
      background: none;
      border: none;
      color: var(--id-accent);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      padding: 0;
      text-align: left;
      align-self: flex-start;
      font-family: 'Inter', sans-serif;
    }

    .id-read-more-btn:hover { text-decoration: underline; }

    .id-card-portfolio {
      font-size: 13px;
      color: var(--gray-600);
      line-height: 1.6;
      border-top: 1px solid var(--gray-200);
      padding-top: 0.75rem;
    }

    .id-portfolio-label {
      font-weight: 600;
      color: var(--gray-800);
    }

    .id-empty-state {
      text-align: center;
      padding: 5rem 2rem;
      color: var(--gray-400);
    }

    .id-empty-state .id-empty-icon { margin: 0 auto 1rem; color: var(--gray-400); }
    .id-empty-state h3 { font-size: 1.1rem; color: var(--gray-600); margin-bottom: 0.5rem; }
    .id-empty-state p { font-size: 0.85rem; }

    /* ── Footer ── */
    .site-footer { margin-top: 4rem; }
    .footer-inner {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 2rem;
      flex-wrap: wrap;
    }
    .footer-logo {
      font-family: 'Newsreader', serif;
    }
    .footer-disclaimer {
      margin-top: 0.35rem;
    }
    .footer-right { display: flex; gap: 1.4rem; flex-wrap: wrap; }
    .footer-right a {
      color: var(--color-text-muted);
      font-size: 0.85rem;
      transition: color 0.15s ease;
    }
    .footer-right a:hover { color: var(--color-brand); }

    /* ── Directory toggle (Investor ⇄ Tech) ── */
    .id-toggle-hint {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.6rem;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.75);
      margin-bottom: 0.6rem;
      position: relative;
      z-index: 1;
    }
    .id-toggle-hint svg { opacity: 0.8; }

    .id-dir-toggle {
      display: inline-flex;
      background: rgba(0,0,0,0.22);
      border: 1px solid rgba(255,255,255,0.28);
      border-radius: var(--radius);
      padding: 4px;
      gap: 4px;
      position: relative;
      z-index: 1;
      margin-bottom: 2.5rem;
    }

    .id-dir-toggle-btn {
      display: inline-flex;
      align-items: center;
      padding: 7px 18px;
      border-radius: var(--radius-sm);
      border: none;
      font-size: 0.74rem;
      font-weight: 700;
      cursor: pointer;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.12s;
      background: transparent;
      color: rgba(255,255,255,0.9);
      white-space: nowrap;
      font-family: 'Inter', sans-serif;
    }

    .id-dir-toggle-btn.active {
      background: #ffffff;
      color: var(--id-primary-dark);
    }

    .id-dir-toggle-btn:not(.active):hover {
      background: rgba(255,255,255,0.18);
      color: #ffffff;
      transform: translateY(-1px);
    }

    .id-dir-new-badge {
      display: inline-block;
      font-size: 0.55rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      color: var(--id-accent-dark);
      background: #ffffff;
      border-radius: 999px;
      padding: 1px 5px;
      margin-left: 5px;
      vertical-align: middle;
      line-height: 1.5;
    }

    /* ── Tech smart-search "Interpreted as" chips ── */
    .id-smart-chips {
      display: none;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      max-width: 1400px;
      margin: 10px auto 0;
      padding-top: 10px;
      border-top: 1px dashed var(--gray-200);
    }
    .id-smart-chips.is-active { display: flex; }
    .id-smart-chips-label {
      font-size: 10.5px;
      font-weight: 700;
      color: var(--gray-400);
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }
    .id-smart-chip {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      padding: 3px 4px 3px 10px;
      border-radius: 999px;
      background: var(--id-primary-muted);
      border: 1px solid rgba(26,58,82,0.22);
      color: var(--id-primary);
      font-size: 12px;
      font-weight: 600;
      line-height: 1.25;
      white-space: nowrap;
    }
    .id-smart-chip-x {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      border-radius: 999px;
      background: none;
      border: none;
      color: var(--id-primary);
      cursor: pointer;
      font-size: 15px;
      line-height: 1;
      padding: 0;
      margin-left: 2px;
    }
    .id-smart-chip-x:hover { background: rgba(26,58,82,0.18); }
    .id-smart-chips-clear {
      background: none;
      border: none;
      color: var(--gray-600);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      padding: 3px 6px;
      margin-left: auto;
      font-family: 'Inter', sans-serif;
    }
    .id-smart-chips-clear:hover { color: var(--id-primary-dark); text-decoration: underline; }

    /* Tech smart-search box is a little wider than firm-name search */
    .id-tech-search-wrapper { max-width: 360px; }

    /* ── Tech iframe ── */
    .id-tech-iframe-wrap { width: 100%; }
    .id-tech-iframe-wrap iframe {
      width: 100%;
      height: 800px;
      border: none;
      display: block;
      overflow: hidden;
    }

    @media (max-width: 768px) {
      .id-hero { padding: 2rem 1.25rem 0; }
      /* Stack the two directory pills vertically and full-width on mobile, as
         carusoventures.com does — each becomes a comfortable centered tap
         target instead of two cramped pills wrapping unevenly. */
      .id-dir-toggle {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 360px;
        margin-bottom: 2rem;
      }
      .id-dir-toggle-btn {
        justify-content: center;
        width: 100%;
        padding: 11px 14px;
        font-size: 0.7rem;
        white-space: normal;
      }
      .id-ticker-wrap { width: calc(100% + 2.5rem); margin-left: -1.25rem; margin-right: -1.25rem; }
      .id-hero h1 { font-size: clamp(1.8rem, 8vw, 2.6rem); }
      .id-hero p { font-size: 0.95rem; }

      .id-filter-bar { padding: 0.6rem 0.85rem; top: 72px; }
      .id-filter-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
      }
      .id-filter-group-left {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.4rem;
      }
      /* Stage/Industry/Region share rows (wrapping 2–3 across) instead of each
         taking a full line, so the filter bar stays short on phones. */
      .id-sector-dropdown-wrapper { flex: 1 1 auto; }
      .id-filter-group-left .id-sector-btn { width: 100%; justify-content: space-between; }
      /* Comfortable ~44px tap targets for all primary controls. */
      .id-sector-btn { min-height: 40px; padding: 8px 14px; font-size: 0.82rem; }
      /* Search shares the same row as the dropdowns rather than claiming its own
         full-width line — keeps the bar compact (it grows to fill leftover space). */
      .id-search-wrapper,
      .id-tech-search-wrapper { max-width: none; flex: 1 1 140px; min-width: 120px; }
      /* >=16px font prevents iOS auto-zoom on focus. */
      .id-search-input { font-size: 16px; padding: 11px 14px 11px 36px; }
      .id-filter-group-right {
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 0.4rem;
        justify-content: space-between;
      }
      .id-filter-chips { flex-wrap: wrap; gap: 0.4rem; }
      .id-chip { padding: 9px 14px; font-size: 0.82rem; min-height: 38px; }
      .id-clear-btn { padding: 9px 16px; font-size: 0.82rem; min-height: 38px; }

      /* Dropdown menus: each opens full-width under its own button and is
         height-capped + scrollable so a long list (Industry) or a right-aligned
         menu (Region) never overflows the viewport. */
      .id-sector-menu {
        left: 0;
        right: 0;
        width: auto;
        min-width: 0;
        max-height: 60vh;
        overflow-y: auto;
      }
      .id-sector-option { padding: 12px 14px; font-size: 0.9rem; }
      .id-sector-option input[type="checkbox"] { width: 20px; height: 20px; }
      .id-result-count { display: inline; font-size: 0.78rem; }
      .id-smart-chips { padding-left: 0; padding-right: 0; }

      .id-main { padding: 1rem; }
      .id-firms-grid { grid-template-columns: 1fr; }
      .id-firm-card { padding: 1.25rem; }
      .id-section-header { padding: 0.75rem 0; }
      /* Long names/URLs must wrap instead of forcing horizontal scroll. */
      .id-firm-card,
      .id-firm-card * { min-width: 0; }
      /* NOTE: do NOT put overflow-x:hidden on #idInvestorsView / #idTechView —
         any non-visible overflow on an ancestor breaks `position: sticky` for
         the filter bar nested inside them. Horizontal overflow is contained at
         its source (the hero) instead, so these scroll containers stay clean. */
    }

    @media (max-width: 400px) {
      .id-hero h1 { font-size: 1.6rem; }
      .id-hero { padding: 1.5rem 1rem 0; }
      .id-ticker-wrap { width: calc(100% + 2rem); margin-left: -1rem; margin-right: -1rem; }
      .id-filter-bar { padding: 0.55rem 0.75rem; }
      /* Keep the three dropdowns sharing rows even at the narrowest widths so the
         filter bar stays compact; each is still ~half-width and fully tappable. */
      .id-filter-group-left .id-sector-dropdown-wrapper { flex: 1 1 30%; }
      .id-filter-group-left .id-sector-btn { padding: 8px 10px; font-size: 0.78rem; }
      .id-chip { padding: 7px 12px; font-size: 0.8rem; }
    }
