/* ==========================================================================
   DateSpark stylesheet, direction E: calm flat product shell, earned fun.
   Layout grammar: paper-white / true-dark surfaces, hairline borders, 8px
   radii, monochrome neutrals. All color belongs to the four category hues
   (tints, edges, icon fills only, never body text). All motion is earned:
   press physics on real controls only, the Surprise reveal, milestone
   confetti, and progressive scroll-driven entrances. Content cards stay
   flat and quiet; nothing animates at rest.
   Fonts: Hanken Grotesk (UI), Source Serif 4 (idea titles + feature
   headlines), DM Mono (counts, badges, meta).
   Every text/surface pair is AA-verified in both modes (tools_contrast.py).
   ========================================================================== */

/* ---- Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-var.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-var.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/dm-mono-500.woff2") format("woff2");
}

/* ---- Tokens ---------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  /* contract tokens */
  --bg: #FBFAF7;
  --surface: #FFFFFF;
  --ink: #1C1B1A;
  --muted: #5D5A55;
  --accent: #1C1B1A;
  --accent-soft: #F1EFEA;
  --font-display: "Hanken Grotesk", "Avenir Next", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", "Avenir Next", system-ui, sans-serif;

  /* app tokens */
  --font-serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-mono: "DM Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --surface-2: #F1EFEA;
  --border: #E3E1DB;
  --btn-tx: #FFFFFF;
  --pill-count: #CFCCC6;
  --badge-tx: #514E48;
  --hard: #1C1B1A;
  --hard-soft: rgba(28, 27, 26, 0.12);

  /* the four owned category hues: edges, tints, icon fills only */
  --cat-romantic: #DE5B8C;
  --cat-fun: #F0A32F;
  --cat-gtky: #7B79D2;
  --cat-unique: #4FA377;
  --tint-romantic: #FBE3ED;
  --tint-fun: #FBEED2;
  --tint-gtky: #EAE9F7;
  --tint-unique: #E0F0E6;

  --appbar-h: 56px;
  --radius: 8px;
  --radius-sm: 6px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.3, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131313;
    --surface: #1C1C1C;
    --ink: #F2F1EE;
    --muted: #A6A39E;
    --accent: #F2F1EE;
    --accent-soft: #262626;

    --surface-2: #262626;
    --border: #2D2C2A;
    --btn-tx: #131313;
    --pill-count: #4A4844;
    --badge-tx: #C9C6C0;
    --hard: #000000;
    --hard-soft: rgba(0, 0, 0, 0.55);

    --tint-romantic: #3D2231;
    --tint-fun: #3B2F16;
    --tint-gtky: #2C2B41;
    --tint-unique: #20332A;
  }
}

/* ---- Reset and base -------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
  text-wrap: balance;
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.625rem, 1.15rem + 1.9vw, 2rem);
  font-weight: 620;
  letter-spacing: -0.005em;
  line-height: 1.15;
}

h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

h3 {
  font-size: 0.9375rem;
  font-weight: 600;
}

p {
  margin: 0 0 0.8em;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition: text-decoration-color 140ms var(--ease-out);
}

a:hover {
  text-decoration-thickness: 2px;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button {
  font: inherit;
}

main {
  display: block;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 1.5rem);
}

/* ---- Visually hidden utility ------------------------------------------------ */

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

/* ---- Skip link ------------------------------------------------------------- */

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus-visible {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 100;
  width: auto;
  height: auto;
  clip-path: none;
  padding: 0.55rem 0.9rem;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}

/* ---- App bar ----------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--appbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 1.5rem);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.site-header__brand img {
  display: block;
  height: 22px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  min-width: 0;
}

.site-nav__link {
  color: var(--muted);
  font-size: 0.84375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  padding-block: 0.35rem;
  transition: color 140ms var(--ease-out);
}

.site-nav__link:hover {
  color: var(--ink);
}

.site-nav__link[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* ---- Screen header: compact copy + sticker art -------------------------------- */

.hero {
  padding-block: 1.1rem 0.4rem;
}

