/* Tune Twin design system. Mobile first. Colours come from src/brand.ts. */

@font-face {
  font-family: 'Bricolage';
  src: url(/static/fonts/bricolage-latin-wght.a97804dc9f.woff2) format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url(/static/fonts/inter-latin-wght.3100e775e8.woff2) format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #0e0b1f;
  --surface: #17132e;
  --surface-2: #211b40;
  --line: #342c5e;
  --text: #f6f3ff;
  --muted: #b7b0d6;
  --violet: #7c4dff;
  --pink: #ff4d9d;
  --lime: #c8ff4d;
  --sky: #4dd8ff;
  --danger: #ff7a7a;
  --radius: 24px;
  --radius-sm: 16px;
  --pill: 999px;
  --display: 'Bricolage', 'Arial Black', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shell: 1120px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Mesh glow behind every page; heroes add their own stronger glow. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at 100% -10%, rgb(255 77 157 / 0.22), transparent 60%),
    radial-gradient(60vmax 45vmax at -10% 110%, rgb(124 77 255 / 0.28), transparent 60%);
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--lime);
  text-underline-offset: 3px;
}
a:hover {
  color: #e2ff9e;
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2.6rem, 11vw, 5.2rem);
  letter-spacing: -0.045em;
}
h2 {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
}
h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
p {
  margin: 0 0 1em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.75rem 1rem;
  border-radius: var(--pill);
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
}
.skip-link:focus {
  top: 1rem;
}

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}
.narrow {
  max-width: 720px;
  margin-inline: auto;
}

main {
  flex: 1;
  padding-block: 1.5rem 4rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(14 11 31 / 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
  text-transform: lowercase;
  min-height: 44px;
}
.brand:hover {
  color: var(--text);
}
.brand svg {
  width: 34px;
  height: 34px;
  flex: none;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  border-radius: var(--pill);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--text);
  background: rgb(255 255 255 / 0.06);
}
.nav .nav-extra {
  display: none;
}
@media (min-width: 720px) {
  .nav .nav-extra {
    display: inline-flex;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid rgb(255 255 255 / 0.06);
  padding-block: 2rem 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner {
  display: grid;
  gap: 1rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--text);
}
@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

/* Type helpers */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: var(--lime);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lede {
  font-size: clamp(1.1rem, 4.2vw, 1.3rem);
  color: var(--muted);
  max-width: 38ch;
}
.muted {
  color: var(--muted);
}
.fine {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}
.gradient-text {
  background: linear-gradient(95deg, var(--pink), var(--violet) 45%, var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-link {
  font-weight: 600;
}

/* Buttons */
.button {
  --bg: transparent;
  --fg: var(--text);
  --bd: rgb(255 255 255 / 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border: 2px solid var(--bd);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--fg);
  font: 700 1rem/1.1 var(--body);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.15s var(--ease),
    background-color 0.15s,
    border-color 0.15s;
}
.button:hover {
  color: var(--fg);
  border-color: var(--text);
}
.button:active {
  transform: scale(0.97);
}
.button.primary,
button.button:not(.secondary, .ghost, .danger) {
  --bg: var(--lime);
  --fg: var(--ink);
  --bd: var(--lime);
}
.button.primary:hover,
button.button:not(.secondary, .ghost, .danger):hover {
  --bg: #d9ff7f;
  --bd: #d9ff7f;
}
.button.ghost {
  --bd: transparent;
  --fg: var(--muted);
  padding-inline: 0.9rem;
}
.button.ghost:hover {
  --fg: var(--text);
  --bg: rgb(255 255 255 / 0.06);
}
.button.danger {
  --bd: var(--danger);
  --fg: var(--danger);
}
.button.big {
  min-height: 58px;
  padding-inline: 1.8rem;
  font-size: 1.1rem;
}
.button.block {
  width: 100%;
}
.button[hidden] {
  display: none;
}
.button svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Cards */
.card {
  position: relative;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.035), transparent 60%), var(--surface);
  border: 1px solid rgb(255 255 255 / 0.07);
  border-radius: var(--radius);
  padding: 1.4rem;
}
@media (min-width: 720px) {
  .card {
    padding: 2rem;
  }
}
.stack {
  display: grid;
  gap: 1rem;
}
.section {
  margin-block: 3.5rem;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
}
.section-head h2 {
  margin: 0;
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--pill);
  background: var(--surface-2);
  border: 1px solid rgb(255 255 255 / 0.08);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}
