:root {
      --primary: #0B3D91;
      --primary-dark: #082d6b;
      --ink: #172033;
      --muted: #657084;
      --line: #e4e9f1;
      --soft: #f5f7fb;
      --white: #fff;
      --shadow: 0 18px 50px rgba(20, 37, 70, .09);
      --radius: 16px;
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      color: var(--ink);
      background: #fbfcfe;
      font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
      line-height: 1.7;
    }
    a { color: inherit; text-decoration: none; }
    img { max-width: 100%; display: block; }
    button, input { font: inherit; }
    .container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

    .topbar {
      background: #11233f;
      color: #dce6f5;
      font-size: 13px;
    }
    .topbar .container {
      min-height: 36px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
    }
    .topbar-links { display: flex; gap: 20px; }
    .topbar a { color: #dce6f5; transition: color .2s ease; }
    .topbar a:hover { color: #fff; }

    .header {
      position: relative;
      z-index: 20;
      background: rgba(255,255,255,.96);
      border-bottom: 1px solid var(--line);
    }
    .header-inner {
      min-height: 78px;
      display: flex;
      align-items: center;
      gap: 28px;
    }
    .logo {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      flex: 0 0 auto;
      color: var(--primary-dark);
      font-size: 19px;
      font-weight: 800;
      letter-spacing: .02em;
    }
    .logo img { width: 38px; height: 38px; object-fit: contain; }
    .main-nav { margin-left: auto; }
    .nav-list {
      display: flex;
      align-items: center;
      gap: 4px;
      list-style: none;
      padding: 0;
      margin: 0;
    }
    .nav-item { position: relative; }
    .nav-link {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      min-height: 48px;
      padding: 10px 13px;
      color: #344157;
      font-size: 14px;
      font-weight: 650;
      white-space: nowrap;
      border-radius: 9px;
    }
    .nav-link:hover,
    .nav-link:focus-visible {
      color: var(--primary);
      background: #f1f5fb;
      outline: none;
    }
    .has-arrow::after {
      content: "⌄";
      font-size: 13px;
      line-height: 1;
      transform: translateY(-1px);
    }
    .dropdown-panel,
    .mega-menu {
      position: absolute;
      top: calc(100% + 1px);
      left: 50%;
      transform: translate(-50%, 8px);
      width: 310px;
      padding: 16px;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 14px;
      box-shadow: var(--shadow);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    }
    .mega-menu { width: min(650px, 90vw); }
    .dropdown-panel::before,
    .mega-menu::before {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: -12px;
      height: 12px;
    }
    .nav-item:hover > .dropdown-panel,
    .nav-item:focus-within > .dropdown-panel,
    .nav-item:hover > .mega-menu,
    .nav-item:focus-within > .mega-menu {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translate(-50%, 0);
    }
    .dropdown-panel > a:not(.mega-footer) {
      display: block;
      padding: 9px 10px;
      border-radius: 8px;
      color: #3f4c61;
      font-size: 14px;
    }
    .dropdown-panel > a:not(.mega-footer):hover { background: var(--soft); color: var(--primary); }
    .mega-heading {
      display: flex;
      justify-content: space-between;
      gap: 15px;
      padding: 0 2px 12px;
      color: var(--primary-dark);
      font-size: 13px;
      font-weight: 800;
      border-bottom: 1px solid var(--line);
    }
    .mega-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      padding: 12px 0;
      max-height: 390px;
      overflow: auto;
    }
    .mega-card {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
      padding: 10px;
      border: 1px solid #edf0f5;
      border-radius: 10px;
      background: #fcfdff;
    }
    .mega-card:hover { border-color: #b9c9e5; background: #f5f8fd; }
    .mega-card img { width: 22px; height: 22px; object-fit: contain; margin-bottom: 2px; }
    .mega-card strong {
      overflow: hidden;
      color: #25334b;
      font-size: 13px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .mega-card small {
      overflow: hidden;
      color: var(--muted);
      font-size: 11px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .mega-footer {
      display: block;
      padding-top: 11px;
      color: var(--primary);
      font-size: 13px;
      font-weight: 750;
      border-top: 1px solid var(--line);
    }
    .header-btns {
      display: flex;
      align-items: center;
      gap: 10px;
      flex: 0 0 auto;
    }
    .member-link {
      color: var(--primary);
      font-size: 13px;
      font-weight: 750;
    }
    .account-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 38px;
      padding: 6px 15px;
      color: #fff;
      background: var(--primary);
      border-radius: 9px;
      font-size: 13px;
      font-weight: 750;
    }
    .account-link:hover { background: var(--primary-dark); }
    .hamburger {
      display: none;
      width: 42px;
      height: 42px;
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: #fff;
      cursor: pointer;
    }
    .hamburger span {
      display: block;
      width: 22px;
      height: 2px;
      margin: 4px auto;
      background: var(--ink);
      transition: transform .2s ease, opacity .2s ease;
    }
    .hamburger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    .drawer-overlay {
      position: fixed;
      z-index: 40;
      inset: 0;
      background: rgba(12, 23, 42, .48);
      opacity: 0;
      visibility: hidden;
      transition: opacity .25s ease, visibility .25s ease;
    }
    .drawer-overlay.open { opacity: 1; visibility: visible; }
    .mobile-drawer {
      position: fixed;
      z-index: 50;
      top: 0;
      right: 0;
      width: min(360px, 88vw);
      height: 100vh;
      overflow-y: auto;
      background: #fff;
      box-shadow: -15px 0 45px rgba(15, 35, 65, .16);
      transform: translateX(100%);
      transition: transform .25s ease;
    }
    .mobile-drawer.open { transform: translateX(0); }
    .drawer-head {
      display: flex;
      align-items: center;
      gap: 13px;
      min-height: 72px;
      padding: 14px 20px;
      color: var(--primary-dark);
      font-weight: 800;
      border-bottom: 1px solid var(--line);
    }
    .drawer-head span { margin-right: auto; }
    .drawer-head a { color: var(--primary); font-size: 13px; }
    .drawer-close {
      width: 32px;
      height: 32px;
      border: 0;
      color: #596579;
      background: #f1f4f8;
      border-radius: 50%;
      cursor: pointer;
      font-size: 22px;
      line-height: 1;
    }
    .drawer-menu { padding: 12px 20px 30px; }
    .drawer-link,
    .drawer-toggle {
      display: block;
      width: 100%;
      padding: 12px 0;
      color: #344157;
      background: transparent;
      border: 0;
      border-bottom: 1px solid #edf0f4;
      text-align: left;
      font-size: 15px;
      cursor: pointer;
    }
    .drawer-toggle::after {
      content: "＋";
      float: right;
      color: var(--primary);
    }
    .drawer-toggle.active::after { content: "－"; }
    .drawer-submenu {
      display: none;
      padding: 5px 0 8px 14px;
      border-left: 2px solid #dbe5f4;
    }
    .drawer-submenu.open { display: block; }
    .drawer-submenu a {
      display: block;
      padding: 7px 0;
      color: var(--muted);
      font-size: 14px;
    }
    .drawer-submenu a:hover,
    .drawer-link:hover { color: var(--primary); }

    .brokerlist-page {
      min-height: 600px;
      padding: 62px 0 88px;
      background:
        radial-gradient(circle at 8% 3%, rgba(11,61,145,.07), transparent 30%),
        #fbfcfe;
    }
    .page-intro {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 28px;
      margin-bottom: 34px;
    }
    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin: 0 0 10px;
      color: var(--primary);
      font-size: 13px;
      font-weight: 800;
      letter-spacing: .08em;
    }
    .eyebrow::before {
      content: "";
      width: 28px;
      height: 2px;
      background: var(--primary);
    }
    .page-intro h1 {
      max-width: 700px;
      margin: 0;
      color: #142542;
      font-size: clamp(30px, 4vw, 48px);
      letter-spacing: -.03em;
      line-height: 1.18;
    }
    .page-intro p {
      max-width: 600px;
      margin: 14px 0 0;
      color: var(--muted);
      font-size: 16px;
    }
    .broker-tools {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      min-width: 220px;
    }
    .tool-pill {
      display: inline-flex;
      align-items: center;
      min-height: 38px;
      padding: 6px 13px;
      color: #45536a;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 999px;
      font-size: 13px;
      box-shadow: 0 5px 18px rgba(20, 37, 70, .04);
    }
    .broker-list {
      display: grid;
      gap: 16px;
    }
    .broker-card {
      display: grid;
      grid-template-columns: 92px minmax(0, 1fr) auto;
      align-items: center;
      gap: 24px;
      padding: 24px 28px;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: 0 8px 28px rgba(30, 50, 86, .045);
      transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    }
    .broker-card:hover {
      transform: translateY(-3px);
      border-color: #b9c9e5;
      box-shadow: var(--shadow);
    }
    .broker-logo {
      display: grid;
      place-items: center;
      width: 78px;
      height: 78px;
      padding: 12px;
      background: #f5f7fb;
      border: 1px solid #e8edf4;
      border-radius: 14px;
    }
    .broker-logo img { width: 100%; height: 100%; object-fit: contain; }
    .broker-main { min-width: 0; }
    .broker-title-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 11px;
      margin-bottom: 4px;
    }
    .broker-title-row h2 {
      margin: 0;
      color: #1b2d4a;
      font-size: 21px;
      line-height: 1.3;
    }
    .rating {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 8px;
      color: #8b5c08;
      background: #fff6dd;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 800;
    }
    .broker-summary {
      display: -webkit-box;
      overflow: hidden;
      margin: 0 0 12px;
      color: var(--muted);
      font-size: 14px;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
    .broker-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 18px;
      margin: 0;
      color: #4c5a70;
      font-size: 12px;
    }
    .broker-meta span { white-space: nowrap; }
    .broker-meta b {
      margin-right: 4px;
      color: #1d3558;
      font-weight: 750;
    }
    .broker-actions {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 8px;
      min-width: 126px;
    }
    .broker-actions a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 40px;
      padding: 7px 13px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 750;
      text-align: center;
    }
    .broker-actions .review-link {
      color: var(--primary);
      background: #eef4fc;
    }
    .broker-actions .apply-link {
      color: #fff;
      background: var(--primary);
    }
    .broker-actions a:hover { filter: brightness(.95); }
    .pagination {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px;
      margin-top: 38px;
    }
    .pagination a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 38px;
      min-height: 38px;
      padding: 5px 12px;
      color: #526078;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 8px;
      font-size: 13px;
    }
    .pagination a:hover,
    .pagination a.active {
      color: #fff;
      background: var(--primary);
      border-color: var(--primary);
    }

    .footer {
      color: #c9d5e7;
      background: #11233f;
    }
    .footer .container { padding-top: 54px; }
    .footer-grid {
      display: grid;
      grid-template-columns: 1.35fr 1fr 1fr 1fr;
      gap: 38px;
      padding-bottom: 42px;
    }
    .footer h2, .footer h3 { margin: 0 0 15px; color: #fff; }
    .footer h2 { font-size: 21px; }
    .footer h3 { font-size: 14px; }
    .footer p { max-width: 310px; margin: 0; color: #aebdd2; font-size: 13px; }
    .footer-links {
      display: grid;
      gap: 7px;
      padding: 0;
      margin: 0;
      list-style: none;
      color: #aebdd2;
      font-size: 13px;
    }
    .footer-links a:hover { color: #fff; }
    .footer-bottom {
      display: flex;
      justify-content: space-between;
      gap: 18px;
      padding: 18px 0;
      color: #8fa3bf;
      border-top: 1px solid rgba(220,230,245,.14);
      font-size: 12px;
    }

    @media (max-width: 1050px) {
      .main-nav { display: none; }
      .hamburger { display: block; }
      .header-btns { margin-left: auto; }
      .page-intro { align-items: flex-start; flex-direction: column; }
      .broker-tools { justify-content: flex-start; }
    }
    @media (max-width: 700px) {
      .container { width: min(100% - 28px, 1180px); }
      .topbar .container { align-items: flex-start; flex-direction: column; gap: 2px; padding: 8px 0; }
      .topbar-links { flex-wrap: wrap; gap: 8px 14px; }
      .header-inner { min-height: 68px; gap: 10px; }
      .logo { font-size: 16px; }
      .logo img { width: 32px; height: 32px; }
      .member-link { display: none; }
      .account-link { min-height: 36px; padding-inline: 11px; }
      .brokerlist-page { padding: 42px 0 64px; }
      .page-intro h1 { font-size: 32px; }
      .broker-card {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 16px;
        padding: 18px;
      }
      .broker-logo { width: 62px; height: 62px; padding: 9px; border-radius: 11px; }
      .broker-main { grid-column: 1 / -1; grid-row: 2; }
      .broker-card > .broker-logo + .broker-main { grid-column: 2; grid-row: 1; }
      .broker-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        min-width: 0;
      }
      .broker-title-row h2 { font-size: 18px; }
      .broker-summary { -webkit-line-clamp: 3; }
      .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
      .footer-bottom { align-items: flex-start; flex-direction: column; gap: 5px; }
    }
    @media (max-width: 430px) {
      .footer-grid { grid-template-columns: 1fr; }
      .broker-meta { display: grid; gap: 5px; }
    }