.hero__grid {
  display: flex;
  align-items: center;
  gap: 0.75rem 2.5rem;
}

.hero__copy {
  flex: 1 1 auto;
  min-width: 0;
}

.hero h1 {
  max-width: 22ch;
  margin-bottom: 0.35em;
}

.hero p {
  max-width: 58ch;
  margin: 0 0 0.35em;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.hero__art {
  flex: 0 0 auto;
  width: clamp(150px, 21vw, 240px);
  /* inline illustration strokes ride currentColor so they flip with the mode */
  color: var(--ink);
}

.hero__art svg {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 719px) {
  .hero {
    padding-block: 0.9rem 0.35rem;
  }

  .hero__grid {
    align-items: flex-start;
  }

  .hero h1 {
    font-size: 1.4375rem;
  }

  .hero p {
    font-size: 0.8125rem;
  }

  .hero__art {
    width: 112px;
    margin-top: 0.4rem;
  }
}

/* ---- Tonight's Pick (filled by app.js; absent without JS) ----------------------
   Sits below the filter toolbar in source order: controls first, then content. */

.tonight {
  padding-block: 0.9rem 0.1rem;
}

.tonight[hidden] {
  display: none;
}

.tonight__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.tonight__head .ico-moon {
  color: var(--cat-fun);
}

.tonight .idea-card {
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--hard);
}

.tonight .idea-card::before {
  width: 4px;
}

.tonight .idea-card__title {
  font-size: 1.375rem;
}

.tonight .idea-card__blurb {
  display: block;
  -webkit-line-clamp: none;
}

/* ---- Toolbar: segmented controls + primary action ----------------------------- */

.filters {
  position: sticky;
  top: var(--appbar-h);
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding-block: 0.75rem;
  scroll-margin-top: var(--appbar-h);
}

.filters__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1.25rem;
}

.filters__block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.filters__caption {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.filters__group {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 100%;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 30px;
  padding: 0 0.7rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out),
    transform 100ms var(--ease-out);
}

.filter-btn:hover {
  color: var(--ink);
}

/* full press: a 2px depress plus a matching fill collapse into the track */
.filter-btn:active {
  transform: translateY(2px);
  background-color: var(--border);
  color: var(--ink);
}

.filter-btn.is-active:active {
  background-color: var(--ink);
  color: var(--btn-tx);
  box-shadow: inset 0 2px 0 var(--hard-soft);
}

.filter-btn.is-active {
  background: var(--ink);
  color: var(--btn-tx);
  font-weight: 600;
}

.filter-btn__count {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  color: var(--muted);
}

.filter-btn.is-active .filter-btn__count {
  color: var(--pill-count);
}

.filters__actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-left: auto;
  padding-bottom: 1px;
}

.filters__count {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.spark-tally {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  color: var(--muted);
  white-space: nowrap;
}

.spark-tally[hidden] {
  display: none;
}

.spark-tally .ico-spark {
  width: 11px;
  height: 11px;
  color: var(--cat-fun);
}

/* ---- Buttons -------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-body);
  transition: background-color 140ms var(--ease-out), transform 110ms var(--ease-out),
    box-shadow 110ms var(--ease-out);
}

.btn--surprise {
  height: 38px;
  padding: 0 1.1rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--btn-tx);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 3px 3px 0 var(--hard-soft);
}

.btn--surprise:hover {
  box-shadow: 4px 4px 0 var(--hard-soft);
  transform: translate(-1px, -1px);
}

.btn--surprise:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--hard-soft);
}

.btn--surprise .ico-spark {
  color: var(--cat-fun);
}

.ico-spark {
  flex: 0 0 auto;
}

/* ---- Results list ------------------------------------------------------------------ */

.idea-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  padding-block: 0.85rem 3rem;
  scroll-margin-top: calc(var(--appbar-h) + 6.5rem);
}

/* content rows are flat and non-interactive: hairline border, category edge,
   tint states for cycle/spotlight; no elevation, no press physics */
