  :root {
    --bg: #06080a;
    --bg-2: #0b1014;
    --panel: rgba(14, 20, 26, 0.62);
    --panel-strong: rgba(18, 26, 34, 0.85);
    --border: rgba(120, 200, 200, 0.10);
    --border-soft: rgba(255, 255, 255, 0.06);
    --text: #e8f1f3;
    --muted: #6e8089;
    --muted-2: #46555c;
    --accent: #7af0d8;
    --accent-2: #5ad6ff;
    --amber: #ffd58a;
    --red: #ff6b7a;
    --green: #5be3a8;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --sans: 'Inter', system-ui, sans-serif;
  }

  * { box-sizing: border-box; }
  .cc-shell { background: var(--bg); color: var(--text); }
  .cc-shell {
    font-family: var(--sans);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    background:
      radial-gradient(1200px 800px at 50% 10%, rgba(20, 50, 60, 0.45), transparent 60%),
      radial-gradient(900px 700px at 90% 90%, rgba(40, 30, 60, 0.30), transparent 60%),
      var(--bg);
  }

  /* ── Background layer ───────────────────────────── */
  .bg-layer {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
  }
  .bg-canvas { width: 100%; height: 100%; display: block; }
  .bg-noise {
    position: absolute; inset: 0;
    background-image:
      radial-gradient(rgba(255,255,255,0.014) 1px, transparent 1px);
    background-size: 3px 3px;
    mix-blend-mode: overlay;
  }

  /* ── InfoTip badges + popover ──────────────────── */
  .infotip__btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(122,240,216,0.08);
    color: var(--accent);
    font: 600 10px/1 var(--mono);
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(122,240,216,0.30) inset;
    transition: transform .25s cubic-bezier(.16,.84,.30,1.10), background .25s ease, box-shadow .25s ease;
    margin-left: 6px;
    flex-shrink: 0;
    vertical-align: middle;
  }
  .infotip__btn:hover, .infotip__btn.open {
    transform: scale(1.15);
    background: rgba(122,240,216,0.18);
    box-shadow:
      0 0 0 1px rgba(122,240,216,0.55) inset,
      0 0 14px rgba(122,240,216,0.40);
  }
  .infotip__btn--step {
    width: 20px; height: 20px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(140deg, rgba(122,240,216,0.20), rgba(90,214,255,0.10));
    box-shadow: 0 0 0 1px rgba(122,240,216,0.40) inset, 0 0 12px rgba(122,240,216,0.20);
  }
  .infotip__btn svg { display: block; }

  .infotip__pop {
    position: fixed;
    width: 260px;
    z-index: 9999;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(8, 14, 18, 0.85);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    box-shadow:
      0 26px 60px rgba(0,0,0,0.65),
      0 0 0 1px rgba(122,240,216,0.18) inset,
      0 0 48px rgba(122,240,216,0.18);
    transform-origin: top center;
    animation: tipPopIn .35s cubic-bezier(.16,.84,.30,1.10);
    overflow: visible;
  }
  .infotip__pop.above { transform-origin: bottom center; }
  @keyframes tipPopIn {
    0%   { opacity: 0; transform: translateY(-6px) scale(0.88); filter: blur(4px); }
    60%  { opacity: 1; transform: translateY(2px) scale(1.02); filter: blur(0); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
  }
  .infotip__glass {
    position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(120% 60% at 20% -10%, rgba(255,255,255,0.10), transparent 50%);
    pointer-events: none;
  }
  .infotip__edge {
    position: absolute; inset: 0; border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, rgba(255,255,255,0.18), rgba(122,240,216,0.22) 50%, rgba(255,255,255,0.04));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
  }
  .infotip__inner { position: relative; z-index: 2; }
  .infotip__step {
    display: inline-flex; align-items: baseline; gap: 4px;
    margin-bottom: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(122,240,216,0.10);
    box-shadow: 0 0 0 1px rgba(122,240,216,0.25) inset;
  }
  .infotip__step-num {
    font: 600 12px/1 var(--mono);
    color: var(--accent);
  }
  .infotip__step-of {
    font: 500 10px/1 var(--mono);
    color: var(--muted);
    letter-spacing: 0.05em;
  }
  .infotip__title {
    font: 600 13px/1.2 var(--sans);
    color: var(--text);
    margin-bottom: 6px;
  }
  .infotip__body {
    font: 400 12.5px/1.5 var(--sans);
    color: var(--muted);
  }
  .infotip__body strong { color: var(--text); font-weight: 500; }
  .infotip__arrow {
    position: absolute;
    top: -6px; left: 50%;
    width: 12px; height: 12px;
    background: rgba(8, 14, 18, 0.85);
    transform: translateX(-50%) rotate(45deg);
    border-left: 1px solid rgba(122,240,216,0.18);
    border-top: 1px solid rgba(122,240,216,0.18);
  }
  .infotip__pop.above .infotip__arrow {
    top: auto; bottom: -6px;
    border-left: none; border-top: none;
    border-right: 1px solid rgba(122,240,216,0.18);
    border-bottom: 1px solid rgba(122,240,216,0.18);
  }

  /* ── App shell ──────────────────────────────────── */
  .app {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 32px 40px;
  }

  /* Phase-based progressive disclosure (cumulative) */
  .topbar, .converter__pair, .rate-bar, .chart-card, .quick-presets, .footer {
    opacity: 0; transform: translateY(14px);
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  }
  .app.phase-up-to-1 .topbar,
  .app.phase-up-to-2 .topbar,
  .app.phase-up-to-3 .topbar { opacity: 1; transform: none; }

  .app.phase-up-to-2 .converter__pair,
  .app.phase-up-to-3 .converter__pair { opacity: 1; transform: none; transition-delay: .05s; }

  .app.phase-up-to-3 .rate-bar     { opacity: 1; transform: none; transition-delay: .00s; }
  .app.phase-up-to-3 .chart-card   { opacity: 1; transform: none; transition-delay: .08s; }
  .app.phase-up-to-3 .quick-presets { opacity: 1; transform: none; transition-delay: .16s; }
  .app.phase-up-to-3 .footer       { opacity: 1; transform: none; transition-delay: .24s; }

  /* Temperature tint overlays */
  .app::before {
    content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
    opacity: 0; transition: opacity 1.2s ease, background 1.2s ease;
  }
  .app.trend-warm::before {
    opacity: 1;
    background: radial-gradient(800px 600px at 80% 90%, rgba(255, 200, 130, 0.06), transparent 60%);
  }
  .app.trend-cool::before {
    opacity: 1;
    background: radial-gradient(800px 600px at 80% 90%, rgba(255, 110, 130, 0.06), transparent 60%);
  }

  /* Processing reveal sweep across cards */
  .app[data-revealing="true"] .liquid-sweep {
    animation: liquidSweep 1.1s cubic-bezier(.2,.7,.2,1);
  }
  @keyframes liquidSweep {
    0%   { transform: translateX(-120%) skewX(-12deg); opacity: 0; }
    30%  { opacity: 1; }
    100% { transform: translateX(220%) skewX(-12deg); opacity: 0; }
  }

  /* ── Liquid glass primitives ──────────────────── */
  .liquid-spec {
    position: absolute; inset: 0;
    border-radius: inherit;
    background:
      radial-gradient(120% 60% at 20% -10%, rgba(255,255,255,0.10), transparent 50%),
      radial-gradient(80% 40% at 100% 110%, rgba(122,240,216,0.06), transparent 60%);
    pointer-events: none;
    mix-blend-mode: screen;
  }
  .liquid-edge {
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg,
      rgba(255,255,255,0.16) 0%,
      rgba(255,255,255,0.02) 30%,
      rgba(122,240,216,0.10) 60%,
      rgba(255,255,255,0.02) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
  }
  .liquid-sweep {
    position: absolute; top: 0; bottom: 0; left: 0;
    width: 40%;
    background: linear-gradient(90deg,
      transparent 0%,
      rgba(122,240,216,0.10) 40%,
      rgba(255,255,255,0.18) 50%,
      rgba(122,240,216,0.10) 60%,
      transparent 100%);
    transform: translateX(-120%) skewX(-12deg);
    pointer-events: none;
    opacity: 0;
    border-radius: inherit;
  }

  /* ── Top bar ────────────────────────────────────── */
  .topbar {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-soft);
  }
  /* Hero */
  .hero { max-width: 720px; }
  .hero__title {
    margin: 0;
    font: 600 34px/1.05 var(--sans);
    letter-spacing: -0.025em;
    color: var(--text);
  }
  .hero__title-accent {
    background: linear-gradient(120deg, #7af0d8 0%, #5ad6ff 60%, #b6f5ff 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
  .hero__sub {
    margin: 10px 0 0;
    font: 400 14px/1.55 var(--sans);
    color: var(--muted);
    max-width: 620px;
  }
  .hero__sub strong { color: var(--text); font-weight: 500; }

  .status {
    display: flex; align-items: center; gap: 18px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
  }
  .status__item { display: flex; align-items: center; gap: 8px; }
  .status__label { color: var(--muted); font-weight: 500; }
  .status__label.muted { color: var(--muted-2); }
  .status__val { color: var(--text); font-weight: 500; }
  .status__sep { width: 1px; height: 14px; background: var(--border-soft); }
  .live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(91,227,168,0.5);
    animation: livePulse 1.8s infinite ease-out;
  }
  .live-dot.err { background: var(--red); box-shadow: none; animation: none; }
  @keyframes livePulse {
    0%   { box-shadow: 0 0 0 0 rgba(91,227,168,0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(91,227,168,0); }
    100% { box-shadow: 0 0 0 0 rgba(91,227,168,0); }
  }

  /* ── Main converter ─────────────────────────────── */
  .converter { padding-top: 36px; }
  .converter__pair {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 22px;
    margin-bottom: 26px;
  }
  /* Both columns share an identical picker+amount stack; the children
     are pushed to top and bottom of the column so the amount cards
     always sit on the same horizontal plane regardless of any minor
     sub-pixel differences in picker-card layout. */
  .pair-col { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; gap: 14px; }

  /* Ensure card content paints above liquid-glass overlay layers */
  .cur-card > *:not(.liquid-spec):not(.liquid-edge):not(.liquid-sweep):not(.cur-dropdown) { position: relative; z-index: 2; }
  .cur-card .cur-dropdown { z-index: 300; }
  .amount-card > *:not(.liquid-spec):not(.liquid-edge):not(.liquid-sweep):not(.amount-card__glow) { position: relative; z-index: 2; }
  .liquid-spec, .liquid-edge, .liquid-sweep { z-index: 1; }

  /* Currency card — liquid glass */
  .cur-card {
    position: relative;
    background:
      linear-gradient(140deg, rgba(20,28,34,0.55), rgba(14,20,26,0.35));
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-radius: 18px;
    padding: 14px 16px;
    transition: transform .25s cubic-bezier(.2,.7,.2,1);
    box-shadow:
      0 18px 40px rgba(0,0,0,0.40),
      0 1px 0 rgba(255,255,255,0.06) inset,
      0 -1px 0 rgba(0,0,0,0.30) inset;
    overflow: visible;
  }
  .cur-card.open { z-index: 200; transform: translateY(-1px); }
  .cur-card:hover { transform: translateY(-1px); }

  .cur-card__label {
    display: flex; align-items: center; gap: 7px;
    font: 500 10px/1 var(--mono);
    letter-spacing: 0.18em;
    color: var(--muted);
    margin-bottom: 10px;
  }
  .cur-card__label .dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
  }
  .cur-card[data-accent="amber"] .dot {
    background: var(--amber);
    box-shadow: 0 0 8px var(--amber);
  }

  .cur-card__main {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    background: transparent;
    border: none; padding: 0;
    color: inherit;
    cursor: pointer;
    text-align: left;
  }

  .cur-flag-wrap {
    position: relative;
    width: 52px; height: 38px;
    border-radius: 7px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06) inset;
  }
  .cur-flag {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    animation: flagIn 0.5s cubic-bezier(.2,.7,.2,1);
  }
  .cur-flag-shine {
    position: absolute; inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0.18) 0%, transparent 35%, transparent 65%, rgba(255,255,255,0.06) 100%);
    pointer-events: none;
  }
  @keyframes flagIn {
    from { transform: scale(1.15); filter: blur(6px); opacity: 0; }
    to   { transform: scale(1);    filter: blur(0);   opacity: 1; }
  }

  .cur-meta { min-width: 0; }
  .cur-code-row { display: flex; align-items: baseline; gap: 8px; }
  .cur-code {
    font: 600 22px/1 var(--mono);
    letter-spacing: 0.04em;
    color: var(--text);
  }
  .cur-symbol {
    font: 400 18px/1 var(--sans);
    color: var(--muted);
  }
  .cur-name {
    margin-top: 5px;
    font: 400 12px/1.2 var(--sans);
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cur-caret {
    color: var(--muted);
    transition: transform .25s ease, color .2s ease;
    padding: 4px;
  }
  .cur-caret.open { transform: rotate(180deg); color: var(--accent); }

  /* Dropdown */
  .cur-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    background: rgba(8, 12, 16, 0.88);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid rgba(122,240,216,0.18);
    border-radius: 14px;
    box-shadow:
      0 30px 80px rgba(0,0,0,0.7),
      0 0 0 1px rgba(255,255,255,0.04) inset,
      0 0 60px rgba(122,240,216,0.10);
    z-index: 300;
    overflow: hidden;
    animation: dropIn .35s cubic-bezier(.16,.84,.30,1.10);
    transform-origin: top center;
  }
  @keyframes dropIn {
    0%   { opacity: 0; transform: translateY(-10px) scale(0.94); filter: blur(6px); }
    60%  { opacity: 1; transform: translateY(2px)   scale(1.01); filter: blur(0); }
    100% { opacity: 1; transform: translateY(0)     scale(1); }
  }
  .cur-search {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--muted);
  }
  .cur-search input {
    flex: 1;
    background: transparent;
    border: none; outline: none;
    color: var(--text);
    font: 400 13px/1 var(--sans);
  }
  .cur-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
  }
  .cur-list::-webkit-scrollbar { width: 6px; }
  .cur-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }

  .cur-list-item {
    width: 100%;
    display: grid;
    grid-template-columns: 28px 52px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: transparent;
    border: none; border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background .15s ease;
  }
  .cur-list-item:hover:not(:disabled) { background: rgba(122,240,216,0.06); }
  .cur-list-item.active {
    background: rgba(122,240,216,0.10);
    box-shadow: inset 2px 0 0 var(--accent);
  }
  .cur-list-item.disabled { opacity: 0.3; cursor: not-allowed; }
  .cur-list-flag {
    width: 28px; height: 20px; object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
  }
  .cur-list-code { font: 500 12px/1 var(--mono); letter-spacing: 0.06em; color: var(--text); }
  .cur-list-name { font: 400 12px/1 var(--sans); color: var(--muted); }
  .cur-list-symbol { font: 400 13px/1 var(--sans); color: var(--accent); }
  .cur-list-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 12px; }

  /* Amount card — liquid glass */
  .amount-card {
    position: relative;
    background:
      linear-gradient(155deg, rgba(22,32,40,0.70), rgba(14,20,26,0.55));
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-radius: 18px;
    padding: 22px 22px 16px;
    overflow: hidden;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
    box-shadow:
      0 24px 50px rgba(0,0,0,0.45),
      0 1px 0 rgba(255,255,255,0.07) inset,
      0 -1px 0 rgba(0,0,0,0.30) inset;
    z-index: 1;
  }
  .amount-card[data-active="true"] {
    transform: translateY(-2px);
    box-shadow:
      0 32px 60px rgba(0,0,0,0.55),
      0 0 0 1px rgba(122,240,216,0.25) inset,
      0 0 60px rgba(122,240,216,0.12);
  }
  .amount-card--to[data-active="true"] {
    box-shadow:
      0 32px 60px rgba(0,0,0,0.55),
      0 0 0 1px rgba(255,213,138,0.25) inset,
      0 0 60px rgba(255,213,138,0.12);
  }
  .amount-card__top {
    display: flex; align-items: baseline; gap: 10px;
  }
  .amount-card__symbol {
    font: 300 36px/1 var(--mono);
    color: var(--muted);
  }
  .amount-card__input {
    flex: 1;
    background: transparent;
    border: none; outline: none;
    color: var(--text);
    font: 500 42px/1.05 var(--mono);
    letter-spacing: -0.01em;
    min-width: 0;
    width: 100%;
  }
  .amount-card__input::placeholder { color: var(--muted-2); }
  .amount-card__input--display {
    font: 500 42px/1.05 var(--mono);
    color: var(--text);
    letter-spacing: -0.01em;
    overflow: hidden;
    white-space: nowrap;
  }
  .amount-card__input-raw {
    background: transparent; border: none; outline: none;
    color: var(--text);
    font: 500 42px/1.05 var(--mono);
    width: 100%;
    text-align: left;
    padding: 0;
  }
  .amount-card__display-btn {
    cursor: text;
    display: block;
    font-family: var(--mono);
    color: var(--text);
  }
  .amount-card__bot {
    margin-top: 8px;
    display: flex; align-items: baseline; gap: 8px;
    font-family: var(--mono);
  }
  .amount-card__code { font-size: 11px; letter-spacing: 0.18em; color: var(--accent); font-weight: 500; }
  .amount-card--to .amount-card__code { color: var(--amber); }
  .amount-card__name { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }

  .amount-card__glow {
    position: absolute;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122,240,216,0.18), transparent 65%);
    bottom: -180px; right: -120px;
    filter: blur(12px);
    pointer-events: none;
    opacity: 0;
    transition: opacity .4s ease;
  }
  .amount-card__glow--to {
    background: radial-gradient(circle, rgba(255,213,138,0.18), transparent 65%);
  }
  .amount-card[data-active="true"] .amount-card__glow { opacity: 1; }

  /* Number ticker */
  .ticker { display: inline-flex; }
  .ticker__ch {
    display: inline-block;
    animation: digitFlip 0.4s ease both;
  }
  .ticker__ch.sep { color: var(--muted); }
  @keyframes digitFlip {
    0%   { transform: translateY(-6px); opacity: 0.4; }
    100% { transform: translateY(0);    opacity: 1; }
  }

  /* Swap button — liquid glass + spring */
  .swap-btn {
    align-self: center;
    position: relative;
    width: 68px; height: 68px;
    border-radius: 50%;
    background: linear-gradient(140deg, rgba(122,240,216,0.18), rgba(90,214,255,0.08));
    border: none;
    color: var(--accent);
    display: grid; place-items: center;
    cursor: pointer;
    box-shadow:
      0 0 0 1px rgba(122,240,216,0.22) inset,
      0 0 32px rgba(122,240,216,0.22),
      0 12px 30px rgba(0,0,0,0.5),
      inset 0 0 22px rgba(122,240,216,0.08);
    transition: transform .35s cubic-bezier(.16,.84,.30,1.10), box-shadow .25s ease;
    /* Bumped from 78px so the swap centers vertically with the amount-card
       row (was floating ~16px above amount-card baseline). */
    margin-top: 102px;
    backdrop-filter: blur(16px);
    overflow: visible;
  }
  .swap-btn__burst {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(122,240,216,0.65);
    pointer-events: none;
    opacity: 0;
    animation: swapBurst 1.1s cubic-bezier(.2,.7,.2,1);
  }
  .swap-btn__burst--2 {
    border-color: rgba(122,240,216,0.35);
    animation-delay: .12s;
  }
  @keyframes swapBurst {
    0%   { opacity: 0.85; transform: scale(0.6); border-width: 3px; }
    100% { opacity: 0;    transform: scale(3.2); border-width: 1px; }
  }
  .swap-btn:hover {
    transform: scale(1.10);
    box-shadow:
      0 0 0 1px rgba(122,240,216,0.40) inset,
      0 0 60px rgba(122,240,216,0.45),
      0 16px 40px rgba(0,0,0,0.6),
      inset 0 0 24px rgba(122,240,216,0.15);
  }
  .swap-btn:active { transform: scale(0.94); transition-duration: .08s; }
  .swap-btn svg {
    position: relative; z-index: 2;
    transition: transform .8s cubic-bezier(.16,.84,.30,1.10);
  }
  .swap-btn__glass {
    position: absolute; inset: 0;
    border-radius: 50%;
    background: radial-gradient(50% 35% at 50% 25%, rgba(255,255,255,0.32), transparent 70%);
    pointer-events: none;
  }
  .swap-btn__ring {
    position: absolute; inset: -8px;
    border: 1px solid rgba(122,240,216,0.22);
    border-radius: 50%;
    pointer-events: none;
  }
  .swap-btn__ring--2 {
    inset: -18px;
    border-color: rgba(122,240,216,0.12);
    animation: ringPulse 3s infinite ease-out;
  }
  .swap-btn__ring--3 {
    inset: -28px;
    border-color: rgba(122,240,216,0.06);
    animation: ringPulse 3s infinite ease-out;
    animation-delay: 1s;
  }
  @keyframes ringPulse {
    0%   { transform: scale(0.92); opacity: 0.85; }
    100% { transform: scale(1.25); opacity: 0; }
  }

  /* Rate bar */
  .rate-bar {
    position: relative;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px;
    background: linear-gradient(90deg, rgba(122,240,216,0.04), rgba(90,214,255,0.02));
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 22px;
    backdrop-filter: blur(12px);
    overflow: hidden;
  }
  .app[data-revealing="true"] .rate-bar::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(90deg,
      transparent 0%,
      rgba(122,240,216,0.10) 40%,
      rgba(255,255,255,0.22) 50%,
      rgba(122,240,216,0.10) 60%,
      transparent 100%);
    transform: translateX(-100%);
    animation: rateWipe 1.0s cubic-bezier(.2,.7,.2,1);
    pointer-events: none;
  }
  @keyframes rateWipe {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
  }
  .rate-bar__main { display: flex; align-items: center; gap: 18px; }
  .rate-bar__label {
    font: 500 10px/1 var(--mono);
    letter-spacing: 0.18em;
    color: var(--muted);
  }
  .rate-bar__label.muted { color: var(--muted-2); }
  .rate-bar__eq {
    display: flex; align-items: baseline; gap: 12px;
    font-family: var(--mono);
  }
  .rate-bar__one { font-size: 14px; color: var(--text); font-weight: 500; }
  .rate-bar__arrow { font-size: 14px; color: var(--accent); }
  .rate-bar__val { font-size: 18px; color: var(--text); font-weight: 500; }
  .rate-bar__inverse { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; }
  .rate-bar__inv-val { color: var(--muted); }

  /* Chart card — liquid glass */
  .chart-card {
    position: relative;
    width: 100%;        /* match the YOU PAY/YOU GET row width — shared.css
                           main { align-items: center } otherwise shrinks
                           this flex child to the SVG's intrinsic size */
    background:
      linear-gradient(160deg, rgba(20,28,34,0.55), rgba(12,18,22,0.40));
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-radius: 18px;
    padding: 22px 24px 18px;
    margin-bottom: 22px;
    overflow: hidden;
    box-shadow:
      0 24px 60px rgba(0,0,0,0.45),
      0 1px 0 rgba(255,255,255,0.06) inset,
      0 -1px 0 rgba(0,0,0,0.30) inset;
  }
  .spark { position: relative; z-index: 2; }
  .spark__head-left { display: flex; align-items: center; }
  .spark__pair { display: flex; align-items: center; gap: 14px; }
  .spark__flag-pair {
    display: flex; align-items: center;
    gap: 6px;
    position: relative;
  }
  .spark__flag-pair img {
    width: 30px; height: 22px; object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
  }
  .spark__flag-pair img:nth-child(2) { margin-left: 0; border: none; }
  .spark__flag-pair::before {
    content: "→";
    position: absolute;
    left: 36px; top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font: 400 12px/1 var(--mono);
    opacity: 0.5;
    width: 0;
    display: none;
  }
  .spark__pair-code {
    font: 600 18px/1 var(--mono);
    letter-spacing: 0.08em;
    color: var(--text);
    display: flex; align-items: center; gap: 6px;
  }
  .spark__pair-sep { color: var(--accent); font-weight: 300; }

  /* Timeframe segmented control */
  .spark__tf {
    display: flex; align-items: center;
  }
  .spark__tf-track {
    position: relative;
    display: flex;
    background: rgba(8, 12, 16, 0.55);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 3px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.3) inset;
  }
  .spark__tf-btn {
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    padding: 7px 14px;
    font: 500 11px/1 var(--mono);
    letter-spacing: 0.10em;
    color: var(--muted);
    cursor: pointer;
    transition: color .25s ease;
    min-width: 42px;
  }
  .spark__tf-btn:hover { color: var(--text); }
  .spark__tf-btn.active { color: #062520; }
  .spark__tf-pill {
    position: absolute;
    top: 3px; bottom: 3px; left: 3px;
    background: linear-gradient(140deg, #7af0d8, #5ad6ff);
    border-radius: 7px;
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.15) inset,
      0 4px 16px rgba(122,240,216,0.40);
    transition: transform .45s cubic-bezier(.16,.84,.30,1.10), width .45s cubic-bezier(.16,.84,.30,1.10);
    z-index: 1;
  }

  .spark__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
  }
  .spark__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
  }
  .spark__head-old { display: none; }
  .spark__title { font: 500 10px/1 var(--mono); letter-spacing: 0.20em; color: var(--accent); }
  .spark__sub { margin-top: 6px; font: 400 11px/1 var(--mono); color: var(--muted); letter-spacing: 0.06em; }
  .spark__stats { display: flex; gap: 22px; }
  .spark__stat { text-align: right; }
  .spark__stat-label { font: 500 9px/1 var(--mono); letter-spacing: 0.18em; color: var(--muted-2); margin-bottom: 5px; }
  .spark__stat-val { font: 500 14px/1 var(--mono); color: var(--text); }
  .spark__stat.up .spark__stat-val { color: var(--green); }
  .spark__stat.down .spark__stat-val { color: var(--red); }

  .spark__svg { width: 100%; height: 180px; display: block; cursor: crosshair; }
  .spark__wrap { position: relative; }

  /* Floating tooltip bubble */
  .spark__tip {
    position: absolute;
    pointer-events: none;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(8, 14, 18, 0.78);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow:
      0 18px 40px rgba(0,0,0,0.55),
      0 0 0 1px rgba(122,240,216,0.16) inset,
      0 0 36px rgba(122,240,216,0.18);
    z-index: 30;
    transform-origin: bottom center;
    animation: tipIn .35s cubic-bezier(.16,.84,.30,1.10);
    overflow: hidden;
  }
  .spark__tip.flipped { transform-origin: top center; }
  @keyframes tipIn {
    0%   { opacity: 0; transform: translateY(6px) scale(0.85); filter: blur(4px); }
    60%  { opacity: 1; transform: translateY(-1px) scale(1.02); filter: blur(0); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
  }
  .spark__tip-glass {
    position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(120% 60% at 20% -10%, rgba(255,255,255,0.10), transparent 50%);
    pointer-events: none;
  }
  .spark__tip-edge {
    position: absolute; inset: 0; border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, rgba(255,255,255,0.18), rgba(122,240,216,0.18) 50%, rgba(255,255,255,0.04));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
  }
  .spark__tip-content { position: relative; z-index: 2; }
  .spark__tip-date {
    font: 500 10px/1 var(--mono);
    letter-spacing: 0.10em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 8px;
  }
  .spark__tip-row {
    display: flex; flex-direction: column; gap: 3px;
  }
  .spark__tip-pair {
    font: 400 10px/1 var(--mono);
    color: var(--muted);
    letter-spacing: 0.08em;
  }
  .spark__tip-val {
    font: 500 16px/1.05 var(--mono);
    color: var(--text);
    letter-spacing: -0.005em;
  }
  .spark__tip-val em {
    font-style: normal;
    color: var(--muted);
    font-size: 11px;
    margin-left: 4px;
  }
  .spark__tip-arrow {
    position: absolute;
    left: 50%; bottom: -6px;
    width: 12px; height: 12px;
    background: rgba(8, 14, 18, 0.78);
    transform: translateX(-50%) rotate(45deg);
    border-right: 1px solid rgba(122,240,216,0.16);
    border-bottom: 1px solid rgba(122,240,216,0.16);
    z-index: 1;
  }
  .spark__tip.flipped .spark__tip-arrow {
    bottom: auto; top: -6px;
    border-right: none; border-bottom: none;
    border-left: 1px solid rgba(122,240,216,0.16);
    border-top: 1px solid rgba(122,240,216,0.16);
  }

  .spark-halo {
    transform-origin: center;
    transform-box: fill-box;
    animation: haloPulse 1.8s infinite ease-out;
  }
  @keyframes haloPulse {
    0%   { r: 5; opacity: 0.30; }
    100% { r: 12; opacity: 0; }
  }

  /* X-axis timescale */
  .spark__axis {
    position: relative;
    height: 28px;
    margin: 8px 16px 0;
  }
  .spark__axis-tick {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center;
    opacity: 0;
    animation: tickIn .5s cubic-bezier(.2,.7,.2,1) forwards;
  }
  @keyframes tickIn {
    from { opacity: 0; transform: translate(-50%, 6px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
  }
  .spark__axis-mark {
    width: 1px; height: 6px;
    background: rgba(255,255,255,0.18);
    margin-bottom: 6px;
    transition: background .25s ease, height .25s ease;
  }
  .spark__axis-tick.active .spark__axis-mark {
    background: var(--accent);
    height: 10px;
    box-shadow: 0 0 8px var(--accent);
  }
  .spark__axis-label {
    font: 400 10px/1 var(--mono);
    color: var(--muted);
    letter-spacing: 0.06em;
    white-space: nowrap;
    transition: color .25s ease;
  }
  .spark__axis-tick.active .spark__axis-label { color: var(--text); }
  .spark__hover-readout { display: none; }
  .spark-pulse-dot {
    animation: pulseDot 2s infinite ease-out;
    transform-origin: center;
    transform-box: fill-box;
  }
  @keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }

  /* Quick preset chips — elegant single row */
  .quick-presets {
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px;
    padding: 14px 4px 4px;
  }
  .quick-presets__label {
    display: flex; align-items: center; gap: 10px;
    font: 500 14px/1.3 var(--sans);
    letter-spacing: 0;
    text-transform: none;
    color: var(--text);
    white-space: nowrap;
  }
  .quick-presets__hint {
    font-weight: 400;
    color: var(--muted);
  }
  .quick-presets__dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: livePulse 2.6s infinite ease-out;
  }
  .quick-presets__chips {
    display: flex; gap: 10px;
    flex: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .chip {
    position: relative;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px;
    border: none;
    background:
      linear-gradient(155deg, rgba(20, 28, 34, 0.55), rgba(12, 18, 22, 0.30));
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    overflow: hidden;
    box-shadow:
      0 8px 18px rgba(0,0,0,0.30),
      0 0 0 1px rgba(255,255,255,0.05) inset;
    opacity: 0;
    transform: translateY(8px);
    animation: chipIn .55s cubic-bezier(.16,.84,.30,1.10) forwards;
    transition:
      transform .25s cubic-bezier(.16,.84,.30,1.10),
      box-shadow .25s ease,
      background .25s ease;
  }
  @keyframes chipIn {
    to { opacity: 1; transform: translateY(0); }
  }
  .chip:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow:
      0 12px 24px rgba(0,0,0,0.45),
      0 0 0 1px rgba(122,240,216,0.30) inset,
      0 0 24px rgba(122,240,216,0.18);
  }
  .chip:active {
    transform: translateY(0) scale(0.96);
    transition-duration: .08s;
  }
  .chip--active {
    background: linear-gradient(140deg, rgba(122,240,216,0.18), rgba(90,214,255,0.10));
    box-shadow:
      0 12px 28px rgba(0,0,0,0.45),
      0 0 0 1px rgba(122,240,216,0.55) inset,
      0 0 36px rgba(122,240,216,0.30);
  }
  .chip__sym {
    font: 300 12px/1 var(--mono);
    color: var(--muted);
  }
  .chip--active .chip__sym { color: var(--accent); }
  .chip__num {
    font: 500 13px/1 var(--mono);
    letter-spacing: 0.02em;
    color: var(--text);
  }
  .chip__preview {
    font: 400 11px/1 var(--mono);
    color: var(--muted);
    margin-left: 4px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,0.08);
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width .35s cubic-bezier(.2,.7,.2,1), opacity .25s ease, padding-left .35s ease, margin-left .35s ease;
  }
  .chip:hover .chip__preview,
  .chip--active .chip__preview {
    max-width: 200px;
    opacity: 1;
  }
  .chip--active .chip__preview { color: var(--accent); border-color: rgba(122,240,216,0.30); }
  .chip__ripple {
    position: absolute; inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(122,240,216,0.30), transparent 60%);
    opacity: 0;
    transform: scale(0.4);
  }
  .chip:active .chip__ripple {
    animation: chipRipple .6s cubic-bezier(.2,.7,.2,1);
  }
  @keyframes chipRipple {
    0%   { opacity: 0.8; transform: scale(0.4); }
    100% { opacity: 0;   transform: scale(2.2); }
  }

  /* Legacy hooks (no longer rendered) */
  .quick-strip, .quick-cell { display: none; }

  /* Footer */
  .footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
    display: flex; justify-content: space-between;
    font: 400 10px/1.4 var(--mono);
    letter-spacing: 0.10em;
    color: var(--muted-2);
  }

  /* Responsive */
  @media (max-width: 980px) {
    .hero__title { font-size: 26px; }
    .hero__sub { font-size: 13px; }
    .topbar { flex-direction: column; align-items: stretch; gap: 18px; }
    .converter__pair { grid-template-columns: 1fr; }
    .swap-btn { margin: 0 auto; transform: rotate(90deg); }
    .swap-btn:hover { transform: rotate(90deg) scale(1.08); }
    .swap-btn.spinning svg { transform: rotate(180deg); }
    .quick-strip { grid-template-columns: repeat(2, 1fr); }
    .quick-presets { flex-direction: column; align-items: stretch; gap: 10px; }
    .quick-presets__chips { justify-content: center; }
    .rate-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .status { display: none; }
  }

  /* ── Apply CTA (bridges to clearfortravel.com) ────────────────── */
  .apply-cta {
    position: relative;
    margin-top: 26px;
    padding: 20px 24px;
    border-radius: 18px;
    background: linear-gradient(140deg, rgba(122,240,216,0.10), rgba(90,214,255,0.04));
    border: 1px solid rgba(122,240,216,0.22);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0,0,0,0.45),
                inset 0 1px 0 rgba(255,255,255,0.06);
  }
  .apply-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(80% 60% at 90% 100%, rgba(122,240,216,0.08), transparent 60%);
    pointer-events: none;
  }
  .apply-cta__copy { flex: 1; min-width: 0; position: relative; z-index: 2; }
  .apply-cta__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 600 10px/1 var(--mono);
    letter-spacing: 0.16em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 8px;
  }
  .apply-cta__eyebrow-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
  }
  .apply-cta__title { font: 600 16px/1.3 var(--sans); color: var(--text); margin-bottom: 4px; }
  .apply-cta__sub { font: 400 12.5px/1.5 var(--sans); color: var(--muted); }
  .apply-cta__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    background: linear-gradient(140deg, #7af0d8, #5ad6ff);
    color: #062520;
    font: 600 13px/1 var(--sans);
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: transform .25s cubic-bezier(.16,.84,.30,1.10), box-shadow .25s ease;
    box-shadow: 0 8px 24px rgba(122,240,216,0.30), inset 0 1px 0 rgba(255,255,255,0.30);
    position: relative;
    z-index: 2;
    white-space: nowrap;
  }
  .apply-cta__btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 36px rgba(122,240,216,0.45), inset 0 1px 0 rgba(255,255,255,0.40); }
  .apply-cta__btn:active { transform: translateY(0) scale(0.98); transition-duration: .08s; }
  .apply-cta__arrow { transition: transform .25s ease; }
  .apply-cta__btn:hover .apply-cta__arrow { transform: translateX(3px); }

  @media (max-width: 760px) {
    .apply-cta { flex-direction: column; align-items: stretch; text-align: left; }
    .apply-cta__btn { justify-content: center; }
  }
