/* ============================================================================
   BabyArgus — design tokens
   Colour values are lifted verbatim from argus.world's own `.dark` CSS custom
   properties so the token sits inside the pad's visual system rather than
   beside it. Iris/sclera come from the Argus logo SVG.
   ========================================================================== */

:root {
  --bg: #08060c;
  --card: #100e16;
  --raised: #211d29;
  --fg: #f5f4f8;
  --muted: #a09ca9;
  --border: #ffffff17;
  --input: #ffffff21;

  --primary: #8347e9;
  --primary-hover: #9362f4;
  --primary-edge: #6b23ca;
  --ring: #ab80ff;
  --iris: #5d13fb;
  --sclera: #faf9fe;

  --gold: #f4c352;
  --success: #00d379;
  --danger: #ff6367;

  --radius: 12px;
  --radius-lg: 20px;
  --page: clamp(1rem, 5vw, 2.5rem);
  --maxw: 68rem;
  --btn-shadow: inset 0 1px 0 0 #ffffff42;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: clamp(1.375rem, 1.1rem + 1.4vw, 1.875rem);
  --step-3: clamp(1.75rem, 1.2rem + 2.8vw, 2.75rem);

  color-scheme: dark;
}

/* ── base ────────────────────────────────────────────────────────────── */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ring);
  text-decoration-color: color-mix(in srgb, var(--ring) 40%, transparent);
  text-underline-offset: 3px;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 99;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip:focus {
  left: 0;
}

