/*
 * FindMeAPartner. White paper, black ink and one red. Red marks the step that moves a match forward
 * (one red button per screen), the rank numbers and anything with a deadline. Everything else is
 * grey pills, black type and underlined text buttons. Shapes are soft: pills, 24px cards, 20px photos.
 */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/plus-jakarta-sans-latin-wght-normal-d2ff26bc.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/plus-jakarta-sans-latin-ext-wght-normal-ff4456f1.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* The native apps tint their tab bars with --red too: see ios/…/SceneDelegate.swift and android/…/colors.xml. */
:root {
  --paper: #ffffff;
  --card: #f6f6f6;
  --chip: #f1f1f1;
  --line: #e2e2e2;
  --ink: #111111;
  --muted: #5f5f5f;
  --red: #d4112e;
  --red-deep: #a80d24;
  --red-text: #a80d24;
  --red-tint: #fde7ea;
  --on-red: #ffffff;
  --on-ink: #ffffff;
  --photo: #e6ded6;

  /* Older names, still used by admin.css. */
  --letter: var(--card);
  --airmail-blue: var(--ink);
  --airmail-red: var(--red);
  --blue-tint: var(--chip);
  --on-accent: var(--on-red);

  --sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --serif: var(--sans);
  --radius: 16px;
  --radius-card: 24px;
  --radius-photo: 20px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111111;
    --card: #1b1b1b;
    --chip: #262626;
    --line: #333333;
    --ink: #f4f4f4;
    --muted: #a9a9a9;
    --red-deep: #b30f28;
    --red-text: #ff6b7d;
    --red-tint: #3a1218;
    --on-ink: #111111;
    --photo: #2b2724;
  }
}

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
}

h1, h2, h3 { font-weight: 800; line-height: 1.15; margin: 0 0 0.5rem; }
h1 { font-size: 1.875rem; letter-spacing: -0.02em; }
h2 { font-size: 1.375rem; letter-spacing: -0.01em; }
h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
p { margin: 0 0 0.75rem; }

a { color: var(--ink); font-weight: 600; text-underline-offset: 0.18em; }
a:hover { color: var(--red-text); }

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

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

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

/* Page frame */

.masthead,
.page {
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.page { padding-block: 1.25rem 4rem; }

.masthead__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}

.masthead__links { display: flex; align-items: center; gap: 1rem; }
.masthead__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark__mark { flex: none; color: var(--red); }
.masthead__links .link-button { white-space: nowrap; }

/* On a phone browser the name doesn't fit beside the links, so only the mark shows. */
@media (max-width: 26rem) {
  .wordmark__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* The person's stage, under the masthead on every page: Staying home, Meeting people, Together.
   Earlier stages are black, the current one red, later ones grey. */

.stages {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.375rem;
}
.stages__step { display: grid; gap: 0.375rem; font-size: 0.75rem; font-weight: 800; color: var(--muted); }
.stages__step::before { content: ""; height: 0.25rem; border-radius: 999px; background: var(--line); }
.stages__step--done { color: var(--ink); }
.stages__step--done::before { background: var(--ink); }
.stages__step--current { color: var(--red-text); }
.stages__step--current::before { background: var(--red); }

/* The person's mode, under the stages. */

.mode-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.75rem;
}
.mode-line p { margin: 0; }

.mode-line--matching,
.mode-line--matched {
  font-size: 0.9375rem;
  font-weight: 600;
}
.mode-line--matching p,
.mode-line--matched p { flex: 1 1 12rem; display: flex; align-items: center; gap: 0.5rem; }
.mode-line--matching p::before,
.mode-line--matched p::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--red);
}
.mode-line--matching .button { min-height: 2.5rem; padding-inline: 1rem; font-size: 0.875rem; }

.mode-line--profile {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem;
  border-radius: var(--radius-card);
  background: var(--ink);
  color: var(--on-ink);
}
.mode-line--profile p:first-child { font-size: 1.125rem; font-weight: 700; line-height: 1.35; }
.mode-line--profile .hint { color: inherit; opacity: 0.82; }
.mode-line__note { font-size: 0.875rem; }
.mode-line__note a { color: inherit; }
.mode-line__progress {
  width: 100%;
  height: 0.5rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--on-ink) 22%, transparent);
  appearance: none;
  overflow: hidden;
}
.mode-line__progress::-webkit-progress-bar { background: transparent; }
.mode-line__progress::-webkit-progress-value { background: var(--red); border-radius: 999px; }
.mode-line__progress::-moz-progress-bar { background: var(--red); border-radius: 999px; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.tabs__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}
.tabs__item:hover { color: var(--ink); background: var(--line); }
.tabs__item[aria-current="page"] { background: var(--ink); color: var(--on-ink); }