.chip.pink {
  background: rgb(255 77 157 / 0.16);
  border-color: rgb(255 77 157 / 0.45);
}
.chip.lime {
  background: rgb(200 255 77 / 0.14);
  border-color: rgb(200 255 77 / 0.45);
}
.chip.sky {
  background: rgb(77 216 255 / 0.13);
  border-color: rgb(77 216 255 / 0.4);
}
.chip.violet {
  background: rgb(124 77 255 / 0.22);
  border-color: rgb(124 77 255 / 0.6);
}
.chip-label {
  display: block;
  margin: 1rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Alerts */
.alert {
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin: 0 0 1.25rem;
  border: 1px solid;
  font-weight: 500;
}
.alert.error {
  border-color: rgb(255 122 122 / 0.5);
  background: rgb(255 122 122 / 0.1);
}
.alert.success {
  border-color: rgb(200 255 77 / 0.45);
  background: rgb(200 255 77 / 0.08);
}
.alert.info {
  border-color: rgb(77 216 255 / 0.4);
  background: rgb(77 216 255 / 0.08);
}
.alert p:last-child {
  margin: 0;
}
.dev-badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--pill);
  background: #ffcf33;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

/* Forms */
.form {
  display: grid;
  gap: 1.1rem;
}
label,
legend {
  font-weight: 650;
}
.field {
  display: grid;
  gap: 0.45rem;
}
.hint {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}
input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  background: var(--ink);
  color: var(--text);
  font: 500 1rem var(--body);
}
input::placeholder {
  color: #8c84b3;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgb(200 255 77 / 0.18);
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
legend {
  padding: 0;
  margin-bottom: 0.6rem;
}
.field-inline {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.field-inline > span {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--lime);
  font-family: var(--display);
  font-weight: 800;
}
.two-col {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}
.checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
}
.checkbox input {
  width: 24px;
  min-height: 24px;
  height: 24px;
  margin: 0.1rem 0 0;
  accent-color: var(--lime);
}
.inline-controls {
  display: flex;
  gap: 0.5rem;
}
.inline-controls input {
  flex: 1;
  min-width: 0;
}
.private-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--lime);
}

/* Paste box */
.paste {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: calc(var(--radius) + 4px);
  background: rgb(255 255 255 / 0.05);
  border: 1px solid rgb(255 255 255 / 0.1);
}
.paste input {
  min-height: 58px;
  font-size: 1.05rem;
  border-radius: var(--radius);
}
@media (min-width: 720px) {
  .paste {
    grid-template-columns: 1fr auto;
  }
}
.paste-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: center;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Segmented contact buttons */
.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
@media (min-width: 640px) {
  .segmented {
    grid-template-columns: repeat(4, 1fr);
  }
}
.segmented input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.segmented label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 84px;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  background: var(--ink);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s,
    transform 0.15s var(--ease);
}
.segmented label svg {
  width: 28px;
  height: 28px;
}
.segmented input:checked + label {
  border-color: var(--lime);
  color: var(--text);
  background: rgb(200 255 77 / 0.08);
}
.segmented input:focus-visible + label {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

/* Steps (form progress) */
.steps {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  counter-reset: step;
}
.steps li {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 650;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  flex: none;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--surface-2);
  font-family: var(--display);
}
.form-section {
  display: grid;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.08);
}
.form-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.form-section > h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.5rem;
  margin: 0;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 1rem;
}

