/*
 * HeatedOne. One stylesheet for the whole site: the design tokens, the page layout, the three card
 * templates and their colour variants. Every text colour declared here is held at WCAG AA against what it can
 * sit on, in every variant, by tests/design.test.mjs, computed from this file, so a colour change is checked the moment it
 * is made. The only motion is the card opening on its recipient page, inside a no-preference block; the
 * reduced-motion block at the end stops any that slips outside it.
 *
 * Fonts: Bricolage Grotesque 800 and Fraunces 600 (display), Inter 400 (text), self-hosted, each with its
 * SIL Open Font License beside it in assets/fonts/.
 */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque/bricolage-grotesque-latin-800-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/fraunces/fraunces-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter/inter-latin-400-normal.woff2") format("woff2");
}

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

:root {
  --paper: #fff7ee;
  --surface: #ffffff;
  --ink: #1f1a17;
  --ink-soft: #5b4f47;
  --heat: #d63a1f;
  --heat-ink: #b02a12;
  --line: #ecdccb;
  --focus: #1f1a17;
  --on-ink: #fff7ee;

  --font-display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius: 14px;
  --gutter: 16px;
}

/* ---- Card variants: each sets the card's colours. Text pairs: card-ink on card-bg (front),
 * inside-ink on inside-bg (inside). Motif colours (m-a, m-b, m-c, m-d, eye) are decoration and never carry text. ---- */

.v-ember,
.preview:has(input[value="ember"]:checked) .card {
  --card-bg: #a3301b;
  --card-ink: #fff4e6;
  --inside-bg: #fff8f1;
  --inside-ink: #4a170b;
  --m-a: #ff9a3c;
  --m-b: #ffd36e;
}

.v-midnight,
.preview:has(input[value="midnight"]:checked) .card {
  --card-bg: #1d1730;
  --card-ink: #fff1dc;
  --inside-bg: #fbf7ff;
  --inside-ink: #241c3d;
  --m-a: #ff6b35;
  --m-b: #ffc457;
}

.v-blush,
.preview:has(input[value="blush"]:checked) .card {
  --card-bg: #ffe1d8;
  --card-ink: #5a1430;
  --inside-bg: #fffaf8;
  --inside-ink: #5a1430;
  --m-a: #e0452c;
  --m-b: #ff9a6b;
}

.v-party,
.preview:has(input[value="party"]:checked) .card {
  --card-bg: #fff1b5;
  --card-ink: #34195a;
  --inside-bg: #fffdf2;
  --inside-ink: #34195a;
  --m-a: #e0452c;
  --m-b: #2f6fd0;
  --m-c: #1f9a63;
  --m-d: #9b43c4;
}

.v-mint,
.preview:has(input[value="mint"]:checked) .card {
  --card-bg: #d8f3e6;
  --card-ink: #0f3b2c;
  --inside-bg: #f7fdfa;
  --inside-ink: #0f3b2c;
  --m-a: #0f3b2c;
  --m-b: #2aa06e;
  --m-c: #f0882a;
  --m-d: #4fa597;
}

.v-mono,
.preview:has(input[value="mono"]:checked) .card {
  --card-bg: #ffffff;
  --card-ink: #141414;
  --inside-bg: #ffffff;
  --inside-ink: #141414;
  --m-a: #141414;
  --m-b: #8a8a8a;
  --m-c: #c4c4c4;
  --m-d: #5a5a5a;
}

.v-cream,
.preview:has(input[value="cream"]:checked) .card {
  --card-bg: #f6eddd;
  --card-ink: #2a241f;
  --inside-bg: #fffcf6;
  --inside-ink: #2a241f;
  --m-a: #2a241f;
  --eye: #f6eddd;
}

.v-slate,
.preview:has(input[value="slate"]:checked) .card {
  --card-bg: #2e3a4b;
  --card-ink: #f6f2ea;
  --inside-bg: #f6f8fb;
  --inside-ink: #22303f;
  --m-a: #f6f2ea;
  --eye: #2e3a4b;
}

.v-tangerine,
.preview:has(input[value="tangerine"]:checked) .card {
  --card-bg: #ffa04a;
  --card-ink: #2a1505;
  --inside-bg: #fffaf3;
  --inside-ink: #3a1d06;
  --m-a: #2a1505;
  --eye: #ffa04a;
}