.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.375rem;
  height: 1.375rem;
  padding: 0 0.375rem;
  border-radius: 999px;
  background: var(--red);
  color: var(--on-red);
  font-size: 0.75rem;
  font-weight: 800;
}

/* Text */

.lede { color: var(--muted); font-size: 0.9375rem; line-height: 1.45; margin-bottom: 1.5rem; }
.hint { color: var(--muted); font-size: 0.875rem; }
.aside { margin-top: 1.5rem; }
.empty { color: var(--muted); padding: 1.5rem; border-radius: var(--radius-card); background: var(--card); text-align: center; }
.status { color: var(--ink); font-weight: 600; font-size: 0.875rem; margin: 0; }
.conflict {
  justify-self: start;
  margin: 0;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--red-tint);
  color: var(--red-text);
  font-size: 0.875rem;
  font-weight: 700;
}
.danger-link { color: var(--red-text); }

.flash {
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  background: var(--card);
  font-weight: 600;
}
.flash--alert { background: var(--red-tint); color: var(--red-text); }
.flash ul { margin: 0.25rem 0 0; padding-left: 1.25rem; font-weight: 500; }
.flash p { margin: 0; }

/* Sign in and sign up */

.hero {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
  padding: 2rem 1.5rem;
  border-radius: 2rem;
  background: var(--red);
  color: var(--on-red);
}
.hero h1 { margin: 0; font-size: 2.5rem; line-height: 1.02; letter-spacing: -0.03em; }
.hero p { margin: 0; font-weight: 500; max-width: 22rem; }
.hero__mark { color: var(--on-red); }

/* Forms */

.form { display: grid; gap: 1rem; }
.form--inline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }

.group {
  border: 0;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 1rem;
}
.group > legend {
  font-size: 1.25rem;
  font-weight: 800;
  padding: 0;
  margin-bottom: 0.75rem;
}

.field { display: grid; gap: 0.375rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > legend { padding: 0; margin-bottom: 0.375rem; }
.field label, .field > legend, .field__label { font-weight: 700; font-size: 0.875rem; }
.field--pair { grid-template-columns: auto 5rem auto 5rem; align-items: center; justify-content: start; gap: 0.5rem; }
.field--pair .field__label { grid-column: 1 / -1; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="search"],
input[type="date"], select, textarea {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ink); }
textarea { resize: vertical; }
input[type="file"] { font: inherit; font-size: 0.875rem; max-width: 100%; }

.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.35rem 1rem;
  border: 2px solid var(--chip);
  border-radius: 999px;
  background: var(--chip);
  font-weight: 600;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--ink); background: var(--paper); }
.choice--block { display: flex; align-items: flex-start; padding: 1rem; border-radius: var(--radius); }
.choice--block input { margin-top: 0.2rem; flex-shrink: 0; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--red); width: 1.15rem; height: 1.15rem; margin: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.5rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { color: var(--ink); background: var(--line); }
.button--primary { background: var(--red); color: var(--on-red); }
.button--primary:hover { background: var(--red-deep); color: var(--on-red); }
.button--dark { background: var(--ink); color: var(--on-ink); }
.button--dark:hover { background: var(--ink); color: var(--on-ink); opacity: 0.88; }
.button--danger { background: var(--red-deep); color: var(--on-red); }
.button--danger:hover { background: var(--red-deep); color: var(--on-red); opacity: 0.9; }
.button--block, form.button_to:has(> .button--block) { width: 100%; }
.button:disabled, .button:disabled:hover { background: var(--line); color: var(--muted); cursor: not-allowed; }
.mode-line--profile .button:disabled { background: color-mix(in srgb, var(--on-ink) 18%, transparent); color: inherit; opacity: 0.7; }