/* Hero */
.hero {
  position: relative;
  padding-block: 2rem 3rem;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero > * {
  min-width: 0;
}
@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    padding-block: 4rem 4.5rem;
  }
}
.hero h1 {
  margin-bottom: 0.35em;
}
.hero .lede {
  margin-bottom: 1.75rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.hero-art {
  position: relative;
  max-width: 420px;
  width: 100%;
  margin-inline: auto;
}
.hero-art::before {
  content: '';
  position: absolute;
  inset: -10% 0;
  z-index: -1;
  background:
    radial-gradient(closest-side at 30% 40%, rgb(255 77 157 / 0.5), transparent),
    radial-gradient(closest-side at 70% 65%, rgb(124 77 255 / 0.55), transparent);
  filter: blur(20px);
}
@media (min-width: 720px) {
  .hero-art::before {
    inset: -12% -8%;
  }
}
.example-tag {
  position: absolute;
  top: -0.8rem;
  right: 1rem;
  z-index: 2;
  padding: 0.3rem 0.75rem;
  border-radius: var(--pill);
  background: var(--text);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (min-width: 720px) {
  .tilt {
    transform: rotate(-2deg);
  }
}
.welcome-back {
  margin: 0.5rem 0 0;
}

/* Strips */
.how-strip {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: how;
}
@media (min-width: 840px) {
  .how-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}
.how-strip li {
  counter-increment: how;
}
.how-strip .card {
  height: 100%;
}
.how-strip .card::before {
  content: counter(how);
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
}
.how-strip li:nth-child(2) .card::before {
  background: var(--pink);
}
.how-strip li:nth-child(3) .card::before {
  background: var(--sky);
}
.how-strip h3 {
  font-size: 1.35rem;
}
.how-strip p {
  color: var(--muted);
  margin: 0;
}
.trust {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 720px) {
  .trust {
    grid-template-columns: repeat(3, 1fr);
  }
}
.trust li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 0.04);
  border: 1px solid rgb(255 255 255 / 0.07);
  font-weight: 650;
}
.trust svg {
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--lime);
}

/* FAQ accordions */
.faq {
  display: grid;
  gap: 0.75rem;
}
.faq details {
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid rgb(255 255 255 / 0.07);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding: 1rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--lime);
  font-size: 1.3rem;
  transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details > div {
  padding: 0 1.2rem 1.2rem;
  color: var(--muted);
}
.faq details > div p:last-child {
  margin: 0;
}

/* Prose pages */
.prose h2 {
  font-size: 1.6rem;
  margin-top: 2.2rem;
}
.prose ul,
.prose ol {
  padding-left: 1.2rem;
}
.prose li {
  margin-bottom: 0.5rem;
}
.prose li::marker {
  color: var(--lime);
}
.page-head {
  padding-block: 1.5rem 1rem;
}

/* Phone mockups for the guide (drawn, no screenshots) */
.guide-steps {
  display: grid;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 720px) {
  .guide-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1040px) {
  .guide-steps.four {
    grid-template-columns: repeat(4, 1fr);
  }
}
.guide-step {
  display: grid;
  gap: 1rem;
  align-content: start;
}
.guide-step h2,
.guide-step h3 {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  font-size: 1.15rem;
  margin: 0;
}
.guide-step p {
  margin: 0;
  color: var(--muted);
}
.phone {
  position: relative;
  width: 150px;
  height: 260px;
  margin-inline: auto;
  padding: 10px;
  border-radius: 28px;
  background: #050410;
  border: 2px solid #3a3266;
  box-shadow: 0 20px 40px -18px rgb(124 77 255 / 0.6);
}
.phone::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  width: 46px;
  height: 7px;
  border-radius: 6px;
  background: #1c1838;
  transform: translateX(-50%);
  z-index: 2;
}
.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 19px;
  overflow: hidden;
  padding: 22px 10px 10px;
  display: grid;
  align-content: start;
  gap: 6px;
  background: linear-gradient(160deg, #2a1f5c, #12102a);
}
.ph-bar {
  height: 7px;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.22);
}
.ph-bar.short {
  width: 55%;
}
.ph-bar.mid {
  width: 75%;
}
.ph-title {
  height: 12px;
  width: 70%;
  border-radius: 4px;
  background: var(--text);
  margin-bottom: 4px;
}
.ph-tile {
  height: 54px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
}
.ph-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ph-grid span {
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.08);
}
.ph-grid span i {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: rgb(255 255 255 / 0.35);
}
.ph-dots {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin-bottom: 4px;
}
.ph-dots i {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.3);
}
.ph-dots i.on {
  background: var(--text);
}
.ph-badge {
  justify-self: center;
  padding: 3px 8px;
  border-radius: var(--pill);
  background: var(--lime);
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.ph-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 6px;
  padding: 12px 10px 14px;
  border-radius: 16px 16px 0 0;
  background: #f6f3ff;
}
.ph-sheet .ph-bar {
  background: #cfc8ee;
}
.ph-sheet .ph-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  background: rgb(200 255 77 / 0.9);
}
.ph-share {
  justify-self: end;
  margin-top: auto;
  padding: 4px 10px;
  border-radius: var(--pill);
  background: var(--text);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}
