/* Reference charcoal surfaces and blush accents, with theme-aware text contrast. */
:root {
  --accent-primary: #dec7d7;
  --accent-pink: #dec7d7;
  --accent-primary-hover: #ebdce6;
  --accent-text: #836778;
  --accent-pink-text: #836778;
  --on-accent: #202020;
  --bg: #f7f4f6;
  --page-grid: radial-gradient(#83677814 1px, transparent 1px);
  --field-a: #f3e8ef;
  --field-b: #fbf5f9;
  --field-c: #dec7d738;
  --field-d: #dec7d70c;
  --field-e: #dec7d70a;
  --ink: #261e24;
  --ink-2: #62535e;
  --ink-3: #766571;
  --paper: #fffcfd;
  --paper-2: #ead8e414;
  --rule: rgba(92, 58, 80, 0.16);
  --slate: var(--accent-pink-text);
  --stamp: var(--accent-text);
  --stamp-hi: var(--accent-primary);
  --stamp-hover: var(--accent-primary-hover);
  --on-stamp: var(--on-accent);
  --green: #b795aa;
  --clear: #8c687d;
  --mint: #dec7d7;
  --mint-soft: #dec7d74d;
  --alert: #bc2c22;
  --accent: var(--accent-pink);
  --rainbow-1: var(--accent-pink);
  --rainbow-2: var(--accent-primary);
  --rainbow-3: #d7c1d2;
  --glass: #fffafdd9;
  --glass-strong: #fffafdec;
  --glass-hi: #fffdfef2;
  --glass-ctl: #fffafdf2;
  --sheet: #fffafdfa;
  --glass-border: rgba(92, 58, 80, 0.12);
  --glass-edge: rgba(92, 58, 80, 0.08);
  --shadow-sm: 0 1px 2px #1f1f1f08, 0 8px 24px -18px #83677840;
  --shadow-md: 0 2px 4px #1f1f1f0a, 0 18px 40px -24px #83677852;
  --shadow-lg: 0 4px 12px #1f1f1f12, 0 30px 64px -32px #83677870;
  --hero-a: #303030;
  --hero-b: #484848;
  --hero-c: #555055;
  --ios-spring: cubic-bezier(0.22, 1.18, 0.36, 1);
  --ios-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --liquid-rim: rgba(255, 255, 255, 0.88);
  --liquid-highlight: rgba(255, 255, 255, 0.38);
  --focus-ring: var(--accent-text);
  --surface-top: #fffdfe;
  --surface-bottom: #fbf3f8;
  --surface-tint: #f5e8f0;
  --control-tint: #f3e6ee;
  --control-shade: #ead8e4;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --accent-text: var(--accent-primary);
  --accent-pink-text: var(--accent-pink);
  --bg: #0f0f0f;
  --page-grid: radial-gradient(#2a2a2a66 1px, transparent 1px);
  --field-a: #8367784d;
  --field-b: #1f1f1f80;
  --field-c: #c2a8b910;
  --field-d: #dec7d706;
  --field-e: #dec7d709;
  --ink: #ffffff;
  --ink-2: #d3d3d3;
  --ink-3: #b2b2b2;
  --paper: #181818;
  --paper-2: #c2a8b91a;
  --rule: #2a2a2a;
  --slate: var(--accent-pink-text);
  --stamp: var(--accent-text);
  --stamp-hi: var(--accent-primary);
  --stamp-hover: var(--accent-primary-hover);
  --on-stamp: var(--on-accent);
  --green: #dec7d7;
  --clear: #dec7d7;
  --mint: #dec7d7;
  --mint-soft: #c2a8b933;
  --alert: #ff998d;
  --glass: rgba(22, 22, 22, 0.9);
  --glass-strong: rgba(32, 32, 32, 0.92);
  --glass-hi: rgba(45, 45, 45, 0.92);
  --glass-ctl: rgba(37, 37, 37, 0.96);
  --sheet: rgba(23, 23, 23, 0.97);
  --glass-border: #2a2a2a;
  --glass-edge: rgba(0, 0, 0, 0.32);
  --shadow-sm: 0 1px 2px #00000040, 0 8px 24px -16px #00000070;
  --shadow-md: 0 2px 4px #00000040, 0 18px 40px -24px #000000c0;
  --shadow-lg: 0 4px 12px #00000050, 0 30px 64px -30px #000000d9;
  --hero-a: #202020;
  --hero-b: #383838;
  --hero-c: #494149;
  --liquid-rim: rgba(235, 235, 235, 0.2);
  --liquid-highlight: rgba(208, 208, 208, 0.085);
  --focus-ring: var(--accent-primary);
  --surface-top: #202020;
  --surface-bottom: #171717;
  --surface-tint: #252525;
  --control-tint: #282828;
  --control-shade: #202020;
  color-scheme: dark;
}

html { scroll-padding-top: 148px; }
html.ios-modal-open { overflow: hidden; }
body { background: var(--bg); background-image: var(--page-grid); background-size: 40px 40px; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
body::before { animation: none; }

::selection { background: var(--accent-pink); color: var(--on-accent); }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
}

.ios-skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  transform: translateY(calc(-100% - 24px));
}
.ios-skip-link:focus { transform: none; }

/* Glass depth uses static reflections. No light follows the pointer. */
.card {
  background:
    linear-gradient(145deg, var(--liquid-highlight), transparent 44%),
    linear-gradient(135deg, var(--glass-hi), var(--glass) 48%, var(--glass-strong));
  border-color: var(--glass-border);
  box-shadow: var(--shadow-sm), inset 1px 1px 0 var(--liquid-rim), inset -1px -1px 0 var(--glass-edge);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* A consistent surface hierarchy, including when system transparency is off. */
main .card-md { border-radius: 26px; }
main section[aria-label="Totals"] > .card,
main section[aria-label="Figures"] > .card {
  padding-block: 23px;
}
main section[aria-label="Totals"] > .card:first-child {
  background: linear-gradient(135deg, var(--surface-tint), var(--surface-bottom));
  border-color: color-mix(in srgb, var(--stamp) 32%, var(--glass-border));
}
.amount { font-variant-numeric: tabular-nums; letter-spacing: -0.035em; }
.eyebrow { font-weight: 500; }
main h2 { letter-spacing: -0.025em; }
.arrow-link { color: var(--accent-text); }
:root[data-theme="dark"] .arrow-link { color: var(--accent-text); }
.arrow-link > svg { transition: translate 180ms var(--ios-smooth); }
.arrow-link:hover > svg { translate: 3px 0; }
main a.card[href^="/coin/"] { padding: 20px; gap: 22px; }
main a.card[href^="/coin/"] > :last-child {
  padding-top: 15px;
  border-top: 1px solid var(--rule);
}
.bar { height: 5px; background: var(--paper-2); }
.bar > span { background: linear-gradient(90deg, var(--accent-primary), var(--accent-pink)); }
footer > .card { box-shadow: inset 0 1px 0 var(--liquid-rim); }

header > .card {
  background:
    linear-gradient(125deg, var(--liquid-highlight), transparent 32%, transparent 75%, var(--liquid-highlight)),
    color-mix(in srgb, var(--glass-strong) 84%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow-md), inset 1px 1px 0 var(--liquid-rim), inset -1px -1px 0 var(--glass-edge);
}
header > .card > .rule-t:not(#mobile-nav) {
  height: 38px;
  background: var(--paper-2);
  border-radius: 0 0 25px 25px;
  font-size: 12px;
}
header:has(#mobile-nav) > .card > .rule-t { border-radius: 0; }

.card-hover, a.card, button.card {
  transition: transform 240ms var(--ios-spring), box-shadow 240ms var(--ios-smooth), border-color 180ms ease;
}
.grid > .card { min-width: 0; }
.card > .skeleton { max-width: 100%; }
.card > .eyebrow + .amount { overflow-wrap: anywhere; }

.btn, button.pill, a.pill, header nav a.rounded-full, .seg > button {
  touch-action: manipulation;
  transition:
    transform 220ms var(--ios-spring),
    box-shadow 220ms var(--ios-smooth),
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.btn {
  box-shadow: 0 2px 4px #1f1f1f0a, inset 1px 1px 0 var(--liquid-rim), inset 0 -1px 0 var(--glass-edge);
}
.btn-primary, .btn-primary:disabled {
  color: var(--on-accent);
  background: linear-gradient(175deg, #f0d8e9, var(--accent-primary) 40%, #c2a8b9);
  box-shadow: 0 6px 18px -10px #c2a8b999, inset 1px 1px 0 #ffffff80, inset -1px -1px 0 #1f1f1f26;
}
.btn-primary:hover {
  color: var(--on-accent);
  background: linear-gradient(180deg, #f0d8e9, var(--accent-primary-hover));
}
.btn-white {
  color: #1d1d1d;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 8px 20px -14px #1f1f1fb0, inset 0 -1px #c2a8b929;
}
.btn-white:hover { background: #f3f3f3; }

.btn:disabled, .btn[aria-disabled="true"], button:disabled {
  cursor: not-allowed;
  transform: none;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.58; }

header nav a[aria-current="page"], #mobile-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--glass-border), inset 0 1px 0 var(--liquid-rim);
}
#mobile-nav {
  max-height: calc(100dvh - 148px);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: ios-fade 180ms ease-out backwards;
}
#mobile-nav a { min-height: 44px; }

.seg { max-width: 100%; }
.seg > button { white-space: nowrap; }
.seg > button[aria-selected="true"], .seg > button[aria-pressed="true"] {
  box-shadow: 0 2px 6px #1f1f1f12, inset 0 1px 0 var(--liquid-rim);
}
.pill-on, .pill-on:hover {
  color: var(--on-accent);
  background: var(--accent-primary);
}

.field {
  color: var(--ink);
  background: var(--glass-ctl);
  box-shadow: inset 0 1px 2px #1f1f1f08;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.field:hover { border-color: var(--stamp); }
.field:focus {
  transform: none;
  border-color: var(--stamp);
  box-shadow: 0 0 0 3px var(--mint-soft);
}
.field:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.field[aria-invalid="true"] {
  border-color: var(--alert);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--alert) 18%, transparent);
}
.field:disabled { opacity: 0.6; cursor: not-allowed; }
.field::placeholder { color: var(--ink-3); }

/* Keep illustration highlights inside the banner, without 3D text distortion. */
.hero {
  background:
    radial-gradient(55% 90% at 100% 0, #ebebeb38 0, transparent 62%),
    radial-gradient(40% 60% at 72% 110%, #dec7d733 0, transparent 70%),
    linear-gradient(105deg, var(--hero-a) 0, var(--hero-a) 34%, var(--hero-b) 72%, var(--hero-c) 100%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 #ffffff80, inset 0 0 0 1px #ffffff29;
}
.hero:has(h1) { padding-block: 64px; }
.hero:has(h1) h1 { font-weight: 650; }
.hero:has(h1) h1 + p { max-width: 40ch; color: #ebebeb; }
.hero .cheque-shadow {
  --paper: #fbfbfb;
  --ink: #1f1f1f;
  --ink-2: #515151;
  --accent-text: #836778;
  --accent-pink-text: #836778;
  --stamp: #836778;
  border-radius: 8px;
  box-shadow: 0 4px 8px #1f1f1f20, 0 28px 55px -20px #14141499;
}
.hero .cheque-shadow > div { border-radius: inherit; overflow: hidden; }
.hero-chip {
  --ink-2: #515151;
  color: #1f1f1f;
  background: rgba(255, 255, 255, 0.96);
  border-color: #ffffff;
  box-shadow: 0 14px 30px -22px #1f1f1fb0, inset 0 1px #ffffff;
}
:root[data-theme] .hero-chip .text-\[\#067759\] { color: #836778; }
/* Both handle composers share a themed glass shell. Requiring a direct submit
   button keeps these styles off Cash's separate input wrapper. */
.hero form > div:has(> input):has(> button[type="submit"]) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--stamp) 32%, var(--glass-border));
  background:
    linear-gradient(120deg, var(--liquid-highlight), transparent 45%),
    linear-gradient(145deg, color-mix(in srgb, var(--control-tint) 86%, transparent), color-mix(in srgb, var(--control-shade) 92%, transparent));
  box-shadow: var(--shadow-sm), inset 1px 1px 0 var(--liquid-rim), inset -1px -1px 0 var(--glass-edge);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
  transition: transform 320ms var(--ios-spring), border-color 220ms ease, box-shadow 220ms ease;
}
.hero form > div:has(> input):has(> button[type="submit"]) > * {
  position: relative;
  z-index: 1;
}
.hero form > div:has(> input):has(> button[type="submit"])::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 25%, #dec7d726 48%, transparent 72%);
  opacity: 0;
  transform: translateX(-105%);
  pointer-events: none;
}
.hero form > div:has(> input):has(> button[type="submit"]):focus-within {
  border-color: var(--stamp-hi);
  box-shadow: 0 0 0 3px var(--paper-2), var(--shadow-md), inset 1px 1px 0 var(--liquid-rim);
  transform: scale(1.006);
}
.hero form > div:has(> input):has(> button[type="submit"]):focus-within::before {
  animation: liquid-reflection 720ms var(--ios-smooth);
}
.hero form > div:has(> input[aria-invalid="true"]):has(> button[type="submit"]) {
  border-color: var(--alert);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--alert) 18%, transparent);
}
.hero form [class~="text-[var(--alert)]"] { color: #ffffff; font-weight: 600; }
.hero form > div:has(> button[type="submit"]) > input:focus-visible { outline: none; }
.hero form button:focus-visible { outline-color: var(--focus-ring); outline-offset: 2px; }
.hero :focus-visible { outline-color: #ffffff; }
.hero .field:focus-visible { outline-color: var(--focus-ring); }
.hero form > button:focus-visible { outline-color: var(--focus-ring); }

/* The closing invitation shares the form's charcoal glass and blush reflection. */
main section.hero:has(h2):has(input[maxlength="16"]) {
  color: var(--ink);
  border: 1px solid var(--glass-border);
  background:
    radial-gradient(ellipse at 100% 0, #dec7d71a, transparent 65%),
    linear-gradient(135deg, var(--surface-tint), var(--surface-bottom) 68%, var(--control-shade));
  box-shadow: var(--shadow-md), inset 1px 1px 0 var(--liquid-rim), inset -1px -1px 0 var(--glass-edge);
}
main section.hero:has(h2):has(input[maxlength="16"])::after {
  content: "";
  position: absolute;
  top: -45%;
  right: -10%;
  width: 56%;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--stamp) 24%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 34px #dec7d706, 0 0 0 68px #dec7d704;
  transform: translate(0, 0);
  transition: transform 700ms var(--ios-smooth), opacity 400ms ease;
  opacity: .6;
  pointer-events: none;
}
main section.hero form:has(input[maxlength="16"]) > label {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}
main section.hero form:has(input[maxlength="16"]) > span { color: var(--ink-3); }
main section.hero form:has(input[maxlength="16"]) > [class~="text-[var(--alert)]"] { color: var(--alert); }
main section.hero form:has(input[maxlength="16"][aria-invalid="true"]) > span[id] {
  color: var(--alert);
  font-weight: 500;
}

/* Reflections play once per interaction, with no pointer tracking or idle loop. */
main .btn-primary { position: relative; isolation: isolate; overflow: hidden; }
main .btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 25%, #ffffff38 50%, transparent 75%);
  opacity: 0;
  transform: translateX(-105%);
  pointer-events: none;
}
main .btn-primary:focus-visible::after { animation: liquid-reflection 640ms var(--ios-smooth); }
main .btn-primary > svg { transition: translate 280ms var(--ios-spring); }
@keyframes liquid-reflection {
  0% { opacity: 0; transform: translateX(-105%); }
  25% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translateX(105%); }
}
@media (hover: hover) and (pointer: fine) {
  .hero form > div:has(> input):has(> button[type="submit"]):hover {
    border-color: color-mix(in srgb, var(--stamp-hi) 68%, var(--glass-border));
  }
  .hero form > div:has(> input):has(> button[type="submit"]):hover::before,
  main .btn-primary:not(:disabled):not([aria-disabled="true"]):hover::after {
    animation: liquid-reflection 720ms var(--ios-smooth);
  }
  .hero form > div:has(> input[aria-invalid="true"]):has(> button[type="submit"]):hover { border-color: var(--alert); }
  main .btn-primary:not(:disabled):hover > svg { translate: 2px 0; }
  main section.hero:has(h2):has(input[maxlength="16"]):hover::after {
    transform: translate(-12px, 8px);
    opacity: 1;
  }
}
.bob, .bob-slow { animation: none; }
.cheque-shadow { box-shadow: 0 4px 8px #3f253c18, 0 20px 48px -18px #52334855; }
img[src*="/art/"][src*=".webp"] {
  filter: hue-rotate(158deg) saturate(.27) brightness(1.13) contrast(.94) !important;
}
.hero img.bob, .hero img.bob-slow {
  filter: hue-rotate(158deg) saturate(.27) brightness(1.13) contrast(.94) drop-shadow(0 16px 22px #83677826) !important;
}
main h1 { letter-spacing: -0.035em; text-wrap: balance; }
main h1, main h2, main h3 { overflow-wrap: break-word; }

.text-\[\#067759\] { color: var(--accent-text); }
.text-\[\#47556f\] { color: var(--ink-2); }
:root[data-theme="dark"] .text-\[\#067759\] { color: var(--accent-text); }
[class~="text-[var(--stamp)]"] { color: var(--accent-text); }
:root[data-theme="dark"] [class~="text-[var(--stamp)]"] { color: var(--accent-text); }
[class~="bg-[var(--clear)]"] { color: var(--paper); }
:root[data-theme="dark"] [class~="bg-[var(--clear)]"] { color: #1f1f1f; }

/* Sheets stay within the viewport; scroll never leaks behind an open panel. */
.panel-scrim {
  background: rgba(18, 18, 18, 0.46);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: ios-fade 160ms ease-out backwards;
}
.panel, .sheet {
  background: linear-gradient(135deg, var(--liquid-highlight), transparent 35%), var(--sheet);
  border-color: var(--glass-border);
  border-radius: 30px;
  box-shadow: var(--shadow-lg), inset 1px 1px 0 var(--liquid-rim), inset -1px -1px 0 var(--glass-edge);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  backdrop-filter: blur(20px) saturate(145%);
  overscroll-behavior: contain;
}
.panel {
  max-height: calc(100dvh - 24px);
  animation: ios-sheet-in 320ms var(--ios-smooth) backwards;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.sheet {
  max-width: calc(100vw - 24px);
  animation: ios-dialog-in 320ms var(--ios-spring) backwards;
}

/* Entrance effects never depend on a hidden base state or a persistent transform. */
.ios-enter {
  animation: ios-enter 480ms var(--ios-smooth) var(--ios-delay, 0ms) backwards;
}
@keyframes ios-enter {
  from { opacity: 0; translate: 0 10px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes ios-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ios-sheet-in {
  from { opacity: 0; translate: 14px 0; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes ios-dialog-in {
  from { opacity: 0; translate: 0 12px; scale: .97; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}

@media (hover: hover) and (pointer: fine) {
  .card-hover:hover, a.card:hover, button.card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--stamp) 42%, var(--glass-border));
    box-shadow: var(--shadow-md), inset 0 1px 0 var(--liquid-rim);
  }
  .btn:not(:disabled):not([aria-disabled="true"]):hover,
  button.pill:not(:disabled):hover, a.pill:hover {
    transform: translateY(-1px);
  }
  header nav a.rounded-full:hover { background-color: var(--paper-2); }
}

.btn:not(:disabled):not([aria-disabled="true"]):active,
button.pill:not(:disabled):active, a.pill:active,
.seg > button:not(:disabled):active {
  transform: scale(0.975);
  transition-duration: 90ms;
}
a.card:active, button.card:not(:disabled):active {
  transform: scale(0.995);
  transition-duration: 90ms;
}

@media (hover: none), (pointer: coarse) {
  .btn:hover, .pill:hover, .card-hover:hover, a.card:hover, button.card:hover {
    transform: none;
  }
  .card-hover:hover, a.card:hover, button.card:hover {
    box-shadow: var(--shadow-sm), inset 0 1px 0 var(--liquid-rim);
    border-color: var(--glass-border);
  }
  .btn:not(:disabled):not([aria-disabled="true"]):active,
  button.pill:not(:disabled):active, a.pill:active { transform: scale(0.975); }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 136px; }
  header > .card {
    -webkit-backdrop-filter: blur(14px) saturate(135%);
    backdrop-filter: blur(14px) saturate(135%);
  }
  .field { font-size: 16px; }
  .hero:has(h1) { padding-block: 36px; }
  .hero:has(h1) h1 + p { font-size: 16px; }
  main a.card[href^="/coin/"] { padding: 18px; gap: 18px; }
  main .card:has(> .eyebrow) { padding-inline: 16px; }
  main .card > .eyebrow + .amount {
    font-size: clamp(18px, 5vw, 24px);
    line-height: 1.15;
  }
  main .btn, .panel .btn, .sheet .btn { min-height: 44px; }
  main button.pill, main a.pill, .seg > button { min-height: 40px; }
  header .btn { min-height: 40px; }
  header .btn-icon { min-width: 40px; min-height: 40px; }
  .seg { overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg > button { flex: 1 0 auto; }
  .panel {
    right: 8px;
    inset-block: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-bottom));
    width: calc(100% - 16px);
    max-height: calc(100dvh - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)));
    padding: 20px;
    animation-name: ios-sheet-mobile;
  }
  @keyframes ios-sheet-mobile {
    from { opacity: 0; translate: 0 18px; }
    to { opacity: 1; translate: 0 0; }
  }
}

@media (max-width: 480px) {
  main div:has(> input[maxlength="16"]):has(> button[type="submit"]) {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 8px 10px;
    height: auto;
    padding: 10px;
    border-radius: 22px;
  }
  main div:has(> button[type="submit"]) > input[maxlength="16"] {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }
  main div:has(> input[maxlength="16"]) > button[type="submit"] {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 48px;
  }
}

@media (max-width: 380px) {
  .hero:has(h1) { padding: 30px 22px; }
  .hero:has(h1) h1 { font-size: 34px !important; line-height: 1.08 !important; }
  header > .card > .flex:first-child { padding-inline: 10px; gap: 4px; }
  header a[aria-label="Checkout home"] { padding-right: 6px; }
  header a[aria-label="Checkout home"] > span { gap: 6px; }
  header a[aria-label="Checkout home"] > span > div {
    font-size: 14px !important;
    letter-spacing: 0.02em !important;
  }
  header > .card > .flex:first-child > .ml-auto { gap: 6px; }
}

@media (max-width: 360px) {
  main section[aria-label="Figures"] { grid-template-columns: minmax(0, 1fr); }
  main section[aria-label="Figures"] .card > .eyebrow + .amount { font-size: 26px; }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .card, header > .card, .panel, .sheet {
    background: linear-gradient(145deg, var(--surface-top), var(--surface-bottom));
  }
}

@media (prefers-reduced-transparency: reduce) {
  .hero form > div:has(> input):has(> button[type="submit"]) {
    background: linear-gradient(145deg, var(--control-tint), var(--control-shade));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .card, header > .card, .field, .panel, .sheet {
    background: linear-gradient(145deg, var(--surface-top), var(--surface-bottom));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .panel-scrim { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .ios-enter, .panel, .sheet, .panel-scrim, .bob, .bob-slow { animation: none !important; }
  .btn, .pill, .card-hover, a.card, button.card, .seg > button {
    transform: none !important;
  }
  .arrow-link > svg { translate: none !important; }
  .hero form > div:has(> input):has(> button[type="submit"]),
  main section.hero:has(h2):has(input[maxlength="16"])::after { transform: none !important; }
  .hero form > div:has(> input):has(> button[type="submit"])::before,
  main .btn-primary::after { animation: none !important; }
  main .btn-primary > svg { translate: none !important; }
}

/* Product layout: quieter navigation, an editorial hero and clear data groups. */
:root { --max-w: 1280px; }
header > .card { border-radius: 32px !important; }
header > .card > .flex:first-child { height: 64px; padding-inline: 18px 12px; }
header > .card > .rule-t:not(#mobile-nav) { display: none; }
header nav a.rounded-full { padding-inline: 15px; }
main { padding-top: 108px; }
main h1 { font-weight: 650; letter-spacing: -0.045em; }
main h2 { font-size: 26px; line-height: 1.2; }

main .hero:has(h1) {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  padding: 24px 0 32px;
  overflow: visible;
  color: var(--ink);
  background: none;
  box-shadow: none;
}
main .hero:has(h1) > div:first-of-type::before {
  content: "ON ROBINHOOD CHAIN";
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 22px;
  padding: 4px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--ink-2);
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
}
main .hero:has(h1) h1 {
  max-width: 12ch;
  font-size: clamp(54px, 5.2vw, 72px) !important;
  line-height: 1.02 !important;
  font-weight: 650;
}
main .hero:has(h1) h1 + p {
  max-width: 43ch;
  margin-top: 24px;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.65;
}
main .hero:has(h1) form > label {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
main .hero:has(h1) form > span { color: var(--ink-3); }
main .hero:has(h1) form [class~="text-[var(--alert)]"] { color: var(--alert); }
main .hero:has(h1) > div:first-of-type > a {
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}
main .hero:has(h1) > div:first-of-type > a:hover { color: var(--ink); }
main .hero:has(h1) > div:nth-of-type(2) {
  display: flex;
  align-items: center;
  min-height: 440px;
  min-width: 0;
  padding: 38px;
  border: 1px solid #dec7d73d;
  border-radius: 36px;
  background:
    radial-gradient(ellipse at 80% 0%, #dec7d799, transparent 60%),
    linear-gradient(125deg, #ffffff1a, transparent 40%, #1f1f1f29),
    linear-gradient(145deg, #333333, #534853);
  box-shadow: inset 1px 1px 0 #ffffff77, inset -1px -1px 0 #1f1f1f44, 0 28px 60px -32px #83677888;
  isolation: isolate;
}
main .hero:has(h1) > div:nth-of-type(2)::before {
  content: "";
  position: absolute;
  inset: 38px;
  z-index: -1;
  border: 1px solid #ebebeb33;
  border-radius: 50%;
  box-shadow: 0 0 0 35px #ebebeb0a, 0 0 0 70px #ebebeb06;
  pointer-events: none;
}
main .hero:has(h1) > div:nth-of-type(2)::after {
  content: "A CHEQUE ON EVERY TRADE";
  position: absolute;
  left: 30px;
  bottom: 24px;
  color: #ebebeb;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  pointer-events: none;
}
main .hero:has(h1) > div:nth-of-type(2) > div { width: 100%; transform: rotate(-5deg); }
main .hero:has(h1) .hero-chip { top: 30px; right: 26px; }
main .hero:has(h1) > div:nth-of-type(2) > img { right: 8px; bottom: 3px; }

main:has(.hero h1) section[aria-label="Totals"] {
  gap: 0;
  padding: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  background: linear-gradient(145deg, var(--surface-top), var(--surface-bottom));
  box-shadow: var(--shadow-sm);
}
main:has(.hero h1) section[aria-label="Totals"] > .card {
  padding: 22px 24px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}
main:has(.hero h1) section[aria-label="Totals"] > .card:first-child {
  background: var(--paper-2);
}
main:has(.hero h1) section[aria-label="Totals"] > .card:hover { background: var(--paper-2); }
main section[aria-labelledby="burn-h"] { margin-top: 10px; }
main section[aria-labelledby="burn-h"] > .card {
  border-left: 3px solid var(--stamp);
  border-radius: 22px;
}
main section[aria-labelledby="burn-h"] h2 { font-size: 20px; }
main section[aria-labelledby="feed-h"] { margin-top: 32px; gap: 24px; }
main section[aria-labelledby="how-h"], main section[aria-labelledby="coins-h"] { margin-top: 44px; }
main section[aria-labelledby="how-h"] [aria-hidden="true"]:has(> .chip) { flex-wrap: wrap; }
main section[aria-labelledby="how-h"] [aria-hidden="true"] > .chip { max-width: 100%; white-space: normal; }
.row { padding-block: 16px; }
.row:focus-visible { outline-offset: -3px; }
.seg { padding: 4px; }
.seg > button[aria-selected="true"] { background: var(--surface-top); }
.seg[data-glass-seg] { position: relative; isolation: isolate; }
.seg[data-glass-seg]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--seg-width);
  height: var(--seg-height);
  transform: translate(var(--seg-x), var(--seg-y));
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: linear-gradient(150deg, var(--surface-top), var(--surface-bottom));
  box-shadow: 0 2px 5px #1f1f1f18, inset 1px 1px 0 var(--liquid-rim), inset -1px -1px 0 var(--glass-edge);
  pointer-events: none;
}
.seg[data-glass-seg="ready"]::before {
  transition: transform 360ms var(--ios-spring), width 360ms var(--ios-spring), height 240ms var(--ios-smooth);
}
.seg[data-glass-seg] > [role="tab"] { position: relative; z-index: 1; }
.seg[data-glass-seg] > [role="tab"][aria-selected="true"] { background: transparent; box-shadow: none; }
.seg[data-glass-seg] > [role="tab"]:active { transform: none; }
footer > .card { border-radius: 26px; }
/* The footer ends at the navigation card, without a copyright/network line. */
footer > p { display: none; }

@media (min-width: 1024px) {
  main:has(.hero h1) section[aria-label="Totals"] > .card + .card {
    border-left: 1px solid var(--rule);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}
@media (max-width: 1100px) and (min-width: 1024px) {
  header nav a.rounded-full { padding-inline: 10px; }
  main .hero:has(h1) { gap: 32px; }
  main .hero:has(h1) > div:nth-of-type(2) { min-height: 400px; padding: 28px; }
}
@media (max-width: 1180px) and (min-width: 1024px) {
  header button[aria-label="Search (Ctrl K)"] {
    width: 36px;
    min-width: 36px;
    padding-inline: 0;
    gap: 0;
    font-size: 0;
  }
  header button[aria-label="Search (Ctrl K)"] .kbd { display: none; }
}
@media (max-width: 1023px) {
  main .hero:has(h1) { gap: 28px; }
  main .hero:has(h1) h1 { font-size: 54px !important; }
  main .hero:has(h1) > div:nth-of-type(2) { min-height: 380px; padding: 26px; }
  main .hero:has(h1) .hero-chip { top: 24px; right: 18px; font-size: 12px; }
}
@media (max-width: 760px) {
  header > .card > .flex:first-child { height: 60px; padding-inline: 12px 10px; }
  main { padding-top: 94px; }
  html { scroll-padding-top: 96px; }
  #mobile-nav { max-height: calc(100dvh - 100px); }
  main h2 { font-size: 24px; }
  main .hero:has(h1) { grid-template-columns: minmax(0, 1fr); padding: 12px 0 16px; gap: 30px; }
  main .hero:has(h1) h1 { max-width: 13ch; font-size: 48px !important; }
  main .hero:has(h1) h1 + p { font-size: 16px; margin-top: 20px; line-height: 1.55; }
  main .hero:has(h1) > div:first-of-type::before { margin-bottom: 18px; }
  main .hero:has(h1) > div:nth-of-type(2) { min-height: 300px; border-radius: 28px; padding: 28px; }
  main .hero:has(h1) .hero-chip { top: 20px; right: 18px; }
  main .hero:has(h1) > div:nth-of-type(2) > img { display: block; width: 100px !important; height: 100px !important; }
  main .hero:has(h1) > div:nth-of-type(2)::after { left: 22px; bottom: 22px; font-size: 9px; letter-spacing: 0.07em; }
  main:has(.hero h1) section[aria-label="Totals"] { gap: 4px; padding: 6px; border-radius: 24px; }
  main:has(.hero h1) section[aria-label="Totals"] > .card { padding: 18px 12px; }
  main:has(.hero h1) section[aria-label="Totals"] .eyebrow { font-size: 12px; }
  main:has(.hero h1) section[aria-label="Totals"] .card > :last-child { font-size: 11px; line-height: 1.5; }
  main section[aria-labelledby="feed-h"] { margin-top: 24px; }
}
@media (max-width: 380px) {
  header > .card > .flex:first-child { padding-inline: 10px; }
  main .hero:has(h1) h1 { font-size: 42px !important; }
  main .hero:has(h1) > div:nth-of-type(2) { min-height: 270px; padding: 24px; }
  main .hero:has(h1) .hero-chip { top: 15px; right: 12px; padding: 8px 12px 8px 8px; gap: 8px; }
  main .hero:has(h1) .hero-chip > :last-child > :first-child { font-size: 11px; }
  main .hero:has(h1) > div:nth-of-type(2)::after { max-width: 150px; line-height: 1.5; }
}

/* Match the captured utility layer so its important font sizes cannot win. */
@layer utilities {
  main .hero:has(h1) h1 { font-size: clamp(54px, 5.2vw, 72px) !important; line-height: 1.02 !important; }
  @media (max-width: 1023px) { main .hero:has(h1) h1 { font-size: 54px !important; } }
  @media (max-width: 760px) { main .hero:has(h1) h1 { font-size: 48px !important; } }
  @media (max-width: 380px) { main .hero:has(h1) h1 { font-size: 42px !important; } }
}