/* ---- Base ---- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 {
  font-size: var(--step-3);
}

p {
  margin: 0;
}

a {
  color: var(--heat-ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
}

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

/* An element marked hidden stays hidden, whatever display its own rule sets (the switch, the finder). */
[hidden] {
  display: none !important;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--ink);
  color: var(--on-ink);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  z-index: 10;
}

.skip:focus {
  top: var(--space-2);
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Header and footer ---- */

.top {
  border-bottom: 1px solid var(--line);
}

.top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-2);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark-flame {
  width: 26px;
  height: 26px;
  fill: var(--heat);
}

.nav-link {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
}

.foot {
  border-top: 1px solid var(--line);
  margin-top: var(--space-8);
  padding: var(--space-6) 0 var(--space-7);
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.foot p + p {
  margin-top: var(--space-2);
}

/* ---- Buttons, tags, heat marks ---- */

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-1);
  text-decoration: none;
  border-radius: 999px;
  padding: var(--space-3) var(--space-5);
}

.button:hover {
  background: var(--heat-ink);
  color: var(--on-ink);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: var(--space-4) 0 0;
  color: var(--ink-soft);
}

.tags div {
  display: flex;
  gap: var(--space-2);
  align-items: baseline;
}

.tags dt {
  font-size: var(--step--1);
}

.tags dd {
  margin: 0;
  color: var(--ink);
}