.ph-tap {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--lime);
  background: rgb(200 255 77 / 0.25);
  z-index: 3;
}
.ph-paste {
  margin-top: 10px;
  padding: 8px;
  border-radius: 8px;
  border: 2px dashed var(--lime);
  color: var(--lime);
  font-size: 9px;
  font-weight: 700;
  word-break: break-all;
}
.ph-go {
  justify-self: stretch;
  padding: 6px;
  border-radius: var(--pill);
  background: var(--lime);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.do-dont {
  display: grid;
  gap: 1rem;
}
.guide-steps + .do-dont {
  margin-top: 2rem;
}
@media (min-width: 720px) {
  .do-dont {
    grid-template-columns: 1fr 1fr;
  }
}
.do-dont .card {
  padding: 1.25rem 1.4rem;
}
.do-dont h2,
.do-dont h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.do-dont ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}
.do {
  border-color: rgb(200 255 77 / 0.4);
}
.dont {
  border-color: rgb(255 122 122 / 0.4);
}

/* Dialog */
dialog {
  width: min(100% - 1.5rem, 760px);
  max-height: min(90vh, 900px);
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
dialog::backdrop {
  background: rgb(5 4 16 / 0.75);
  backdrop-filter: blur(4px);
}
.dialog-body {
  padding: 1.5rem;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}
.dialog-close {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

/* Loading overlay after submitting a link */
.scanning {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  align-content: center;
  gap: 1rem;
  background: rgb(14 11 31 / 0.92);
  text-align: center;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
}
.scanning.on {
  display: grid;
}

/* Equalizer */
.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.eq i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  transform-origin: bottom;
}
.eq i:nth-child(1) {
  transform: scaleY(0.5);
}
.eq i:nth-child(2) {
  transform: scaleY(1);
}
.eq i:nth-child(3) {
  transform: scaleY(0.7);
}

/* Radar (empty state) */
.radar {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 30%, rgb(200 255 77 / 0.18) 31%, transparent 32%),
    radial-gradient(circle, transparent 55%, rgb(200 255 77 / 0.18) 56%, transparent 57%),
    radial-gradient(circle, rgb(124 77 255 / 0.25), transparent 70%);
  border: 2px solid rgb(200 255 77 / 0.35);
  overflow: hidden;
}
.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgb(200 255 77 / 0.55), transparent 25%);
}
.radar-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 12px var(--pink);
  opacity: 0.85;
}
.radar-dot.d1 {
  top: 28%;
  left: 62%;
}
.radar-dot.d2 {
  top: 64%;
  left: 30%;
  background: var(--sky);
  box-shadow: 0 0 12px var(--sky);
}
.radar-dot.d3 {
  top: 70%;
  left: 70%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
}