.link-button {
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.link-button:hover { color: var(--red-text); }

form.button_to { display: inline; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }

/* Sections. A label-style heading (small caps, grey) for reading a profile; a bold one for editing. */

.section { margin-top: 2.25rem; }
.section__label {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* Profile editing: three ranked slots */

.slots { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; counter-reset: slot; }
.slot {
  position: relative;
  padding: 1rem 1rem 1rem 3.75rem;
  border-radius: var(--radius-card);
  background: var(--card);
  counter-increment: slot;
}
.slot::before {
  content: counter(slot) / "";
  position: absolute;
  top: 0.9rem;
  left: 1rem;
  display: grid;
  place-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--red);
  color: var(--on-red);
  font-size: 0.9375rem;
  font-weight: 800;
}
.slot:nth-child(3)::before { background: var(--ink); color: var(--on-ink); }
.slot__name { color: var(--muted); font-size: 0.8125rem; font-weight: 700; margin: 0.35rem 0 0.5rem; }
.slot__value { font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.25rem; }
.slot__form { display: grid; gap: 0.75rem; }
.slot__form .field select, .slot__form .field input { background: var(--paper); }
.slot > form.button_to { display: block; margin-top: 0.25rem; }

/* Photos */

.photos { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.photos li { position: relative; }
.photos li > form.button_to { position: absolute; top: 0.5rem; right: 0.5rem; }
.photos li > form.button_to .link-button {
  min-height: 2.25rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.8125rem;
  text-decoration: none;
}
.photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-photo); background: var(--photo); }

/* The full profile: photos fall into two columns at their own heights. */
.photos--large { display: block; columns: 2; column-gap: 0.5rem; }
.photos--large li { break-inside: avoid; margin-bottom: 0.5rem; }
.photos--large .photo { aspect-ratio: auto; }
/* With an odd number of photos, the first one goes full width so the two columns below stay even. */
.photos--large li:first-child:nth-last-child(odd) { column-span: all; }
.photos--large li:first-child:nth-last-child(odd) .photo { aspect-ratio: 4 / 5; max-height: 32rem; }

.photo-upload {
  padding: 1rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius-card);
}

/* Discover: photo-first cards */

.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 2.25rem; }
.person { display: grid; gap: 0.75rem; }
.person__frame { position: relative; }
.person__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 30rem;
  object-fit: cover;
  border-radius: var(--radius-card);
  background: var(--photo);
}
.badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  margin: 0;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font-size: 0.8125rem;
  font-weight: 800;
}
.person > .badge { position: static; justify-self: start; background: var(--chip); color: var(--ink); }
.person__body { display: grid; gap: 0.75rem; }
.person__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 0.75rem; }
.person__name { font-size: 1.375rem; margin: 0; }
.person__meta { color: var(--muted); font-weight: 500; margin: 0; }
.person__bio { color: var(--ink); font-size: 0.9375rem; }
.person__bio p:last-child { margin-bottom: 0; }

/* A Discover card is a preview: three lines of the bio, and the name's link stretched over the whole card. */
.person__bio {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.person--card { position: relative; }
.person__link { color: inherit; text-decoration: none; }
.person__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-card); }
.person__link:focus-visible { outline: none; }
.person__link:focus-visible::after { outline: 3px solid var(--ink); outline-offset: 4px; }
.person--card:hover .person__name { color: var(--red-text); }
.person__open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 3rem;
  margin: 0.25rem 0 0;
  border-radius: 999px;
  background: var(--chip);
  font-weight: 700;
}
.person__open::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.request-status {
  margin: 0.25rem 0 0;
  padding: 0.75rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 1.25rem;
  text-align: center;
}

/* What someone is about or wants: numbered pills, or a bigger ranked list on the full profile. */

.about-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  counter-reset: rank;
}
.about-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.875rem;
  font-weight: 600;
  counter-increment: rank;
}
.about-list li::before { content: counter(rank) / ""; color: var(--red-text); font-weight: 800; }

.about-list--ranked { flex-direction: column; gap: 0.6rem; }
.about-list--ranked li { padding: 0; background: none; font-size: 1.0625rem; font-weight: 700; gap: 0.75rem; }
.about-list--ranked li::before {
  display: grid;
  place-content: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--red);
  color: var(--on-red);
  font-size: 0.9375rem;
}
.about-list--ranked li:nth-child(n + 3)::before { background: var(--ink); color: var(--on-ink); }