.idea-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 0.6rem;
  row-gap: 0.3rem;
  padding: 0.85rem 1rem 0.8rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scroll-margin-top: calc(var(--appbar-h) + 8rem);
  transition: border-color 140ms var(--ease-out),
    background-color 140ms var(--ease-out);
}

/* each row carries its category hue as a left edge tab */
.idea-card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 2px;
  background: var(--cat, var(--border));
}

.idea-card[data-category="romantic"] {
  --cat: var(--cat-romantic);
  --cat-tint: var(--tint-romantic);
}

.idea-card[data-category="fun"] {
  --cat: var(--cat-fun);
  --cat-tint: var(--tint-fun);
}

.idea-card[data-category="getting-to-know-you"] {
  --cat: var(--cat-gtky);
  --cat-tint: var(--tint-gtky);
}

.idea-card[data-category="unique"] {
  --cat: var(--cat-unique);
  --cat-tint: var(--tint-unique);
}

.idea-card[hidden] {
  display: none;
}

.idea-card__labels {
  display: contents;
}

.idea-card__price {
  grid-row: 1;
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--badge-tx);
}

.idea-card__category {
  grid-row: 1;
  grid-column: 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
  background: var(--cat-tint, var(--surface-2));
}

.idea-card__title {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
}

.idea-card__blurb {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.idea-card__meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.45rem;
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  color: var(--muted);
}

.idea-card__meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.idea-card__meta li + li::before {
  content: "\00B7";
}

/* Desktop rows: leading badge column, trailing mood chip */
@media (min-width: 720px) {
  .idea-card {
    grid-template-columns: 88px 1fr auto;
    column-gap: 0.8rem;
    row-gap: 0.2rem;
    padding: 0.85rem 1.1rem 0.85rem 1.2rem;
  }

  .idea-card__price {
    grid-row: 1;
    grid-column: 1;
    justify-self: start;
    margin-top: 3px;
  }

  .idea-card__title {
    grid-row: 1;
    grid-column: 2;
    margin: 0;
    font-size: 1.1875rem;
  }

  .idea-card__category {
    grid-row: 1;
    grid-column: 3;
    justify-self: end;
    margin-top: 3px;
  }

  .idea-card__blurb {
    grid-row: 2;
    grid-column: 2 / -1;
  }

  .idea-card__meta {
    grid-row: 3;
    grid-column: 2 / -1;
  }
}

/* ---- Surprise states: slot-machine cycle, then the landing ---------------------- */

.is-cycling {
  border-color: var(--cat, var(--ink));
  background: var(--cat-tint, var(--surface-2));
}

.is-spotlight {
  background: var(--cat-tint, var(--accent-soft));
  border-color: var(--cat, var(--ink));
  animation: settle-pop 460ms var(--ease-pop) 1;
}

.is-spotlight::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  pointer-events: none;
  box-shadow: 0 0 0 0 var(--cat, var(--ink));
  opacity: 0.5;
  animation: spot-ping 300ms var(--ease-out) 1 forwards;
}