.empty-state {
  text-align: center;
  padding-block: 2.5rem;
  overflow: hidden;
}
.empty-state > p {
  max-width: 46ch;
  margin-inline: auto;
  color: var(--muted);
}
.save-link {
  max-width: 520px;
  margin: 2rem auto 0;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  text-align: left;
}
.save-link h3 {
  margin-bottom: 0.25rem;
}
.save-link p {
  margin: 0.5rem 0 0.75rem;
}

/* Invite panel */
.invite {
  display: grid;
  gap: 1rem;
  margin-block: 2rem;
  background:
    radial-gradient(120% 140% at 100% 0%, rgb(255 77 157 / 0.25), transparent 55%),
    radial-gradient(120% 140% at 0% 100%, rgb(124 77 255 / 0.3), transparent 55%), var(--surface);
}
.invite h2 {
  margin-bottom: 0.25rem;
}
.invite p {
  margin: 0;
}
.invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.invite-actions .button {
  flex: 1 1 auto;
}
@media (min-width: 720px) {
  .invite-actions .button {
    flex: 0 0 auto;
  }
}

/* Dashboard */
.dash-head {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (min-width: 960px) {
  .dash-head:has(.notice-card) {
    grid-template-columns: 1fr 1fr;
  }
}
.taste {
  display: grid;
  gap: 1rem;
  overflow: hidden;
  background:
    radial-gradient(80% 120% at 100% 0%, rgb(255 77 157 / 0.32), transparent 60%),
    radial-gradient(80% 120% at 0% 100%, rgb(124 77 255 / 0.4), transparent 60%), var(--surface);
}
.taste-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.taste-top h1 {
  font-size: clamp(2.2rem, 9vw, 3.6rem);
  margin: 0;
}
.taste .avatar {
  width: 72px;
  height: 72px;
}
.taste-artists {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
  counter-reset: art;
}
.taste-artists li {
  counter-increment: art;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.15rem, 4.5vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.taste-artists li::before {
  content: counter(art);
  display: inline-block;
  width: 1.6em;
  color: var(--lime);
}
.notice-card {
  display: grid;
  gap: 0.75rem;
  border-color: rgb(77 216 255 / 0.35);
}
.notice-card ol {
  margin: 0;
  padding-left: 1.2rem;
}
.notice-card li {
  margin-bottom: 0.35rem;
}
.safety-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.safety-note {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 0.04);
  border: 1px solid rgb(255 255 255 / 0.08);
  margin-bottom: 1.25rem;
}
.safety-note svg {
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--sky);
  margin-top: 2px;
}

.matches {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 900px) {
  .matches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .matches > li:first-child {
    grid-column: 1 / -1;
  }
}
.match {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  height: 100%;
  align-content: start;
}
.match.top {
  border-color: rgb(200 255 77 / 0.35);
  background:
    radial-gradient(90% 120% at 100% 0%, rgb(200 255 77 / 0.12), transparent 60%),
    radial-gradient(90% 120% at 0% 100%, rgb(255 77 157 / 0.18), transparent 60%), var(--surface);
}
.match-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
}
.match-name {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-size: 1.4rem;
  overflow-wrap: anywhere;
}
.avatar {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
}
.label-chip {
  display: inline-flex;
  white-space: nowrap;
  padding: 0.2rem 0.7rem;
  border-radius: var(--pill);
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--surface-2);
  color: var(--muted);
}
.label-chip.twin {
  background: var(--lime);
  color: var(--ink);
}
.label-chip.wavelength {
  background: var(--pink);
  color: var(--ink);
}
.label-chip.cousin {
  background: var(--sky);
  color: var(--ink);
}

/* Score ring: the value circle uses pathLength=100 and a stroke-dashoffset attribute */
.ring {
  --size: 84px;
  position: relative;
  width: var(--size);
  height: var(--size);
  flex: none;
}
.match.top .ring {
  --size: 92px;
}
@media (min-width: 720px) {
  .match.top .ring {
    --size: 110px;
  }
}
.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring circle {
  fill: none;
  stroke-width: 9;
}
.ring .track {
  stroke: rgb(255 255 255 / 0.1);
}
.ring .value {
  stroke: var(--lime);
  stroke-linecap: round;
  stroke-dasharray: 100 100;
}
.ring.wavelength .value {
  stroke: var(--pink);
}
.ring.cousin .value {
  stroke: var(--sky);
}
.ring-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: calc(var(--size) * 0.3);
  letter-spacing: -0.04em;
}
.ring-num small {
  font-size: 0.45em;
  margin-left: 1px;
  vertical-align: 0.6em;
}