.mono {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

/* ── header ──────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem var(--page);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 0.5rem;
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: block;
  flex: none;
}
.mark-eye {
  width: 100%;
  height: 100%;
  display: block;
}
.mark-lid {
  transform-origin: 50% 50%;
  transform: scaleY(0);
  transition: transform 90ms ease;
}
.mark-eye.is-blinking .mark-lid {
  transform: scaleY(1);
}

.brand-word {
  font-size: var(--step-1);
}
.brand-word.small {
  font-size: var(--step-0);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 500;
  padding: 0.5rem 0.625rem;
  border-radius: 10px;
  transition: color 140ms ease, background-color 140ms ease;
}
.header-nav a:hover {
  color: var(--fg);
  background: var(--raised);
}
.header-nav .ext span {
  margin-left: 0.2em;
  opacity: 0.6;
}

/* ── socials ─────────────────────────────────────────────────────────── */

.socials {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.social {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--muted);
  border-radius: 10px;
  transition: color 140ms ease, background-color 140ms ease;
}
.social svg {
  width: 17px;
  height: 17px;
  display: block;
}
.social:hover {
  color: var(--fg);
  background: var(--raised);
}

.socials-lg {
  justify-content: center;
  margin-bottom: 0.5rem;
}
.socials-lg .social {
  color: var(--ring);
  border: 1px solid var(--border);
  background: var(--card);
}
.socials-lg .social:hover {
  background: var(--raised);
  border-color: var(--input);
  color: var(--fg);
}
.socials-lg svg {
  width: 19px;
  height: 19px;
}

/* ── pre-launch alert ────────────────────────────────────────────────── */

.alert {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  padding: 0.75rem var(--page);
  font-size: var(--step--1);
  color: color-mix(in srgb, var(--gold) 88%, #fff);
  background: color-mix(in srgb, var(--gold) 10%, var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 26%, transparent);
}
.alert span {
  color: color-mix(in srgb, var(--gold) 62%, var(--fg));
}

/* once the token is real the banner stops warning and starts publishing the address */
.alert.alert-live {
  color: color-mix(in srgb, var(--success) 88%, #fff);
  background: color-mix(in srgb, var(--success) 9%, var(--bg));
  border-bottom-color: color-mix(in srgb, var(--success) 26%, transparent);
}
.alert.alert-live span {
  color: color-mix(in srgb, var(--success) 55%, var(--fg));
}
.alert.alert-live a {
  color: color-mix(in srgb, var(--success) 92%, #fff);
  text-decoration-color: color-mix(in srgb, var(--success) 45%, transparent);
  word-break: break-all;
}

/* ── contract address ────────────────────────────────────────────────── */

.ca-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}
.ca-row .mono {
  flex: 1;
  min-width: 0;
}
.ca-copy {
  flex: none;
  min-height: 0;
  padding-inline: 0.9rem;
  font-size: var(--step--1);
}

.ca-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0.75rem 0 0;
  font-size: var(--step--1);
}

.ca-parent {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.ca-parent h4 {
  margin: 0 0 0.6rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--muted);
}
.ca-parent h4 b {
  color: var(--ring);
}
.ca-parent-tag {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: color-mix(in srgb, var(--muted) 78%, var(--bg));
}
.ca-parent .mono {
  margin: 0;
  font-size: var(--step--1);
  color: var(--muted);
  padding: 0.7rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.badge-draft.is-locked {
  border-style: solid;
  border-color: color-mix(in srgb, var(--success) 45%, transparent);
  color: color-mix(in srgb, var(--success) 85%, #fff);
  background: color-mix(in srgb, var(--success) 8%, transparent);
}

/* ── layout ──────────────────────────────────────────────────────────── */

.section {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3rem, 9vw, 5.5rem) var(--page);
  border-top: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.32px;
  text-transform: uppercase;
  color: var(--muted);
}

.h2 {
  margin: 0 0 0.75rem;
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-lede {
  margin: 0 0 2rem;
  max-width: 44ch;
  color: var(--muted);
}

/* ── hero ────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 8vw, 5rem) var(--page) clamp(3rem, 8vw, 5rem);
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 -40% 0;
  height: 70%;
  background: radial-gradient(60% 60% at 50% 40%, color-mix(in srgb, var(--primary) 26%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.eye-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.eye-field svg {
  position: absolute;
  opacity: 0.32;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin-inline: auto;
  text-align: center;
}

.display {
  margin: 0 0 1rem;
  font-size: var(--step-3);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.display .hl {
  display: block;
  color: transparent;
  background: linear-gradient(100deg, var(--ring), var(--primary) 60%, var(--iris));
  -webkit-background-clip: text;
  background-clip: text;
}

.lede {
  margin: 0 auto 2rem;
  max-width: 46ch;
  color: var(--muted);
  text-wrap: pretty;
}
.lede strong {
  color: var(--fg);
  font-weight: 600;
}

.hero-art {
  margin: 0 auto 1.75rem;
  width: min(72vw, 340px);
  filter: drop-shadow(0 24px 60px color-mix(in srgb, var(--primary) 45%, transparent));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  font-size: var(--step--1);
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.chip b {
  color: var(--fg);
  font-weight: 600;
}
.chip-ticker {
  color: var(--ring);
  font-weight: 700;
  letter-spacing: 0.02em;
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  background: color-mix(in srgb, var(--primary) 14%, var(--bg));
}

/* ── buttons ─────────────────────────────────────────────────────────── */

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: 22rem;
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: var(--step-0);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, transform 100ms ease, border-color 140ms ease;
}
.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--btn-shadow);
  border-color: var(--primary-edge);
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-ghost {
  background: var(--card);
  color: var(--fg);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--raised);
  border-color: var(--input);
}

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

.cta-note {
  margin: 1rem auto 0;
  max-width: 34ch;
  font-size: var(--step--1);
  color: var(--muted);
}

/* ── myth beats ──────────────────────────────────────────────────────── */

.beats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.beats li {
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.beats h3 {
  margin: 0.75rem 0 0.4rem;
  font-size: var(--step-1);
  font-weight: 650;
  letter-spacing: -0.02em;
}
.beats p {
  margin: 0;
  color: var(--muted);
  font-size: var(--step--1);
}
.beat-eye {
  display: block;
  width: 42px;
  height: 42px;
}

/* ── rates + flow ────────────────────────────────────────────────────── */

.badge-draft {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.75rem;
  font-size: var(--step--1);
  font-weight: 500;
  border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--gold) 45%, transparent);
  color: color-mix(in srgb, var(--gold) 85%, #fff);
  background: color-mix(in srgb, var(--gold) 8%, transparent);
}

.rates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.rate {
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.rate dt {
  font-size: var(--step--1);
  color: var(--muted);
}
.rate dd {
  margin: 0.15rem 0 0;
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.card {
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.card-title {
  margin: 0 0 1rem;
  font-size: var(--step-1);
  font-weight: 650;
  letter-spacing: -0.02em;
}
.card-title b {
  color: var(--ring);
}
.card-foot {
  margin: 1rem 0 0;
  font-size: var(--step--1);
  color: var(--muted);
}

.flow-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
}
.flow-row:first-child {
  border-top: 0;
}
.flow-row .lbl {
  font-weight: 550;
}
.flow-row .note {
  display: block;
  font-size: var(--step--1);
  color: var(--muted);
  font-weight: 400;
}
.flow-row .amt {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
}
.flow-row .pct {
  font-size: var(--step--1);
  color: var(--muted);
  margin-left: 0.4rem;
  font-weight: 400;
}
.flow-bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 3px;
  background: var(--raised);
  overflow: hidden;
}
.flow-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--primary);
}
.flow-row.is-pad .flow-bar i {
  background: var(--muted);
}
.flow-row.is-pad {
  color: var(--muted);
}