@keyframes settle-pop {
  0% {
    transform: scale(0.985);
  }

  55% {
    transform: scale(1.012);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes spot-ping {
  to {
    box-shadow: 0 0 0 14px transparent;
    opacity: 0;
  }
}

/* ---- Milestone confetti (single burst, then removed by app.js) ------------------- */

.confetti {
  position: fixed;
  z-index: 90;
  width: 0;
  height: 0;
  pointer-events: none;
}

.confetti i {
  position: absolute;
  left: 0;
  top: 0;
  width: 7px;
  height: 11px;
  border-radius: 2px;
  background: var(--clr, var(--cat-fun));
  opacity: 0;
  animation: confetti-fly 1.25s cubic-bezier(0.16, 0.6, 0.35, 0.98) forwards;
}

.confetti i:nth-child(3n) {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

@keyframes confetti-fly {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  55% {
    opacity: 1;
    transform: translate(var(--mx, 0px), var(--my, -70px))
      rotate(var(--mrot, 180deg)) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(var(--dx, 0px), var(--dy, 40px))
      rotate(var(--rot, 420deg)) scale(0.82);
  }
}

/* ---- Empty state ------------------------------------------------------------------ */

.card-hidden-note {
  margin: 0.75rem 0 0;
  padding: 1.4rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ---- Mobile bottom action bar ------------------------------------------------------ */

.action-bar {
  display: none;
}

@media (max-width: 719px) {
  .action-bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.55rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    border-top: 1px solid var(--border);
  }

  .action-bar[hidden] {
    display: none;
  }

  .action-bar__count {
    margin: 0;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--muted);
  }

  .action-bar__sparks[hidden] {
    display: none;
  }

  .action-bar__sparks::before {
    content: "\00B7";
    margin: 0 0.4rem;
  }

  .action-bar__btn {
    width: 100%;
    height: 48px;
    font-size: 0.9375rem;
  }

  body.has-action-bar {
    padding-bottom: 108px;
  }

  /* toolbar collapses: captions off, groups become scrollable strips.
     nowrap is load-bearing: a wrapping column blows the layout viewport
     out past the screen and clips the segments. */
  .filters {
    padding-block: 0.6rem;
  }

  .filters__bar {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.45rem;
  }

  .filters__caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .filters__group {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filters__group::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex: 0 0 auto;
  }

  /* the primary action moves to the bottom bar; the live count stays audible */
  .filters__actions {
    margin: 0;
    padding: 0;
  }

  .filters__actions .btn--surprise,
  .filters__actions .spark-tally {
    display: none;
  }

  .filters__count {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* ---- Hub screens --------------------------------------------------------------------- */

.hub-intro {
  display: flex;
  align-items: center;
  gap: 1rem 2.5rem;
  padding-block: 1.4rem 0.4rem;
}

.hub-intro__copy {
  flex: 1 1 auto;
  min-width: 0;
}

.hub-intro__art {
  flex: 0 0 auto;
  width: clamp(120px, 15vw, 168px);
  /* inline illustration strokes ride currentColor so they flip with the mode */
  color: var(--ink);
}

.hub-intro__art svg {
  display: block;
  width: 100%;
  height: auto;
}

.hub-intro h1 {
  max-width: 26ch;
}

.hub-intro h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--hub-accent, var(--border));
}

.hub-intro[data-hub="romantic"] {
  --hub-accent: var(--cat-romantic);
}

.hub-intro[data-hub="fun"] {
  --hub-accent: var(--cat-fun);
}

.hub-intro[data-hub="getting-to-know-you"] {
  --hub-accent: var(--cat-gtky);
}

.hub-intro[data-hub="unique"] {
  --hub-accent: var(--cat-unique);
}

.hub-intro p {
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 719px) {
  .hub-intro__art {
    width: 96px;
  }
}

.hub-ideas h2,
.faq h2 {
  margin: 1rem 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hub-ideas .idea-grid {
  padding-top: 0;
}

/* hub outro: paragraph two of the intro copy lands below the list */
.hub-outro {
  max-width: 62ch;
  margin: -2rem 0 0;
}

.hub-outro p {
  color: var(--muted);
  font-size: 0.875rem;
}

.hub-back {
  margin: 0.4rem 0 0;
  padding-bottom: 3rem;
}

.hub-back a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--hard-soft);
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out),
    transform 110ms var(--ease-out);
}

.hub-back a:hover {
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--hard);
}

.hub-back a:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--hard);
}

/* ---- FAQ as settings groups (two <details open> panels) --------------------------------- */

.faq {
  max-width: 760px;
  padding-bottom: 3rem;
}

.faq__group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.faq__group + .faq__group {
  margin-top: 0.75rem;
}

.faq__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  list-style: none;
  transition: background-color 140ms var(--ease-out);
}

.faq__summary::-webkit-details-marker {
  display: none;
}

.faq__summary:hover {
  background: var(--surface-2);
}