.matches > li,
.match {
  min-width: 0;
}
.contact-button {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.contact-button {
  justify-content: flex-start;
  border-radius: var(--radius-sm);
  padding-block: 0.55rem;
}
.contact-button span {
  display: grid;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
}
.contact-button small {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}
.match-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.overflow {
  position: relative;
  flex: none;
}
.overflow > summary {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  font-size: 1.4rem;
  line-height: 1;
}
.overflow > summary::-webkit-details-marker {
  display: none;
}
.overflow > summary:hover {
  background: rgb(255 255 255 / 0.07);
  color: var(--text);
}
.overflow[open] > summary {
  background: rgb(255 255 255 / 0.1);
}
.overflow-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.5rem);
  z-index: 10;
  width: min(300px, calc(100vw - 3rem));
  display: grid;
  gap: 0.75rem;
  box-shadow: 0 20px 40px -10px rgb(0 0 0 / 0.6);
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid rgb(255 255 255 / 0.1);
}
.overflow-panel form {
  display: grid;
  gap: 0.5rem;
}
.overflow-panel label {
  font-size: 0.9rem;
}

.settings > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  cursor: pointer;
  list-style: none;
}
.settings > summary::-webkit-details-marker {
  display: none;
}
.settings > summary h2 {
  margin: 0;
  font-size: 1.4rem;
}
.settings > summary::after {
  content: '+';
  font-size: 1.6rem;
  color: var(--lime);
}
.settings[open] > summary::after {
  content: '–';
}
.settings hr {
  border: 0;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  margin: 2rem 0;
}
.settings .form {
  margin-top: 1rem;
}

/* Confetti for 70+ reveals: spans positioned with CSS custom properties */
.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.confetti i {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: 0;
  background: var(--c, var(--lime));
}

/* Stagger and confetti positions without inline styles (CSP forbids them). */
.reveal:nth-child(2) {
  --i: 1;
}
.reveal:nth-child(3) {
  --i: 2;
}
.reveal:nth-child(4) {
  --i: 3;
}
.reveal:nth-child(5) {
  --i: 4;
}
.reveal:nth-child(6) {
  --i: 5;
}
.confetti i:nth-child(1) {
  --x: 101px;
  --y: 63px;
  --r: -217deg;
  --d: 137;
  --c: var(--pink);
}
.confetti i:nth-child(2) {
  --x: 128px;
  --y: 101px;
  --r: -199deg;
  --d: 22;
  --c: var(--sky);
}
.confetti i:nth-child(3) {
  --x: 51px;
  --y: 106px;
  --r: -462deg;
  --d: 108;
  --c: var(--violet);
}
.confetti i:nth-child(4) {
  --x: 50px;
  --y: 150px;
  --r: -502deg;
  --d: 160;
  --c: var(--text);
}
.confetti i:nth-child(5) {
  --x: -20px;
  --y: 115px;
  --r: 205deg;
  --d: 56;
  --c: var(--lime);
}
.confetti i:nth-child(6) {
  --x: -59px;
  --y: 173px;
  --r: 394deg;
  --d: 36;
  --c: var(--pink);
}
.confetti i:nth-child(7) {
  --x: -114px;
  --y: 114px;
  --r: -232deg;
  --d: 148;
  --c: var(--sky);
}
.confetti i:nth-child(8) {
  --x: -103px;
  --y: 67px;
  --r: -460deg;
  --d: 16;
  --c: var(--violet);
}
.confetti i:nth-child(9) {
  --x: -152px;
  --y: 37px;
  --r: 528deg;
  --d: 136;
  --c: var(--text);
}
.confetti i:nth-child(10) {
  --x: -115px;
  --y: 9px;
  --r: 365deg;
  --d: 76;
  --c: var(--lime);
}
.confetti i:nth-child(11) {
  --x: -89px;
  --y: -9px;
  --r: -221deg;
  --d: 147;
  --c: var(--pink);
}
.confetti i:nth-child(12) {
  --x: -79px;
  --y: -52px;
  --r: 409deg;
  --d: 73;
  --c: var(--sky);
}
.confetti i:nth-child(13) {
  --x: -13px;
  --y: -37px;
  --r: 264deg;
  --d: 87;
  --c: var(--violet);
}
.confetti i:nth-child(14) {
  --x: 5px;
  --y: -71px;
  --r: -522deg;
  --d: 19;
  --c: var(--text);
}
.confetti i:nth-child(15) {
  --x: 87px;
  --y: -55px;
  --r: 354deg;
  --d: 177;
  --c: var(--lime);
}
.confetti i:nth-child(16) {
  --x: 101px;
  --y: -37px;
  --r: 215deg;
  --d: 23;
  --c: var(--pink);
}
.confetti i:nth-child(17) {
  --x: 135px;
  --y: 21px;
  --r: -211deg;
  --d: 179;
  --c: var(--sky);
}
.confetti i:nth-child(18) {
  --x: 147px;
  --y: 31px;
  --r: 325deg;
  --d: 98;
  --c: var(--violet);
}

