/* ==========================================================================
   Hybrid Core: membership pages (landing, join flow, profile, membership card).
   Builds on design-system/tokens.css and components.css.
   ========================================================================== */

:root {
  --hc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hc-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---- Toast -------------------------------------------------------------- */
.hc-toast {
  position: fixed; z-index: 1000; left: 0; right: 0; top: max(16px, env(safe-area-inset-top));
  width: fit-content; margin-inline: auto;
  display: flex; align-items: center; gap: 10px;
  max-width: min(26rem, calc(100vw - 32px)); padding: 12px 18px 12px 12px;
  border-radius: var(--radius-pill); background: var(--ink-900); color: #fff;
  font: 500 0.9375rem/1.3 var(--font-display); letter-spacing: -0.01em;
  box-shadow: 0 18px 40px -12px rgb(13 24 33 / 0.45);
  transform: translateY(calc(-100% - 24px)) scale(0.96); opacity: 0;
  transition: transform 260ms var(--hc-ease), opacity 200ms ease;
  pointer-events: none;
}
.hc-toast svg { flex: none; width: 24px; height: 24px; }
.hc-toast.is-in { transform: none; opacity: 1; transition: transform 620ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 160ms ease; }
.hc-toast--error { background: #fff; color: var(--danger); box-shadow: 0 18px 40px -12px rgb(13 24 33 / 0.3), 0 0 0 1px var(--line); }
.hc-toast__tick { stroke-dasharray: 14; stroke-dashoffset: 14; }
.hc-toast.is-in .hc-toast__tick { animation: hc-draw 420ms 180ms var(--hc-ease) forwards; }
@keyframes hc-draw { to { stroke-dashoffset: 0; } }

.hc-confetti { position: fixed; inset: 0; z-index: 999; width: 100vw; height: 100vh; pointer-events: none; }

/* ---- Membership card ---------------------------------------------------- */
.hc-card {
  --w: 300px;
  position: relative; display: block; width: var(--w); aspect-ratio: 320 / 500; text-align: left;
  perspective: 1400px; container-type: inline-size;
}
.hc-card__inner { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.hc-card__face {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: 6.5cqw; background: #fff; color: var(--ink-900);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.8) inset, 0 0 0 1px rgb(13 24 33 / 0.06), 0 34px 60px -26px rgb(13 24 33 / 0.55);
}
.hc-card__art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hc-card__art--top { z-index: 2; }
.hc-card__blob { fill: var(--teal-400); }
.hc-card__panel-bg { fill: #fff; }
.hc-card__wave { fill: var(--ink-900); }
.hc-card__slot { position: absolute; z-index: 3; top: 3.2%; left: 50%; width: 16%; height: 2.6%; transform: translateX(-50%); border-radius: 99px; background: var(--paper-100); box-shadow: inset 0 1px 2px rgb(13 24 33 / 0.25); }
.hc-card__brand { position: absolute; z-index: 3; top: 9%; left: 8%; display: flex; align-items: center; gap: 2.6cqw; }
.hc-card__logo { width: 31cqw; height: auto; color: var(--ink-900); }
.hc-card__frame { position: absolute; z-index: 1; top: 23%; right: 0; left: 23%; height: 54%; overflow: hidden; border-top-left-radius: 24cqw; background: linear-gradient(160deg, var(--paper-100), var(--paper-200)); }
.hc-card__photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hc-card__photo--empty { display: grid; place-items: end center; color: var(--paper-300); }
.hc-card__photo--empty svg { width: 70%; height: auto; }
.hc-card__panel { position: absolute; z-index: 3; left: 8%; right: 30%; top: 70.5%; }
.hc-card__name { display: flex; flex-direction: column; font: 500 calc(8.6cqw * var(--name-scale, 1))/1.04 var(--font-display); letter-spacing: -0.035em; color: var(--ink-900); }
.hc-card__name span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hc-card__rule { display: block; width: 17cqw; height: 1.1cqw; margin-top: 4.6cqw; border-radius: 99px; background: var(--teal-400); }
.hc-card__role { position: absolute; z-index: 3; left: 8%; bottom: 6.5%; font: 500 4.2cqw/1 var(--font-display); color: var(--ink-900); }
.hc-card__panel .hc-card__role { position: static; margin-top: 6cqw; }
.hc-card__id { position: absolute; z-index: 3; right: 7%; bottom: 5.8%; font: 500 3.9cqw/1 var(--font-display); letter-spacing: 0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.hc-card__back { transform: rotateY(180deg); background: var(--ink-900); color: #fff; }
.hc-card__back .hc-card__slot { background: var(--ink-950); box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.5); }
.hc-card__back-brand { position: absolute; z-index: 3; top: 12%; left: 8%; right: 8%; display: grid; gap: 2.4cqw; }
.hc-card__back-brand .hc-card__logo { width: 48cqw; color: #fff; }
.hc-card__back-brand span { font: 500 3.6cqw/1.2 var(--font-display); letter-spacing: 0.01em; color: var(--teal-400); }
.hc-card__facts { position: absolute; z-index: 3; top: 33%; left: 8%; right: 8%; display: grid; grid-template-columns: 1fr 1fr; gap: 5cqw 4cqw; margin: 0; padding-top: 5cqw; border-top: 1px solid rgb(255 255 255 / 0.16); }
.hc-card__fact--wide { grid-column: 1 / -1; }
.hc-card__facts dt { font: 400 3.2cqw/1.2 var(--font-body); color: rgb(255 255 255 / 0.6); }
.hc-card__facts dd { margin: 1cqw 0 0; font: 500 4.8cqw/1.2 var(--font-display); letter-spacing: -0.01em; color: #fff; overflow-wrap: anywhere; }
.hc-card__fact--wide dd { font-size: 6cqw; letter-spacing: -0.02em; }
.hc-card__found { position: absolute; z-index: 3; left: 42%; right: 8%; bottom: 7%; font: 400 2.9cqw/1.4 var(--font-body); color: rgb(255 255 255 / 0.6); text-align: right; }
.hc-card.is-expired .hc-card__photo { filter: grayscale(1); opacity: 0.7; }
.hc-card.is-expired .hc-card__blob { fill: var(--paper-300); }

/* ---- Join flow: full-screen, one question at a time ---------------------- */
/* The page itself never scrolls: only the current question does. On phones, script sizes the
   flow to exactly the part of the screen above the keyboard (see core-join.js). */
html.hc-app, html.hc-app body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.hc-app { scroll-behavior: auto; }
.hc-flow {
  position: fixed; top: 0; left: 0; right: 0; height: 100%; height: 100dvh;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--bg); overflow: hidden; will-change: transform;
}
.flow-top { display: grid; gap: 6px; padding: max(8px, env(safe-area-inset-top)) var(--page-x) 12px; }
.flow-top__row { display: grid; grid-template-columns: 2.75rem 1fr 2.75rem; align-items: center; gap: var(--space-3); }
.flow-icon {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer;
  transition: background-color var(--dur-fast) ease, opacity var(--dur-base) ease, transform 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.flow-icon svg { width: 22px; height: 22px; }
@media (hover: hover) { .flow-icon:hover { background: var(--bg-sunken); } }
.flow-icon:active { transform: scale(0.92); background: var(--bg-sunken); }
.flow-icon[hidden] { display: grid !important; visibility: hidden; opacity: 0; }
/* Progress: step label centred between back and close, one full-width bar underneath.
   Solid brand teal on a hairline track: no gradients. */
.flow-progress__meta { display: flex; justify-content: center; align-items: baseline; gap: 8px; font: 500 0.875rem/1.2 var(--font-display); color: var(--text-subtle); white-space: nowrap; }
.flow-progress__meta b { font-weight: 500; color: var(--text); }
.flow-progress__meta span::before { content: "·"; margin-right: 8px; }
.flow-progress__track { position: relative; height: 6px; overflow: hidden; border-radius: 99px; background: var(--paper-200); }
.flow-progress__fill { position: absolute; inset: 0; border-radius: inherit; transform-origin: left center; transform: scaleX(0); background: var(--teal-400); }

.flow-stage { position: relative; overflow: hidden; }
.flow-step {
  position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(1.5rem, 6vh, 4.5rem) var(--page-x) var(--space-7);
  -webkit-overflow-scrolling: touch;
}
.flow-step[hidden] { display: none !important; }
.flow-step__inner { width: 100%; max-width: 36rem; margin: 0 auto; }
.flow-step__inner--wide { max-width: 52rem; }
.q-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: var(--space-4); font: 500 0.875rem/1 var(--font-display); color: var(--accent); }
.q-title { font: 500 clamp(2rem, 1.4rem + 2.6vw, 3.25rem)/1.04 var(--font-display); letter-spacing: -0.04em; text-wrap: balance; }
.q-sub { margin-top: var(--space-4); font-size: var(--text-lead); line-height: 1.45; color: var(--text-muted); text-wrap: pretty; }
.q-body { margin-top: var(--space-6); }
.q-hello { min-height: 1.6em; margin-top: var(--space-4); font: 500 1.125rem/1.3 var(--font-display); color: var(--accent); opacity: 0; transform: translateY(6px); transition: opacity 260ms ease, transform 420ms var(--hc-ease); }
.q-hello.is-on { opacity: 1; transform: none; }

/* Big answer fields */
.q-fields { display: grid; gap: var(--space-3); }
@media (min-width: 640px) { .q-fields--two { grid-template-columns: 1fr 1fr; } }
.q-field { position: relative; display: block; }
.q-field__label { display: block; margin: 0 0 var(--space-2) 4px; font-size: var(--text-small); font-weight: 500; color: var(--text-muted); }
.q-input {
  width: 100%; min-height: 4rem; padding: 0 1.25rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--bg-raised); color: var(--text);
  font: 500 clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem)/1.2 var(--font-display); letter-spacing: -0.02em;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-base) var(--hc-ease);
}
.q-input::placeholder { color: var(--paper-300); }
.q-input:focus { outline: 0; border-color: var(--ink-900); box-shadow: 0 0 0 4px rgb(0 212 196 / 0.22); }
.q-input[aria-invalid="true"] { border-color: var(--danger); }
.q-error { min-height: 1.4em; margin: var(--space-2) 0 0 4px; font-size: var(--text-small); color: var(--danger); }
.q-hint { margin: var(--space-3) 0 0 4px; font-size: var(--text-small); color: var(--text-subtle); }
.is-shake { animation: hc-shake 420ms cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes hc-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }

/* Choice cards (plans, payment method) */
.picks { display: grid; gap: var(--space-3); }
@media (min-width: 720px) { .picks--plans { grid-template-columns: 1fr 1fr; } }
.pick { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick__body {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px var(--space-4); align-items: start;
  min-height: 100%; padding: 1.125rem 1.25rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); background: var(--bg-raised);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-base) var(--hc-ease), transform 160ms var(--hc-ease);
}
@media (hover: hover) { .pick:hover .pick__body { border-color: var(--grey-500); } }
.pick:active .pick__body { transform: scale(0.985); }
.pick input:focus-visible + .pick__body { outline: 2px solid var(--focus); outline-offset: 3px; }
.pick input:checked + .pick__body { border-color: var(--ink-900); box-shadow: 0 0 0 1px var(--ink-900), 0 16px 32px -18px rgb(13 24 33 / 0.35); }
.pick__title { font: 500 1.125rem/1.25 var(--font-display); letter-spacing: -0.015em; color: var(--text); }
.pick__price { grid-column: 1; font: 500 1.625rem/1.1 var(--font-display); letter-spacing: -0.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.pick__price small { font: 400 0.875rem/1 var(--font-body); letter-spacing: 0; color: var(--text-subtle); }
.pick__note { grid-column: 1 / -1; font-size: var(--text-small); color: var(--text-muted); }
.pick__was { color: var(--text-subtle); text-decoration: line-through; }
.pick__check { grid-column: 2; grid-row: 1; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--bg-raised); transition: background-color 180ms ease, border-color 180ms ease, transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.pick__check svg { width: 100%; height: 100%; opacity: 0; }
.pick__check path { stroke-dasharray: 14; stroke-dashoffset: 14; }
.pick input:checked + .pick__body .pick__check { border-color: var(--ink-900); background: var(--ink-900); transform: scale(1.08); }
.pick input:checked + .pick__body .pick__check svg { opacity: 1; }
.pick input:checked + .pick__body .pick__check path { animation: hc-draw 360ms 60ms var(--hc-ease) forwards; }
.pick__badge { justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 10px; border-radius: 99px; background: var(--teal-100); color: var(--teal-900); font: 500 0.75rem/1.2 var(--font-display); }
.pick__badge--amber { background: var(--amber-100); color: var(--amber-700); }

/* Terms tick */
.agree { display: flex; align-items: flex-start; gap: 12px; margin-top: var(--space-5); cursor: pointer; font-size: 0.9375rem; color: var(--text-muted); -webkit-tap-highlight-color: transparent; }
.agree input { position: absolute; opacity: 0; }
.agree__box { flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-top: 1px; border: 1.5px solid var(--line-strong); border-radius: 7px; background: var(--bg-raised); transition: background-color 160ms ease, border-color 160ms ease, transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.agree__box svg { width: 16px; height: 16px; opacity: 0; }
.agree__box path { stroke-dasharray: 14; stroke-dashoffset: 14; }
.agree input:checked + .agree__box { border-color: var(--ink-900); background: var(--ink-900); transform: scale(1.06); }
.agree input:checked + .agree__box svg { opacity: 1; }
.agree input:checked + .agree__box path { animation: hc-draw 320ms var(--hc-ease) forwards; }
.agree input:focus-visible + .agree__box { outline: 2px solid var(--focus); outline-offset: 3px; }
.agree a, .link-btn { color: var(--text); text-underline-offset: 0.18em; }
.link-btn { padding: 0; border: 0; background: none; font: inherit; text-decoration: underline; cursor: pointer; }

/* Photo step */
.photo-step { display: grid; gap: var(--space-5); justify-items: center; margin-top: var(--space-6); }
.photo-drop { position: relative; display: block; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 6.5cqw; -webkit-tap-highlight-color: transparent; transition: transform 200ms var(--hc-ease); }
.photo-drop:active { transform: scale(0.98); }
.photo-drop .hc-card { --w: max(170px, min(250px, 62vw, calc((100dvh - 400px) * 0.64))); }
.photo-drop__cta {
  position: absolute; z-index: 5; left: 23%; right: 0; top: 23%; height: 45%;
  display: grid; place-content: center; justify-items: center; gap: 8px;
  border-top-left-radius: 60px; color: var(--ink-900); font: 500 0.875rem/1.2 var(--font-display);
  background: rgb(255 255 255 / 0.35); transition: opacity 240ms ease;
}
.photo-drop__cta span:first-child { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--ink-900); color: #fff; box-shadow: 0 10px 24px -10px rgb(13 24 33 / 0.6); animation: hc-pulse 2.4s var(--hc-ease-in-out) infinite; }
.photo-drop__cta svg { width: 22px; height: 22px; }
.photo-drop.has-photo .photo-drop__cta { opacity: 0; }
@keyframes hc-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.photo-drop.is-dragover .hc-card__frame { box-shadow: inset 0 0 0 3px var(--teal-400); }
.hc-card__photo.is-new { animation: hc-develop 900ms var(--hc-ease) both; }
@keyframes hc-develop { from { opacity: 0; filter: blur(12px) saturate(0); transform: scale(1.12); } to { opacity: 1; filter: none; transform: none; } }

/* Done */
.done { display: grid; justify-items: center; gap: var(--space-5); text-align: center; padding-top: var(--space-4); }
.done .hc-card { --w: min(260px, 64vw); }
.done__card { transform-origin: 50% 0; }
.done .q-title { max-width: 14ch; }

/* Payment in progress */
.paying { display: grid; justify-items: center; gap: var(--space-5); padding-top: 12vh; text-align: center; }
.paying__ring { width: 72px; height: 72px; }
.paying__ring circle { fill: none; stroke-width: 5; }
.paying__ring .bg { stroke: var(--paper-200); }
.paying__ring .fg { stroke: var(--teal-400); stroke-linecap: round; stroke-dasharray: 60 200; transform-origin: center; animation: hc-spin 900ms linear infinite; }
.paying.is-done .paying__ring .fg { animation: none; stroke-dasharray: 202; stroke-dashoffset: 0; transition: stroke-dasharray 400ms var(--hc-ease); }
.paying__tick { fill: none; stroke: var(--ink-900); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.paying.is-done .paying__tick { animation: hc-draw 420ms 200ms var(--hc-ease) forwards; }
@keyframes hc-spin { to { transform: rotate(360deg); } }

/* Footer with the main button, kept above the phone keyboard */
.flow-foot {
  position: relative; z-index: 2; display: grid; justify-items: center; gap: var(--space-3);
  padding: var(--space-4) var(--page-x) max(var(--space-4), env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgb(248 248 246 / 0), var(--bg) 22%);
}
/* Keyboard open: the button sits right on top of it, and the small print steps aside. */
.hc-flow.is-kb .flow-foot { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.hc-flow.is-kb .flow-foot__note { display: none; }
.hc-flow.is-kb .flow-top { padding-top: 4px; padding-bottom: 8px; }
.hc-flow.is-kb .flow-step { padding-top: var(--space-4); }
/* Test sites only: keep the staging label clear of the button and its small print. */
html.hc-app #hybrid-staging-badge { bottom: calc(var(--foot-h, 128px) + 6px) !important; padding: 4px 10px !important; font-size: 11px !important; }
.flow-foot__inner { display: grid; gap: var(--space-3); width: 100%; max-width: 36rem; }
.flow-foot .btn { width: 100%; min-height: 3.5rem; font-size: 1.0625rem; }
.flow-foot .btn .btn__arrow { transition: transform 260ms var(--hc-ease); }
@media (hover: hover) { .flow-foot .btn:hover .btn__arrow { transform: translateX(3px); } }
.flow-foot__note { min-height: 1.2em; text-align: center; font-size: var(--text-small); color: var(--text-subtle); }
.btn.is-busy { pointer-events: none; }
.btn.is-busy::after { content: ""; width: 1rem; height: 1rem; margin-left: 4px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: hc-spin 700ms linear infinite; }
.btn.is-busy .btn__arrow { display: none; }


/* Read by screen readers, not shown */
.hc-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[data-step="pay"] .fee { margin-top: 0; }
[data-step="renew"] .q-kicker { margin-bottom: var(--space-2); }
[data-step="renew"] .pick__body { padding: 0.875rem 1.125rem; }
[data-step="renew"] .pick__price { font-size: 1.375rem; }

/* ---- Compact pieces: fee, closed lists, switch (see "Space on mobile") ---- */
.q-title--sm { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); }
.q-sub--sm { margin-top: var(--space-3); font-size: 1rem; }
.q-body--tight { margin-top: var(--space-5); }
.agree--tight { margin-top: var(--space-4); font-size: 0.875rem; }
@media (max-width: 560px) { .flow-step { padding-top: var(--space-5); } }

.fee { margin-top: var(--space-5); padding: 1.125rem 1.25rem; border-radius: var(--radius-lg); background: var(--ink-900); color: #fff; }
.fee__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }
.fee__label { font: 500 0.9375rem/1.2 var(--font-display); color: rgb(255 255 255 / 0.72); }
.fee__amount { font: 500 clamp(1.75rem, 1.5rem + 1vw, 2.25rem)/1 var(--font-display); letter-spacing: -0.035em; color: var(--teal-400); font-variant-numeric: tabular-nums; }
.fee__what { margin-top: var(--space-2); font-size: 0.9375rem; line-height: 1.45; color: #fff; }
.fee__then { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid rgb(255 255 255 / 0.14); font-size: 0.875rem; line-height: 1.45; color: rgb(255 255 255 / 0.72); }
.fee .btn { width: 100%; margin-top: var(--space-4); }

/* A long list or extra options, closed into one card until tapped */
.disclose { margin-top: var(--space-3); border-radius: var(--radius-md); background: var(--bg-raised); box-shadow: 0 0 0 1px var(--line); interpolate-size: allow-keywords; }
.disclose summary { display: flex; align-items: center; gap: var(--space-3); padding: 0.875rem 1.125rem; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.disclose summary::-webkit-details-marker { display: none; }
.disclose__text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.disclose__text b { font: 500 0.9375rem/1.3 var(--font-display); color: var(--text); }
.disclose__text span { font-size: 0.8125rem; line-height: 1.4; color: var(--text-muted); }
.disclose__chev { flex: none; width: 10px; height: 10px; margin-right: 4px; border-right: 1.6px solid var(--text-subtle); border-bottom: 1.6px solid var(--text-subtle); transform: translateY(-3px) rotate(45deg); transition: transform 260ms var(--hc-ease); }
.disclose[open] .disclose__chev { transform: translateY(2px) rotate(225deg); }
.disclose::details-content { block-size: 0; overflow: clip; transition: block-size 320ms var(--hc-ease), content-visibility 320ms allow-discrete; }
.disclose[open]::details-content { block-size: auto; }
@supports not (interpolate-size: allow-keywords) { .disclose::details-content { block-size: auto; transition: none; } }
.disclose > .picks, .disclose > .included { padding: 0 0.75rem 0.75rem; }
.disclose--plans { margin-top: var(--space-3); }
.disclose--plans .pick__body { padding: 0.875rem 1rem; }
.disclose--plans .pick__price { font-size: 1.375rem; }

.included { display: grid; gap: 0; margin: 0; }
@media (min-width: 720px) { .included { grid-template-columns: 1fr 1fr; column-gap: var(--space-5); } }
.included li { display: grid; grid-template-columns: 1.25rem 1fr; gap: 2px var(--space-3); padding: 0.625rem 0.375rem; border-top: 1px solid var(--line); }
.included li::before { content: ""; grid-row: span 2; width: 1.25rem; height: 1.25rem; margin-top: 1px; border-radius: 50%; background: var(--teal-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.4l2.6 2.6L14 7.6' fill='none' stroke='%2300393a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.included b { font: 500 0.875rem/1.3 var(--font-display); color: var(--text); }
.included span { font-size: 0.8125rem; line-height: 1.4; color: var(--text-muted); }

/* On/off switch */
.switch { display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-4); padding: 0.875rem 1.125rem; border-radius: var(--radius-md); background: var(--bg-raised); box-shadow: 0 0 0 1px var(--line); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.switch[hidden] { display: none !important; }
.switch__text { display: grid; gap: 2px; flex: 1; }
.switch__text b { font: 500 0.9375rem/1.3 var(--font-display); }
.switch__text span { font-size: 0.8125rem; color: var(--text-muted); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { position: relative; flex: none; width: 3.125rem; height: 1.875rem; border-radius: 99px; background: var(--paper-300); transition: background-color 200ms ease; }
.switch__thumb { position: absolute; top: 3px; left: 3px; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgb(13 24 33 / 0.25); transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.switch input:checked + .switch__track { background: var(--teal-600); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(1.25rem); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--focus); outline-offset: 3px; }
.renew-note { margin-top: var(--space-3); font-size: 0.875rem; line-height: 1.5; color: var(--text-muted); }

/* ---- Sheets (native dialog) --------------------------------------------- */
.hc-sheet {
  width: min(40rem, 100vw); max-width: 100vw; max-height: min(88dvh, 52rem); margin: auto auto 0;
  padding: 0; border: 0; border-radius: 24px 24px 0 0; background: var(--bg-raised); color: var(--text);
  box-shadow: 0 -20px 60px -20px rgb(13 24 33 / 0.4);
  transform: translateY(100%); transition: transform 420ms var(--hc-ease), overlay 420ms allow-discrete, display 420ms allow-discrete;
}
.hc-sheet[open] { display: flex; flex-direction: column; transform: none; }
@starting-style { .hc-sheet[open] { transform: translateY(100%); } }
.hc-sheet::backdrop { background: rgb(8 15 21 / 0); backdrop-filter: blur(0); transition: background-color 320ms ease, backdrop-filter 320ms ease, overlay 320ms allow-discrete, display 320ms allow-discrete; }
.hc-sheet[open]::backdrop { background: rgb(8 15 21 / 0.5); backdrop-filter: blur(4px); }
@starting-style { .hc-sheet[open]::backdrop { background: rgb(8 15 21 / 0); backdrop-filter: blur(0); } }
@media (min-width: 720px) {
  .hc-sheet { margin: auto; border-radius: 24px; transform: translateY(24px) scale(0.97); opacity: 0; transition: transform 320ms var(--hc-ease), opacity 220ms ease, overlay 320ms allow-discrete, display 320ms allow-discrete; }
  .hc-sheet[open] { transform: none; opacity: 1; }
  @starting-style { .hc-sheet[open] { transform: translateY(24px) scale(0.97); opacity: 0; } }
}
.hc-sheet__grab { width: 40px; height: 5px; margin: 10px auto 0; border-radius: 99px; background: var(--paper-300); }
@media (min-width: 720px) { .hc-sheet__grab { display: none; } }
.hc-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-5) var(--space-3); }
.hc-sheet__body { flex: 1 1 auto; min-height: 0; padding: 0 var(--space-5) var(--space-2); overflow-y: auto; overscroll-behavior: contain; }
.hc-sheet__foot { flex: none; border-top: 1px solid var(--line); display: grid; gap: var(--space-3); padding: var(--space-4) var(--space-5) max(var(--space-5), env(safe-area-inset-bottom)); }
.hc-sheet__foot .btn { width: 100%; min-height: 3.25rem; }
.terms h3 { margin: var(--space-5) 0 var(--space-2); font: 500 1.0625rem/1.3 var(--font-display); color: var(--text); }
.terms p, .terms li { font-size: 0.9375rem; color: var(--text-muted); }
.terms ul { margin: var(--space-2) 0 0; padding-left: 1.1rem; display: grid; gap: 6px; }

/* ---- Landing page: what it is, the price and Join on the first phone screen ---- */
.core-hero { padding-block: clamp(1.25rem, 0.5rem + 4vw, 5rem) clamp(2.5rem, 1rem + 5vw, 6rem); }
.core-hero__grid { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 900px) { .core-hero__grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-8); align-items: center; } }
.core-hero__copy { display: grid; gap: var(--space-3); justify-items: start; }
.core-hero__title { font: 500 clamp(2rem, 1.3rem + 3.6vw, 4.5rem)/1.02 var(--font-display); letter-spacing: -0.045em; text-wrap: balance; }
.core-hero__lead { font-size: clamp(1rem, 0.95rem + 0.4vw, 1.25rem); line-height: 1.45; color: var(--text-muted); max-width: 34rem; text-wrap: pretty; }
.core-hero__signin { display: none; }
@media (min-width: 900px) { .core-hero__signin { display: block; } .core-hero__copy { gap: var(--space-5); } }
.core-hero__buy { display: grid; gap: 0; }
.core-hero__buy .fee { margin-top: 0; }
.core-hero__buy .disclose { margin-top: var(--space-3); }
.disclose .plan-rows { margin: 0; padding: 0 1.125rem 0.75rem; }
.plan-rows li { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--space-3); align-items: center; padding: 0.75rem 0; border-top: 1px solid var(--line); }
.plan-rows li > span:first-child { display: grid; }
.plan-rows b { font: 500 0.9375rem/1.3 var(--font-display); }
.plan-rows small { font-size: 0.8125rem; color: var(--text-muted); }
.plan-rows__price, .plan-row__price { font: 500 1.0625rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; text-align: right; }
.plan-row__price s { margin-right: 4px; font: 400 0.8125rem/1 var(--font-body); color: var(--text-subtle); }
.plan-rows .pick__badge { grid-column: 1 / -1; margin-top: 0; }
.core-close-wrap { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.core-close { display: grid; gap: var(--space-5); justify-items: center; text-align: center; }

/* ---- Profile page ------------------------------------------------------- */
.me { padding-block: clamp(1.5rem, 1rem + 3vw, 3.5rem) var(--space-9); }
.me__wrap { width: 100%; max-width: 40rem; margin: 0 auto; display: grid; gap: var(--space-6); }
.me-hero { display: grid; justify-items: center; gap: var(--space-4); text-align: center; }
.me-avatar { position: relative; width: 112px; height: 112px; border-radius: 50%; overflow: hidden; background: var(--paper-200); box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--teal-400); }
.me-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.me-hero h1 { font: 500 clamp(2rem, 1.6rem + 2vw, 2.75rem)/1.05 var(--font-display); letter-spacing: -0.04em; }
.me-hero__meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-2) var(--space-3); color: var(--text-muted); font-size: 0.9375rem; }
.me-hero .btn { min-height: 3.5rem; padding-inline: var(--space-6); }
.me-hero .btn svg { width: 20px; height: 20px; }
@media (max-width: 560px) { .me-hero .btn { width: 100%; } }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font: 500 0.8125rem/1.2 var(--font-display); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--active { background: var(--teal-100); color: var(--teal-900); }
.status--warn { background: var(--amber-100); color: var(--amber-700); }
.status--off { background: var(--paper-200); color: var(--grey-600); }

.group { display: grid; gap: var(--space-2); }
.group__title { padding: 0 var(--space-2); font: 500 0.875rem/1.2 var(--font-display); color: var(--text-subtle); }
.group__box { overflow: hidden; border-radius: var(--radius-lg); background: var(--bg-raised); box-shadow: 0 0 0 1px var(--line); }
.group__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 3.5rem; padding: 0.875rem 1.125rem; border-top: 1px solid var(--line); }
.group__row:first-child { border-top: 0; }
.group__row > span:first-child { flex: none; color: var(--text-muted); font-size: 0.9375rem; }
.group__row > b { font: 500 0.9375rem/1.35 var(--font-display); text-align: right; overflow-wrap: anywhere; }
button.group__row, a.group__row { width: 100%; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); font: 500 1rem/1.3 var(--font-display); text-align: left; text-decoration: none; cursor: pointer; transition: background-color 120ms ease; -webkit-tap-highlight-color: transparent; }
button.group__row:first-child, a.group__row:first-child { border-top: 0; }
@media (hover: hover) { button.group__row:hover, a.group__row:hover { background: var(--bg-sunken); } }
button.group__row:active, a.group__row:active { background: var(--paper-200); }
.group__row svg { flex: none; width: 18px; height: 18px; color: var(--text-subtle); }
.group__row--danger { color: var(--danger) !important; }
button.group__row > span:first-child, a.group__row > span:first-child { color: inherit; font-size: inherit; }
.group__row--danger svg { color: currentColor; opacity: 0.6; }
.group__note { padding: 0 var(--space-2); font-size: var(--text-small); color: var(--text-subtle); }
.callout { display: grid; gap: var(--space-3); padding: 1.125rem 1.25rem; border-radius: var(--radius-lg); background: var(--amber-100); color: var(--amber-700); }
.callout p { font-size: 0.9375rem; }
.callout .btn { justify-self: start; }
.callout--teal { background: var(--teal-100); color: var(--teal-900); }

/* Sign in */
.signin { width: 100%; max-width: 28rem; margin: 0 auto; display: grid; gap: var(--space-5); padding-top: var(--space-6); }
.signin .q-title { font-size: clamp(2rem, 1.6rem + 2vw, 2.75rem); }
.signin .btn { width: 100%; min-height: 3.5rem; }
.code-input { letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }

/* ---- Membership ID viewer ---------------------------------------------- */
.idview { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; overflow: hidden; }
.idview[hidden] { display: none !important; }
.idview__scrim { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 0%, rgb(22 36 47 / 0.94), rgb(8 15 21 / 0.98)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity 320ms ease; }
.idview.is-open .idview__scrim { opacity: 1; }
.idview__close { position: absolute; z-index: 3; top: max(14px, env(safe-area-inset-top)); right: 14px; color: #fff; }
@media (hover: hover) { .idview__close:hover { background: rgb(255 255 255 / 0.1); } }
.idview__close:active { background: rgb(255 255 255 / 0.16); }
.idview__hang { position: relative; z-index: 2; display: grid; justify-items: center; transform-origin: 50% -40vh; will-change: transform; }
.idview__strap { width: 40px; height: 42vh; margin-top: -40vh; border-radius: 0 0 6px 6px; background: linear-gradient(90deg, #0a121a, #1a2a36 50%, #0a121a); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.05); }
.idview__strap::after { content: ""; display: block; width: 14px; height: 14px; margin: calc(42vh - 30px) auto 0; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #9aa4ab 60%, #5b666e); }
.idview__clip { width: 26px; height: 38px; margin: -2px 0 -14px; border: 4px solid #b9c2c8; border-radius: 13px 13px 6px 6px; position: relative; z-index: 3; box-shadow: 0 4px 10px rgb(0 0 0 / 0.35); }
.idview .hc-card { --w: min(320px, 76vw, calc((100dvh - 210px) * 0.64)); cursor: pointer; }
.idview__card { border: 0; padding: 0; background: none; border-radius: 6.5cqw; -webkit-tap-highlight-color: transparent; }
.idview__card:focus-visible { outline: 2px solid var(--teal-400); outline-offset: 6px; }
.idview.is-open .idview__hint { position: absolute; z-index: 2; left: 0; right: 0; bottom: max(24px, env(safe-area-inset-bottom)); text-align: center; color: rgb(255 255 255 / 0.66); font: 500 0.875rem/1.3 var(--font-display); opacity: 0; transform: translateY(8px); transition: opacity 400ms 500ms ease, transform 600ms 500ms var(--hc-ease); }
.idview.is-open .idview__hint { opacity: 1; transform: none; }

/* ---- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hc-toast, .hc-toast.is-in { transition: opacity 200ms ease; transform: none; }
  .photo-drop__cta span:first-child { animation: none; }
  .disclose::details-content, .disclose__chev { transition: none; }
  .hc-card__photo.is-new { animation: hc-fade 300ms ease both; }
  .hc-sheet, .hc-sheet[open] { transform: none; transition: opacity 200ms ease, overlay 200ms allow-discrete, display 200ms allow-discrete; }
  .is-shake { animation: none; }
}
@keyframes hc-fade { from { opacity: 0; } }