/* row chevron: points right when closed, down when open */
.faq__summary::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 140ms var(--ease-out);
}

.faq__group[open] > .faq__summary {
  border-bottom: 1px solid var(--border);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.faq__group[open] > .faq__summary::after {
  transform: rotate(45deg) translate(-2px, -2px);
}

.faq__item {
  padding: 0.85rem 1.1rem 0.9rem;
}

.faq__item + .faq__item {
  border-top: 1px solid var(--border);
}

.faq__q {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
}

.faq__a {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.55;
}

/* ---- Prose screens (about, privacy, 404) ------------------------------------------------- */

.prose {
  max-width: 660px;
  padding-block: 1.5rem 3.5rem;
}

.prose h1 {
  margin-bottom: 0.6em;
}

.prose h2 {
  font-size: 1rem;
  margin: 1.8em 0 0.4em;
}

.prose h3 {
  margin: 1.5em 0 0.3em;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
  margin: 0 0 1em;
}

.prose li {
  margin-bottom: 0.35em;
}

.prose strong {
  color: var(--ink);
}

.prose blockquote {
  margin: 1.4em 0;
  padding: 0.1em 0 0.1em 1em;
  border-left: 2px solid var(--cat-romantic);
  color: var(--ink);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

.prose .btn {
  height: 36px;
  padding: 0 0.9rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 2px 2px 0 var(--hard-soft);
}

.prose .btn:hover {
  box-shadow: 3px 3px 0 var(--hard);
}

.prose .btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--hard);
}

/* ---- Footer -------------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.site-footer__in {
  max-width: 1080px;
  margin-inline: auto;
  padding: 1.1rem clamp(1rem, 3vw, 1.5rem) 1.3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.5rem;
}

.site-footer__name {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.5rem;
  margin-inline: -0.25rem;
}

/* padded block boxes keep every footer link target at 24x24 CSS px or more */
.site-footer__nav a {
  display: inline-block;
  padding: 0.45rem 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.site-footer__nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer__tagline {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

/* the one hidden gag: a tilted sticker that quietly straightens up */
.footer-sticker {
  display: inline-block;
  margin-right: 0.45rem;
  vertical-align: -3px;
  color: var(--ink);
}

.footer-sticker svg {
  display: inline-block;
  transform: rotate(14deg);
  transition: transform 340ms var(--ease-pop);
}

.site-footer:hover .footer-sticker svg {
  transform: rotate(0deg);
}

/* ---- Small screens: compact nav ------------------------------------------------------------- */

@media (max-width: 719px) {
  .site-nav {
    gap: 1rem;
  }

  .site-nav__link.is-mood {
    display: none;
  }
}

/* ---- Scroll-driven motion (progressive enhancement only) ------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    /* the :not() guards keep this rule off state cards so settle-pop and the
       cycle flash always win (a bare #idea-grid .idea-card outranks them) */
    #idea-grid .idea-card:not(.is-spotlight):not(.is-cycling) {
      animation: card-enter linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 35%;
    }

    .hero__art svg {
      animation: hero-drift linear both;
      animation-timeline: scroll();
      animation-range: 0px 420px;
    }

    .hub-intro__art svg {
      animation: hub-drift linear both;
      animation-timeline: scroll();
      animation-range: 0px 320px;
    }
  }
}

/* transform only: opacity here fails mid-fade contrast and leaves the fold
   looking half loaded */
@keyframes card-enter {
  from {
    transform: translateY(20px);
  }
}

@keyframes hero-drift {
  to {
    transform: translateY(-38px);
  }
}

@keyframes hub-drift {
  to {
    transform: translateY(-26px);
  }
}

/* ---- Reduced motion --------------------------------------------------------------------------- */

@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;
  }

  .filter-btn:active,
  .btn--surprise:active {
    transform: none;
  }

  .is-spotlight {
    animation: none;
  }

  .is-spotlight::after {
    animation: none;
    box-shadow: 0 0 0 3px var(--cat, var(--ink));
    opacity: 1;
  }
}
