    :root {
      /* Light tokens */
      --bg-l: #f7f6f3;
      --surface-l: #ffffff;
      --surface-2-l: #f3f1ec;
      --surface-hover-l: #eceae4;
      --text-l: #1c1917;
      --text-secondary-l: #44403c;
      --text-muted-l: #57534e;
      --border-l: #e6e4df;
      --brand-l: #1d4ed8;
      --brand-hover-l: #1e40af;
      --brand-soft-l: #eef2ff;
      --brand-border-l: #c7d2fe;
      --up-l: #065f46;
      --up-soft-l: #ecfdf5;
      --up-border-l: #a7f3d0;
      --down-l: #b91c1c;
      --down-soft-l: #fef2f2;
      --down-border-l: #fecaca;
      --warn-l: #92400e;
      --warn-soft-l: #fffbeb;
      --warn-border-l: #fde68a;

      /* Dark tokens (calm slate, never harsh pitch black) */
      --bg-d: #0f172a;
      --surface-d: #1e293b;
      --surface-2-d: #162032;
      --surface-hover-d: #27354d;
      --text-d: #f8fafc;
      --text-secondary-d: #cbd5e1;
      --text-muted-d: #94a3b8;
      --border-d: #334155;
      --brand-d: #60a5fa;
      --brand-hover-d: #93c5fd;
      --brand-soft-d: rgba(59, 130, 246, 0.15);
      --brand-border-d: rgba(96, 165, 250, 0.35);
      --up-d: #34d399;
      --up-soft-d: rgba(16, 185, 129, 0.15);
      --up-border-d: rgba(52, 211, 153, 0.35);
      --down-d: #f87171;
      --down-soft-d: rgba(239, 68, 68, 0.15);
      --down-border-d: rgba(248, 113, 113, 0.35);
      --warn-d: #fbbf24;
      --warn-soft-d: rgba(245, 158, 11, 0.15);
      --warn-border-d: rgba(251, 191, 36, 0.35);

      /* Fallback defaults */
      --bg: var(--bg-l);
      --surface: var(--surface-l);
      --surface-2: var(--surface-2-l);
      --surface-hover: var(--surface-hover-l);
      --text: var(--text-l);
      --text-secondary: var(--text-secondary-l);
      --text-muted: var(--text-muted-l);
      --border: var(--border-l);
      --brand: var(--brand-l);
      --brand-hover: var(--brand-hover-l);
      --brand-soft: var(--brand-soft-l);
      --brand-border: var(--brand-border-l);
      --up: var(--up-l);
      --up-soft: var(--up-soft-l);
      --up-border: var(--up-border-l);
      --down: var(--down-l);
      --down-soft: var(--down-soft-l);
      --down-border: var(--down-border-l);
      --warn: var(--warn-l);
      --warn-soft: var(--warn-soft-l);
      --warn-border: var(--warn-border-l);

      @media (prefers-color-scheme: dark) {
        --bg: var(--bg-d);
        --surface: var(--surface-d);
        --surface-2: var(--surface-2-d);
        --surface-hover: var(--surface-hover-d);
        --text: var(--text-d);
        --text-secondary: var(--text-secondary-d);
        --text-muted: var(--text-muted-d);
        --border: var(--border-d);
        --brand: var(--brand-d);
        --brand-hover: var(--brand-hover-d);
        --brand-soft: var(--brand-soft-d);
        --brand-border: var(--brand-border-d);
        --up: var(--up-d);
        --up-soft: var(--up-soft-d);
        --up-border: var(--up-border-d);
        --down: var(--down-d);
        --down-soft: var(--down-soft-d);
        --down-border: var(--down-border-d);
        --warn: var(--warn-d);
        --warn-soft: var(--warn-soft-d);
        --warn-border: var(--warn-border-d);
      }

      @supports (color: light-dark(white, black)) {
        --bg: light-dark(var(--bg-l), var(--bg-d));
        --surface: light-dark(var(--surface-l), var(--surface-d));
        --surface-2: light-dark(var(--surface-2-l), var(--surface-2-d));
        --surface-hover: light-dark(var(--surface-hover-l), var(--surface-hover-d));
        --text: light-dark(var(--text-l), var(--text-d));
        --text-secondary: light-dark(var(--text-secondary-l), var(--text-secondary-d));
        --text-muted: light-dark(var(--text-muted-l), var(--text-muted-d));
        --border: light-dark(var(--border-l), var(--border-d));
        --brand: light-dark(var(--brand-l), var(--brand-d));
        --brand-hover: light-dark(var(--brand-hover-l), var(--brand-hover-d));
        --brand-soft: light-dark(var(--brand-soft-l), var(--brand-soft-d));
        --brand-border: light-dark(var(--brand-border-l), var(--brand-border-d));
        --up: light-dark(var(--up-l), var(--up-d));
        --up-soft: light-dark(var(--up-soft-l), var(--up-soft-d));
        --up-border: light-dark(var(--up-border-l), var(--up-border-d));
        --down: light-dark(var(--down-l), var(--down-d));
        --down-soft: light-dark(var(--down-soft-l), var(--down-soft-d));
        --down-border: light-dark(var(--down-border-l), var(--down-border-d));
        --warn: light-dark(var(--warn-l), var(--warn-d));
        --warn-soft: light-dark(var(--warn-soft-l), var(--warn-soft-d));
        --warn-border: light-dark(var(--warn-border-l), var(--warn-border-d));
      }

      color-scheme: light dark;
      accent-color: var(--brand);

      &:has(> head > meta[name="color-scheme"][content="dark"]) {
        color-scheme: dark;
      }
      &:has(> head > meta[name="color-scheme"][content="light"]) {
        color-scheme: light;
      }
    }

    :root {
      --target-size: 24px;
    }
    @media (pointer: coarse) {
      :root {
        --target-size: 44px;
      }
    }

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

    html {
      overflow-x: clip;
    }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background-color: var(--bg);
      color: var(--text);
      line-height: 1.7;
      font-size: 17px;
      min-block-size: 100dvh;
      overflow-x: clip;
      overflow-wrap: anywhere;
    }

    img, video, svg, iframe {
      max-inline-size: 100%;
    }

    h1, h2, h3 {
      text-wrap: balance;
    }

    p, li {
      text-wrap: pretty;
    }

    :where(button, select, textarea, input:not([type="checkbox"], [type="radio"]), [role="button"], nav a, label:has(input[type="checkbox"], input[type="radio"])) {
      min-block-size: var(--target-size);
      min-inline-size: var(--target-size);
    }

    .container {
      width: 100%;
      max-width: min(1240px, 100%);
      min-inline-size: 0;
      margin: 0 auto;
      padding-top: 0;
      padding-bottom: 0;
      padding-left: max(16px, env(safe-area-inset-left, 0px));
      padding-right: max(16px, env(safe-area-inset-right, 0px));
    }

    /* Header */
    .topbar {
      width: 100%;
      max-inline-size: 100%;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      z-index: 40;
      padding-top: env(safe-area-inset-top, 0px);
    }
    .topbar-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 14px 0;
      flex-wrap: wrap;
    }
    .brand-logo {
      display: flex;
      align-items: center;
      gap: 12px;
      text-decoration: none;
      color: inherit;
    }
    .brand-icon {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      background: var(--brand);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .brand-title {
      font-size: 19px;
      font-weight: 800;
      letter-spacing: -0.02em;
    }
    .brand-sub {
      font-size: 12px;
      color: var(--text-muted);
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 9px 15px;
      border-radius: 10px;
      font-size: 13.5px;
      font-weight: 600;
      cursor: pointer;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      transition: background 0.15s, border-color 0.15s, transform 0.1s;
      font-family: inherit;
      flex-shrink: 0;
      max-inline-size: 100%;
    }
    .btn:hover { background: var(--surface-hover); }
    .btn:active { transform: translateY(1px); }
    .btn-primary {
      background: #1d4ed8;
      border-color: #1d4ed8;
      color: #ffffff;
    }
    .btn-primary:hover { background: #1e40af; border-color: #1e40af; }
    .btn-soft {
      background: var(--brand-soft);
      border-color: var(--brand-border);
      color: var(--brand);
    }
    .btn-soft:hover { opacity: 0.9; }

    /* Navigation Tabs */
    .nav-bar {
      display: flex;
      flex-wrap: nowrap;
      gap: 8px;
      width: 100%;
      max-inline-size: 100%;
      min-inline-size: 0;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      padding: 12px 0 0;
      border-top: 1px solid var(--border);
      margin-top: 4px;
    }
    .nav-tab {
      display: inline-flex;
      align-items: center;
      flex: 0 0 auto;
      min-inline-size: max-content;
      gap: 8px;
      padding: 10px 16px;
      border-radius: 10px 10px 0 0;
      border: none;
      border-bottom: 3px solid transparent;
      background: transparent;
      color: var(--text-secondary);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      font-family: inherit;
      text-decoration: none;
      transition: color 0.15s, background 0.15s;
    }
    .nav-tab:hover {
      color: var(--text);
      background: var(--surface-hover);
    }
    .nav-tab.active {
      color: var(--brand);
      border-bottom-color: var(--brand);
      background: transparent;
    }
    .badge-new {
      font-size: 11px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 999px;
      background: var(--up-soft);
      color: var(--up);
      border: 1px solid var(--up-border);
    }

    /* Quick Summary Strip (4 clear cards - overflow-proof 2-row layout) */
    .summary-strip {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
      gap: 14px;
      margin: 22px 0;
    }
    @media (max-width: 560px) and (min-width: 350px) {
      .summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 14px 0;
      }
      .summary-card {
        padding: 12px 13px !important;
        gap: 8px !important;
        border-radius: 14px !important;
      }
      .summary-card .pill {
        padding: 2px 7px;
        font-size: 11px;
      }
      .summary-label {
        font-size: 12px !important;
      }
    }
    .summary-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 16px 18px;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
      cursor: pointer;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .summary-card:hover {
      border-color: var(--border);
      background: var(--surface-hover);
    }
    .summary-card-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      min-width: 0;
      flex-wrap: wrap;
    }
    .summary-label {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-muted);
      margin: 0;
      min-width: 0;
    }
    .summary-price {
      font-size: clamp(1.125rem, 0.95rem + 0.9vw, 1.45rem);
      font-weight: 800;
      letter-spacing: -0.02em;
      line-height: 1.2;
    }
    .pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .pill-up { background: var(--up-soft); color: var(--up); border: 1px solid var(--up-border); }
    .pill-down { background: var(--down-soft); color: var(--down); border: 1px solid var(--down-border); }
    .pill-warn { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-border); }
    .pill-info { background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-border); }

    /* Cards & Layout */
    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 22px;
      min-inline-size: 0;
      max-inline-size: 100%;
    }
    .chart-sticky-card {
      position: sticky;
      top: 130px;
    }
    .chart-frame-box {
      height: 430px;
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid var(--border);
      position: relative;
    }
    .section-intro {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 20px 24px;
      margin-bottom: 20px;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }
    .section-intro > div:first-child {
      min-inline-size: 0;
    }
    .section-title {
      font-size: clamp(1.15rem, 1rem + 0.7vw, 1.3rem);
      font-weight: 800;
      margin-bottom: 4px;
      letter-spacing: -0.01em;
    }
    .section-desc {
      font-size: 14px;
      color: var(--text-secondary);
      max-width: 760px;
    }

    .grid-main-chart {
      display: grid;
      grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
      gap: 20px;
      align-items: start;
    }
    .grid-two {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
      gap: 20px;
      align-items: start;
    }
    .grid-cards-4 {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
      gap: 16px;
    }
    .grid-cards-3 {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
      gap: 16px;
    }
    @media (max-width: 820px) {
      .grid-main-chart, .grid-two { grid-template-columns: minmax(0, 1fr); }
      .chart-sticky-card { position: static; }
      .chart-frame-box { height: 340px; }
    }
    @media (max-width: 640px) {
      .topbar { position: relative; }
      .brand-sub { display: none; }
      .topbar-inner { padding: 10px 0 8px; gap: 10px; }
      .brand-icon { width: 34px; height: 34px; border-radius: 10px; }
      .brand-title { font-size: 17px; }
      .header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap !important;
        gap: 6px;
        padding-top: 2px;
      }
      .header-actions .btn {
        padding: 7px 10px;
        font-size: 12px;
        white-space: nowrap;
      }
      #notif-btn span,
      #theme-toggle-btn span {
        display: none;
      }
      #notif-btn,
      #theme-toggle-btn {
        padding: 7px 10px;
      }
      #auth-btn {
        margin-left: auto;
      }
      .nav-bar {
        padding: 6px 0 0;
        gap: 4px;
        scrollbar-width: none;
      }
      .nav-bar::-webkit-scrollbar { display: none; }
      .nav-tab {
        padding: 8px 12px;
        font-size: 13px;
      }
      .card { padding: 16px; border-radius: 16px; }
      .section-intro { padding: 16px; border-radius: 16px; gap: 12px; }
    }

    /* Filter chips */
    .chip-group {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .chip {
      padding: 7px 14px;
      border-radius: 999px;
      font-size: 13px;
      font-weight: 600;
      border: 1px solid var(--border);
      background: var(--surface-2);
      color: var(--text-secondary);
      cursor: pointer;
      font-family: inherit;
    }
    .chip:hover { color: var(--text); border-color: var(--brand); }
    .chip.active {
      background: #2563eb;
      color: #ffffff;
      border-color: #2563eb;
    }

    /* Clean Responsive Table (modern-web-guidance responsive-table) */
    .table-wrap {
      overflow: auto;
      max-inline-size: 100%;
      container-type: inline-size;
    }
    table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      text-align: left;
    }
    thead {
      position: sticky;
      inset-block-start: 0;
      z-index: 1;
    }
    th {
      font-size: 12px;
      font-weight: 700;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.03em;
      padding: 12px 14px;
      border-bottom: 1px solid var(--border);
      background: var(--surface-2);
    }
    td {
      padding: 14px;
      border-bottom: 1px solid var(--border);
      font-size: 14px;
      vertical-align: middle;
    }
    tbody tr { cursor: pointer; transition: background 0.12s; }
    tbody tr:hover { background: var(--surface-hover); }
    .asset-name { font-weight: 700; color: var(--text); }
    .asset-sym { font-size: 12px; color: var(--text-muted); font-family: ui-monospace, monospace; }
    .num { font-variant-numeric: tabular-nums; font-weight: 600; }

    /* Compact markets table inside narrow mobile containers (no horizontal overflow) */
    @container (width < 520px) {
      table.markets-table th:nth-child(4),
      table.markets-table td:nth-child(4) {
        display: none;
      }
      table.markets-table th {
        padding: 9px 8px;
        font-size: 11px;
      }
      table.markets-table td {
        padding: 10px 8px;
        font-size: 13px;
      }
      table.markets-table td:nth-child(2),
      table.markets-table td:nth-child(3) {
        white-space: nowrap;
      }
    }

    /* Stacked card layout for member table inside narrow containers */
    @container (width < 520px) {
      table.stacked-mobile-table,
      table.stacked-mobile-table thead,
      table.stacked-mobile-table tbody,
      table.stacked-mobile-table tr,
      table.stacked-mobile-table th,
      table.stacked-mobile-table td {
        display: block;
      }
      table.stacked-mobile-table thead {
        display: none;
      }
      table.stacked-mobile-table tr {
        margin-block-end: 12px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface-2);
        overflow: hidden;
      }
      table.stacked-mobile-table tbody th {
        position: sticky;
        inset-block-start: 0;
        z-index: 2;
        background: var(--surface);
        text-transform: none;
        letter-spacing: normal;
        font-size: 14px;
        color: var(--text);
      }
      table.stacked-mobile-table {
        --label-2: "Kayıt";
        --label-3: "İşlem";
      }
      table.stacked-mobile-table td {
        padding: 10px 12px;
        text-align: left !important;
      }
      table.stacked-mobile-table td:nth-child(2)::before {
        content: var(--label-2) ": ";
        font-weight: 700;
        color: var(--text-muted);
      }
      table.stacked-mobile-table td:nth-child(3)::before {
        content: var(--label-3) ": ";
        font-weight: 700;
        color: var(--text-muted);
      }
    }

    /* Rich Customizable Select Picker (modern-web-guidance rich-media-picker) */
    select.custom-select,
    select.custom-select::picker(select) {
      appearance: base-select;
    }
    select.custom-select {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      min-height: 46px;
      padding: 10px 13px;
      background-color: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: 10px;
      color: var(--text);
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
    }
    select.custom-select::picker(select) {
      background-color: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 6px;
      box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
      width: anchor-size(width);
      max-block-size: min(340px, 60dvh);
      overflow-y: auto;
    }
    select.custom-select option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 9px 10px;
      border-radius: 8px;
      cursor: pointer;
      color: var(--text);
    }
    select.custom-select option:hover {
      background-color: var(--surface-hover);
    }
    select.custom-select option::checkmark {
      display: none;
    }
    select.custom-select option:checked {
      background-color: #2563eb;
      color: #ffffff;
    }
    select.custom-select option:checked .opt-title {
      font-weight: 800;
    }
    select.custom-select option:checked .opt-sub,
    select.custom-select option:checked .opt-badge {
      color: #ffffff;
      border-color: rgba(255, 255, 255, 0.4);
      background: rgba(255, 255, 255, 0.16);
    }
    .opt-left {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-inline-size: 0;
    }
    .opt-badge {
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 11.5px;
      font-weight: 800;
      padding: 2px 7px;
      border-radius: 6px;
      background: var(--brand-soft);
      color: var(--brand);
      border: 1px solid var(--brand-border);
      flex: none;
    }
    .opt-title {
      font-weight: 600;
      font-size: 13.5px;
    }
    .opt-sub {
      font-size: 12px;
      font-weight: 700;
      color: var(--text-muted);
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    select.custom-select selectedcontent {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      width: 100%;
      min-inline-size: 0;
    }

    /* Live Company & Lot Valuation Banner */
    .live-lot-banner {
      grid-column: 1 / -1;
      padding: 13px 15px;
      border-radius: 14px;
      background: linear-gradient(135deg, var(--brand-soft), var(--up-soft));
      border: 1px solid var(--brand-border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px 16px;
      flex-wrap: wrap;
    }
    .live-lot-left {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-inline-size: 0;
    }
    .live-lot-kicker {
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--brand);
    }
    .live-lot-price-line {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      font-size: 14.5px;
      font-weight: 800;
      color: var(--text);
    }
    .live-lot-total-box {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 2px;
    }
    @media (max-width: 520px) {
      .live-lot-total-box {
        align-items: flex-start;
        width: 100%;
        padding-top: 8px;
        border-top: 1px dashed var(--brand-border);
      }
    }
    .lot-quick-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 5px;
    }
    .lot-mini-btn {
      padding: 4px 9px;
      min-block-size: 32px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
    }
    .lot-mini-btn:hover, .lot-mini-btn.active {
      border-color: var(--brand);
      background: var(--brand-soft);
      color: var(--brand);
    }

    /* Form Controls */
    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    @media (max-width: 560px) {
      .form-grid { grid-template-columns: 1fr; }
    }
    .field { display: flex; flex-direction: column; gap: 5px; }
    .field-full { grid-column: 1 / -1; }
    .field label {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
    }
    .field-hint {
      font-size: 12px;
      color: var(--text-muted);
    }
    input[type="text"], input[type="search"], input[type="number"], input[type="email"], input[type="password"], select, textarea {
      width: 100%;
      padding: 10px 13px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--surface-2);
      color: var(--text);
      font-size: max(1rem, 1em);
      min-height: 46px;
      font-family: inherit;
    }
    input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
      outline: 2.5px solid var(--brand);
      outline-offset: 1px;
    }

    /* Tax Comparison Boxes */
    .scenario-compare {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
      gap: 12px;
      margin: 16px 0;
    }
    .scenario-grid-2 {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    @media (max-width: 520px) {
      .scenario-grid-2 {
        grid-template-columns: minmax(0, 1fr);
      }
    }
    .scenario-box {
      border: 1px solid var(--border);
      background: var(--surface-2);
      border-radius: 14px;
      padding: 16px;
    }
    .scenario-box.optimal {
      background: var(--up-soft);
      border: 2px solid var(--up);
    }
    .scenario-label {
      font-size: 12.5px;
      font-weight: 700;
      color: var(--text-secondary);
      margin-bottom: 6px;
    }
    .scenario-tax {
      font-size: 23px;
      font-weight: 800;
      letter-spacing: -0.02em;
      margin-bottom: 4px;
    }
    .scenario-sub {
      font-size: 12.5px;
      color: var(--text-muted);
    }

    .alert-banner {
      padding: 16px 18px;
      border-radius: 14px;
      font-size: 14.5px;
      font-weight: 600;
      display: flex;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 16px;
    }
    .alert-warning { background: var(--warn-soft); border: 1px solid var(--warn-border); color: var(--text); }
    .alert-success { background: var(--up-soft); border: 1px solid var(--up-border); color: var(--text); }
    .alert-info { background: var(--brand-soft); border: 1px solid var(--brand-border); color: var(--text); }

    .step-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 12px;
    }
    .step-list li {
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 14px;
      font-size: 13.5px;
      color: var(--text-secondary);
    }

    details.clean-details {
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 13px 16px;
      margin-top: 10px;
    }
    details.clean-details summary {
      font-weight: 600;
      font-size: 14px;
      cursor: pointer;
      color: var(--text);
    }

    .hidden { display: none !important; }

    /* Native Modal Dialog per Modern Web Guidance */
    dialog.modal-shell {
      margin: auto;
      max-width: 740px;
      width: min(calc(100dvw - 20px), 740px);
      max-block-size: min(88dvh, 780px);
      border: 1px solid var(--border);
      border-radius: 20px;
      background: var(--surface);
      color: var(--text);
      padding: 0;
      box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    }
    dialog.modal-shell[open] {
      display: flex;
      flex-direction: column;
    }
    dialog:modal {
      overscroll-behavior: contain;
    }
    dialog.modal-shell::backdrop {
      background: rgba(15, 23, 42, 0.58);
      backdrop-filter: blur(3px);
      overflow: hidden;
      overscroll-behavior: contain;
    }
    .dialog-header {
      padding: 18px 22px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .dialog-body {
      padding: 22px;
      overflow-y: auto;
      font-size: 14.5px;
      line-height: 1.65;
    }
    .dialog-body h1, .dialog-body h2, .dialog-body h3 { margin: 14px 0 6px; }
    .dialog-body ul { padding-left: 20px; margin: 8px 0; }

    /* Brand Story Section & Footer */
    .brand-story-section {
      margin-top: 48px;
      padding: 8px 0 12px;
      background: transparent;
      border: 0;
      position: relative;
    }
    .story-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 0;
      border-radius: 0;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.04em;
      background: transparent;
      color: var(--brand);
      border: 0;
      margin-bottom: 12px;
    }
    .story-formula {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 12px;
      margin: 20px 0 28px;
      padding: 0;
      border-radius: 0;
      background: transparent;
      border: 0;
      font-size: 15px;
      font-weight: 600;
      max-width: 68ch;
      line-height: 1.6;
    }
    .story-pillars {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
      gap: 28px 36px;
      margin-top: 8px;
    }
    .story-pillar-card {
      background: transparent;
      border: 0;
      border-radius: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .story-pillar-tag {
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--brand);
    }
    .story-pillar-title {
      font-size: 16.5px;
      font-weight: 800;
      color: var(--text);
    }
    .story-pillar-desc {
      font-size: 16px;
      color: var(--text-secondary);
      line-height: 1.7;
      max-width: 38ch;
    }
    .site-footer {
      margin-top: 48px;
      padding: 28px 0 12px;
      border-top: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
      font-size: 15px;
      line-height: 1.6;
      color: var(--text-secondary);
      max-width: 72ch;
    }
    .site-footer a { color: var(--brand); text-decoration: none; }
    .site-footer a:hover { text-decoration: underline; }
    .home-hero {
      margin: 12px 0 8px;
      padding: clamp(8px, 2vw, 16px) 0 clamp(28px, 4vw, 48px);
      border: 0;
      border-radius: 0;
      background: transparent;
    }
    .hero-kicker {
      margin: 0;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--brand);
    }
    .home-hero h1 {
      max-width: 16em;
      margin: 14px 0 16px;
      font-size: clamp(2rem, 1.2rem + 2.4vw, 3.15rem);
      line-height: 1.15;
      letter-spacing: -0.03em;
      font-weight: 700;
      text-wrap: balance;
    }
    .hero-lead {
      max-width: 38rem;
      margin: 0 0 24px;
      color: var(--text-secondary);
      font-size: 1.125rem;
      line-height: 1.7;
    }
    .hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
    .hero-ctas .btn { min-height: 46px; padding: 10px 18px; font-size: 16px; }
    .home-intro.brand-story-section { margin-top: 12px; }
    .brand-story-section .section-title { font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem); margin: 0 0 12px; }
    .brand-story-section .section-desc { max-width: 62ch; font-size: 1.05rem; line-height: 1.7; }
    .summary-strip { margin: 36px 0 8px; gap: 18px; }
    .summary-card {
      border: 0;
      background: transparent;
      box-shadow: none;
      padding: 4px 0 8px;
      border-radius: 0;
    }
    .market-fold { margin-top: 28px; border-top: 1px solid var(--border); }
    .market-fold-summary {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      padding: 22px 0 18px;
      cursor: pointer;
      list-style: none;
    }
    .market-fold-summary::-webkit-details-marker { display: none; }
    .market-fold-summary::marker { content: ""; }
    .market-fold-title {
      font-size: 1.2rem;
      font-weight: 700;
      color: var(--text);
    }
    .market-fold-title::before {
      content: "▸ ";
      color: var(--brand);
      font-weight: 600;
    }
    .market-fold[open] .market-fold-title::before { content: "▾ "; }
    .market-fold-hint {
      max-width: 62ch;
      color: var(--text-secondary);
      font-size: 1rem;
      font-weight: 400;
      line-height: 1.6;
    }
    .market-fold .section-intro {
      background: transparent;
      border: 0;
      border-radius: 0;
      padding: 8px 0 18px;
    }
    .market-fold .rates-ribbon-box,
    .market-fold .exchange-card,
    .market-fold .card {
      box-shadow: none;
    }
    .live-pulse-dot,
    .rate-flash-up,
    .rate-flash-down { animation: none; }
    .live-pulse-dot { box-shadow: none; }
    .nav-tab .badge-new { display: none; }
    .rates-ribbon-box { box-shadow: none; margin-top: 8px; }
    .exchange-card:hover { box-shadow: none; }
    @media (max-width: 640px) {
      .home-hero h1 { font-size: 1.85rem; }
      .story-pillars { gap: 22px; }
      .summary-strip { margin-top: 28px; }
    }

    @keyframes spin { to { transform: rotate(360deg); } }
    .spin { animation: spin 1s linear infinite; }

    /* Real Return Scorecard & Comparison Bars */
    .grade-circle {
      width: 54px;
      height: 54px;
      border-radius: 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      font-weight: 800;
      flex-shrink: 0;
    }
    .grade-good { background: var(--up-soft); color: var(--up); border: 2px solid var(--up); }
    .grade-warn { background: var(--down-soft); color: var(--down); border: 2px solid var(--down); }
    .grade-mid { background: var(--brand-soft); color: var(--brand); border: 2px solid var(--brand); }

    .race-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin: 16px 0;
      padding: 16px;
      border-radius: 14px;
      background: var(--surface-2);
      border: 1px solid var(--border);
    }
    .race-row { display: flex; flex-direction: column; gap: 5px; }
    .race-meta {
      display: flex;
      justify-content: space-between;
      font-size: 13px;
      font-weight: 600;
    }
    .race-track {
      height: 10px;
      border-radius: 999px;
      background: var(--border);
      overflow: hidden;
    }
    .race-fill {
      height: 100%;
      border-radius: 999px;
      transition: width 0.35s ease;
    }

    /* ==================== SLIDE-OUT NAVIGATION DRAWER (modern-web-guidance) ==================== */
    .Drawer {
      --drawer-width: min(21em, 82dvw, 100dvw - 24px);
      --drawer-backdrop: 0;
      inset: 0;
      width: auto;
      height: auto;
      max-width: none;
      max-height: none;
      margin: 0;
      padding: 0;
      background: transparent;
      border: 0;
      overflow: visible;
    }
    .Drawer::backdrop {
      background: #020617;
      opacity: calc(var(--drawer-backdrop) * 0.55);
    }
    .Drawer-scroller {
      position: relative;
      display: grid;
      grid-template-columns: var(--drawer-width) 100%;
      overflow-x: scroll;
      overscroll-behavior: none;
      scrollbar-width: none;
      scroll-snap-type: x mandatory;
    }
    .Drawer-scroller::-webkit-scrollbar { display: none; }
    @media (prefers-reduced-motion: no-preference) {
      .Drawer-scroller {
        scroll-behavior: smooth;
      }
    }
    .Drawer-scroller::after {
      content: '';
      scroll-snap-align: end;
      scroll-initial-target: nearest;
    }
    .Drawer-sheet {
      display: grid;
      grid-template-rows: auto 1fr;
      height: 100svh;
      background: var(--surface);
      color: var(--text);
      border-right: 1px solid var(--border);
      box-shadow: 18px 0 42px rgba(0, 0, 0, 0.22);
      overflow-y: auto;
      scroll-snap-align: start;
      scrollbar-width: none;
    }
    @supports (animation-timeline: scroll()) {
      .Drawer {
        timeline-scope: --drawer-fade;
        animation: fade-drawer-backdrop linear both;
        animation-timeline: --drawer-fade;
      }
      .Drawer-scroller {
        scroll-timeline: --drawer-fade x;
      }
      @property --drawer-backdrop {
        syntax: '<number>';
        inherits: true;
        initial-value: 0;
      }
      @keyframes fade-drawer-backdrop {
        0% { --drawer-backdrop: 1; }
        100% { --drawer-backdrop: 0; }
      }
    }
    .drawer-header {
      padding: 16px 18px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .drawer-body {
      padding: 14px 12px 24px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }
    .drawer-group-title {
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
      padding: 0 10px;
      margin-bottom: 4px;
    }
    .drawer-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .drawer-link {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 11px 12px;
      border-radius: 12px;
      border: 1px solid transparent;
      background: transparent;
      color: var(--text);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      text-align: left;
      font-family: inherit;
      text-decoration: none;
      box-sizing: border-box;
      transition: background 0.14s, border-color 0.14s, color 0.14s;
    }
    .drawer-link:hover {
      background: var(--surface-hover);
    }
    .drawer-link.active {
      background: var(--brand-soft);
      border-color: var(--brand-border);
      color: var(--brand);
    }
    .drawer-link-left {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    /* ==================== AUTH, NOTIFICATIONS & ACCESSIBLE HELPERS ==================== */
    .visually-hidden {
      position: absolute;
      clip-path: inset(50%);
      overflow: hidden;
      width: 1px;
      height: 1px;
      margin: -1px;
      padding: 0;
      border: 0;
      white-space: nowrap;
    }
    .notif-btn-wrap {
      position: relative;
    }
    .notif-badge {
      position: absolute;
      top: -5px;
      right: -5px;
      min-width: 19px;
      height: 19px;
      padding: 0 5px;
      border-radius: 999px;
      background: #dc2626;
      color: #ffffff;
      font-size: 11px;
      font-weight: 800;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 2px solid var(--surface);
    }
    .auth-tabs {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 6px;
      padding: 5px;
      border-radius: 12px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      margin-bottom: 18px;
    }
    .auth-tab-btn {
      padding: 9px 10px;
      border-radius: 9px;
      border: 0;
      background: transparent;
      color: var(--text-secondary);
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
    }
    .auth-tab-btn.active {
      background: var(--surface);
      color: var(--brand);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    .auth-form-stack {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
    .social-auth-stack {
      display: flex;
      flex-direction: column;
      gap: 9px;
      margin-bottom: 14px;
    }
    .social-auth-btn {
      width: 100%;
      min-height: 48px;
      padding: 9px 14px;
      border-radius: 12px;
      border: 1px solid var(--border);
      background: var(--surface-2);
      color: var(--text);
      font-size: 14px;
      font-weight: 700;
      font-family: inherit;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 8px 10px;
      transition: background 0.15s, border-color 0.15s, transform 0.1s;
    }
    .social-auth-btn:disabled {
      opacity: 0.65;
      cursor: wait;
    }
    .social-auth-btn:hover:not(:disabled) {
      background: var(--surface-hover);
      border-color: var(--brand-border);
    }
    .social-auth-btn:active:not(:disabled) {
      transform: translateY(1px);
    }
    .social-btn-main {
      display: inline-flex;
      align-items: center;
      gap: 11px;
      min-inline-size: 0;
    }
    .social-icon-tile {
      width: 26px;
      height: 26px;
      border-radius: 7px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: none;
      pointer-events: none;
    }
    .social-icon-tile.google-tile {
      background: #ffffff;
      border: 1px solid rgba(15, 23, 42, 0.14);
    }
    .social-icon-tile.apple-tile {
      color: var(--text);
    }
    .social-icon-tile.fb-tile {
      background: #1877f2;
      color: #ffffff;
      border-radius: 999px;
    }
    .social-icon-tile svg {
      flex: none;
      pointer-events: none;
    }
    .auth-divider {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 600;
      margin: 4px 0 14px;
    }
    .auth-divider::before,
    .auth-divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
    }
    .pw-input-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }
    .pw-input-wrap input {
      padding-right: 78px;
    }
    .pw-toggle-btn {
      position: absolute;
      right: 8px;
      padding: 6px 10px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
    }
    .pw-toggle-btn:hover { color: var(--text); }
    .tone-fieldset {
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px 14px 12px;
      background: var(--surface-2);
    }
    .tone-fieldset legend {
      font-size: 12.5px;
      font-weight: 700;
      padding: 0 6px;
      color: var(--text);
    }
    .radio-group-row {
      display: flex;
      flex-wrap: wrap;
      gap: 14px;
      margin-top: 6px;
    }
    .radio-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 13.5px;
      font-weight: 600;
      cursor: pointer;
    }
    .btn-film {
      background: linear-gradient(135deg, #1d4ed8, #0f766e);
      border-color: transparent;
      color: #ffffff;
      box-shadow: 0 4px 14px rgba(29, 78, 216, 0.25);
    }
    .btn-film:hover {
      background: linear-gradient(135deg, #1e40af, #115e59);
      color: #ffffff;
    }

    /* ==================== INTERACTIVE PROMO SHORT FILM ==================== */
    dialog.promo-dialog {
      max-width: 920px;
      background: #09101f;
      color: #f8fafc;
      border: 1px solid rgba(148, 163, 184, 0.25);
    }
    .film-topbar {
      padding: 14px 20px;
      border-bottom: 1px solid rgba(148, 163, 184, 0.16);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }
    .film-stage {
      position: relative;
      min-block-size: 320px;
      padding: 26px 22px;
      background:
        radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.28), transparent 52%),
        radial-gradient(circle at 82% 78%, rgba(16, 185, 129, 0.22), transparent 52%),
        #09101f;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 18px;
      overflow-y: auto;
    }
    @media (max-width: 560px) {
      .film-topbar { padding: 12px 14px; }
      .film-stage { padding: 18px 14px; min-block-size: 260px; }
      .film-footer { padding: 12px 14px 14px; }
      .film-btn { padding: 6px 10px; font-size: 12px; }
      .dialog-header { padding: 14px 16px; }
      .dialog-body { padding: 16px; }
      .brand-story-section { padding: 20px 16px; }
    }
    @keyframes filmSlideUp {
      from { opacity: 0; transform: translateY(14px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .film-animate {
      animation: filmSlideUp 0.42s ease both;
    }
    .film-kicker {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 5px 12px;
      border-radius: 999px;
      background: rgba(59, 130, 246, 0.18);
      border: 1px solid rgba(96, 165, 250, 0.35);
      color: #93c5fd;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }
    .film-headline {
      font-size: clamp(1.25rem, 1rem + 2vw, 1.9rem);
      font-weight: 800;
      letter-spacing: -0.02em;
      line-height: 1.22;
      color: #ffffff;
      margin-top: 10px;
    }
    .film-visual-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
      gap: 14px;
    }
    .film-metric-card {
      background: rgba(30, 41, 59, 0.78);
      border: 1px solid rgba(148, 163, 184, 0.22);
      border-radius: 16px;
      padding: 16px 18px;
    }
    .film-subtitle-bar {
      padding: 13px 16px;
      border-radius: 14px;
      background: rgba(15, 23, 42, 0.85);
      border: 1px solid rgba(148, 163, 184, 0.2);
      font-size: 14.5px;
      color: #e2e8f0;
      line-height: 1.55;
    }
    .film-footer {
      padding: 14px 20px 18px;
      background: #0b1324;
      border-top: 1px solid rgba(148, 163, 184, 0.16);
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .film-progress-row {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 6px;
    }
    .film-seg {
      position: relative;
      min-block-size: 6px;
      height: 6px;
      border-radius: 999px;
      background: rgba(148, 163, 184, 0.24);
      cursor: pointer;
      border: 0;
      padding: 0;
    }
    .film-seg::after {
      content: "";
      position: absolute;
      inset-block: -12px;
      inset-inline: 0;
    }
    .film-seg-fill {
      height: 100%;
      width: 0%;
      border-radius: 999px;
      background: linear-gradient(90deg, #3b82f6, #10b981);
    }
    .film-controls-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }
    .film-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 7px 13px;
      border-radius: 10px;
      border: 1px solid rgba(148, 163, 184, 0.28);
      background: rgba(30, 41, 59, 0.85);
      color: #f8fafc;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
    }
    .film-btn:hover { background: rgba(51, 65, 85, 0.95); }

    /* ==================== GLOBAL EXCHANGES STRIP & CONTEXTUAL EXCHANGE CARDS ==================== */
    .exchange-strip-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr));
      gap: 14px;
      margin-bottom: 20px;
    }
    .exchange-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 15px 16px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 10px;
      min-inline-size: 0;
      max-inline-size: 100%;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .exchange-card:hover {
      border-color: var(--brand);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    }
    .exchange-card-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
      min-inline-size: 0;
    }
    .exchange-card-title {
      font-size: 14.5px;
      font-weight: 800;
      color: var(--text);
      line-height: 1.25;
    }
    .exchange-card-sub {
      font-size: 11.5px;
      color: var(--text-muted);
      margin-top: 2px;
    }
    .exchange-meta-rows {
      display: flex;
      flex-direction: column;
      gap: 5px;
      font-size: 12.5px;
      color: var(--text-secondary);
      padding: 9px 11px;
      border-radius: 11px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      min-inline-size: 0;
    }
    .exchange-meta-line {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
      min-inline-size: 0;
    }
    .exchange-tax-highlight {
      font-size: 12px;
      font-weight: 700;
      color: var(--up);
      background: var(--up-soft);
      border: 1px solid var(--up-border);
      border-radius: 9px;
      padding: 6px 10px;
      line-height: 1.4;
    }
    .exchange-tax-highlight.warn {
      color: var(--brand);
      background: var(--brand-soft);
      border-color: var(--brand-border);
    }
    .exchange-actions-row {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }
    .exchange-actions-row .btn {
      flex: 1 1 auto;
      padding: 6px 10px;
      font-size: 12px;
      min-block-size: 36px;
    }

    .selected-exchange-box {
      grid-column: 1 / -1;
      padding: 12px 14px;
      border-radius: 13px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      gap: 7px;
      font-size: 12.5px;
      min-inline-size: 0;
    }
    .selected-exchange-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }
    .selected-exchange-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .selected-exchange-tag {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 8px;
      border-radius: 8px;
      background: var(--surface);
      border: 1px solid var(--border);
      font-size: 11.5px;
      font-weight: 600;
      color: var(--text-secondary);
    }
    .stock-search-box {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 12px;
      border-radius: 13px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      min-inline-size: 0;
    }

    /* Language Switcher & RTL logical overrides */
    .lang-select {
      width: auto !important;
      min-height: 36px !important;
      padding: 5px 28px 5px 10px !important;
      border-radius: 10px !important;
      font-size: max(1rem, 13px) !important;
      font-weight: 700 !important;
      background-color: var(--surface-2) !important;
      border: 1px solid var(--border) !important;
      color: var(--text) !important;
      cursor: pointer;
    }
    [dir="rtl"] .lang-select {
      padding: 5px 10px 5px 28px !important;
      background-position: left 8px center !important;
    }

    /* Cross-Filtering & Multi-Country Data Analysis Dashboard */
    .cross-country-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr));
      gap: 12px;
      margin-bottom: 16px;
    }
    .cross-country-btn {
      appearance: none;
      width: 100%;
      text-align: start;
      background: var(--surface);
      border: 1.5px solid var(--border);
      border-radius: 14px;
      padding: 13px 14px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 8px;
      color: var(--text);
      font: inherit;
      transition: border-color 0.16s, background 0.16s, opacity 0.16s, box-shadow 0.16s;
      min-inline-size: 0;
    }
    .cross-country-btn[aria-pressed="true"] {
      border-color: var(--brand);
      background: color-mix(in srgb, var(--brand) 7%, var(--surface));
      box-shadow: 0 3px 12px rgba(37, 99, 235, 0.10);
    }
    .cross-country-btn[aria-pressed="false"] {
      opacity: 0.56;
      background: var(--surface-2);
    }
    .cross-country-btn:focus-visible {
      outline: 3px solid var(--brand);
      outline-offset: 2px;
    }
    .cross-sector-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
      gap: 10px;
    }
    .cross-sector-btn {
      appearance: none;
      width: 100%;
      text-align: start;
      background: var(--surface-2);
      border: 1.5px solid var(--border);
      border-radius: 11px;
      padding: 10px 12px;
      cursor: pointer;
      color: var(--text);
      font: inherit;
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-inline-size: 0;
      transition: border-color 0.15s, background 0.15s;
    }
    .cross-sector-btn[aria-pressed="true"] {
      border-color: var(--brand);
      background: color-mix(in srgb, var(--brand) 10%, var(--surface));
    }
    .cross-sector-btn:focus-visible {
      outline: 3px solid var(--brand);
      outline-offset: 2px;
    }
    .cross-sector-bar-track {
      height: 6px;
      width: 100%;
      border-radius: 999px;
      background: var(--border);
      overflow: hidden;
    }
    .cross-sector-bar-fill {
      height: 100%;
      border-radius: 999px;
      background: var(--brand);
      transition: width 0.25s ease;
    }
    .cross-kpi-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
      gap: 12px;
      margin: 16px 0;
    }
    .cross-table-wrap {
      overflow-x: auto;
      max-inline-size: 100%;
      container-type: inline-size;
    }
    .cross-table {
      width: 100%;
      min-inline-size: 720px;
      border-collapse: separate;
      border-spacing: 0;
      font-size: 13.5px;
    }
    .cross-table caption {
      text-align: start;
      padding: 14px 16px 10px;
      font-weight: 800;
      font-size: 15px;
      color: var(--text);
    }
    .cross-table thead {
      position: sticky;
      inset-block-start: 0;
      z-index: 2;
      background: var(--surface-2);
    }
    .cross-table th {
      font-size: 12px;
      font-weight: 700;
      color: var(--text-secondary);
      border-bottom: 1px solid var(--border);
      padding: 10px 12px;
      text-align: start;
      white-space: nowrap;
      background: var(--surface-2);
    }
    .cross-table th:has(> button) {
      padding: 0;
    }
    .cross-table th > button {
      appearance: none;
      inline-size: 100%;
      min-block-size: 40px;
      padding: 10px 12px;
      background: transparent;
      border: 0;
      font: inherit;
      color: inherit;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      text-align: start;
    }
    .cross-table th > button:hover {
      color: var(--brand);
      background: color-mix(in srgb, var(--brand) 6%, transparent);
    }
    .cross-table th > button:focus-visible {
      outline: 2px solid var(--brand);
      outline-offset: -2px;
    }
    .cross-table th .sort-icon::before {
      content: "↕";
      opacity: 0.45;
      font-size: 11px;
    }
    .cross-table th[aria-sort="ascending"] .sort-icon::before {
      content: "▲";
      opacity: 1;
      color: var(--brand);
    }
    .cross-table th[aria-sort="descending"] .sort-icon::before {
      content: "▼";
      opacity: 1;
      color: var(--brand);
    }
    .cross-table td {
      padding: 11px 12px;
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
    }
    .cross-tbody tr {
      view-transition-name: match-element;
    }
    .cross-tbody tr:hover {
      background: var(--surface-2);
    }
    @media (prefers-reduced-motion: reduce) {
      ::view-transition-group(*),
      ::view-transition-old(*),
      ::view-transition-new(*) {
        animation: none;
      }
    }

    /* ---- Scroll-Driven Edge-Fade Horizontal Scroller (tabs guidance + RTL + IO fallback) ---- */
    @property --fade-start {
      syntax: "<length>";
      inherits: false;
      initial-value: 0px;
    }
    @property --fade-end {
      syntax: "<length>";
      inherits: false;
      initial-value: 0px;
    }
    .edge-fade-scroller {
      overflow-x: auto;
      scrollbar-width: none;
      scroll-snap-type: inline proximity;
      scroll-padding-inline: 2.25rem;
      --fade-size: 2.25rem;
      --fade-dir: right;
      --fade-start-pos: 0;
      --fade-end-pos: 100%;
      mask:
        linear-gradient(black, black) no-clip subtract,
        linear-gradient(to var(--fade-dir), black, transparent) var(--fade-start-pos) 0 / var(--fade-start) 100% no-repeat no-clip,
        linear-gradient(to var(--fade-dir), transparent, black) var(--fade-end-pos) 0 / var(--fade-end) 100% no-repeat no-clip;
      animation: reveal-fade-start linear both, hide-fade-end linear both;
      animation-timeline: scroll(self inline);
      animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%;
      transition: --fade-start .2s, --fade-end .2s;
    }
    .edge-fade-scroller::-webkit-scrollbar {
      display: none;
    }
    .edge-fade-scroller:dir(rtl) {
      --fade-dir: left;
      --fade-start-pos: 100%;
      --fade-end-pos: 0;
    }
    .edge-fade-scroller.more-start {
      --fade-start: var(--fade-size);
    }
    .edge-fade-scroller.more-end {
      --fade-end: var(--fade-size);
    }
    @keyframes reveal-fade-start {
      to { --fade-start: var(--fade-size); }
    }
    @keyframes hide-fade-end {
      from { --fade-end: var(--fade-size); }
    }

    /* ---- Live FX, Gold & Core Coins Top Ribbon + Converter & Board ---- */
    .rates-ribbon-box {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 10px 12px;
      margin-top: 14px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
      max-inline-size: 100%;
      min-inline-size: 0;
      overflow: hidden;
    }
    .rates-ribbon-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 8px;
    }
    .live-pulse-dot {
      display: inline-block;
      inline-size: 8px;
      block-size: 8px;
      border-radius: 50%;
      background: #10b981;
      box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
      animation: livePulseRing 2.1s infinite;
      flex-shrink: 0;
    }
    @keyframes livePulseRing {
      0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
      70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
      100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
    }
    @media (prefers-reduced-motion: reduce) {
      .live-pulse-dot { animation: none; }
    }
    .rates-ribbon-track {
      display: flex;
      align-items: stretch;
      gap: 8px;
      padding-block: 2px;
      width: 100%;
      max-inline-size: 100%;
      min-inline-size: 0;
    }
    .rate-pill-chip {
      flex: none;
      scroll-snap-align: start;
      appearance: none;
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: 11px;
      padding: 7px 11px;
      min-block-size: 46px;
      display: inline-flex;
      align-items: center;
      gap: 9px;
      font: inherit;
      color: var(--text);
      cursor: pointer;
      transition: border-color .16s ease, background-color .35s ease, transform .14s ease;
      text-align: start;
    }
    .rate-pill-chip:hover {
      border-color: var(--brand);
    }
    .rate-pill-chip:focus-visible {
      outline: 2px solid var(--brand);
      outline-offset: 2px;
    }
    .rate-flash-up {
      animation: rateTickUp 0.9s ease;
    }
    .rate-flash-down {
      animation: rateTickDown 0.9s ease;
    }
    @keyframes rateTickUp {
      0% { background-color: rgba(16, 185, 129, 0.24); }
      100% { background-color: transparent; }
    }
    @keyframes rateTickDown {
      0% { background-color: rgba(239, 68, 68, 0.24); }
      100% { background-color: transparent; }
    }

    .converter-layout {
      display: grid;
      grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
      gap: 18px;
      align-items: stretch;
      min-inline-size: 0;
    }
    .converter-layout > * {
      min-inline-size: 0;
    }
    @media (max-width: 920px) {
      .converter-layout {
        grid-template-columns: minmax(0, 1fr);
      }
    }
    .conv-pair-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
      gap: 10px;
      align-items: end;
      min-inline-size: 0;
    }
    .conv-pair-row > * {
      min-inline-size: 0;
    }
    @media (max-width: 600px) {
      .conv-pair-row {
        grid-template-columns: minmax(0, 1fr);
      }
    }
    .conv-ctrl {
      inline-size: 100%;
      max-inline-size: 100%;
      min-block-size: 48px;
      padding: 10px 12px;
      font: inherit;
      font-size: max(1rem, 1em);
      color: var(--text);
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: 11px;
      box-sizing: border-box;
    }
    .conv-ctrl:focus-visible {
      outline: 2px solid var(--brand);
      outline-offset: 2px;
    }
    .conv-result-banner {
      background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 11%, var(--surface-2)), var(--surface-2));
      border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--border));
      border-radius: 13px;
      padding: 14px 16px;
      display: flex;
      flex-direction: column;
      gap: 5px;
    }
    .conv-multi-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    @media (max-width: 420px) {
      .conv-multi-grid {
        grid-template-columns: 1fr;
      }
    }
    .conv-mini-tile {
      appearance: none;
      font: inherit;
      color: inherit;
      text-align: start;
      cursor: pointer;
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 9px 11px;
      min-block-size: 48px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 3px;
      min-inline-size: 0;
    }
    .conv-mini-tile:hover {
      border-color: var(--brand);
    }

    /* Category Sub-Tablist compliant with modern-web-guidance `tabs` */
    .rates-tablist {
      display: flex;
      gap: 4px;
      border-block-end: 1px solid var(--border);
      max-inline-size: 100%;
    }
    .rates-tab-btn {
      flex: none;
      scroll-snap-align: start;
      position: relative;
      appearance: none;
      background: transparent;
      border: 0;
      font: inherit;
      font-size: 13.5px;
      font-weight: 700;
      color: var(--text-secondary);
      padding: 10px 14px;
      min-block-size: 44px;
      cursor: pointer;
      white-space: nowrap;
    }
    .rates-tab-btn:hover {
      color: var(--text);
    }
    .rates-tab-btn:focus-visible {
      outline: 2px solid var(--brand);
      outline-offset: -2px;
    }
    .rates-tab-btn[aria-selected="true"] {
      color: var(--brand);
    }
    .rates-tab-btn[aria-selected="true"]::after {
      content: "";
      position: absolute;
      inset: auto 0 0;
      border-block-end: 3px solid var(--brand);
    }

    .rates-cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
      gap: 12px;
    }
    .rate-board-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 14px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 10px;
      min-inline-size: 0;
      transition: border-color .16s ease, box-shadow .16s ease;
    }
    .rate-board-card:hover {
      border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    }
    .range-24h-track {
      inline-size: 100%;
      block-size: 5px;
      border-radius: 999px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      position: relative;
      overflow: hidden;
    }
    .range-24h-fill {
      block-size: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
    }