.bio p { max-width: 65ch; font-size: 1.0625rem; line-height: 1.55; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0; }
.facts > div { padding: 0.75rem 0.9rem; border-radius: var(--radius); background: var(--card); }
.facts dt { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.facts dd { margin: 0.1rem 0 0; font-weight: 700; }

/* The full profile's actions: send a request, follow one, or answer one. Stuck to the bottom of the screen. */

.action-bar {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 0.6rem;
  margin: 2rem calc(-1 * var(--gutter)) -4rem;
  padding: 0.85rem var(--gutter) 1rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.action-bar p { margin: 0; text-align: center; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.action-bar__buttons { display: flex; gap: 0.5rem; }
.action-bar__buttons form.button_to:last-child, .action-bar__buttons > .button:last-child { flex: 1; }
.action-bar__buttons form.button_to:last-child .button { width: 100%; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  margin-bottom: 0.75rem;
  padding: 0 1rem 0 0.6rem;
  border-radius: 999px;
  background: var(--chip);
  text-decoration: none;
}
.back-link:hover { color: var(--ink); background: var(--line); }

/* Requests */

.letters { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.85rem; }

.letter {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: var(--radius-card);
  background: var(--card);
}
.letter .about-list li { background: var(--paper); }
.letter__head { display: flex; align-items: center; gap: 0.75rem; }
.letter__who { flex: 1; min-width: 0; }
.letter__avatar {
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--photo);
}
.letter__name { font-size: 1.25rem; margin: 0; }
.letter__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.letter__actions > .button { flex: 1; }
.letter__actions > .button:not(.button--primary) { background: var(--paper); }
.letter__actions > .button:not(.button--primary):hover { background: var(--line); }

/* The answer timer. It turns red in the last 12 hours. */
.postmark {
  flex: none;
  display: grid;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-ink);
  text-align: center;
  line-height: 1.1;
}
.postmark--soon { background: var(--red); color: var(--on-red); }
.postmark__time { font-weight: 800; font-size: 1rem; }
.postmark__label { font-size: 0.6875rem; font-weight: 600; }

.waiting {
  padding: 0.75rem 1rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.sent { list-style: none; padding: 0; margin: 0; }
.sent li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; min-height: 3.5rem; border-bottom: 1px solid var(--line); }
.sent .status { flex: 1; color: var(--muted); font-weight: 500; }
.sent form { margin: 0; }
.sent__name { font-weight: 700; }

/* Notifications */

.notifications { list-style: none; padding: 0; margin: 0; }
.notification {
  position: relative;
  padding: 0.9rem 0 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.notification--unread::before {
  content: "";
  position: absolute;
  top: 1.35rem;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--red);
}
.notification--unread p { font-weight: 700; }
.notification p { margin: 0; }
.notification time { color: var(--muted); font-size: 0.8125rem; }

/* Match */

.match-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.match-head__avatar {
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--photo);
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--red);
}
.match-head__who { flex: 1; min-width: 0; }
.match-head h1 { font-size: 1.25rem; margin: 0; }
.match-head .lede { margin: 0; font-size: 0.8125rem; }

/* A small menu: a round button that opens a panel below it. */
.menu { position: relative; flex: none; }
.menu > summary {
  display: grid;
  place-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--chip);
  list-style: none;
  cursor: pointer;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu__panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 10;
  width: min(20rem, calc(100vw - 2 * var(--gutter)));
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.14);
}
.menu__panel h2 { font-size: 1rem; margin: 0; }
.menu__panel p { margin: 0; }
.menu__panel .button { width: 100%; }
.menu__panel form.button_to { display: block; }

.notice-panel {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-card);
  background: var(--red-tint);
  color: var(--red-text);
  font-weight: 600;
}
.notice-panel p { margin: 0; }
.notice-panel .button { background: var(--paper); color: var(--ink); }

.messages { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.6rem; }
.message {
  max-width: 80%;
  padding: 0.7rem 1rem;
  border-radius: 1.375rem 1.375rem 1.375rem 0.375rem;
  background: var(--chip);
  justify-self: start;
}
.message--mine {
  background: var(--red);
  color: var(--on-red);
  border-radius: 1.375rem 1.375rem 0.375rem 1.375rem;
  justify-self: end;
}
.message--mine a, .message--mine .link-button { color: inherit; }
.message p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message time { display: block; font-size: 0.75rem; margin-top: 0.2rem; opacity: 0.75; }

@media (min-width: 40rem) {
  h1 { font-size: 2.25rem; }
  .hero h1 { font-size: 3rem; }
}

/* Chat */

.messages:not(:empty) + .empty--chat { display: none; }
.message__picture { max-height: 22rem; width: auto; border-radius: 1rem; margin-bottom: 0.35rem; }
.message__audio { width: min(16rem, 64vw); display: block; margin-bottom: 0.25rem; }

/* The composer is three forms (text and picture, voice, contact), laid out as one bar: the text field
   and Send on top, the extras as small pills below. */