/* a zero allocation is real information, so it stays visible and reads as "off"
   rather than being hidden and quietly misleading the reader */
.flow-row.is-zero .lbl,
.flow-row.is-zero .amt {
  color: color-mix(in srgb, var(--muted) 85%, var(--bg));
}
.flow-row.is-zero .flow-bar {
  background: repeating-linear-gradient(
    -45deg,
    var(--raised) 0 6px,
    transparent 6px 12px
  );
}

.headline-stat {
  margin: 1.25rem 0 0;
  padding: 0.85rem 1rem;
  font-size: var(--step-0);
  color: var(--muted);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent);
  border-radius: var(--radius);
}
.headline-stat b {
  color: var(--ring);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── facts ───────────────────────────────────────────────────────────── */

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.fact {
  padding: 1.1rem 1.1rem 1.1rem 2.6rem;
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.fact::before {
  content: '';
  position: absolute;
  left: 1.1rem;
  top: 1.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.fact.good::before {
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 18%, transparent);
}
.fact.warn::before {
  background: var(--gold);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent);
}
.fact h3 {
  margin: 0 0 0.3rem;
  font-size: var(--step-0);
  font-weight: 650;
  letter-spacing: -0.015em;
}
.fact p {
  margin: 0;
  font-size: var(--step--1);
  color: var(--muted);
}

/* ── steps ───────────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
}
.step-n {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--ring);
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
}
.steps h3 {
  margin: 0.25rem 0 0.3rem;
  font-size: var(--step-0);
  font-weight: 650;
}
.steps p {
  margin: 0 0 0.4rem;
  font-size: var(--step--1);
  color: var(--muted);
}
.inline-link {
  font-size: var(--step--1);
}

.contract-card .mono {
  margin: 0;
  font-size: var(--step--1);
  color: var(--muted);
  padding: 0.7rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* ── footer ──────────────────────────────────────────────────────────── */

.site-footer {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 2.5rem var(--page) 3.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.site-footer p {
  margin: 0.4rem 0 1.25rem;
  color: var(--muted);
  font-size: var(--step--1);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  margin-bottom: 1.5rem;
}
/* pad these out to a thumb-sized target rather than leaving 21px of text */
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.5rem;
  font-size: var(--step--1);
}
.fine {
  max-width: 52ch;
  margin-inline: auto !important;
  font-size: 12px;
  color: color-mix(in srgb, var(--muted) 72%, var(--bg));
  line-height: 1.5;
}

/* ── dreams ──────────────────────────────────────────────────────────── */

.dreams {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.dream {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.dream img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
}
.dream h3 {
  margin: 0 0 0.2rem;
  font-size: var(--step-0);
  font-weight: 650;
  letter-spacing: -0.015em;
}
.dream p {
  margin: 0 0 0.5rem;
  font-size: var(--step--1);
  color: var(--muted);
  text-wrap: pretty;
}

.dream-status {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: var(--muted);
}
.dream-status.s-ruled-out {
  color: color-mix(in srgb, var(--danger) 80%, #fff);
}
.dream-status.s-ongoing {
  color: color-mix(in srgb, var(--success) 78%, #fff);
}
.dream-status.s-permanent {
  color: color-mix(in srgb, var(--ring) 90%, #fff);
}
.dream-status.s-undecided {
  color: color-mix(in srgb, var(--gold) 85%, #fff);
}

.dreams-foot {
  margin: 1.5rem 0 0;
  max-width: 54ch;
  font-size: var(--step--1);
  color: var(--muted);
}
.dreams-foot b {
  color: var(--fg);
  font-weight: 600;
}
.dreams-foot .inline-link {
  display: inline-block;
  margin-left: 0.25rem;
}

/* ── meme maker ──────────────────────────────────────────────────────── */

.section-tight {
  border-top: 0;
  padding-top: clamp(2rem, 6vw, 3rem);
}

.maker {
  display: grid;
  gap: 1.5rem;
}

.stage canvas {
  display: block;
  width: 100%;
  height: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.stage-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0.6rem 0 0;
  font-size: var(--step--1);
  color: var(--muted);
}
.stage-meta .dims {
  flex: none;
  /* no opacity here: dimming --muted any further drops this below the 4.5:1
     contrast floor, which axe flags as a serious violation */
}

.controls {
  display: grid;
  gap: 1.1rem;
  align-content: start;
}

.ctl {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.ctl legend,
.ctl label {
  padding: 0;
  font-size: var(--step--1);
  font-weight: 550;
  color: var(--muted);
}
.lbl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mini {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ring);
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 38%, transparent);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: background-color 140ms ease;
}
.mini:hover {
  background: color-mix(in srgb, var(--primary) 28%, transparent);
}

.ctl input[type='text'] {
  width: 100%;
  min-height: 48px;
  padding: 0 0.85rem;
  font: inherit;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--input);
  border-radius: var(--radius);
  transition: border-color 140ms ease;
}
.ctl input[type='text']::placeholder {
  color: color-mix(in srgb, var(--muted) 70%, var(--bg));
}
.ctl input[type='text']:focus {
  border-color: var(--primary);
}

.ctl input[type='range'] {
  width: 100%;
  accent-color: var(--primary);
  height: 32px;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step--1);
  color: var(--muted);
  cursor: pointer;
}
.check {
  min-height: 44px;
}
.check input {
  /* 24px is the WCAG 2.2 target-size floor; 18px was under it */
  width: 24px;
  height: 24px;
  accent-color: var(--primary);
  flex: none;
}

/* Download is the primary action, so it gets its own full-width row. Squeezing it
   beside the others truncated the label to "PNG" in a narrow sidebar. */
.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.btn-row .btn {
  min-width: 0;
  white-space: nowrap;
}
.btn-row .btn-wide {
  grid-column: 1 / -1;
}

/* ── template picker ─────────────────────────────────────────────────── */

.picker {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 5.5rem;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--raised) transparent;
}

.thumb {
  scroll-snap-align: start;
  display: grid;
  gap: 0.3rem;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-align: center;
}
.thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--border);
  transition: border-color 140ms ease, transform 120ms ease;
}
.thumb:hover img {
  transform: translateY(-2px);
  border-color: var(--input);
}
.thumb[aria-pressed='true'] img {
  border-color: var(--primary);
}
.thumb-name {
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted);
}
.thumb[aria-pressed='true'] .thumb-name {
  color: var(--fg);
}