.heat {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.heat-flames {
  display: inline-flex;
}

.heat .flame {
  width: 16px;
  height: 16px;
  fill: var(--heat);
}

/* ---- The card: two panels, each 5:7, sized from its own width so it reads the same at any size. The
 * padding is a percentage of the panel's width, never cqi: a panel cannot be its own query container, so cqi
 * there would measure the window and swallow the text box on a wide screen. ---- */

.card {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  max-width: 760px;
}

.panel {
  position: relative;
  aspect-ratio: 5 / 7;
  border-radius: var(--radius);
  overflow: hidden;
  container-type: inline-size;
  box-shadow: 0 1px 0 var(--line), 0 10px 24px -14px rgba(31, 26, 23, 0.45);
}

.panel-front {
  background: var(--card-bg);
  color: var(--card-ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10%;
}

.panel-inside {
  background: var(--inside-bg);
  color: var(--inside-ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10%;
  border: 1px solid var(--line);
}

.front-line {
  position: relative;
  z-index: 1;
}

.front-line.fit-s {
  font-size: 11cqi;
}

.front-line.fit-m {
  font-size: 8.5cqi;
}

.front-line.fit-l {
  font-size: 6.6cqi;
}

.inside-text {
  font-family: var(--font-text);
  line-height: 1.5;
}

.inside-text p + p {
  margin-top: 0.8em;
}

.inside-text.fit-s {
  font-size: 7cqi;
}

.inside-text.fit-m {
  font-size: 5.6cqi;
}

.inside-text.fit-l {
  font-size: 4.6cqi;
}

.inside-mark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5cqi;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.6cqi;
  letter-spacing: 0.04em;
}

.motif {
  position: absolute;
}

/* Flame: a bold sans line over a big flame rising from the bottom. */
.card-flame .front-line,
.panel-front.card-flame .front-line {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.015em;
  align-self: stretch;
}

.card-flame .panel-front,
.panel-front.card-flame {
  justify-content: flex-start;
}

.motif-flame {
  width: 62cqi;
  right: -8cqi;
  bottom: -6cqi;
}

/* Confetti: a soft serif line, centred, in a frame of confetti. */
.card-confetti .front-line,
.panel-front.card-confetti .front-line {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.12;
  text-align: center;
}

.motif-confetti {
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Cat: a flat, deadpan line above a cat that has seen it all before. */
.card-cat .front-line,
.panel-front.card-cat .front-line {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
}

.card-cat .panel-front,
.panel-front.card-cat {
  justify-content: flex-start;
}

.motif-cat {
  width: 58cqi;
  left: 21cqi;
  bottom: 7cqi;
}

.motif .m-a {
  fill: var(--m-a);
}

.motif .m-b {
  fill: var(--m-b, var(--eye));
}

.motif .m-c {
  fill: var(--m-c);
}

.motif .m-d {
  fill: var(--m-d);
}

.motif .m-line {
  fill: none;
  stroke: var(--eye);
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* ---- Card page ---- */

.card-page {
  padding-top: var(--space-6);
}

.crumbs {
  margin-bottom: var(--space-3);
}

.preview {
  margin-top: var(--space-6);
}

.variants {
  border: 0;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}

.variants legend {
  font-family: var(--font-display);
  font-weight: 800;
  padding: 0;
  margin-bottom: var(--space-2);
}

.swatch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: var(--space-2) var(--space-4) var(--space-2) var(--space-2);
  background: var(--surface);
  cursor: pointer;
}

.swatch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.swatch:has(input:checked) {
  border-color: var(--ink);
}

.swatch:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Without :has() (older browsers) the label cannot show the choice or the focus, so the chip does. */
@supports not selector(:has(a)) {
  .swatch input:checked + .swatch-chip {
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink);
  }

  .swatch input:focus-visible + .swatch-chip {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }
}

.swatch-chip {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(31, 26, 23, 0.35);
}

.sw-ember .swatch-chip { background: #a3301b; }
.sw-midnight .swatch-chip { background: #1d1730; }
.sw-blush .swatch-chip { background: #ffe1d8; }
.sw-party .swatch-chip { background: #fff1b5; }
.sw-mint .swatch-chip { background: #d8f3e6; }
.sw-mono .swatch-chip { background: #ffffff; }
.sw-cream .swatch-chip { background: #f6eddd; }
.sw-slate .swatch-chip { background: #2e3a4b; }
.sw-tangerine .swatch-chip { background: #ffa04a; }

.actions {
  margin-top: var(--space-6);
}

.note-page {
  padding-top: var(--space-7);
  max-width: 640px;
}

.note-page p {
  margin-top: var(--space-4);
}

.note-page .button {
  margin-top: var(--space-2);
}

/* ---- The sender's note, inside the card (the editor's preview and, from M2 step (e), the recipient page).
 * A panel with a note has no motif to clip, so it may grow past 5:7 to hold the note; a long word wraps. ---- */

.panel-inside.has-note {
  overflow: visible;
  justify-content: flex-start;
}

/* A panel that grows taller than 5:7 must not grow wider with it: a grid item's automatic minimum width would
 * take the extra height through the aspect ratio and push the card past a phone's screen. */
.card > .panel {
  min-width: 0;
}

.note {
  margin-top: 1.4em;
  padding-top: 1em;
  border-top: 1px solid;
  font-family: var(--font-text);
  font-size: 5cqi;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.note > * + * {
  margin-top: 0.6em;
}

.note-message p + p {
  margin-top: 0.8em;
}

.note-to,
.note-from {
  font-family: var(--font-serif);
  font-weight: 600;
}

.note-from {
  text-align: right;
}

/* ---- The editor (/make/<slug>/) and the delete page ---- */

.make-page {
  padding-top: var(--space-6);
}

.needs-script {
  margin-top: var(--space-5);
  max-width: 640px;
}

.editor {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-5);
}

.editor-preview {
  margin-top: 0;
}

.editor-side .intro {
  color: var(--ink-soft);
}

.field {
  margin-top: var(--space-5);
}

.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
}

.hint {
  margin-top: var(--space-1);
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  margin-top: var(--space-2);
  padding: var(--space-3);
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--ink-soft);
  border-radius: 10px;
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--heat-ink);
}

.count {
  margin-top: var(--space-1);
  color: var(--ink-soft);
  font-size: var(--step--1);
  text-align: right;
}

.field-error,
.form-error {
  margin-top: var(--space-2);
  color: var(--heat-ink);
  font-weight: 600;
}

/* The honeypot: off the page for people, there for a script that fills every field. */
.nope {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button.button {
  border: 0;
  cursor: pointer;
}

button.button:disabled {
  cursor: progress;
}

.editor-form .button {
  margin-top: var(--space-5);
}

.button-quiet,
button.button-quiet {
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--ink);
}

.button-quiet:hover {
  background: var(--paper);
  color: var(--ink);
}

.made {
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.made h3 {
  margin-top: var(--space-6);
}

.made p {
  margin-top: var(--space-3);
}

.made-link a {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.made .actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.form-status,
.made-status,
.delete-status {
  min-height: 1.5em;
  font-weight: 600;
}

/* ---- The recipient page (/c/<id>) ---- */

.recipient {
  padding-top: var(--space-6);
}

.recipient-card {
  margin-top: var(--space-5);
}

.report {
  margin-top: var(--space-6);
}

.report-hint {
  margin-top: var(--space-1);
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* ---- Privacy and abuse (drafts until approved) ---- */

.legal-page {
  max-width: 720px;
  padding-top: var(--space-6);
}

.draft-note {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  color: var(--heat-ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
}

.updated {
  margin-top: var(--space-3);
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.legal-page .intro {
  margin-top: var(--space-4);
  font-size: var(--step-1);
}

.legal-page section {
  margin-top: var(--space-6);
}

.legal-page h2 {
  font-size: var(--step-2);
}

.legal-page section p {
  margin-top: var(--space-3);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.form-status {
  margin-top: var(--space-2);
}

/* ---- Home ---- */

.hero {
  padding: var(--space-7) 0 var(--space-6);
}

.hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 4vw, 4rem);
  max-width: 14ch;
}

.hero .lede {
  margin-top: var(--space-4);
}

.find h2,
.featured h2,
.how h2 {
  font-size: var(--step-2);
}

.find h3 {
  font-size: var(--step-0);
  margin-top: var(--space-5);
}

.home-search {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.home-search[hidden] {
  display: none;
}

.home-search .filter-search {
  flex: 1 1 220px;
}

.home-search .button {
  border: 0;
  cursor: pointer;
  font-size: var(--step-0);
  min-height: 44px;
}

.chips {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chips a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.chips a:hover {
  border-color: var(--ink);
}

.featured {
  margin-top: var(--space-7);
}

.more {
  margin-top: var(--space-6);
}

.how {
  margin-top: var(--space-7);
}

.steps {
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-2);
  line-height: 1.25;
}

.how .hint {
  margin-top: var(--space-2);
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

/* ---- Catalog ---- */

.catalog {
  padding-top: var(--space-6);
}

.lede {
  margin-top: var(--space-3);
  color: var(--ink-soft);
  font-size: var(--step-1);
  max-width: 40em;
}

.finder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.finder[hidden] {
  display: none;
}

.filter {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step--1);
  min-width: 0;
}

.filter-search {
  grid-column: 1 / -1;
}

.filter input,
.filter select {
  font: inherit;
  font-family: var(--font-text);
  font-weight: 400;
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--ink-soft);
  border-radius: 10px;
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
  width: 100%;
}

.clear {
  grid-column: 1 / -1;
  justify-self: start;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--heat-ink);
  background: none;
  border: 0;
  padding: var(--space-2) 0;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.scorching {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-5);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 800;
  cursor: pointer;
  min-height: 44px;
}

.switch-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 800;
}

.switch input {
  width: 22px;
  height: 22px;
  accent-color: var(--heat-ink);
}

.hint {
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.count {
  margin-top: var(--space-4);
  color: var(--ink-soft);
}

.count[hidden],
.empty[hidden] {
  display: none;
}

.items {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-5) var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.catalog:not(:has(#show-scorching:checked)) .item[data-heat="3"] {
  display: none;
}

.item-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.item-title {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-1);
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
}

.item-link:hover .item-title {
  text-decoration-color: var(--heat-ink);
}

.item-tags {
  margin-top: var(--space-1);
  color: var(--ink-soft);
  font-size: var(--step--1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
}

.item-tags .heat-name {
  color: var(--ink-soft);
}

.empty {
  margin-top: var(--space-5);
  font-size: var(--step-1);
}

/* ---- Review page (staging only) ---- */

.review {
  padding-top: var(--space-6);
}

.review-card {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.review-card h2 {
  font-size: var(--step-2);
}

.review-slug {
  display: block;
  font-family: var(--font-text);
  font-weight: 400;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.review-card .card {
  margin-top: var(--space-4);
}

.review-card > p {
  margin-top: var(--space-3);
}

/* ---- Wider screens ---- */

@media (min-width: 700px) {
  .card {
    grid-template-columns: 1fr 1fr;
  }

  .made {
    padding: var(--space-6);
  }

  .finder {
    grid-template-columns: 2fr repeat(4, 1fr);
    align-items: end;
  }

  .filter-search {
    grid-column: auto;
  }

  .items {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }
}

@media (min-width: 1000px) {
  .editor {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
  }

  .editor-preview {
    position: sticky;
    top: var(--space-5);
  }
}

/* The card opening on its recipient page: the front arrives, then the inside. Only for readers who have not
 * asked for reduced motion; everyone else gets the card still, and the page reads the same either way. */
@media (prefers-reduced-motion: no-preference) {
  .recipient-card .panel {
    animation: card-arrive 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .recipient-card .panel-inside {
    animation-delay: 240ms;
  }

  @keyframes card-arrive {
    from {
      opacity: 0;
      transform: translateY(14px) rotate(-1.5deg);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