.composer-area {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.composer-area > .flash { flex-basis: 100%; margin: 0; }
.composer { display: contents; }
.composer textarea { flex: 1 1 12rem; min-height: 3rem; border-radius: 1.5rem; padding-inline: 1.1rem; }
.composer input[type="submit"] { flex: none; }
.composer__extras, .recorder { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.composer__extras { order: 1; }
.recorder { order: 2; }
.contact-share { order: 3; }
.composer-area .hint { margin: 0; font-size: 0.8125rem; }

.composer__picture,
.recorder .button,
.contact-share summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.composer__picture:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }

/* Contact cards */

.contact-card {
  display: grid;
  gap: 0.5rem;
  min-width: 14rem;
  padding: 0.9rem 1rem;
  margin: -0.2rem -0.5rem 0.35rem;
  border: 2px solid var(--ink);
  border-radius: 1.125rem;
  background: var(--paper);
  color: var(--ink);
}
.message--mine .contact-card a, .message--mine .contact-card .link-button { color: var(--ink); }
.contact-card__title { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.contact-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 0.85rem; margin: 0; }
.contact-card dt { color: var(--muted); font-weight: 600; }
.contact-card dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.contact-card__revoke { justify-self: start; min-height: 2.25rem; }
.message:not(.message--mine) .contact-card__revoke { display: none; }
.contact-share summary { list-style: none; }
.contact-share summary::-webkit-details-marker { display: none; }
.contact-share[open] { flex-basis: 100%; }
.contact-share__form { margin-top: 0.75rem; }

/* A step between stages gets a page that says what changes: who sees you, which requests end. */

.page-actions { display: grid; gap: 0.5rem; margin-top: 2rem; }
.page-actions form.button_to { display: block; }

.panel {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-card);
  background: var(--card);
}
.panel h2, .panel__title { margin: 0; font-size: 1.0625rem; }
.panel p { margin: 0; font-size: 0.9375rem; }
.panel .button { justify-self: start; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.checklist li { position: relative; padding-left: 2rem; line-height: 1.45; }
.checklist li::before {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.15rem;
  width: 0.45rem;
  height: 0.85rem;
  border-right: 2.5px solid var(--red);
  border-bottom: 2.5px solid var(--red);
  transform: rotate(45deg);
}

.preview-card { display: flex; gap: 0.75rem; padding: 0.75rem; border-radius: var(--radius-card); background: var(--card); }
.preview-card__photo { flex: none; width: 6.5rem; height: 8rem; border-radius: var(--radius); object-fit: cover; background: var(--photo); }
.preview-card__body { display: grid; align-content: start; gap: 0.5rem; min-width: 0; }
.preview-card__name { margin: 0; font-size: 1.25rem; font-weight: 800; }
.preview-card__name span { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.preview-card .about-list li { background: var(--paper); }

.consequences { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.consequence { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.consequence:last-child { border-bottom: 0; }
.consequence__avatar { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; background: var(--photo); }
.consequence__who { flex: 1; min-width: 0; display: grid; }
.consequence__who span { font-size: 0.8125rem; color: var(--muted); }

.tag { flex: none; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--chip); font-size: 0.75rem; font-weight: 800; }
.tag--red { background: var(--red-tint); color: var(--red-text); }

.match-pair { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; padding-left: 4px; }
.match-pair__avatar {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--photo);
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--red);
}
.match-pair__mark { color: var(--red); }
.ended__mark { color: var(--muted); margin: 1.5rem 0 1rem; }

/* Requests: delivered requests as slots, so the limit is visible. */

.section--first { margin-top: 1rem; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 1rem; }
.section__head h2 { margin-bottom: 0.25rem; }

.sent-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin: 0.75rem 0 0.5rem; }
.sent .slot-tile {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.35rem;
  min-height: 10rem;
  padding: 0.75rem 0.5rem 0.25rem;
  border: 0;
  border-radius: 1.25rem;
  background: var(--card);
  text-align: center;
}
.slot-tile__avatar { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; background: var(--photo); }
.slot-tile .sent__name { text-decoration: none; }
.slot-tile .link-button { min-height: 2.25rem; font-size: 0.8125rem; }
.sent .slot-tile--free { background: none; border: 2px dashed var(--line); align-content: stretch; padding: 0; }
.slot-tile--free a {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 800;
  text-decoration: none;
}
.slot-tile__plus { font-size: 1.75rem; line-height: 1; color: var(--red); }

.timer { padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 0.75rem; font-weight: 800; }
.timer--soon { background: var(--red); color: var(--on-red); }