/* ── stickers ────────────────────────────────────────────────────────── */

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.6rem;
}

.sticker {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  padding: 0.6rem 0.35rem 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 120ms ease;
}
.sticker:hover {
  background: var(--raised);
  border-color: var(--input);
  transform: translateY(-2px);
}
.sticker img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}
.sticker-name {
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
}
.sticker:hover .sticker-name {
  color: var(--fg);
}

/* ── file list ───────────────────────────────────────────────────────── */

.filelist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.filelist a {
  display: block;
  padding: 0.85rem 1rem;
  font-size: var(--step--1);
  color: var(--fg);
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background-color 140ms ease, border-color 140ms ease;
}
.filelist a::after {
  content: '↓';
  float: right;
  color: var(--ring);
}
.filelist a:hover {
  background: var(--raised);
  border-color: var(--input);
}

/* ── wider screens ───────────────────────────────────────────────────── */

@media (min-width: 720px) {
  .cta-row {
    flex-direction: row;
    justify-content: center;
    max-width: none;
  }
  .beats {
    grid-template-columns: repeat(3, 1fr);
  }
  .facts {
    grid-template-columns: 1fr 1fr;
  }
  .rates {
    grid-template-columns: repeat(4, 1fr);
  }
  .dreams {
    grid-template-columns: 1fr 1fr;
  }
  .hero-art {
    width: min(42vw, 400px);
  }
}

@media (min-width: 900px) {
  /* preview on the left, controls parked beside it so captions can be tweaked
     while watching the result, with no scrolling between the two */
  .maker {
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 2rem;
    align-items: start;
  }
  .picker {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(4, 1fr);
    overflow-x: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
