:root {
        --navy: #1f2f5e;
        --navy-2: #2a3f7a;
        --aqua: #6ec1c7;
        --aqua-2: #88d3d7;
        --ink: #0f1a3a;
        --muted: #5a6a84;
        --bg: #fff;
        --border: #e7edf6;
        --radius: 14px;
        --shadow: 0 10px 24px rgba(10, 31, 68, 0.08);
        --focus: 0 0 0 3px rgba(31, 47, 94, 0.2);
      }
      * {
        box-sizing: border-box;
      }
      html,
      body {
        height: 100%;
      }
      body {
        margin: 0;
        font: 16px/1.6 "Open Sans", system-ui, -apple-system, Segoe UI, Roboto,
          Arial;
        color: var(--ink);
        background: var(--bg);
      }
      .wrap {
        max-width: 1100px;
        margin: 0 auto;
        padding: 32px 16px 80px;
      }

      /* Headings */
      h1,
      h2 {
        font-family: "Montserrat", system-ui;
        font-weight: 700;
        color: var(--navy);
        margin: 0 0 18px;
      }
      h1 {
        font-size: clamp(28px, 4.6vw, 44px);
        text-align: center;
      }
      h2 {
        font-size: clamp(18px, 3vw, 26px);
      }

      /* ===== Modern Tabs (left-aligned, roomy, scrollable on mobile) ===== */
      .tabs,
      .subtabs {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        align-items: center;
        overflow-x: auto;
        padding: 6px 2px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
      }
      .tabs::-webkit-scrollbar,
      .subtabs::-webkit-scrollbar {
        display: none;
      }
      .tabs {
        margin: 6px 0 6px;
        justify-content: flex-start;
      }
      .subtabs {
        margin: 2px 0 16px;
        justify-content: flex-start;
      }

      .tab,
      .subtab {
        position: relative;
        font-family: "Montserrat", system-ui;
        font-weight: 700;
        font-size: 16px;
        border: 1px solid var(--border);
        border-radius: 999px;
        padding: 12px 18px;
        background: linear-gradient(180deg, #fff, #fbfdff);
        color: var(--navy);
        cursor: pointer;
        transition: transform 0.08s ease, box-shadow 0.2s ease,
          background 0.2s ease;
      }
      .subtab {
        font-size: 14px;
        padding: 10px 16px;
      }
      .tab:hover,
      .subtab:hover {
        box-shadow: 0 6px 16px rgba(10, 31, 68, 0.08);
      }
      .tab[aria-pressed="true"],
      .subtab[aria-pressed="true"] {
        background: linear-gradient(180deg, var(--aqua), var(--aqua-2));
        border-color: transparent;
        color: #0d2730;
      }
      .subtabs[hidden] {
        display: none !important;
      }

      /* ===== Search bar ===== */
      .searchbar {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        padding: 12px;
        margin: 12px 0 26px;
      }
      .search-row {
        display: flex;
        gap: 18px;
        flex-wrap: wrap;
        align-items: center;
      }
      .field {
        position: relative;
        flex: 1 1 460px;
      }
      .field input {
        width: 100%;
        height: 44px;
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 10px 56px 10px 44px;
        outline: none;
      }
      .field input:focus {
        box-shadow: var(--focus);
        border-color: transparent;
      }
      .field .icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
        color: var(--navy);
        opacity: 0.6;
      }
      .clear {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 26px;
        height: 26px;
        display: grid;
        place-items: center;
        border: none;
        background: transparent;
        cursor: pointer;
        border-radius: 6px;
      }
      .clear:hover {
        background: #f2f6fb;
      }

      .select {
        height: 44px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: #fff;
        padding: 8px 12px;
        color: var(--ink);
        min-width: 200px;
        outline: none;
      }
      .btn {
        height: 44px;
        border-radius: 10px;
        background: linear-gradient(180deg, var(--navy), var(--navy-2));
        color: #fff;
        border: none;
        padding: 0 18px;
        cursor: pointer;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        letter-spacing: 0.02em;
      }
      .btn.secondary {
        background: #fff;
        color: var(--navy);
        border: 1px solid var(--border);
        font-weight: 600;
      }
      .count {
        margin-left: auto;
        color: var(--muted);
        white-space: nowrap;
      }

      /* ===== Result cards (full width) ===== */
      .grid {
        display: flex;
        flex-direction: column;
        gap: 22px;
      }
      .card {
        width: 100%;
        background: var(--aqua);
        border: 1px solid color-mix(in oklab, var(--aqua) 60%, #000 40%);
        border-radius: 10px;
        padding: 22px;
        box-shadow: var(--shadow);
        display: flex;
        flex-direction: column;
        gap: 12px;
      }
      .title {
        font-family: "Montserrat", system-ui;
        font-weight: 700;
        margin: 0;
        color: #0d2730;
        font-size:12px;
        line-height: 1.3;
      }
      .meta {
        font-size: 13px;
        color: #0d2730;
        opacity: 0.85;
      }
      .actions {
        margin-top: auto;
      }
      .download {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 42px;
        min-width: 210px;
        padding: 0 14px;
        background: linear-gradient(180deg, var(--navy), var(--navy-2));
        color: #fff;
        border: none;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 700;
      }

      .empty {
        display: none; /* hidden by default; shown only when no matches */
        place-items: center;
        text-align: center;
        gap: 8px;
        padding: 40px;
        border: 1px dashed var(--border);
        border-radius: 10px;
        color: var(--muted);
      }

      .sr-only {
        position: absolute !important;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
      }

      /* ===== Mobile tweaks ===== */
      @media (max-width: 700px) {
        .search-row {
          gap: 12px;
        }
        .select,
        .btn,
        .btn.secondary {
          flex: 1 1 160px;
        }
        .count {
          order: 10;
          width: 100%;
          text-align: right;
        }
      }