/* Error page */
.error-page {
  text-align: center;
  padding-block: 3rem;
}
.error-page .big-code {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(5rem, 30vw, 11rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  margin: 0 0 1rem;
}
.error-page .alert {
  max-width: 520px;
  margin-inline: auto;
}
.error-page .actions {
  justify-content: center;
  margin-top: 1.5rem;
}

/* ----- Motion (only when the user has not asked for less) ----- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise 0.6s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 90ms);
  }
  .radar-sweep {
    animation: spin 2.8s linear infinite;
  }
  .radar-dot {
    animation: blip 2.8s ease-in-out infinite;
  }
  .radar-dot.d2 {
    animation-delay: 0.9s;
  }
  .radar-dot.d3 {
    animation-delay: 1.8s;
  }
  .eq i {
    animation: eq 0.9s ease-in-out infinite alternate;
  }
  .eq i:nth-child(2) {
    animation-delay: -0.3s;
  }
  .eq i:nth-child(3) {
    animation-delay: -0.6s;
  }
  .eq-bar {
    transform-box: fill-box;
    transform-origin: center;
  }
  .brand:hover .eq-bar {
    animation: eq 0.5s ease-in-out infinite alternate;
  }
  .brand:hover .eq-bar:nth-child(5) {
    animation-delay: -0.2s;
  }
  .ring.animate .value {
    animation: ring-draw 1.1s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 90ms + 150ms);
  }
  .confetti.on i {
    animation: confetti 1.3s cubic-bezier(0.1, 0.7, 0.3, 1) forwards;
    animation-delay: calc(var(--d, 0) * 1ms + 400ms);
  }
  .skip-motion .reveal,
  .skip-motion .ring .value,
  .skip-motion .confetti i {
    animation: none !important;
  }
  .float {
    animation: float 6s ease-in-out infinite;
  }
  .scanning .eq {
    height: 40px;
    color: var(--lime);
  }
  .scanning .eq i {
    width: 8px;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes blip {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.6);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}
@keyframes eq {
  from {
    transform: scaleY(0.25);
  }
  to {
    transform: scaleY(1);
  }
}
@keyframes ring-draw {
  from {
    stroke-dashoffset: 100;
  }
}
@keyframes confetti {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(var(--x, 0), var(--y, 120px)) rotate(var(--r, 360deg));
  }
}
@keyframes float {
  0%,
  100% {
    transform: rotate(-2deg) translateY(0);
  }
  50% {
    transform: rotate(-1deg) translateY(-8px);
  }
}
.faq + p {
  margin-top: 1rem;
}
