/*
  Halves site styles.
  Plain CSS, no build step. Sections:
  1. Fonts (self-hosted, see assets/fonts/ and the OFL license files there)
  2. Design tokens (light and dark)
  3. Base and layout
  4. Header and footer
  5. Landing page sections (the hero, How it works, and the area section,
     "Coming to your area soon", with the "Mobile app coming soon" note,
     the Kundera quote, the map of the visitor's area and the note of
     where Halves is open)
  6. Waitlist form and success state (the join section)
  7. Simple pages (privacy, why Halves, 404)
  8. Motion
  9. App page (/app/: sign-up, log-in, About you, the profile, partner
     filters, the two MaxDiff steps, results, then the menu's pages: New
     Halves and Connections, My Profile, Product Research, Feedback (the
     Give feedback form) and Account; the menu itself, whose Results tab
     opens the results, is in section 4)
  10. Blog (the list, a post, the home page's From the blog, the admin
      preview bar)
*/

/* 1. Fonts: latin subsets only, from Fontsource (OFL 1.1). They live with the rest of the brand in brand/fonts/. */
@font-face {
  font-family: "Gabarito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("brand/fonts/gabarito-latin-700-normal.woff2") format("woff2");
  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: "Gabarito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("brand/fonts/gabarito-latin-800-normal.woff2") format("woff2");
  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: "Onest";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("brand/fonts/onest-latin-400-normal.woff2") format("woff2");
  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: "Onest";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("brand/fonts/onest-latin-600-normal.woff2") format("woff2");
  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: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("brand/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  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;
}

/* 2. Design tokens. The brand guide is assets/brand/README.md: two rings, and the coral
   middle where they meet is the match. Indigo carries the text and buttons. Coral and
   periwinkle are for graphics and tints, since plain coral is under 4.5:1 for text on lilac. */
:root {
  color-scheme: light dark;

  --bg: #F3F1FB;               /* lilac */
  --surface: #FFFFFF;
  --sunk: #E8E5F7;
  --ink: #23205A;              /* indigo */
  --muted: #5B5880;            /* 5.9:1 on bg */
  --line: #DAD6F0;
  --primary: #23205A;          /* buttons */
  --primary-hover: #34307F;
  --on-primary: #FFFFFF;       /* 14:1 on primary */
  --coral-text: #C4391F;       /* coral when it is text: 4.8:1 on bg */
  --coral: #F05D43;            /* coral as a graphic: the hero's overlap */
  --coral-soft: #FDE4DE;
  --periwinkle-soft: #E6E4FB;
  --error: #B4232F;
  --success: #1E7A44;

  /* Derived tokens */
  --field-bg: #FFFFFF;
  --field-line: #8A86B3;       /* input borders: 3.4:1 on white, meets non-text contrast */
  --link: #4A43C9;             /* 6.4:1 on bg, 7:1 on white */
  --focus: var(--link);
  --step-done: #C4C1F4;        /* the step bar's finished steps (section 9): indigo 8.6:1 on it */
  --step-done-hover: #A9A6F2;  /* periwinkle, hovered or pressed: indigo 6.6:1 on it */
  --suggested: #DEDBF9;        /* a suggested pill not picked (section 9): indigo 10.9:1 on it, 1.35:1 on white */
  --cancel: #FCE4E6;           /* Cancel buttons' light red (.button-cancel): text 6.5:1 on it, 1.2:1 on white */
  --cancel-hover: #F9D3D7;     /* hovered: text 5.7:1 on it */
  --cancel-line: #D9727C;      /* their border: 3.2:1 on white */
  --cancel-text: #9E1F2A;      /* dark red, darker than --error: 7.8:1 on white */

  --font-head: "Gabarito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --max: 1120px;
  --gutter: 16px;
  --radius-sm: 12px;
  --radius: 24px;
  --section-space: clamp(3.5rem, 2rem + 6vw, 7rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15133A;             /* night */
    --surface: #1D1A4A;
    --sunk: #27245C;
    --ink: #F3F1FB;
    --muted: #ABA8D6;          /* 7:1 on surface */
    --line: #34306B;
    --primary: #A9A6F2;        /* periwinkle */
    --primary-hover: #BDBAF6;
    --on-primary: #15133A;     /* 8:1 on primary */
    --coral-text: #FF8A72;
    --coral: #F26A51;
    --coral-soft: #3A2240;
    --periwinkle-soft: #262361;
    --error: #FF7A84;
    --success: #5BCB8A;

    --field-bg: #15133A;
    --field-line: #7E7AB8;     /* 4:1 or better on dark surfaces */
    --link: #B9B6FF;
    --step-done: #403C93;      /* periwinkle 4.1:1 on it */
    --step-done-hover: #2F2B72; /* darker, hovered or pressed: periwinkle 5.5:1 on it */
    --suggested: #363280;      /* text 9.8:1 on it, 1.5:1 on surface, 1.6:1 on the night pills */
    --cancel: #4D2440;         /* wine: text 7.6:1 on it, 1.3:1 on surface */
    --cancel-hover: #5E2B48;   /* text 6.5:1 on it */
    --cancel-line: #B8566A;    /* 3.5:1 on surface */
    --cancel-text: #FFB3B9;    /* pink */
  }
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 32px; }
}

/* 3. Base and layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 640px) {
  body { font-size: 1.0625rem; }
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-weight: 800;
  font-size: clamp(2.5rem, 1.5rem + 4.6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

/* The area section's map starts level with the capital letters of that
   section's h2, worked out from this font, size and line height
   (.area-map, section 5): change them here and its top margin there
   follows only if it is changed too. */
h2 {
  font-weight: 800;
  font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h3 {
  font-weight: 700;
  font-size: 1.3125rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
}

p {
  margin: 0;
}

/* Links have no underline, on hover either. Hovering one turns it coral
   text, the color the step bar gives the step on screen. Links made into
   buttons (.button) keep their own colors. */
a {
  color: var(--link);
  text-decoration: none;
}

a:not(.button):hover {
  color: var(--coral-text);
}

/* A link inside running text (a sentence in a paragraph or a label, or a
   list item on a prose page) is SemiBold as well. Without an underline its
   color alone would tell it apart from the words around it, and the link
   color is only about 2:1 against the text color, under the 3:1 WCAG 1.4.1
   asks for. Links that stand on their own (the header, the footer, action
   links such as "Change email") need nothing more; a paragraph that holds
   only a link, such as "Cancel" under Change email's form, gets it too,
   which does no harm. */
p a,
label a,
.prose li a {
  font-weight: 600;
}

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

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

.wrap {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-space);
}

/* Out of sight above the page until it has the focus. It is moved up by
   twice its own height, not by a fixed distance: the link grows with the
   browser's text size, and with large text its lower edge would show at
   the top of the page. */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0;
  transform: translateY(-200%);
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  border: 2px solid var(--focus);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 12px;
  transform: none;
}

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

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.button-primary:hover {
  background: var(--primary-hover);
}

.button-primary:active {
  transform: translateY(1px);
}

.button-primary:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

/* A sign-up step's Next (the MaxDiff screens' Finish too) while a
   required answer is still missing: outlined like the Back next to it, so
   only a step that can be saved shows the filled button. It keeps
   button-primary, and so its width in the row, and still works when
   pressed (members.js, showReady, adds and removes .is-pending). Windows
   high contrast puts its own colors on both looks, and each keeps its 2px
   border. */
.button-quiet,
.button-primary.is-pending {
  background: transparent;
  color: var(--ink);
  border-color: var(--field-line);
}

.button-quiet:hover,
.button-primary.is-pending:hover {
  border-color: var(--ink);
}

/* Every Cancel drawn as a button on the app page is light red (Zack,
   December 3, 2026: "maybe the Cancel button can have light red background
   button color"): a soft red tint with a red border and dark red text,
   the tint a little stronger on hover. It goes with .button-quiet, which
   keeps its place in a row: the pop-up boxes' Cancel, the Account page's
   number form and Delete account's confirm step (app/index.html), and the
   Back of Steps 2 and 3 while it says Cancel (members.js,
   labelStepButtons; Back keeps the quiet look). Pale, it never reads as
   the solid red .button-danger next to it in Delete account. Grayed while
   its box is busy (Log out's), it keeps its tint on hover. Windows high
   contrast gives it the system's button colors, as the other buttons. A
   Cancel that is a link (Change email's, the code screen's) stays a
   link. */
.button-cancel,
.button-cancel:hover {
  background: var(--cancel);
  color: var(--cancel-text);
  border-color: var(--cancel-line);
}

.button-cancel:not(:disabled):not([aria-disabled="true"]):hover {
  background: var(--cancel-hover);
}

.button-small {
  min-height: 44px;
  padding: 0.5rem 1.125rem;
  font-size: 0.9375rem;
}

/* 4. Header and footer */
.site-header {
  padding-block: 14px;
}

/* Wraps only when the logo and the buttons do not fit on one row (the app
   page's "Log out" on a 320px phone): the buttons then move to a second
   row, on the right, instead of squeezing the logo. The app page's menu
   takes a row of its own under 1170px (.app-menu). */
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin-left: auto;
}

/* A plain link in the header: the landing page's "Log in" (assets/app.js
   shows it only on APP_HOSTS: meethalves.com, the dev site and locally),
   and each tab of the app page's menu (.app-menu). */
.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

/* The app menu's tab whose view is on screen: a quiet "you are here" marker
   instead of something to click, in coral text like the step on screen in
   the step bar (with a bar under it, .app-menu-link). */
.header-link[aria-current="page"] {
  color: var(--coral-text);
  cursor: default;
}

/* Windows high contrast turns the coral into its link color, as on every
   other link, so there the marker is in the text color instead, hovered or
   not: it then stands out from the links next to it, and reads as nothing
   to click. (Its highlight color is too close to the link color in some
   themes.) */
@media (forced-colors: active) {
  .header-link[aria-current="page"],
  .header-link[aria-current="page"]:hover {
    color: CanvasText;
  }
}

/* The app page's menu (app/index.html, #app-menu, shown by members.js while
   someone is signed in): during sign-up My Profile and Account; once
   every step is done New Halves, Connections, My Profile, Results,
   Product Research (once the studies are in), Feedback and Account.
   Under 1170px it takes a row of its own under the logo and
   "Log out" (the order below): from 640px that row wraps onto another
   line when the tabs do not fit, and on a phone it is one row that
   scrolls sideways (the phone rules below). From 1170px it sits between
   the logo and "Log out", on one row. Each tab is a .header-link, 44px
   tall, its text level with the logo's left edge on the narrow layout;
   the one on screen (aria-current) has a bar under it as well as its
   coral text, so it does not show by color alone. */
.app-menu {
  order: 3;
  flex: 1 1 100%;
  min-width: 0;
}

.app-menu ~ .header-actions {
  order: 2;
}

/* Under 340px "Log out" is a little narrower (about 87px instead of 95px),
   so it still fits beside the logo and the DEV pill on a 320px phone. */
@media (max-width: 339.98px) {
  .app-menu ~ .header-actions .button-small {
    padding-inline: 0.875rem;
  }
}

.app-menu-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.125rem;
  margin: 0 0 0 -0.625rem;
  padding: 0;
  list-style: none;
}

.app-menu-link {
  position: relative;
  gap: 0.375rem;
  padding-inline: 0.625rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  white-space: nowrap;
}

/* A border, not a background, so Windows high contrast keeps it. */
.app-menu-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.625rem;
  right: 0.625rem;
  bottom: 5px;
  border-top: 3px solid currentColor;
  border-radius: 2px;
}

/* Product research's coral dot, while a study waits for this person (with
   " (new study)" for screen readers next to it). For sighted people the dot
   alone says so, so it takes the text coral, which keeps 3:1 or better on
   the header's background: #C4391F on #F3F1FB is 4.75:1 (the graphic coral,
   #F05D43, is 2.96:1), and #FF8A72 on #15133A in dark mode. */
.menu-new {
  display: inline-flex;
}

.menu-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--coral-text);
}

@media (forced-colors: active) {
  .menu-dot {
    forced-color-adjust: none;
    background: CanvasText;
  }
}

/* On a phone (under 640px) the menu is one row that scrolls sideways,
   from one edge of the screen to the other, instead of wrapping: once
   every step is done its tabs are about 740px wide, three lines on a 393px
   phone, which would push each page's heading down. So while someone
   is signed in, the header is two rows at every stage (the logo and
   "Log out", then the menu), 108px tall: 8px of padding above them, then
   the menu's own 6px above and under its 44px tabs, room for their focus
   outline, which the scrolling row would cut off otherwise. The header
   has no padding under the menu, and the space above the page's first
   panel is 0.5rem, not about 1.75rem. With the step bar's phone rules
   (section 9) a step's heading starts about 200px from the top on a 393px
   phone, and My profile's about 140px.

   During sign-up the tabs fit on most phones, so nothing scrolls. The
   first tab's text stays level with the logo, and the list keeps its end
   padding when it is wider than the row. Once every step is
   done, Product Research, Feedback and Account are past the right edge
   (Results, before them, just fits on a 393px phone): when the tab on
   screen is not all in sight, members.js scrolls the row to put it in
   the middle (showMenu, scrollToCurrentTab), also after the person
   scrolled the row themselves. A touch screen shows no scroll bar, as the
   cut-off tab at the edge already shows that the row scrolls; with a
   mouse a thin one stays, the only way to scroll it besides the Tab key.
   overscroll-behavior keeps a swipe past the row's end from going back a
   page. */
@media (max-width: 639.98px) {
  .site-header:has(.app-menu:not([hidden])) {
    padding-block: 0.5rem 0;
  }

  .site-header:has(.app-menu:not([hidden])) + .app-main {
    padding-top: 0.5rem;
  }

  /* The negative top margin takes back the header's 4px row gap, so the
     padding is all the space between the rows. */
  .app-menu {
    display: flex;
    margin: -0.25rem calc(-1 * var(--gutter)) 0;
    padding-block: 0.375rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .app-menu-list {
    flex: 1 0 auto;
    flex-wrap: nowrap;
    margin: 0;
    padding-inline: calc(var(--gutter) - 0.625rem) var(--gutter);
  }
}

@media (max-width: 639.98px) and (pointer: coarse) {
  .app-menu {
    scrollbar-width: none;
  }

  .app-menu::-webkit-scrollbar {
    display: none;
  }
}

@media (min-width: 1170px) {
  .app-menu {
    order: 0;
    flex: 1 1 auto;
  }

  .app-menu ~ .header-actions {
    order: 0;
  }

  .app-menu-list {
    margin-left: 0;
  }
}

/* The landing page's "Log in". Block, not flex, with a 44px line to keep
   the text centered (it showed the signed-in person's first name, cut
   with "...", until December 1, 2026: the name is now the menu button
   below). */
.header-link[data-app-link] {
  display: block;
  max-width: 7.5em;
  line-height: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The landing page's menu for a signed-in person (index.html,
   #account-menu-box in place of "Log in"; assets/app.js, initAccountMenu;
   Zack, December 1, 2026). The button is the first name in the header
   link's look (.header-link: indigo SemiBold, 44px tall, coral on hover
   like a link), with a small arrow after it that turns up while the menu
   is open. A long name ends in "..." at 7.5em, as the name link did, so
   the logo and the name still fit on one row on a 320px phone (with the
   DEV pill, a name over about 76px moves to a row of its own there:
   .env-pill); the button's aria-label keeps the full name.
   The menu drops 4px below the button with its right edge on the
   button's (so on the header's right edge, never past the window), over
   the hero (z-index; the header clips nothing), in the drop-downs' look
   (.dropdown-list, section 9): the field's white (night in dark mode) and
   border, the small radius and the shadow, each item at least 44px tall,
   tinted on hover, and the item with the focus tinted periwinkle and
   outlined in the focus color, as a drop-down's highlighted option is
   (the mouse moves the focus to the item under it, so there is one at a
   time). No animation. The note under the name (MESSAGES.logOutFailed)
   takes the menu's place and look, in the error color, and draws nothing
   while it is empty. */
.account-menu {
  position: relative;
}

.account-menu-button {
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.account-menu-button:hover {
  color: var(--coral-text);
}

.account-menu-name {
  max-width: 7.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-arrow {
  flex: none;
  width: 0.75em;
  height: 0.75em;
}

.account-menu-button[aria-expanded="true"] .account-menu-arrow {
  transform: rotate(180deg);
}

.account-menu-list,
.account-menu-note {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  margin: 0;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  box-shadow: 0 8px 24px rgba(35, 32, 90, 0.18);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
}

.account-menu-list {
  display: grid;
  min-width: 11rem;
  max-width: calc(100vw - 2 * var(--gutter));
  padding: 0.25rem;
  list-style: none;
  color: var(--ink);
}

.account-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Stronger than a:not(.button):hover, which would turn "Open Halves"
   coral. */
.account-menu-list .account-menu-item:hover {
  background: var(--sunk);
  color: var(--ink);
}

.account-menu-list .account-menu-item:focus {
  background: var(--periwinkle-soft);
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

/* "Log out" while the API answers: it cannot be picked again. */
.account-menu-list .account-menu-item[aria-disabled="true"] {
  color: var(--muted);
  cursor: not-allowed;
}

.account-menu-note {
  width: max-content;
  max-width: min(18rem, calc(100vw - 2 * var(--gutter)));
  padding: 0.75rem 1rem;
  color: var(--error);
}

.account-menu-note:empty {
  padding: 0;
  border: 0;
  box-shadow: none;
}

/* Windows high contrast drops the tint and the shadow, as for
   .dropdown-list: a border in the text color, and the item with the focus
   in the system's highlight colors. */
@media (forced-colors: active) {
  .account-menu-list,
  .account-menu-note {
    border-color: CanvasText;
  }

  .account-menu-list .account-menu-item:hover {
    outline: 1px solid CanvasText;
    outline-offset: -1px;
  }

  .account-menu-list .account-menu-item:focus {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
    outline: 2px solid Highlight;
  }

  .account-menu-list .account-menu-item[aria-disabled="true"] {
    color: GrayText;
  }
}

/* While the landing page does not yet know whether the browser is signed
   in, nor whether a signed-out visitor may create an account from where
   they are (data-account-pending on <html>, set by
   assets/account-pending.js before the page is drawn, on APP_HOSTS only,
   and taken off by app.js once GET /api/me and GET /api/auth/region have
   answered, or after its wait), neither its signed-out parts (the hero's
   "Join the waitlist", "Create an account", the waitlist panel) nor its
   signed-in ones ("Open Halves") show, nor the parts marked data-region
   (the whole join section, which hides where the visitor may create an
   account), nor the area section's heading (data-area: "Coming to your
   area soon" or "We operate in your area"), so nobody sees the wrong
   buttons or heading for a moment. visibility keeps their place, so
   nothing jumps where the page stays as it is. */
[data-account-pending] [data-signed-out],
[data-account-pending] [data-signed-in],
[data-account-pending] [data-region],
[data-account-pending] [data-area] {
  visibility: hidden;
}

/* The logo link and, on the dev site and locally, the "DEV" pill right of
   it, on one row that never splits: when the header wraps, the buttons
   move, not the pill. The pill is outside the link, so clicking it does
   not follow the link and it is not inside the link's focus ring. */
.header-brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.375rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
}

/* The logo is an image from assets/brand/logo/. Each page's <picture> swaps in the
   on-dark file in dark mode. Its height sets its size. */
.brand-logo {
  width: auto;
  height: 30px;
}

/* "DEV", right of the logo in .header-brand on every page with a header.
   It starts hidden, and assets/env.js shows it on the dev site and locally
   only (DEV_HOSTS there), never on meethalves.com. A small badge, about
   23px tall and 39px wide, centered on the logo: the --coral-soft tint, a
   1px --coral outline, and --coral-text mixed with 15% of --ink, so a
   little darker in light mode and a little lighter in dark mode (plain
   --coral-text on the tint is 4.4:1 in light mode). That gives #AC3528 on
   #FDE4DE, 5.3:1, and in dark mode #FD9987 on #3A2240, 6.8:1. A browser
   without color-mix shows the text in --ink. No hover and no focus, so it
   reads as a marker, not a button. Nothing loads to its left, so it does
   not move when the header links appear. With its gap it adds about 45px
   to the header row, so on the dev site the header wraps a little sooner
   than on production (the comment on .header-inner): under about 315px on
   the signed-in app page (270px without it), where only "Log out" shares
   the logo's row (the menu has its own), and "Log out" is a little
   narrower under 340px (.app-menu ~ .header-actions), so phones down to
   320px keep one row for them; and on the landing page, where "Log in" or
   a signed-in person's name is alone next to it, for a name wider than
   about 76px at 320px (92px less the menu button's arrow: .account-menu).
   "Why we are different" and the privacy notice have no header buttons,
   so they never wrap. */
.env-pill {
  flex: none;
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--coral);
  border-radius: 999px;
  background: var(--coral-soft);
  color: color-mix(in srgb, var(--coral-text) 85%, var(--ink));
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.06em;
  white-space: nowrap;
  cursor: default;
}

/* Windows high contrast drops the coral tint, so the border draws the pill
   there, in the text color. */
@media (forced-colors: active) {
  .env-pill {
    border-color: CanvasText;
  }
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-inner {
  display: grid;
  gap: 1.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding-block: 0.375rem;
}

.brand-small .brand-logo {
  height: 26px;
}

/* "Admin" (index.html and app/index.html): for a signed-in admin only,
   so assets/app.js and assets/members.js show it. It sits after the
   footer links in the page. On phones, while it shows, the footer is two
   columns: the logo across both, then the links on the left and "Admin"
   at the right end of their row, level with the first line of links if
   they wrap. From 760px up, while it shows, the footer is three columns, the logo
   on the left, the links on the right, and "Admin" in the middle: the
   outer columns share the rest of the row equally, so it is centered on
   the footer, not just between them. Hidden (everyone else, and every
   other page), the footer keeps its two columns, the logo and then the
   links taking the rest of the row. */
.footer-admin {
  justify-self: center;
}

@media (max-width: 759.98px) {
  .footer-inner:has(> .footer-admin:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1.5rem;
  }
  .footer-inner:has(> .footer-admin:not([hidden])) > .brand {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .footer-admin {
    justify-self: end;
    align-self: start;
  }
}

.footer-admin a {
  display: inline-block;
  padding-block: 0.375rem;
}

@media (min-width: 760px) {
  .footer-inner {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 2rem;
  }
  .footer-links {
    justify-content: flex-end;
  }
  .footer-inner:has(> .footer-admin:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .footer-inner:has(> .footer-admin:not([hidden])) > .brand {
    grid-area: 1 / 1;
    justify-self: start;
  }
  .footer-admin {
    grid-area: 1 / 2;
  }
  .footer-inner:has(> .footer-admin:not([hidden])) > nav {
    grid-area: 1 / 3;
  }
}

/* 5. Landing page sections */

/* Hero */
.hero {
  padding-block: clamp(1.5rem, 0.5rem + 4vw, 4.5rem) var(--section-space);
}

.hero-grid {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

/* On phones the picture comes after the headline and button, so they stay on the first screen. */
.hero-art {
  width: min(100%, 31rem);
}

/* The match story, kept short: two people with their priority chips (rows from 1rem to about
   10.7rem), and the rings right below them (from 11.4rem). "Common ground" sits between the
   two people just above the rings (8.2rem to about 11rem); it only appears once the shared
   chips have glided into it, and each person's own chip (the top row) stays clear of it.
   It is a size container (cqw) so the motion in section 8 can send the shared chips to its
   center at any width. */
.match-story {
  --person-width: 9rem;
  position: relative;
  min-height: 21rem;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
}

.match-person {
  position: absolute;
  top: 1rem;
  display: grid;
  width: var(--person-width);
  justify-items: center;
  gap: 0.45rem;
  z-index: 3;
}

.match-person--left { left: 0; }
.match-person--right { right: 0; }

/* A and B are each half of one heart, split like a yin-yang: A the left half and B the right,
   so their curved sides face each other. Each shape is the SVG path in its avatar in
   index.html: the two share one smooth S-curve (two cubic Beziers from the heart's bottom
   point to the notch at its top, bulging right in the lower half and left in the upper; B's
   is A's, 30 units to the left), so at the end of the story (section 8) they fit together
   into one heart. Drawn in the text color with no fill, so the page shows through.
   B's half is two paths, its outline and its copy of the S-curve (.match-half-middle), so
   section 8 can hide that copy once the halves have joined: the two copies then lie exactly
   on top of each other, and two strokes stacked made the middle line look bolder than the
   outline. The paths' ends are round (stroke-linecap), so B's notch and point stay as round
   as A's corners (stroke-linejoin) and B looks whole until then (Zack, December 1, 2026).
   A comment above the avatars in index.html keeps the earlier zigzag paths, to go back to
   them. */
.match-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
}

.match-half {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.match-priority {
  display: inline-flex;
  min-height: 1.7rem;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 0.4rem 1rem rgba(35, 32, 90, 0.06);
}

.common-ground {
  position: absolute;
  left: 50%;
  top: 8.2rem;
  display: grid;
  width: 11rem;
  translate: -50% 0;
  justify-items: center;
  gap: 0.25rem;
  text-align: center;
  z-index: 4;
}

.common-ground span {
  color: var(--coral-text);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.common-ground strong {
  color: var(--ink);
  font-size: 0.9rem;
}

/* The rings' centers are 4.5rem apart, about 0.54 of a ring (measured from border middle to
   border middle), as in the logo (assets/brand/logo/halves-mark.svg: r 26, 28 apart). */
.match-mark {
  position: absolute;
  left: 50%;
  top: 11.4rem;
  width: 13.5rem;
  height: 9rem;
  translate: -50% 0;
}

/* The rings and the overlap, together, so the heartbeat (section 8) can pulse them as one. */
.match-beat {
  position: absolute;
  inset: 0;
}

.match-ring,
.match-overlap {
  position: absolute;
  top: 0;
  width: 9rem;
  height: 9rem;
}

.match-ring {
  border: 0.7rem solid var(--ink);
  border-radius: 50%;
  z-index: 2;
}

.match-ring--left { left: 0; }
.match-ring--right { right: 0; }

.match-overlap {
  left: 50%;
  width: 3.8rem;               /* the lens where the rings' border middles cross: */
  height: 6.97rem;             /* 9rem rings 4.5rem apart, so the borders hide its edges */
  top: 1.015rem;
  translate: -50% 0;
  clip-path: polygon(50% 0%, 68% 7%, 84% 21%, 96% 39%, 100% 50%, 96% 61%, 84% 79%, 68% 93%, 50% 100%, 32% 93%, 16% 79%, 4% 61%, 0% 50%, 4% 39%, 16% 21%, 32% 7%);
  background: var(--coral);
  opacity: 1;
  transform-origin: center;
  filter: drop-shadow(0 0.5rem 1.1rem rgba(240, 93, 67, 0.22));
  z-index: 1;
}

.hero-copy {
  display: grid;
  gap: 1.25rem;
}

.hero-sub {
  max-width: 34rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 3rem;
  }
  .hero-art {
    justify-self: center;
  }
}

/* How it works: a real sequence, so the steps are numbered. */
.step-list {
  display: grid;
  gap: 2rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding-top: 1.25rem;
  border-top: 2px solid var(--line);
}

.step-number {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--coral-text);
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--muted);
  max-width: 30rem;
}

@media (min-width: 760px) {
  .step-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }
}

/* The area section (<section id="area">, right after the join section;
   Zack, December 2, 2026), shown to everyone: its heading, "Coming to your
   area soon" or, where the region is open, "We operate in your area" (two
   spans, one shown at a time: app.js), then the "Mobile app coming soon"
   pill and the Kundera quote, both moved here from the join section with
   their look. Left-aligned like the other sections' headings, in one
   column at every width. The quote sits 2.5rem under the pill, as far as
   How it works' steps are under its heading. The map and the note of
   where Halves is open, which can show with them (below), leave all of
   this as it is. */
.area-inner {
  display: grid;
  gap: 1rem;
  align-content: start;
}

/* "Mobile app coming soon": a small pill under the heading, as wide as its
   text. Muted on periwinkle-soft is 5.3:1 (light) and 6.2:1 (dark). The
   transparent border shows in forced colors. */
.app-soon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: start;
  max-width: 100%;
  margin-top: 0.5rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--periwinkle-soft);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}

.app-soon-icon {
  flex: none;
  width: 1.125em;
  height: 1.125em;
}

/* The Kundera quote, the last thing in the area section as written (the
   map and the note of where Halves is open, below, come after it when
   they show). Its class keeps the name it had in the join section. */
.join-quote {
  margin: 1.5rem 0 0;
  max-width: 30rem;
}

.join-quote blockquote {
  margin: 0;
}

/* The quote alone is set in Instrument Serif italic (brand/fonts/), a display
   serif that only appears here. */
.join-quote p {
  margin: 0;
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.625rem, 1.35rem + 1.2vw, 2.125rem);
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.join-quote figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* The map of the visitor's general area (Zack, December 2, 2026: "a map on
   the right side of the operate section that is like a cartoon map which
   shows the region in which the user is logging in from"). The box is in
   index.html, empty and hidden; app.js draws the map into it (an svg,
   centered on the state GET /api/auth/region named) and shows it only when
   that answer came in time with a state. Otherwise it stays hidden and
   takes no room, so the section is as it was.
   The look: a rounded card of light water with a few waves, the states in
   four pastel colors (.area-map-fill-0 to -3, from assets/area-map.json, so
   two neighbors never share one) with round, ink outlines that are as
   thick at every zoom (vector-effect), a thicker line round the coasts and
   the lakes, and a "sticker" shadow under the land. No pin, no labels.
   Where the area is open ("We operate in your area") it has full colors;
   where it is not ("Coming to your area soon", .area-map--soon) the same
   map is softer: lighter fills, a lighter outline and shadow.
   Where: on phones and tablets under the quote, as wide as the text, a bit
   smaller than on wide screens. On wide screens it sits right of the text
   and starts level with it (Zack, December 3, 2026: "text should start at
   the same horizontal position"; until then it was vertically centered on
   the text, out of the flow): the top edge of its border is at the top of
   the heading's capital letters. It is in the flow there, in the text's
   own grid column and across its rows, at the right end, so the section
   grows to hold it and it no longer reaches into the section's padding.
   The text never moves when it appears: the height it adds goes to the
   quote's row alone (the 1fr row of .area-inner below; without the map
   that row is only as tall as the quote, as an auto row would be), and
   the quote stays at the top of its row. There it is exactly as wide
   as the join section's panel above it, with the same left and right edges
   (Zack, December 3, 2026: "the boxes should have the same width"): the
   width below is .join-grid's second column, 1.15 of 2.15 parts of the row
   less its 4rem gap, so keep the two the same. Only when there is room for
   it there, though: .area-inner is a size container, and the map goes
   beside the text only when the section is at least 60rem wide, which
   leaves the heading ("Coming to your area soon", about 27.5rem) a gap of
   2rem or more before the map. That is a window about 1024px wide at the
   default font size (a little more where a scrollbar takes room);
   narrower, or with a larger default font size in the browser (the rems
   grow), the map stays under the quote until it fits beside the text. It
   fades in, except with reduced motion. */
.area-inner {
  container-type: inline-size;
  grid-template-rows: auto auto 1fr;
}

.area-map {
  --map-water: #DCE2FB;
  --map-wave: #B4BEEE;
  --map-ink: var(--ink);
  --map-shadow: #A9A6F2;
  --map-fill-0: #C9C6F5;
  --map-fill-1: #FBD0C4;
  --map-fill-2: #FBE7B5;
  --map-fill-3: #CDEBD8;
  --map-line: 1.75px;
  --map-coast: 4px;
  width: 100%;
  max-width: 30rem;
  aspect-ratio: 4 / 3;
  margin-top: 1.5rem;
  overflow: hidden;
  border: 2px solid var(--map-ink);
  border-radius: var(--radius);
  background: var(--map-water);
}

.area-map--soon {
  --map-water: #E6E9FB;
  --map-wave: #CBD1F2;
  --map-ink: #8A86B3;
  --map-shadow: #D4D2F5;
  --map-fill-0: #E3E1F8;
  --map-fill-1: #F6E3DE;
  --map-fill-2: #F5EEDC;
  --map-fill-3: #E2EFE7;
}

@media (prefers-color-scheme: dark) {
  .area-map {
    --map-water: #2B2868;
    --map-wave: #4A469A;
    --map-ink: #0E0C2B;
    --map-shadow: #0E0C2B;
    --map-fill-0: #8E8AE6;
    --map-fill-1: #E8907C;
    --map-fill-2: #E5C77E;
    --map-fill-3: #8FCFAE;
  }

  .area-map--soon {
    --map-water: #24215A;
    --map-wave: #3A3680;
    --map-ink: #2E2A66;
    --map-shadow: #15133A;
    --map-fill-0: #5E5AA6;
    --map-fill-1: #8D6475;
    --map-fill-2: #8B7D68;
    --map-fill-3: #5F8A78;
  }
}

.area-map-svg {
  width: 100%;
  height: 100%;
  max-width: none;
}

.area-map-water {
  stroke: none;
}

.area-map-wave {
  fill: none;
  stroke: var(--map-wave);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.area-map-shadow,
.area-map-coast,
.area-map-state {
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.area-map-shadow {
  fill: var(--map-shadow);
  stroke: var(--map-shadow);
  stroke-width: var(--map-coast);
}

.area-map-coast {
  fill: var(--map-ink);
  stroke: var(--map-ink);
  stroke-width: var(--map-coast);
}

.area-map-state {
  stroke: var(--map-ink);
  stroke-width: var(--map-line);
}

.area-map-fill-0 { fill: var(--map-fill-0); }
.area-map-fill-1 { fill: var(--map-fill-1); }
.area-map-fill-2 { fill: var(--map-fill-2); }
.area-map-fill-3 { fill: var(--map-fill-3); }

/* The note of where Halves is open (Zack, December 3, 2026: "a little note
   on the bottom on the left side in this section that lists the locations
   that we operate in"): "Now open in New York, New Jersey and
   Connecticut.", the last thing in the section. The <p> is in index.html,
   empty and hidden; app.js writes the sentence from the names GET
   /api/auth/region answered (the server's own region list) and shows it,
   under both headings, only when that answer came in time and named any.
   Otherwise it stays hidden and takes no room.
   The look: a small, quiet line like the quote's caption (muted on the
   page's background is 5.9:1 light and 7.8:1 dark), left-aligned, at most
   as wide as the quote, 2.5rem under what is before it: the map on phones
   and tablets, the quote where there is no map. Where it takes more than
   one line (a phone, a long list), its last line is not left with one
   word, "Connecticut." (text-wrap: pretty, which on a phone breaks it
   before "and" instead); a browser without it wraps as usual. A city's
   name is as an admin typed it, so a long one with no space in it breaks
   where the line ends instead of widening the page. It fades in like the
   map, and with it where there is one. On wide screens it is at the
   bottom left, level with the map's bottom edge (below). */
.area-places {
  max-width: 30rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

/* Wide screens: the text is in rows 1 to 4 of the one column (the
   heading, the pill, the quote, the note of where Halves is open) and the
   map in the same column across those rows, at the top right.
   The map's top margin brings the top of its border down to the top of
   the heading's capital letters: 0.205 of the heading's font size (the
   clamp is h2's, in section 3: keep the two the same), which is where
   Gabarito ExtraBold's capitals start in a line 1.1 high.
   Its bottom margin is how far the baseline of the note's last line is
   above the bottom of the note (0.4375rem, for Onest at 0.9375rem in a
   line 1.6 high). So where the map is taller than the text, the note ends
   with its baseline on the map's bottom edge, at the bottom left of the
   section; where the text is taller (a long list of places), the note
   just follows the quote, 2.5rem under it.
   With no note the map spans the three rows of the text and has no bottom
   margin (:has; a browser without it leaves that 0.4375rem under the map,
   nothing else).
   Beside the map the note is at most as wide as the join section's text
   column above it (the first column of .join-grid), so a long list keeps
   clear of the map in a window that is only just wide enough. */
@media (min-width: 900px) {
  @container (min-width: 60rem) {
    .area-inner > h2 {
      grid-area: 1 / 1;
    }
    .area-inner > .app-soon {
      grid-area: 2 / 1;
    }
    .area-inner > .join-quote {
      grid-area: 3 / 1;
      align-self: start;
    }
    .area-places {
      grid-area: 4 / 1;
    }
    .area-map:not([hidden]) + .area-places {
      max-width: min(30rem, (100% - 4rem) / 2.15);
    }
    .area-map {
      grid-area: 1 / 1 / span 4;
      justify-self: end;
      align-self: start;
      width: calc((100% - 4rem) * 1.15 / 2.15);
      max-width: none;
      margin: calc(0.205 * clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem)) 0 0.4375rem;
    }
    .area-map:has(+ .area-places[hidden]) {
      grid-row-end: span 3;
      margin-bottom: 0;
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .area-map,
  .area-places {
    animation: area-map-in 0.6s ease-out both;
  }
}

@keyframes area-map-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Windows high contrast: the system's colors, the outlines kept, nothing
   only a color would show. */
@media (forced-colors: active) {
  .area-map {
    border-color: CanvasText;
    background: Canvas;
  }
  .area-map-wave,
  .area-map-shadow {
    display: none;
  }
  .area-map-coast {
    fill: CanvasText;
    stroke: CanvasText;
  }
  .area-map-state {
    fill: Canvas;
    stroke: CanvasText;
  }
}

/* 6. Waitlist form and success state (the join section). Since December 2,
   2026 its left column is the heading and the intro only (the "Mobile app
   coming soon" pill and the quote moved to the area section, section 5),
   at the top of the column, with the panel on its right on wide screens
   and under it on narrow ones. The single column of narrow screens can
   shrink (minmax(0, 1fr), as the two of wide screens do), so a very long
   first name in the thank-you panel wraps instead of widening the page. */
.join-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.join-copy {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.join-copy p {
  max-width: 30rem;
  color: var(--muted);
}

/* The area section's map is as wide as the second column here (.area-map,
   section 5): change these columns or the gap and its width follows only
   if it is changed too. The same goes for that section's note of where
   Halves is open, which beside the map is at most as wide as the first
   column (.area-places). */
@media (min-width: 900px) {
  .join-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 4rem;
  }
  .join-copy {
    grid-column: 1;
    grid-row: 1;
  }
  .join-panel {
    grid-column: 2;
    grid-row: 1;
  }
}

.join-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 0.75rem + 2.5vw, 2.5rem);
}

/* The panel a signed-in person sees in place of the waitlist panel (only on
   APP_HOSTS, assets/app.js): "You already have a Halves account." and
   "Open Halves", as wide as its word. It is only as tall as that, at the
   top of its column on wide screens, instead of stretching to the height
   of the heading and the intro. */
.join-signed-in {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  align-self: start;
}

.waitlist-form {
  display: grid;
  gap: 1.5rem;
}

.field {
  display: grid;
  gap: 0.375rem;
  align-content: start;
  min-width: 0;
}

.field label,
.optional-group legend {
  font-weight: 600;
  line-height: 1.35;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

/* Two fields side by side that stack on narrow phones, so a long name still
   fits its box: the waitlist's first name and gender (the last name until
   November 19, 2026), and the app's first and last name at sign-up. */
.field-row--names {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 480px) {
  .field-row--names {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.optional-group {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.optional-group legend {
  padding: 0;
  margin-bottom: 0.25rem;
}

.optional-tag {
  font-weight: 400;
  color: var(--muted);
}

.hint {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.text-input {
  width: 100%;
  min-height: 48px;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;   /* 16px keeps iOS from zooming on focus */
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.text-input::-webkit-outer-spin-button,
.text-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.text-input:hover {
  border-color: var(--ink);
}

.text-input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
  border-radius: var(--radius-sm);
}

.text-input[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}

/* Example text in an empty box (a survey question's "placeholder", such as
   the favorite activities' "Hiking", and the Give feedback box's prompt): the
   muted gray of hints, so it reads as an example, not an answer. 6.7:1 on
   the box's background in light, 7.8:1 in dark. opacity: 1, as Firefox dims
   placeholders by default. */
.text-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field-error {
  color: var(--error);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
}

.field-error:empty {
  display: none;
}

.consent {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 0.75rem;
  row-gap: 0.375rem;
  align-items: start;
}

.consent input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.consent label {
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
}

.consent .field-error {
  grid-column: 2;
}

/* Honeypot: off screen but not display:none, so naive bots still fill it. */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.waitlist-form .button-primary {
  width: 100%;
}

.form-status {
  margin-top: 1rem;
  font-weight: 600;
  line-height: 1.45;
}

.form-status:empty {
  display: none;
}

.form-status[data-tone="error"] {
  color: var(--error);
}

.noscript-note {
  margin-bottom: 1.25rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--sunk);
  color: var(--ink);
}

/* A column that can shrink, so "Thanks, <first name>." wraps inside the
   panel at every width, however long the name. */
.join-success {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.join-success h3 {
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  letter-spacing: -0.015em;
}

.join-success h3:focus {
  outline: none;
}

.join-success h3:focus-visible {
  outline: 3px solid var(--focus);
}

.success-mark {
  width: 56px;
  height: auto;
}

.share-row {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .share-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

.share-status {
  color: var(--success);
  font-weight: 600;
}

.share-status:empty {
  display: none;
}

/* 7. Simple pages (privacy notice, why Halves, 404) */
.page {
  padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) var(--section-space);
}

.prose {
  max-width: 42rem;
}

.prose h1 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.25rem);
}

.prose h2 {
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

/* The questions under a section on /why-halves/. */
.prose h3 {
  font-size: 1.125rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.prose p + p {
  margin-top: 1rem;
}

.prose ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose .lede {
  margin-top: 1rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  color: var(--muted);
}

.prose .updated {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.not-found {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  max-width: 36rem;
}

.not-found p {
  color: var(--muted);
}

/* The waitlist leave page's heading (waitlist/leave/) gets focus only so
   screen readers read the result of its button. It is not a control, so it
   never shows a focus ring (as the app page's headings). */
.not-found h1:focus {
  outline: none;
}

/* 8. Motion: two people arrive with different priorities and hold still for a moment
   (about 1.3s to 1.9s). Their shared priorities then glide into "Common ground" at the
   center, and the Halves rings are pulled together by that common ground. As they join,
   each person's own priority fades and A and B settle into their own rings, either side of
   the orange overlap. Then the finished picture (label, rings, A and B) rises together to
   the middle of the area and grows a little as it does. Last, A and B, each half of one
   heart, glide out of their rings and join on the overlap, and the heart and the rings beat.
   The moment they join, B's copy of the middle line hides, so it is drawn once.
   The story plays once: every animation runs 7.5s with fill "both", and its last movement
   ends at 77% (about 5.8 seconds). To slow it evenly, change every 7.5s, the 0.23s chip
   delay and the heartbeat's 6.05s delay by the same factor.
   A click (or tap) on the picture freezes it where it is, and the next one lets it go on:
   app.js (initHeroPause) toggles .is-paused. That needs a mouse or a touch screen, as the
   picture is hidden from screen readers and takes no keyboard focus, so the endless
   heartbeat still does not fully meet WCAG 2.2.2 (a way to pause motion that lasts more
   than 5 seconds). With reduced motion nothing here moves, the heartbeat included. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .match-person--left {
    animation: person-arrive-left 7.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .match-person--right {
    animation: person-arrive-right 7.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  /* Where the motion ends (the 480px block at the end of this section sets the phone sizes).
     --ring-pull: how far out each ring starts. --in-ring: from the story's center to the
     middle of each ring's own crescent (the ring's radius to the middle of its border), where
     A and B settle. --avatar-drop: from an avatar's center (2.625rem from the top) down to
     the rings' centers. --rise: how far the finished picture moves up at the end, so the
     space above "Common ground" (8.2rem) equals the space below the rings (0.6rem):
     (8.2rem - 0.6rem) / 2, the same at both sizes. --grow: how much the finished picture
     grows as it rises, around its own middle. For that, each part also moves by
     (--grow - 1) times its distance from that middle: --mark-dy for the rings and A and B
     (their centers are 1.6rem below it at both sizes), --label-dy for "Common ground", and
     the --in-ring sideways offset for A and B. --join-scale: how small A and B are once
     joined, so the heart fits inside the overlap (smaller on phones, where it is narrower).
     --join: from the story's center to the middle of each half once joined, so their curves
     meet on the center line: each curve's ends (and its middle) are 15 of the avatar's 52
     units (3.25rem) from its middle, and 15/52 of 3.25rem is 0.9375rem. */
  .match-story {
    --ring-pull: 3rem;
    --in-ring: 4.15rem;
    --avatar-drop: 13.275rem;
    --rise: 3.8rem;
    --grow: 1.15;
    --mark-dy: 1.6rem;
    --label-dy: -4.71rem;
    --join-scale: 0.66;
    --join: calc(0.9375rem * var(--join-scale));
  }

  .match-mark {
    animation: mark-rise 7.5s both;
  }

  /* A and B drop, and a beat later slide in and shrink, so they pass outside "Common ground"
     and step into their rings from the side. --join-x takes them to their place in the heart:
     --join (grown with the picture) either side of the center. */
  .match-person--left .match-avatar {
    --to-x: calc(50cqw - var(--in-ring) - var(--person-width) / 2);
    --grow-x: calc(-1 * var(--in-ring));
    --join-x: calc(var(--to-x) + var(--in-ring) - var(--join) * var(--grow));
  }

  .match-person--right .match-avatar {
    --to-x: calc(var(--in-ring) + var(--person-width) / 2 - 50cqw);
    --grow-x: var(--in-ring);
    --join-x: calc(var(--to-x) - var(--in-ring) + var(--join) * var(--grow));
  }

  .match-avatar {
    animation: avatar-drop 7.5s cubic-bezier(0.45, 0, 0.25, 1) both,
               avatar-in 7.5s cubic-bezier(0.45, 0, 0.25, 1) both;
  }

  /* Each shared chip ends on the middle of the "Kindness · Family" line: --to-x reaches the
     story's center from the middle of a person's column, and --to-y reaches 10.26rem from the
     top (the label's line), from chip row centers at 7.7rem and 9.85rem. The upper chip
     leaves 0.23s after the lower one, so the two follow each other instead of stacking. */
  .match-person--left .match-priority--shared-one,
  .match-person--left .match-priority--shared-two {
    --to-x: calc(50cqw - var(--person-width) / 2);
    animation: shared-priority-left 7.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .match-person--right .match-priority--shared-one,
  .match-person--right .match-priority--shared-two {
    --to-x: calc(var(--person-width) / 2 - 50cqw);
    animation: shared-priority-right 7.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .match-person .match-priority--shared-one { --to-y: 2.56rem; animation-delay: 0.23s; }
  .match-person .match-priority--shared-two { --to-y: 0.41rem; }

  .match-priority--own {
    animation: individual-priority 7.5s ease both;
  }

  .common-ground {
    animation: common-ground 7.5s ease both;
  }

  .match-ring--left {
    animation: ring-attract-left 7.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .match-ring--right {
    animation: ring-attract-right 7.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .match-overlap {
    animation: overlap-reveal 7.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  /* A heartbeat every 1.3s, from 6.05s, just after the halves join (5.8s). The joined heart
     beats too: each half around a point on the line its curve winds about (A's at 41 and B's
     at 11 of 52 units across, 26.5 down), which is the same point once joined, so they stay
     together. */
  .match-beat,
  .match-half {
    animation: heartbeat 1.3s ease-in-out 6.05s infinite both;
  }

  .match-person--left .match-half {
    transform-origin: 78.846% 50.962%;
  }

  .match-person--right .match-half {
    transform-origin: 21.154% 50.962%;
  }

  /* B's copy of the middle line (section 5) hides at 77%, the moment the halves have joined
     (avatar-in), so from then on only A's is drawn there, as thin as the outline, through the
     heartbeat too. Until then B looks whole, and with reduced motion, where A and B stay
     apart, it never hides (Zack, December 1, 2026). */
  .match-half-middle {
    animation: middle-line-out 7.5s step-end both;
  }

  /* Clicked: everything here stops where it is until the next click (app.js). */
  .match-story.is-paused,
  .match-story.is-paused * {
    animation-play-state: paused !important;
  }
}

@keyframes person-arrive-left {
  0%, 3% { opacity: 0; translate: -3rem 0; }
  13%, 100% { opacity: 1; translate: 0 0; }
}

@keyframes person-arrive-right {
  0%, 3% { opacity: 0; translate: 3rem 0; }
  13%, 100% { opacity: 1; translate: 0 0; }
}

/* In by 17%, still until 25%, then one smooth glide to (--to-x, --to-y), gone just before
   it arrives so no chip sits on the label. The right person's chips leave 2% later, and
   each upper chip 0.23s later still (animation-delay above), arriving by about 3.5s. */
@keyframes shared-priority-left {
  0%, 10% { opacity: 0; }
  17% { opacity: 1; }
  25% { opacity: 1; translate: 0 0; scale: 1; animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
  32% { opacity: 1; animation-timing-function: linear; }
  39% { opacity: 0; }
  41%, 100% { opacity: 0; translate: var(--to-x) var(--to-y); scale: 0.6; }
}

@keyframes shared-priority-right {
  0%, 10% { opacity: 0; }
  17% { opacity: 1; }
  27% { opacity: 1; translate: 0 0; scale: 1; animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
  34% { opacity: 1; animation-timing-function: linear; }
  41% { opacity: 0; }
  43%, 100% { opacity: 0; translate: var(--to-x) var(--to-y); scale: 0.6; }
}

/* Gone before A and B drop through them. */
@keyframes individual-priority {
  0%, 10% { opacity: 0; }
  17%, 33% { opacity: 1; }
  42%, 100% { opacity: 0; }
}

/* The rise and grow (57% to 66%) use the same timing in mark-rise, common-ground, avatar-drop
   and avatar-in, so the label, the rings and A and B move up and grow as one. */
@keyframes avatar-drop {
  0%, 41% { translate: 0 0; }
  55% { translate: 0 var(--avatar-drop); }
  57% { translate: 0 var(--avatar-drop); animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
  66%, 100% { translate: 0 calc(var(--avatar-drop) - var(--rise) + (var(--grow) - 1) * var(--mark-dy)); }
}

/* translateX before scale in one transform, so the shrink does not shorten the slide. From
   57% the grow moves A and B out from the middle and scales them with the rings. From 68%
   to 77% they glide out of their rings and shrink a little, until their curves meet. */
@keyframes avatar-in {
  0%, 45% { transform: translateX(0) scale(1); }
  57% { transform: translateX(var(--to-x)) scale(0.72); animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
  66%, 68% { transform: translateX(calc(var(--to-x) + (var(--grow) - 1) * var(--grow-x))) scale(calc(0.72 * var(--grow))); animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
  77%, 100% { transform: translateX(var(--join-x)) scale(calc(var(--join-scale) * var(--grow))); }
}

/* Visible until 77%, when avatar-in has joined the halves, and hidden from then on (step-end). */
@keyframes middle-line-out {
  0% { visibility: visible; }
  77%, 100% { visibility: hidden; }
}

/* The label and the rings are centered with translate -50% (section 5), so the rise keeps it. */
@keyframes common-ground {
  0%, 38% { opacity: 0; scale: 0.94; }
  46% { opacity: 1; scale: 1; }
  57% { scale: 1; translate: -50% 0; animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
  66%, 100% { opacity: 1; scale: var(--grow); translate: -50% calc((var(--grow) - 1) * var(--label-dy) - var(--rise)); }
}

@keyframes mark-rise {
  0%, 57% { translate: -50% 0; scale: 1; animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
  66%, 100% { translate: -50% calc((var(--grow) - 1) * var(--mark-dy) - var(--rise)); scale: var(--grow); }
}

@keyframes ring-attract-left {
  0%, 37% { translate: calc(-1 * var(--ring-pull)) 0; }
  51%, 100% { translate: 0 0; }
}

@keyframes ring-attract-right {
  0%, 37% { translate: var(--ring-pull) 0; }
  51%, 100% { translate: 0 0; }
}

@keyframes overlap-reveal {
  0%, 47% { opacity: 0; scale: 0.08 0.25; }
  52% { opacity: 1; scale: 1; }
  55% { opacity: 1; scale: 1.08; }
  58%, 100% { opacity: 1; scale: 1; }
}

/* Lub-dub, then a rest: the rings, the overlap and the joined heart swell 6%, then 4%. */
@keyframes heartbeat {
  0%, 48%, 100% { scale: 1; }
  12% { scale: 1.06; }
  24% { scale: 1; }
  34% { scale: 1.04; }
}

@media (max-width: 480px) {
  .match-story {
    min-height: 19.75rem;
    --person-width: 7.5rem;
    --ring-pull: 2.6rem;
    --in-ring: 3.525rem;
    --avatar-drop: 12.65rem;
    --label-dy: -4.085rem;
    --join-scale: 0.56;
  }
  .match-mark { width: 11.55rem; height: 7.75rem; }   /* 7.75rem rings 3.8rem apart */
  .match-ring { width: 7.75rem; height: 7.75rem; }
  .match-overlap { width: 3.25rem; height: 5.94rem; top: 0.905rem; }
}

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

  /* The still picture: each person with their own priority, "Common ground" naming the
     shared ones, and the joined rings. The shared chips would sit beside the label, and on
     narrow phones under it, so they are left out. */
  .match-priority--shared-one,
  .match-priority--shared-two {
    visibility: hidden;
  }
}

/* 9. App page (/app/: sign-up, log-in, About you, the profile, partner
   filters, the two MaxDiff steps, results, and the menu's pages at the
   end of this section). One narrow column of panels (My profile's
   is wider); the form pieces (.field, .text-input, .consent,
   .form-status) are the waitlist's from section 6. */
.app-main {
  padding-block: clamp(1.5rem, 1rem + 3vw, 3.5rem) var(--section-space);
}

.app-wrap {
  max-width: 40rem;
}

.app-loading {
  color: var(--muted);
}

/* The line gets the focus when a reason takes the place of a view
   (members.js, showLoadError), only so screen readers read it, as a view's
   heading does: it is not a control, so it shows no focus ring. */
.app-loading:focus {
  outline: none;
}

/* With scripts on, what is inside <noscript> is text, not elements, so
   .noscript-note is in the page only with scripts off. Then nothing would
   ever take "Loading..." away, so only the note shows. */
.app-wrap:has(.noscript-note) .app-loading {
  display: none;
}

/* The panel's one column can shrink (minmax(0, 1fr)), so a long email
   address in one of its lines wraps inside the panel instead of widening
   the panel and the page. */
.app-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 0.75rem + 2.5vw, 2.5rem);
}

.app-panel h1 {
  font-size: clamp(1.875rem, 1.4rem + 2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Each view's heading gets focus only so screen readers announce the new
   view. It is not a control, so it never shows a focus ring. */
.app-panel h1:focus {
  outline: none;
}

.app-lede {
  color: var(--muted);
}

/* The same for a form, so one part that cannot shrink does not stretch
   the form's other rows with it. */
.app-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.app-form > .button-primary {
  width: 100%;
}

/* Stacked names keep the form's spacing between fields. */
.app-form .field-row {
  row-gap: 1.5rem;
}

.app-form .form-status {
  margin-top: 0;
}

/* A part of Step 2 or 3 that its address opens (/app/build-profile/bio,
   from My profile's Edit links; members.js, showPagePart) stops a little
   under the window's top edge rather than against it: a question, a group
   of questions under one title (/app/build-profile/favorite_activities) or
   the photos. */
.app-form [data-question],
.app-form [data-group],
.app-form .photos {
  scroll-margin-top: 1rem;
}

/* The step bar at the top of each step and of the results (members.js,
   drawStepBar): the five steps as numbered marks joined by a line, each
   name under its mark, then "Your results" after a divider, with the
   Halves mark in a wider pill instead of a number: the place the steps lead
   to, not a sixth step. A finished step's mark holds a check mark; the one
   on screen is solid, with a halo, and its name is in coral text; a step
   not open yet has a dashed mark and muted text. A finished step that
   opens, and Your results once it opens, has a filled mark, darker while
   hovered or pressed, so it reads as a button. Under 640px only the
   marks show (the names stay for screen readers), the line under them
   names the one on screen, and the bar sits higher in its panel; under
   375px the marks are smaller too, so the six of them fit a 320px
   screen. */
.stepbar {
  --stepbar-mark: 2rem;
  --stepbar-pad: 0.375rem;
  display: grid;
  gap: 0.375rem;
}

.stepbar-row {
  display: flex;
  align-items: stretch;
}

.stepbar-list {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stepbar-item {
  position: relative;
  display: flex;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
}

/* The line from the step before to this one, between their marks: indigo
   once the step before is done. A border, not a background, so Windows
   high contrast keeps it. */
.stepbar-item + .stepbar-item::before {
  content: "";
  position: absolute;
  top: calc(var(--stepbar-pad) + var(--stepbar-mark) / 2 - 1px);
  left: calc(-50% + var(--stepbar-mark) / 2 + 0.375rem);
  right: calc(50% + var(--stepbar-mark) / 2 + 0.375rem);
  border-top: 2px solid var(--line);
}

.stepbar-item.is-done + .stepbar-item::before {
  border-top-color: var(--primary);
}

/* Hovering a step turns its name coral, the color of the step on screen,
   since that is every link's hover color (section 3). The marks set their
   own colors, so they stay as they are (a filled one goes darker, below). */
.stepbar-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: var(--stepbar-pad) 0.25rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.stepbar-mark {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--stepbar-mark);
  height: var(--stepbar-mark);
  border: 2px solid var(--primary);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stepbar-mark svg {
  width: 1rem;
  height: 1rem;
}

/* A finished step's mark is filled (--step-done, section 2). The step on
   screen and a finished step that cannot open set their own fills below. */
.stepbar-item.is-done .stepbar-mark {
  background: var(--step-done);
  color: var(--primary);
}

/* Hovered with a mouse, or pressed (a tap on a phone; on an iPhone only
   because drawStepBar gives the bar a touch listener), the fill of a
   finished step that opens is darker, and so is Your results' (below). The
   one on screen keeps its look; the steps not open yet are not links. */
@media (hover: hover) {
  .stepbar-item.is-done > a.stepbar-link:not([aria-current]):hover .stepbar-mark,
  .stepbar-end > a.stepbar-link:not([aria-current]):hover .stepbar-mark {
    background: var(--step-done-hover);
  }
}

.stepbar-item.is-done > a.stepbar-link:not([aria-current]):active .stepbar-mark,
.stepbar-end > a.stepbar-link:not([aria-current]):active .stepbar-mark {
  background: var(--step-done-hover);
}

.stepbar-link[aria-current] .stepbar-mark {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 0 0 4px var(--periwinkle-soft);
}

.stepbar-link[aria-current] .stepbar-name {
  color: var(--coral-text);
  font-weight: 700;
}

.is-locked > .stepbar-link {
  color: var(--muted);
  font-weight: 400;
}

.is-locked > .stepbar-link .stepbar-mark {
  border-style: dashed;
  border-color: var(--field-line);
  background: var(--surface);
  color: var(--muted);
}

/* Your results, after the divider. */
.stepbar-end {
  display: flex;
  flex: none;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
}

.stepbar-end .stepbar-name {
  white-space: nowrap;
}

.stepbar-end .stepbar-mark {
  width: calc(var(--stepbar-mark) * 1.5);
  border-color: var(--coral);
}

.stepbar-end .stepbar-mark svg {
  width: 1.5625rem;
  height: 1rem;
}

/* Once it opens, on a step, the pill is filled like a finished step. */
.stepbar-end > a.stepbar-link:not([aria-current]) .stepbar-mark {
  background: var(--step-done);
}

.stepbar-overlap {
  fill: var(--coral);
}

.stepbar-end .stepbar-link[aria-current] .stepbar-mark {
  border-color: var(--primary);
}

.stepbar-end.is-locked .stepbar-overlap {
  fill: currentColor;
  opacity: 0.35;
}

.stepbar-caption {
  display: none;
  color: var(--coral-text);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 639.98px) {
  .stepbar-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .stepbar-link {
    padding: var(--stepbar-pad);
  }

  /* Longer lines between the marks, with the names out of the way. */
  .stepbar-item + .stepbar-item::before {
    left: calc(-50% + var(--stepbar-mark) / 2 + 0.125rem);
    right: calc(50% + var(--stepbar-mark) / 2 + 0.125rem);
  }

  .stepbar-end {
    margin-left: 0.25rem;
    padding-left: 0.5rem;
  }

  .stepbar-caption {
    display: block;
  }

  /* Higher in the panel and closer to the heading, so a step's heading
     starts about 200px from the top with the phone's shorter header
     (section 4, .app-menu): the marks about 17px under the panel's top
     edge, the caption right under them (the links' own 6px under each
     mark is the space between) and 10px over the heading. The links stay
     44px tall: 6px of padding around each 32px mark. */
  .stepbar {
    gap: 0;
    margin-block: -0.75rem -0.625rem;
  }
}

/* The narrowest phones (320px to 374px wide): the five marks and Your
   results' pill are smaller (28px), with no padding at the links' sides
   and less around the divider, so the lines between the marks still show
   (about 7px long at 320px, 15px at 360px). The links stay 44px tall: 8px
   of padding over and under each mark, which is also the space between
   the marks and the caption under them here. */
@media (max-width: 374.98px) {
  .stepbar {
    --stepbar-mark: 1.75rem;
    --stepbar-pad: 0.5rem;
  }

  .stepbar-link {
    padding: var(--stepbar-pad) 0;
  }

  .stepbar-end {
    margin-left: 0.125rem;
    padding-left: 0.375rem;
  }
}

/* Windows high contrast drops backgrounds and shadows: the mark on screen
   is drawn in the highlight colors (Your results' too, whose indigo
   border above would otherwise win), the steps not open yet in GrayText,
   and the coral overlap in the text color. */
@media (forced-colors: active) {
  .stepbar-link[aria-current] .stepbar-mark,
  .stepbar-end .stepbar-link[aria-current] .stepbar-mark {
    forced-color-adjust: none;
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
    box-shadow: none;
  }

  .is-locked > .stepbar-link,
  .is-locked > .stepbar-link .stepbar-mark {
    forced-color-adjust: none;
    color: GrayText;
    border-color: GrayText;
    background: Canvas;
  }

  .stepbar-overlap,
  .stepbar-end.is-locked .stepbar-overlap {
    fill: currentColor;
    opacity: 1;
  }
}

/* Create an account / Log in: two links that look like one switch. */
.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--sunk);
}

.auth-switch a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

/* Its words stay indigo on hover: the links' coral would be under 4.5:1
   on the switch's tinted track. */
.auth-switch a:hover {
  color: var(--ink);
}

.auth-switch a[aria-current="page"] {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(35, 32, 90, 0.18);
}

/* Partner filters */
.question-group {
  display: grid;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

/* Space, not a rule, between the two groups: a fieldset's border runs
   through the middle of its legend. */
.question-group + .question-group {
  margin-top: 2.75rem;
}

.group-title {
  padding: 0;
  margin-bottom: 0.25rem;
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.choice-field {
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.choice-field legend {
  padding: 0;
  margin-bottom: 0.625rem;
  font-weight: 600;
  line-height: 1.35;
}

.choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Each option is a pill. The radio button stays in the page (for keyboards
   and screen readers) but is drawn by its <span>. */
.choice {
  position: relative;
  display: inline-flex;
}

.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: var(--field-bg);
  line-height: 1.3;
}

.choice input:hover + span {
  border-color: var(--ink);
}

/* A picked pill keeps its weight (no bold) and so its width: a wider pill
   would push the pills after it along, and with them the rows, under the
   person's finger (since November 25, 2026). The fill says it is picked. */
.choice input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.choice input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.choice-field[aria-invalid="true"] .choice span {
  border-color: var(--error);
}

.choice-field .field-error {
  margin-top: 0.5rem;
}

/* A scale: equal buttons in one row, however many there are. */
.choice-scale {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.375rem;
}

.choice-scale .choice span {
  justify-content: center;
  width: 100%;
  padding-inline: 0;
}

.scale-ends {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.scale-ends span:last-child {
  text-align: right;
}

/* A drop-down with the same look as the text boxes, and an arrow drawn with
   two gradients (no image file, nothing the Content-Security-Policy blocks).
   With .text-input on the same element, which gives it the box, focus ring
   and error state. The app's questions use it, and so does the waitlist's
   Gender on the landing page (since November 19, 2026), so it is not only
   for this section. The appearance lines (also since November 19, 2026)
   undo .text-input's "-moz-appearance: textfield", which Firefox reads as
   "appearance" and which brings a drop-down's own arrow back there, next to
   this one; .textarea-input does the same for the bio. Since November 30,
   2026 the drawn control of assets/dropdown.js takes the select's classes,
   so these rules draw it closed, the same size as the select was. */
.select-input {
  appearance: none;
  -moz-appearance: none;
  padding-right: 2.75rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* Drop-downs (Zack, November 30, 2026). Every drop-down a visitor or
   member sees opens a list drawn by assets/dropdown.js (its header comment
   says how it works) in the site's colors and shapes, instead of the
   browser's own list: the landing page's Gender, About you's birth month,
   the phone country pickers, the Results "View" picker and the select
   questions of Steps 2 and 3.
   - The native select stays in the page, hidden from sight but not
     display:none (.dropdown-native), so autofill still fills it.
   - The drawn control (.dropdown, a role="combobox" element right after
     the select) takes the select's classes, so .text-input and
     .select-input above draw it closed: box, arrow, hover, focus ring and
     the red border of aria-invalid. The ring shows on any focus, a click
     or tap too, as it did on the select (.text-input's ring is for
     :focus-visible, which a click on a <div> does not match). Its text is
     one line, cut with "..." when it does not fit, and centered in the
     box as a select's is.
   - Its list (.dropdown-list) comes right after the control in the page,
     for screen readers, and is shown in the top layer (a popover, where
     the browser has them) with position: fixed, placed by the script, so
     no card's overflow clips it. It is the suggestion list's look
     (.combo-list): a white (night in dark mode) panel with the field's
     border, the highlighted option tinted periwinkle and outlined, and a
     check mark on the option picked. Each option is at least 44px tall for
     a finger; a long one wraps. At most about 21rem tall (seven and a half
     options: the script cuts the bottom option in half, so it shows there
     are more), it scrolls inside, and a swipe on it never scrolls the
     page. It sets its own text styles, as it takes the rest from where it
     sits in the page. */
select.dropdown-native {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.dropdown {
  display: flex;
  align-items: center;
  min-width: 0;
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* The text, and with data-dropdown-fit (the Results "View" picker) an
   invisible copy of every option in the same grid cell, so the control is
   as wide as its longest option, as a native select is. */
.dropdown-face {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
}

.dropdown-face > *,
.dropdown-fit > * {
  grid-area: 1 / 1;
}

.dropdown-fit {
  display: grid;
  grid-area: 1 / 1;
  visibility: hidden;
}

.dropdown-value,
.dropdown-ghost {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dropdown.text-input:focus {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.dropdown.text-input:focus:not([aria-invalid="true"]) {
  border-color: var(--focus);
}

.dropdown[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

.dropdown-list {
  position: fixed;
  z-index: 20;
  inset: 0 auto auto 0;
  width: max-content;
  height: auto;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(35, 32, 90, 0.18);
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  white-space: normal;
}

/* Room on the left for the check mark, on every option, so picking one
   moves no text. */
.dropdown-option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem 0.5rem 2.125rem;
  border-radius: 8px;
  overflow-wrap: anywhere;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.dropdown-option:hover {
  background: var(--sunk);
}

.dropdown-option[aria-selected="true"] {
  background: var(--periwinkle-soft);
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.dropdown-option.is-picked::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.9375rem;
  width: 0.3125rem;
  height: 0.625rem;
  margin-top: -0.4375rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.dropdown-option[aria-disabled="true"] {
  color: var(--muted);
  cursor: not-allowed;
}

.dropdown-option[aria-disabled="true"]:hover {
  background: none;
}

/* Windows high contrast drops the tint and the shadow, as for .combo-list:
   the list gets a border in the text color, and the highlighted option the
   system's highlight colors. */
@media (forced-colors: active) {
  .dropdown-list {
    border-color: CanvasText;
  }

  .dropdown-option:hover {
    outline: 1px solid CanvasText;
    outline-offset: -1px;
  }

  .dropdown-option[aria-selected="true"] {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
    outline: 2px solid Highlight;
  }

  .dropdown-option[aria-disabled="true"] {
    color: GrayText;
  }
}

/* Pop-up boxes (since December 1, 2026; the first is the header's "Log
   out of Halves?", Zack). Each is a native <dialog class="app-dialog">
   (app/index.html, at the end of <body>) that members.js opens with
   showModal() (openDialog, section 2 of members.js): the browser puts it
   in the top layer, centered in the window, over the ::backdrop. The
   dialog element itself has no look: the box is the .app-dialog-box in
   it, so a press on the dialog element is a press outside the box, which
   closes it. The box is a card like .app-panel (surface, border, radius,
   padding), with a shadow, at most 26rem wide and never wider than the
   window less a gutter each side (a 393px phone gets a 361px box); a box
   taller than the window scrolls inside. Its title (.app-dialog-title),
   an optional line of text (.app-dialog-text), then its buttons
   (.app-dialog-actions: the action's .button-primary and Cancel's
   .button-quiet .button-cancel, light red, side by side when they fit,
   each at least 52px tall). The page behind is not locked
   or moved, so nothing shifts. No transition, so nothing to turn off for
   reduced motion. Closed, the box never shows, also where the browser
   does not know <dialog> (members.js then uses the box's fallback). */
.app-dialog:not([open]) {
  display: none;
}

.app-dialog {
  width: min(26rem, 100% - 2 * var(--gutter));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  color: var(--ink);
}

/* A click on the box's text can give the dialog element itself the focus
   (Chrome; a press on the backdrop cannot, members.js stops it). It is
   not a control and not in the Tab order, so, like a view's heading, it
   never shows a ring. */
.app-dialog:focus {
  outline: none;
}

/* Light: the night color at 45%. Dark: darker still, so the box stands out
   from the page behind it. Plain colors, not tokens: older browsers do
   not pass custom properties to ::backdrop. */
.app-dialog::backdrop {
  background: rgba(21, 19, 58, 0.45);
}

@media (prefers-color-scheme: dark) {
  .app-dialog::backdrop {
    background: rgba(6, 5, 20, 0.72);
  }
}

.app-dialog-box {
  display: grid;
  gap: 1.25rem;
  max-height: calc(100vh - 2 * var(--gutter));
  max-height: calc(100dvh - 2 * var(--gutter));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.25rem, 0.75rem + 2.5vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(21, 19, 58, 0.28);
}

.app-dialog-title {
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.app-dialog-text {
  color: var(--muted);
}

.app-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* A label stays on one line ("Keep editing" on a 393px phone took two):
   when both buttons do not fit side by side, they go under each other. */
.app-dialog-actions .button {
  flex: 1 1 8rem;
  white-space: nowrap;
}

/* An action under way (Log out's "Log out" while the API answers): grayed
   but not disabled, so it keeps the focus (members.js sets aria-disabled). */
.app-dialog-actions .button[aria-disabled="true"] {
  opacity: 0.7;
  cursor: progress;
}

.app-dialog-actions .button-primary[aria-disabled="true"]:active {
  transform: none;
}

/* Windows high contrast drops the shadow and the backdrop's tint: the box
   gets a border in the text color. */
@media (forced-colors: active) {
  .app-dialog-box {
    border: 2px solid CanvasText;
  }
}

/* About you's ZIP code box with "Use my location" next to it (members.js
   adds the button only where the browser can give a location), side by
   side while they fit, and the line under them that says how the lookup
   went. */
.zip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.zip-row .text-input {
  flex: 1 1 8rem;
  width: auto;
  min-width: 0;
}

.zip-locate {
  flex: 0 0 auto;
}

.zip-locate[aria-disabled="true"] {
  opacity: 0.7;
  cursor: progress;
}

.zip-status {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.zip-status:empty {
  display: none;
}

.zip-status[data-tone="error"] {
  color: var(--error);
  font-weight: 600;
}

/* A text box that suggests places ("suggest": "city" in api/app/survey.py:
   Current city and Hometown): the list of suggestions opens under the box,
   as wide as it, over what follows. Each place is at least 44px tall for a
   finger, and a long name wraps. The list has no scroll bar of its own: it
   holds 8 places at most, and the page scrolls (a list that scrolls inside
   the page is fiddly on a phone, and in a test at phone width the content
   under such a list showed through its bottom edge), except for School and
   Profession (.pick-list below). The highlighted one (aria-selected, moved
   with the arrow keys) is tinted and outlined, so it shows without color
   too. */
.combo {
  position: relative;
}

.combo-list {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  box-shadow: 0 8px 24px rgba(35, 32, 90, 0.18);
}

/* School and Profession ("from_list"): school names can be long, so 8 of
   them and Other, always last, can be taller than a phone's screen, with
   Other under the on-screen keyboard. Their list is at most half the
   screen tall and scrolls inside (a swipe on it never scrolls the page,
   and never closes it), so Other stays close to the box. */
.combo-list.pick-list {
  max-height: min(50vh, 26rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.combo-option {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.combo-option:hover {
  background: var(--sunk);
}

.combo-option[aria-selected="true"] {
  background: var(--periwinkle-soft);
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

/* Windows high contrast drops the tint and the shadow: the list gets a
   border in the text color, and the highlighted place the system's
   highlight colors. */
@media (forced-colors: active) {
  .combo-list {
    border-color: CanvasText;
  }

  .combo-option:hover {
    outline: 1px solid CanvasText;
    outline-offset: -1px;
  }

  .combo-option[aria-selected="true"] {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
    outline: 2px solid Highlight;
  }
}

/* A line of help under a question's label ("hint" in api/app/survey.py). */
.choice-field .question-hint {
  margin: -0.375rem 0 0.625rem;
}

/* Several answers ("multi"): each pill picked gets a check mark, so they
   read as checkboxes. Less padding on its left makes room for the mark,
   and a pill not picked has the same total padding (1.15625rem each side,
   2.3125rem in all: 0.625rem + the mark's 0.9375rem with its margins +
   0.75rem), so picking one never changes its width or moves the others. */
.choice-multi .choice span {
  padding-inline: 1.15625rem;
}

.choice-multi .choice input:checked + span {
  padding-inline: 0.625rem 0.75rem;
}

.choice-multi .choice input:checked + span::before {
  content: "";
  flex: none;
  width: 0.3125rem;
  height: 0.625rem;
  margin: -0.125rem 0.5rem 0 0.125rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* A suggested pill ("suggested" in api/app/survey.py: English in
   "Languages you speak", since December 3, 2026; Zack asked for a light
   background on the languages popular in the member's country, "so they
   can easily find the button"): a periwinkle tint while it is not picked,
   so it stands out among the white pills without looking picked
   (members.js adds .choice--suggested). Picked, it is any picked pill;
   hover, focus and the fading at the limit are the other pills'. Windows
   high contrast drops the tint, and the hint under the label names the
   language. */
.choice--suggested input:not(:checked) + span {
  background: var(--suggested);
}

/* A multi question at its limit ("Pick up to three."): members.js
   (limitMulti) disables the boxes not picked until one is unpicked. They
   fade and take no clicks; in Windows high contrast they are GrayText. */
.choice input:disabled {
  cursor: not-allowed;
}

.choice input:disabled + span {
  opacity: 0.5;
}

.choice input:disabled:hover + span {
  border-color: var(--field-line);
}

/* Windows high contrast drops the fill, the only sign that a pill is
   picked: the picked one takes the highlight colors, as a picked rating
   does (a multi pill's check mark is drawn in its text color, so it takes
   them too). Its focus ring is set in the text color, like the ring of
   the other pills: the system no longer sets it on a pill that keeps its
   own colors. */
@media (forced-colors: active) {
  .choice input:checked + span {
    forced-color-adjust: none;
    background: Highlight;
    border-color: Highlight;
    color: HighlightText;
  }

  .choice input:checked:focus-visible + span {
    outline-color: CanvasText;
  }

  .choice input:disabled + span {
    opacity: 1;
    color: GrayText;
    border-color: GrayText;
  }
}

/* The bio: a box of several lines (its rows are set in members.js) that
   can be made taller. */
.textarea-input {
  resize: vertical;
  appearance: none;
  -moz-appearance: none;
}

/* The character count under a box of several lines (the bio, Give
   feedback's text) and under each favorite activity's one-line box ("12 of
   30 characters": members.js, hasCount), at its right; over the limit, in
   the error color. */
.char-count {
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.char-count.is-over {
  color: var(--error);
  font-weight: 600;
}

/* Questions under one title (the three favorite activities): one per row
   at every width, each box as wide as the form, since December 3, 2026
   (Zack: "put one per row"); side by side from 560px before. The rows are
   1rem apart, closer than the form's questions (1.5rem), so the three
   read as one question under their title. */
.field-group {
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.field-group legend {
  padding: 0;
  margin-bottom: 0.625rem;
  font-weight: 600;
  line-height: 1.35;
}

.field-group .field label {
  font-weight: 400;
}

.app-form .field-row--group {
  grid-template-columns: minmax(0, 1fr);
  row-gap: 1rem;
}

/* Step 2's photos, at the top of Your profile (members.js moves the block
   there): the title with the count ("3 / 6") at its right end, the
   uploaded thumbnails, 3 to a row and 2 under 480px, each with its buttons
   under it, then "Add photo", as wide as the form. The file input it opens
   is visually hidden. Each thumbnail is cropped to the same 4:5 frame; the
   first carries a "Main photo" tag. */
.photos {
  display: grid;
  gap: 0.875rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.photos legend {
  padding: 0;
  margin-bottom: 0.375rem;
  font-weight: 600;
  line-height: 1.35;
}

.photos-legend {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.photo-count {
  flex: none;
  padding: 0 0.625rem;
  border-radius: 999px;
  background: var(--sunk);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 480px) {
  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Focus lands on a photo only after a move or a removal, so screen readers
   read it: a ring for keyboard users, none after a click. */
.photo {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  min-width: 0;
  border-radius: var(--radius-sm);
}

.photo:focus {
  outline: none;
}

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

/* A press on a photo selects no text and, on iPhones, opens no menu for
   the image, so a finger can rest on it to drag it (members.js). */
.photo-frame {
  position: relative;
  border-radius: var(--radius-sm);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.photo-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--sunk);
}

/* Dragging: with two photos or more, a thumbnail shows a grab cursor (a
   progress one while a change saves). The dragged photo is lifted above
   the others, without its year and buttons, which would cover theirs, and the
   others slide a place along to make room. */
.photo-grid--sortable .photo-frame {
  cursor: grab;
}

.photo-grid--busy .photo-frame {
  cursor: progress;
}

.photo-grid--sorting,
.photo-grid--sorting .photo-frame {
  cursor: grabbing;
}

.photo-grid--sorting .photo {
  transition: transform 0.15s ease;
}

.photo-grid--sorting .photo--dragging {
  position: relative;
  z-index: 1;
  transition: none;
}

.photo--dragging .photo-frame {
  box-shadow: 0 12px 28px rgba(21, 19, 58, 0.35);
}

.photo--dragging .photo-move,
.photo--dragging .photo-year,
.photo--dragging .photo-actions {
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .photo-grid--sorting .photo {
    transition: none;
  }
}

/* The arrows over a thumbnail's bottom corners move it a place left or
   right: 44px circles with their own background, so they show on any
   photo. */
.photo-move {
  position: absolute;
  bottom: 0.375rem;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  border-color: var(--field-line);
  box-shadow: 0 1px 4px rgba(21, 19, 58, 0.3);
}

.photo-move:hover {
  border-color: var(--ink);
}

/* The focus ring falls on the photo, which can be any color, the ring's
   own included: a band in the button's own color between the button and
   the ring keeps it visible on any photo. */
.photo-move:focus-visible {
  box-shadow: 0 0 0 3px var(--surface), 0 1px 4px rgba(21, 19, 58, 0.3);
}

.photo-move--left {
  left: 0.375rem;
}

.photo-move--right {
  right: 0.375rem;
}

.photo-tag {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
}

/* The year it was taken, under the photo (members.js, buildPhotoYear):
   "2023" with "From the photo" (muted) for a year that comes from the
   photo, or with "Change year" for one the member picked, and "Add year"
   alone for a photo with none. The button goes under the year when they
   do not fit side by side (2 photos a row on a phone), as wide as the
   photo. At least 44px tall, so the rows under the photos line up. */
.photo-year {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.625rem;
  min-height: 44px;
}

.photo-year-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.photo-year-note {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.3;
}

.photo-year .button {
  flex: 1 1 auto;
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
}

/* "Make main" and "Remove": side by side when they fit, else one above the
   other, each as wide as the photo. */
.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.photo-actions .button {
  flex: 1 1 auto;
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
}

/* "Add photo" takes the whole row; "Try again", when it shows, goes under
   it. */
.photos-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.photo-add {
  width: 100%;
}

.photos .button[aria-disabled="true"] {
  opacity: 0.7;
  cursor: progress;
}

/* As .form-status, which it is not: the form's own messages go to the
   first .form-status in it. */
.photo-status {
  font-weight: 600;
  line-height: 1.45;
}

.photo-status:empty {
  display: none;
}

.photo-status[data-tone="error"] {
  color: var(--error);
}

/* Windows high contrast drops backgrounds and shadows: give the tag and
   the count a border, and the dragged photo an outline. */
@media (forced-colors: active) {
  .photo-tag,
  .photo-count {
    border: 1px solid CanvasText;
  }

  .photo--dragging .photo-frame {
    outline: 3px solid Highlight;
    outline-offset: 2px;
  }
}

/* A question under review ("review_note"): a small note icon after the
   label, and the note it opens, in a tinted box under the label. Notes are
   for the team on the dev site. */
.question-head {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.review-note-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -4px 0 -4px 0.375rem;   /* no taller line for it */
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral-text);
  vertical-align: middle;
  cursor: pointer;
}

.question-head .review-note-button {
  margin-inline-start: 0;
}

.review-note-button:hover {
  border-color: var(--coral-text);
}

.review-note-button[aria-expanded="true"] {
  background: var(--coral-text);
  color: var(--surface);
}

.review-note-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.review-note-button svg {
  display: block;
  width: 16px;
  height: 16px;
}

.review-note {
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: var(--coral-soft);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.choice-field .review-note {
  margin: -0.25rem 0 0.75rem;
}

/* The partner age range: one slider, two native range inputs on one track
   (one per handle), ring-shaped handles and the coral overlap between them,
   as in the logo. .range-track and .range-fill draw the track; members.js
   sets --range-low and --range-high (0 to 1) and handles presses on the
   whole 48px strip, so the inputs take no pointer events themselves. */
.range-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}

.range-label {
  font-weight: 600;
  line-height: 1.35;
}

.range-readout {
  font-family: var(--font-head);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.range-slider {
  --range-height: 48px;
  --range-thumb: 28px;
  --range-low: 0;
  --range-high: 1;
  position: relative;
  height: var(--range-height);
  cursor: pointer;
  touch-action: pan-y;  /* sideways drags move a handle, vertical swipes scroll */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.range-track {
  position: absolute;
  top: 50%;
  left: calc(var(--range-thumb) / 2);
  right: calc(var(--range-thumb) / 2);
  height: 4px;
  margin-top: -2px;
  border-radius: 999px;
  background: var(--field-line);
}

.range-fill {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: calc(var(--range-low) * 100%);
  right: calc((1 - var(--range-high)) * 100%);
  border-radius: 999px;
  background: var(--coral);
}

.range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: none;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}

/* The handle in use sits over the other when they meet. */
.range-input.is-front {
  z-index: 1;
}

/* The focus ring goes on the handle, not around the whole strip. */
.range-input:focus-visible {
  outline: none;
}

.range-input::-webkit-slider-runnable-track {
  height: var(--range-height);
  border: 0;
  background: none;
}

.range-input::-moz-range-track {
  border: 0;
  background: none;
}

.range-input::-moz-range-progress {
  background: none;
}

.range-input::-webkit-slider-thumb {
  box-sizing: border-box;
  width: var(--range-thumb);
  height: var(--range-thumb);
  margin-top: calc((var(--range-height) - var(--range-thumb)) / 2);
  border: 3px solid var(--primary);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(35, 32, 90, 0.25);
  appearance: none;
  -webkit-appearance: none;
}

.range-input::-moz-range-thumb {
  box-sizing: border-box;
  width: var(--range-thumb);
  height: var(--range-thumb);
  border: 3px solid var(--primary);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(35, 32, 90, 0.25);
}

.range-input:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--focus);
}

.range-input:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--focus);
}

.range-input[aria-invalid="true"]::-webkit-slider-thumb {
  border-color: var(--error);
}

.range-input[aria-invalid="true"]::-moz-range-thumb {
  border-color: var(--error);
}

.range-ends {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: -0.375rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Windows high contrast drops backgrounds and shadows: keep the track, the
   overlap and the focus ring visible in system colors. */
@media (forced-colors: active) {
  .range-track,
  .range-fill,
  .range-input {
    forced-color-adjust: none;
  }

  .range-track {
    background: GrayText;
  }

  .range-fill {
    background: Highlight;
  }

  .range-input::-webkit-slider-thumb {
    border-color: CanvasText;
    background: Canvas;
  }

  .range-input::-moz-range-thumb {
    border-color: CanvasText;
    background: Canvas;
  }

  .range-input:focus-visible::-webkit-slider-thumb {
    border-color: Highlight;
    box-shadow: 0 0 0 3px Canvas, 0 0 0 6px Highlight;
  }

  .range-input:focus-visible::-moz-range-thumb {
    border-color: Highlight;
    box-shadow: 0 0 0 3px Canvas, 0 0 0 6px Highlight;
  }
}

/* MaxDiff: one row per quality, "most" on the left and "least" on the right. */
.survey-progress {
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
}

.survey-progress progress {
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--sunk);
  color: var(--primary);
  appearance: none;
  -webkit-appearance: none;
}

.survey-progress progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--sunk);
}

.survey-progress progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--primary);
}

.survey-progress progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--primary);
}

.maxdiff-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
  margin-block: -0.5rem;
}

.maxdiff-table thead th {
  padding: 0 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  width: 30%;
}

.maxdiff-table thead th:nth-child(2) {
  width: auto;
}

.maxdiff-table tbody td,
.maxdiff-table tbody th {
  padding: 0.75rem 0.5rem;
  background: var(--sunk);
}

.maxdiff-table tbody td:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.maxdiff-table tbody td:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.maxdiff-item {
  font-family: var(--font-head);
  font-size: 1.1875rem;
  font-weight: 700;
  text-align: center;
}

/* Step 5's headings ("Most important", "Least important") and the longest
   quality need 310px, more than the card has under 388px wide: there its
   cells keep only 0.125rem of side padding, and under 360px none, with
   the headings also a little smaller, without their letter spacing, so
   the table fits its card down to 320px. Step 4's table ("More like me",
   "Less like me") fits as it is down to 320px, so it is left as it was:
   the rules name Step 5's view. From 388px up nothing changes. */
@media (max-width: 387.98px) {
  [data-view="survey"] .maxdiff-table thead th,
  [data-view="survey"] .maxdiff-table tbody td,
  [data-view="survey"] .maxdiff-table tbody th {
    padding-inline: 0.125rem;
  }
}

@media (max-width: 359.98px) {
  [data-view="survey"] .maxdiff-table thead th,
  [data-view="survey"] .maxdiff-table tbody td,
  [data-view="survey"] .maxdiff-table tbody th {
    padding-inline: 0;
  }

  [data-view="survey"] .maxdiff-table thead th {
    font-size: 0.75rem;
    letter-spacing: 0;
  }
}

.maxdiff-pick {
  text-align: center;
}

/* The label members.js puts around each radio button (drawSurveyScreen).
   It has no text of its own, and its ::after reaches over the cell's
   padding, so a tap anywhere across the cell picks, not only one on the
   26px button. The ::after is placed against the label, a block as wide
   as the cell's content, not against the cell: a browser that placed it
   wrongly would only make the target smaller, never spread it over the
   page. Its insets are the cell's padding, also where Step 5's cells
   have less of it on narrow screens (above). A read-only screen's radio
   buttons are disabled, so their labels take nothing. */
.maxdiff-target {
  position: relative;
  display: block;
  cursor: pointer;
}

.maxdiff-target::after {
  content: "";
  position: absolute;
  inset: -0.75rem -0.5rem;
}

@media (max-width: 387.98px) {
  [data-view="survey"] .maxdiff-target::after {
    inset: -0.75rem -0.125rem;
  }
}

@media (max-width: 359.98px) {
  [data-view="survey"] .maxdiff-target::after {
    inset: -0.75rem 0;
  }
}

.maxdiff-table.is-read-only .maxdiff-target {
  cursor: not-allowed;
}

.maxdiff-pick input {
  width: 26px;
  height: 26px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--primary);
  cursor: pointer;
}

/* A finished step's screen that cannot be changed now (members.js,
   drawSurveyScreen): its saved picks, the radio buttons disabled. The
   browser's own disabled radio button is a pale gray that hides which one
   is picked, so these are drawn here: a ring in the muted text color, and
   a dot in it on the picked one, 5.4:1 on the row's fill (#5B5880 on
   #E8E5F7) and in dark mode 6.2:1 (#ABA8D6 on #27245C), so the picks read
   clearly while the rings and the cursor say they take no clicks.
   Windows high contrast keeps the browser's own, in its colors. */
.maxdiff-table.is-read-only .maxdiff-pick input {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: transparent;
  cursor: not-allowed;
}

.maxdiff-table.is-read-only .maxdiff-pick input:checked {
  background: radial-gradient(circle, var(--muted) 0 38%, transparent 42%);
}

@media (forced-colors: active) {
  .maxdiff-table.is-read-only .maxdiff-pick input {
    appearance: auto;
    -webkit-appearance: auto;
  }
}

.app-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-actions .button {
  flex: 1 1 0;
}

/* Back and Next on Steps 2 and 3: Back as wide as its word, Next the rest
   of the row, also while it is outlined (.is-pending). The other forms
   with a quiet button before the main one use it too. */
.app-actions--step .button-quiet {
  flex: 0 0 auto;
}

.app-actions--step .button-primary {
  flex: 1 1 auto;
}

/* Results (the /app/results view): two rankings of the 7 qualities, the
   highest first, Your Best Bits (Step 4) and then Your Must Halves (Step
   5), each under its heading, with a line between them, under a small
   "View" drop-down (.results-view) that shows them Simple or Detailed.
   Simple (.results-top): each ranking's top three, numbered, their names
   alone in large type. Detailed (.results-list): every quality with its
   bar, as long as the quality's percent: members.js sets
   --result-percent (0 to 100) on .result-bar. The bars are indigo, and the
   top quality's is coral, the logo's match color, as is Simple's first
   number. */
.results-load {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
}

.results-load .form-status {
  margin-top: 0;
}

.results-load .button[aria-disabled="true"] {
  opacity: 0.7;
  cursor: progress;
}

.results-rankings {
  display: grid;
  gap: 1.75rem;
}

.results-ranking {
  display: grid;
  gap: 1.25rem;
}

.results-ranking + .results-ranking {
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.results-ranking h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

/* The "View" label and its drop-down on one line, the drop-down as wide
   as its longest option (not the column), at the 44px touch height. It
   keeps .text-input's 16px text, which keeps iOS from zooming on focus. */
.results-view {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.results-view label {
  font-weight: 600;
}

.results-view .select-input {
  width: auto;
  min-height: 44px;
  padding-block: 0.375rem;
  padding-left: 0.75rem;
}

/* A note on a dev-only feature (the dev site and local previews), such as
   the results' "View" drop-down: small muted text after an "i" in a
   circle, on the text's first line when it wraps (baseline). members.js
   hides the feature, note and all, on meethalves.com. */
.dev-note {
  display: inline-flex;
  align-items: baseline;
  gap: 0.375rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.dev-note-icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.125rem;
  height: 1.125rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
}

/* Simple: the top three, each its number in a circle, then its name in
   the headings' type. The first number is on coral, the others on
   periwinkle. The circles' borders are transparent, so Windows high
   contrast, which drops the backgrounds, still draws them. */
.results-top {
  display: grid;
  gap: 0.875rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.results-top-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.results-top-place {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--periwinkle-soft);
  color: var(--ink);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.results-top-item.is-top .results-top-place {
  background: var(--coral-soft);
  color: var(--coral-text);
}

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

.result {
  display: grid;
  gap: 0.375rem;
}

.result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-head);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
}

.result-percent {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.result-bar {
  --result-percent: 0;
  height: 10px;
  border-radius: 999px;
  background: var(--sunk);
  overflow: hidden;
}

.result-fill {
  width: calc(var(--result-percent) * 1%);
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

.result-line {
  color: var(--muted);
  line-height: 1.5;
}

/* The top quality: a little larger, with a coral percent and bar. */
.result.is-top .result-head {
  font-size: 1.4375rem;
}

.result.is-top .result-percent {
  color: var(--coral-text);
}

.result.is-top .result-fill {
  background: var(--coral);
}

/* Windows high contrast drops backgrounds: keep the track and the bars. */
@media (forced-colors: active) {
  .result-bar,
  .result-fill {
    forced-color-adjust: none;
  }

  .result-bar {
    background: GrayText;
  }

  .result.is-top .result-fill,
  .result-fill {
    background: Highlight;
  }
}

/* About you: the birthday as three fields (month, day, year), the age
   worked out from it under them and the check before it (and a new
   gender) is saved (once saved, each shows in the account's details,
   .account-details); the phone number with its country picker (the
   Account page's number form, and About you's while a number is
   required); and the phone code. */
.date-field {
  display: grid;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.date-field legend {
  padding: 0;
  margin-bottom: 0.375rem;
  font-weight: 600;
  line-height: 1.35;
}

/* On a narrow phone the month gets its own row, so "September" fits. */
.date-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.625rem;
}

.date-row > .field:first-child {
  grid-column: 1 / -1;
}

@media (min-width: 420px) {
  .date-row {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1.25fr);
  }

  .date-row > .field:first-child {
    grid-column: auto;
  }
}

.date-row label {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 400;
}

.date-row .text-input {
  padding-inline: 0.75rem;
}

.date-row .select-input {
  padding-right: 2.25rem;
}

.age-readout {
  margin-top: 0.25rem;
  font-weight: 600;
}

.age-readout:empty {
  display: none;
}

.date-field .field-error {
  margin-top: 0.25rem;
}

/* The check before a new birthday or gender is saved, in place of "Next".
   members.js moves the focus here when it opens. */
.birthday-confirm {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--periwinkle-soft);
}

/* Focus lands here only so screen readers read the check: a ring for
   keyboard users, none after a click. */
.birthday-confirm:focus {
  outline: none;
}

.birthday-confirm:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.birthday-confirm-text {
  font-weight: 600;
  line-height: 1.45;
}

.birthday-confirm .app-actions {
  flex-wrap: wrap;
}

.birthday-confirm .app-actions .button {
  flex: 1 1 7rem;
}

.birthday-confirm .button[aria-disabled="true"] {
  opacity: 0.7;
  cursor: progress;
}

/* The phone number: a country picker, then the number. Closed, the picker
   shows a short "US +1" with an arrow like .select-input's; open, the list
   of every country by name ("United Kingdom +44"). Since November 30, 2026
   (Zack) the list is drawn by assets/dropdown.js like every other
   drop-down: its control (.dropdown, which takes the select's class
   .phone-country-select) fills the box and shows each option's short form
   (its data-short, set by members.js), and the span is hidden. The box
   around it draws the border, the arrow, the focus ring (:focus-within)
   and the error state. Without the script the native select lies over the
   span (.phone-country-label, which members.js keeps up to date),
   transparent, as before, so a press anywhere on it opens the browser's
   own list. */
.phone-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
}

.phone-country {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 2.25rem 0 0.875rem;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  background-color: var(--field-bg);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.phone-country:hover {
  border-color: var(--ink);
}

.phone-country:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

.phone-country:has([aria-invalid="true"]) {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}

.phone-country-label {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dropdown-native ~ .phone-country-label {
  display: none;
}

/* The drawn control: the whole box is its target (the negative margins
   undo the box's padding, which the control takes instead). */
.dropdown.phone-country-select {
  align-self: stretch;
  margin: 0 -2.25rem 0 -0.875rem;
  padding: 0 2.25rem 0 0.875rem;
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

/* The native select without the script. 16px, like .text-input, so iOS
   does not zoom when the list opens. The colors are for the list, which
   some browsers draw from them. */
select.phone-country-select:not(.dropdown-native) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  background: var(--field-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

/* The ring is on .phone-country instead. */
.phone-country-select:focus-visible {
  outline: none;
}

.code-input {
  max-width: 12rem;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  font-variant-numeric: tabular-nums;
}

/* "Send a new code", "Use a different number" and, for a number from the
   Account page, "Cancel" under the code form. */
.app-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

/* The line under the heading of About you and of the Account page: the
   reason the account's details did not load, with "Try again" under it
   (members.js, showAboutError and showAccountError), "Loading..." while
   they load, and on the Account page what happened after Change email, a
   change-email link or a confirmed number (state.accountNotice). Empty,
   it takes no room (.form-status:empty). */
.about-notice,
.account-notice {
  margin-top: 0;
}

.about-retry .button[aria-disabled="true"],
.account-retry .button[aria-disabled="true"] {
  opacity: 0.7;
  cursor: progress;
}

/* The account's details, read-only: on the Account page the name, the
   email and the mobile number, and on About you the birthday and the
   gender once each is saved (each is set once, so it shows as text, not
   as fields; a row is hidden until then, and the list while both are).
   One row per detail, the label above its value. The action (the "Change
   email" link, the "Add number" or "Change number" button, or the note on
   how to change a detail that cannot be changed here, .account-note) sits
   next to the value from 480px up, and under it on a phone, where both
   would not fit. The line under the last row is on the list itself. */
.account-details {
  display: grid;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.account-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.125rem 1rem;
  padding-block: 0.875rem;
  border-top: 1px solid var(--line);
}

.account-item dt {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.account-item dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-action a,
.account-action-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* "Add number" and "Change number" open the number's form in place, so
   they are buttons (with aria-expanded), drawn like the "Change email"
   link above them: link color, coral on hover, no box. */
.account-action-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}

.account-action-button:hover {
  color: var(--coral-text);
}

/* Windows high contrast gives a button its button colors: these keep the
   link color, like the "Change email" link above them (Delete account's
   too, which has its own color otherwise). */
@media (forced-colors: active) {
  .account-action-button,
  .account-action-button.account-action-danger {
    color: LinkText;
  }
}

/* The number's form, under its row and as wide as it: the field, then
   Cancel and "Text me a code" side by side (.app-actions--step: Cancel as
   wide as its word, so "Text me a code" fits on one line on a phone). */
.account-item .account-phone-edit {
  grid-column: 1 / -1;
  padding-top: 0.75rem;
  overflow-wrap: normal;
}

/* "To change this, email hello@meethalves.com" on the name (Account) and
   on the saved birthday and gender (About you): muted and the size of
   .hint. At most 12rem wide, so it takes two short lines ("To change this,
   email" over the address, about 165px wide) and leaves the value most of
   the row, as tall as the "Change email" link's 44px. The address is a
   link inside the sentence, so it stays inline rather than in
   .account-action's 44px box, and SemiBold like any link in running text. */
.account-note {
  max-width: 12rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.account-note a {
  display: inline;
  min-height: 0;
}

@media (min-width: 480px) {
  .account-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .account-item dt {
    grid-column: 1 / -1;
  }

  .account-action {
    text-align: right;
  }
}

/* Delete account: last on the Account page, with a confirm step before
   anything happens. members.js moves the focus to the confirm box when it
   opens. Right under the account's details, their line is the one above
   it; while they are hidden (they did not load), it has its own. */
.danger-zone {
  display: grid;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.account-details:not([hidden]) + .danger-zone {
  padding-top: 0;
  border-top: 0;
}

.danger-zone h2 {
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}

/* Its line, with the "Delete account" button next to it, drawn like the
   actions of the rows above (.account-action-button: no box, on the right
   from 480px up and under the line on a phone), in the error color. Its
   hover underlines it, since coral would hardly show on that red. */
.danger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.125rem 1rem;
}

@media (min-width: 480px) {
  .danger-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

.account-action-button.account-action-danger,
.account-action-button.account-action-danger:hover {
  color: var(--error);
}

.account-action-button.account-action-danger:hover {
  text-decoration: underline;
}

.button-danger {
  background: var(--error);
  color: var(--surface);
}

.button-danger:hover {
  filter: brightness(0.92);
}

.button-danger:disabled {
  opacity: 0.7;
  cursor: progress;
}

.delete-confirm {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 2px solid var(--error);
  border-radius: var(--radius-sm);
}

/* Focus lands here only so screen readers read the question: a ring for
   keyboard users, none after a click. */
.delete-confirm:focus {
  outline: none;
}

.delete-confirm:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.delete-confirm-title {
  font-family: var(--font-head);
  font-size: 1.1875rem;
  font-weight: 700;
}

.delete-confirm .app-actions {
  flex-wrap: wrap;
}

.delete-confirm .app-actions .button {
  flex: 1 1 12rem;
}

.delete-confirm .form-status {
  margin-top: 0;
}

/* New Halves and Connections (the menu's "coming soon" pages): the line
   that says nothing is there yet, in a dashed box like an empty slot. */
.app-empty {
  padding: 1rem 1.25rem;
  border: 1px dashed var(--field-line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 600;
}

/* A line about the page in a tinted box, while the sign-up is not
   finished: My profile's "Your sign-up is not finished yet.", and the
   lines of New Halves and Connections, each with its link to the step
   the person is on, and "Step 4 done." on Step 5's first screen
   (#survey-banner). The transparent border shows in Windows high
   contrast, which drops the tint. */
.app-notice {
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--periwinkle-soft);
  line-height: 1.5;
}

/* My profile (/app/profile; members.js builds the profile,
   buildProfileCard).
   From 860px the page is wider than the other views and the profile is two
   columns: the photos and the basics on the left, the eight sections on the
   right. On narrower screens the left column comes first, its photo at
   most 22rem wide. The chips are tints with ink text; their transparent
   borders show in Windows high contrast. */
@media (min-width: 860px) {
  .app-wrap:has(> [data-view="my-profile"]:not([hidden])) {
    max-width: 62rem;
  }
}

/* A long word or URL in the bio, fun fact, a favorite activity, name or
   city wraps instead of widening the page (as .account-item dd): the
   grid's tracks would grow to the longest unbroken word otherwise. */
.profile-card {
  display: grid;
  gap: 2rem;
  overflow-wrap: anywhere;
}

@media (min-width: 860px) {
  .profile-card {
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
  }
}

.profile-side {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.profile-photos {
  display: grid;
  gap: 0.625rem;
  max-width: 22rem;
  margin-bottom: 0.25rem;
}

.profile-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--sunk);
}

/* The large photo's frame, which holds the year it was taken as a
   watermark (members.js, buildProfilePhotos; Zack, December 1, 2026): in
   the bottom-left corner, inside the rounded corner with a little room,
   small and semi-bold, white at slight transparency with a soft dark
   shadow and a faint dark haze behind it that fades out at its edges
   (no box), so it reads on light and dark photos alike, a white sky or
   wall included. Not a control: clicks go through it, it cannot be
   selected, and screen readers skip it (the year is in the photo's alt
   text). Only the large photo has it, not the thumbnails. */
.profile-photo-frame {
  position: relative;
}

.profile-photo-frame .profile-photo {
  display: block;
}

.profile-photo-year {
  position: absolute;
  left: 0.125rem;
  bottom: 0.125rem;
  padding: 0.5rem 0.75rem;
  background: radial-gradient(closest-side, rgba(13, 12, 34, 0.4), rgba(13, 12, 34, 0.22) 55%, rgba(13, 12, 34, 0));
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55), 0 0 10px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Windows high contrast drops the shadow and the haze: the year gets the
   window's own colors behind it instead. */
@media (forced-colors: active) {
  .profile-photo-year {
    left: 0.625rem;
    bottom: 0.5rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    background: Canvas;
    color: CanvasText;
  }
}

/* No photo yet: the first initial in the photo's place, and "Add photos". */
.profile-photo--empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  border: 1px dashed var(--field-line);
  background: var(--periwinkle-soft);
}

.profile-initial {
  color: var(--primary);
  font-family: var(--font-head);
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
}

.profile-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Each thumbnail is a button that shows its photo above it; the one
   showing (aria-pressed) has an indigo ring. */
.profile-thumb {
  display: block;
  width: 3.25rem;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: none;
  cursor: pointer;
}

.profile-thumb img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
  background: var(--sunk);
}

.profile-thumb:hover {
  border-color: var(--field-line);
}

.profile-thumb[aria-pressed="true"] {
  border-color: var(--primary);
}

@media (forced-colors: active) {
  .profile-thumb {
    border-color: Canvas;
  }

  .profile-thumb[aria-pressed="true"] {
    border-color: Highlight;
  }
}

.profile-name {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
  letter-spacing: -0.02em;
}

/* The two lines under the name and the facts under them
   (.profile-fact), each after its icon (members.js, iconLine): a map pin
   before "Lives in" the current city, a house before "From" the hometown,
   then a briefcase, a graduation cap, an open book, a ruler and a speech
   bubble before the profession, the school, the education level, the
   height and the languages. The icons make one column at the left edge
   with the words after them, so a line too long for the column wraps
   under its words, not under its icon. The icon stays centered on the
   first line: 1.6em is the body's line height, and the icon is 16px. */
.profile-place,
.profile-fact {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
}

.profile-place svg,
.profile-fact svg {
  flex: none;
  margin-top: calc((1.6em - 16px) / 2);
}

/* The two lines under the name are in muted SemiBold. The second sits
   closer under the first than the column's gap, so the two read as a
   pair. */
.profile-place {
  color: var(--muted);
  font-weight: 600;
}

.profile-place + .profile-place {
  margin-top: -0.375rem;
}

/* A line with no answer ("Profession not added", members.js, notAdded)
   keeps its icon, its words muted and Regular, so it reads as a gap rather
   than as an answer; in the person's own view its "Add" link follows,
   SemiBold like any link in running text (the facts are list items, which
   that rule does not cover). A fact answered without saying anything
   ("Education not shared") looks the same, with no link. */
.profile-place.is-empty,
.profile-fact.is-empty {
  color: var(--muted);
  font-weight: 400;
}

.profile-fact a {
  font-weight: 600;
}

.profile-facts {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

/* The facts' words are in ink, and their icons muted, like the pin and
   the house above them, so the whole column of icons is one color. */
.profile-fact svg {
  color: var(--muted);
}

.profile-main {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.profile-section {
  display: grid;
  gap: 0.5rem;
}

.profile-section + .profile-section {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* The section's title with its one link at the right end of the row:
   Edit, or Add while the section is empty (members.js,
   buildProfileSection). */
.profile-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
}

.profile-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* The section's link, Edit or Add alike, with a 44px target.
   margin-left: auto keeps a link that wraps under its title (the longer
   "Refresh Your Vibe", "Go to How you see yourself", "Revisit What
   Matters Most" and "Go to What matters most", on phones) at the
   right, like the others. */
.profile-edit {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: auto;
  font-weight: 600;
}

/* Refresh Your Vibe or Revisit What Matters Most while its step cannot be
   changed, this month's retake used (members.js, retakeButton): in the
   link's place, the same words on a disabled button that is not a link,
   grayed as Product research's answered study is (.research-study
   .button:disabled): the sunk fill of the page's other gray pills with
   the muted text of the intro lines, 5.4:1 (#5B5880 on #E8E5F7) and in
   dark mode 6.2:1 (#ABA8D6 on #27245C), as a small pill, so it reads as
   a control that is off rather than as a link (in dark mode the link
   color and the muted text are both light). No hover or press change,
   and the cursor says it takes no clicks. Under it, "Available again
   January 1" in small muted type, as the "Done" under an answered study,
   at the right like the link (also when it wraps under the title on a
   phone). Windows high contrast makes the button's text and border
   GrayText. */
.profile-retake {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  margin-left: auto;
  padding-block: 0.375rem;
  text-align: right;
}

.profile-retake .profile-edit,
.profile-retake .profile-edit:hover,
.profile-retake .profile-edit:active {
  min-height: 0;
  margin: 0;
  padding: 0.25rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--sunk);
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  line-height: 1.35;
  cursor: not-allowed;
  transform: none;
}

.profile-retake-when {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (forced-colors: active) {
  .profile-retake .profile-edit {
    color: GrayText;
    border-color: GrayText;
  }
}

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-chip {
  padding: 0.375rem 0.875rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--periwinkle-soft);
  font-weight: 600;
  line-height: 1.35;
}

/* The bio keeps its line breaks (members.js puts it in as text). */
.profile-text {
  white-space: pre-line;
}

/* The favorite activities (members.js, lineList): plain text in the body's
   style, like the bio and the fun fact, one activity per line, with no
   bullets and no indent. A long one wraps within its own line
   (.profile-card). */
.profile-lines {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* An empty section's words ("Not added yet."), alone in its body: its Add
   is in its head. */
.profile-empty {
  color: var(--muted);
}

/* "Life now": a row for each answer, its label at the left and its value
   after it, "Not added" muted when there is none. Label and value are the
   body's size, like the rest of My profile (Zack, December 2, 2026; the
   labels were 0.875rem before), the label in muted SemiBold like the
   "Lives in" and "From" lines under the name. The labels make one column
   8.5em wide, a little wider than the longest, "Relationship goal" (the
   first row, about 8.1em). In em, so it grows with the body's size (17px
   from 640px wide, 16px below). */
.profile-rows {
  display: grid;
  gap: 0.375rem;
  margin: 0;
}

.profile-row {
  display: grid;
  grid-template-columns: 8.5em minmax(0, 1fr);
  gap: 0 1rem;
  align-items: baseline;
}

.profile-row dt {
  color: var(--muted);
  font-weight: 600;
}

/* A value too long for its line on a phone wraps into two lines of about
   the same length (text-wrap: balance), so "Short-Term or Long-Term"
   breaks as "Short-Term" and "or Long-Term", never after the hyphen of
   "Long-" with "Term" alone on the second line. A browser without it
   wraps as usual. */
.profile-row dd {
  margin: 0;
  min-width: 0;
  text-wrap: balance;
}

.profile-row dd.is-empty {
  color: var(--muted);
}

/* "Preview profile" and "Edit your profile": side by side while they fit,
   else one above the other, each as wide as the panel. */
.profile-actions {
  flex-wrap: wrap;
}

.profile-actions .button {
  flex: 1 1 12rem;
}

@media (min-width: 860px) {
  .profile-actions .button {
    flex: 0 1 auto;
  }
}

/* "Preview profile" keeps the view's height (members.js, drawProfileCard),
   so "Leave preview" stays where it was, under the pointer, and the
   panel does not shrink. The card's place keeps the height the editing
   card had, measured right before the preview is drawn, as its minimum
   (members.js sets --profile-min-height on it, and takes it off on "Leave
   preview", on a new load and when a resize changes the card's width),
   so the space the preview frees is at its bottom. The line about an
   unfinished sign-up and "Edit your profile" are invisible in their
   places (.is-invisible), so nothing above the card moves and the row of
   buttons keeps its height (two rows on a phone); visibility also takes
   their links out of the tab order and away from screen readers. */
.profile-card-slot {
  min-height: var(--profile-min-height, auto);
}

.profile-view .is-invisible {
  visibility: hidden;
}

/* Give feedback's questions on the Feedback page (app/index.html,
   #feedback-form). Its button is drawn as Product Research's study
   buttons are (.research-studies, below). */
.feedback-questions {
  display: grid;
  gap: 1.75rem;
}

/* The Feedback page's thank-you gets the focus once the answers are sent
   (members.js, feedbackAnswered), only so screen readers read it, as a
   view's heading does: it is not a control, so it shows no focus ring.
   The same for Product Research's thank-you, right after a study is
   answered (drawResearch). */
.feedback-thanks:focus,
.research-thanks:focus {
  outline: none;
}

/* A feedback scale: round number buttons in one row, each at most 2.75rem
   and smaller when the row is short of room (0 to 10 on a 393px phone:
   about 1.65rem), the first at the left edge and the last at the right,
   over the words for the two ends (.scale-ends); under 360px a scale of
   more than 7 points takes two rows (below). Each is a radio button
   drawn by its <span>, as the pills are; the one picked is filled. */
.rating-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 2.75rem);
  justify-content: space-between;
  gap: 0.25rem;
}

.rating {
  position: relative;
  display: flex;
  padding-block: 0.25rem;
}

.rating input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.rating-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--field-line);
  border-radius: 50%;
  background: var(--field-bg);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.rating input:hover + .rating-mark {
  border-color: var(--ink);
}

.rating input:checked + .rating-mark {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.rating input:focus-visible + .rating-mark {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.rating-field[aria-invalid="true"] .rating-mark {
  border-color: var(--error);
}

@media (max-width: 479.98px) {
  .rating-list {
    gap: 0.125rem;
  }

  .rating-mark {
    font-size: 0.8125rem;
  }
}

/* Under 360px one row of 0 to 10 would make each button under 24px (WCAG
   2.5.8), so a scale of more than 7 points (members.js marks it
   .rating-list--long) takes two rows of up to 6: 0 to 5, then 6 to 10. */
@media (max-width: 359.98px) {
  .rating-list--long {
    grid-auto-flow: row;
    grid-template-columns: repeat(6, minmax(0, 2.75rem));
    row-gap: 0.25rem;
  }
}

/* Windows high contrast drops the fill: the picked one takes the
   highlight colors. */
@media (forced-colors: active) {
  .rating input:checked + .rating-mark {
    forced-color-adjust: none;
    background: Highlight;
    border-color: Highlight;
    color: HighlightText;
  }
}

/* Product research's landing: the payment-model question as two cards,
   side by side from 560px. Each is a radio button drawn as a card, with a
   round mark that fills with a dot once it is picked (so the pick shows by
   more than color), an indigo border and the periwinkle tint. */
.research-landing {
  display: grid;
  gap: 1.25rem;
}

/* A button for each study, before its question takes their place
   (members.js): each as wide as the Continue under the question, with the
   study's time under it in small muted type ("Done" once it is answered,
   its button grayed, below). One per row on phones; from 560px side by
   side, as many as fit at 12rem or more each (a lone study's button
   fills the row). The panel's column is at most about 558px, so that is
   two a row, and a last button alone on its row (a third study's) fills
   it, rather than sitting at half width. The Feedback page's one button,
   Give feedback, is drawn the same way (#feedback-start), so it fills
   its row too. */
.research-studies {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .research-studies {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  }

  .research-study:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.research-study {
  display: grid;
  gap: 0.375rem;
  align-content: start;
}

.research-study .button {
  width: 100%;
}

/* A study the person has answered: its button stays in its place,
   disabled (members.js, drawStudyButtons), grayed out with the sunk fill
   of the page's other gray pills (the photo count, the sign-up/log-in
   switch), with the muted text of the intro lines and the time line under
   it, 5.4:1 (#5B5880 on #E8E5F7) and in dark mode 6.2:1 (#ABA8D6 on
   #27245C), so its name stays readable.
   No hover or press change, and the cursor says it takes no clicks, as
   on a multi question's boxes at its limit. Windows high contrast makes
   its text and border GrayText. */
.research-study .button:disabled,
.research-study .button:disabled:hover,
.research-study .button:disabled:active {
  background: var(--sunk);
  color: var(--muted);
  opacity: 1;
  cursor: not-allowed;
  transform: none;
}

@media (forced-colors: active) {
  .research-study .button:disabled {
    color: GrayText;
    border-color: GrayText;
  }
}

.research-time {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
}

.research-cards {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .research-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.research-card {
  position: relative;
  display: flex;
}

.research-card input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.research-card-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 0.25rem 0.75rem;
  width: 100%;
  padding: 1rem 1.125rem;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
}

.research-card-radio {
  position: relative;
  grid-row: 1 / span 2;
  width: 1.375rem;
  height: 1.375rem;
  margin-top: 0.125rem;
  border: 2px solid var(--field-line);
  border-radius: 50%;
}

.research-card-label {
  font-family: var(--font-head);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
}

.research-card-text {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.research-card input:hover + .research-card-body {
  border-color: var(--ink);
}

.research-card input:checked + .research-card-body {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
  background: var(--periwinkle-soft);
}

.research-card input:checked + .research-card-body .research-card-radio {
  border-color: var(--primary);
}

/* The dot: a border, so Windows high contrast keeps it. */
.research-card input:checked + .research-card-body .research-card-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 6px solid var(--primary);
  border-radius: 50%;
}

.research-card input:focus-visible + .research-card-body {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.choice-field[aria-invalid="true"] .research-card-body {
  border-color: var(--error);
}

/* A payment model's prices. The chip (the model's study_label) comes after
   the heading in the page, so the heading is read first, and shows above
   it. Each price: its name in small capitals over its question, then the
   box, with "$" inside it, and the unit after it ("per month"). */
.study-chip {
  order: -1;
  justify-self: start;
  margin-bottom: -0.5rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--periwinkle-soft);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
}

.research-prices {
  display: grid;
  gap: 1.25rem;
}

.price-fields {
  display: grid;
  gap: 1.75rem;
}

.price-field label {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.price-question {
  font-weight: 600;
  line-height: 1.4;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.25rem;
}

.price-box {
  position: relative;
  flex: 0 1 10rem;
  min-width: 7rem;
}

.price-prefix {
  position: absolute;
  top: 50%;
  left: 0.875rem;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
  pointer-events: none;
}

.price-box .price-input {
  padding-left: 1.75rem;
  font-variant-numeric: tabular-nums;
}

.price-unit {
  color: var(--muted);
  font-weight: 600;
}

/* 10. Blog (the list, a post, the home page's From the blog, the admin preview bar).
   The API makes /blog/ and each post (api/app/blog.py); the home page's
   section is in index.html, filled by app.js (section 6). The cards are the
   same on /blog/ (h2 titles) and on the home page (h3). Every picture is the
   wide link-preview shape (1200 by 630), so its box is set before it loads
   and nothing moves. */
.blog-index h1 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.25rem);
}

.blog-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.25rem 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .blog-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 56rem) {
  .blog-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem 2rem;
  }
}

/* The whole card is the title's link (its ::after covers the card). */
.blog-card {
  position: relative;
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.blog-card-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--sunk);
}

/* A post without a picture: a tinted block of the same shape. */
.blog-card-image--none {
  background: linear-gradient(135deg, var(--periwinkle-soft), var(--coral-soft));
}

.blog-card-title {
  font-size: 1.3125rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
}

.blog-card-link {
  color: var(--ink);
}

.blog-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
}

/* The focus ring goes round the whole card, the link's real size. */
.blog-card-link:focus-visible {
  outline: none;
}

.blog-card-link:focus-visible::after {
  outline: 3px solid var(--focus);
  outline-offset: 6px;
}

.blog-card-date {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* The home page's From the blog, the last section before the footer. */
.blog-latest .blog-cards {
  margin-top: 2.5rem;
}

.blog-latest-more {
  margin-top: 2rem;
}

/* A post. */
.blog-post-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  margin: 1.5rem 0;
  border-radius: var(--radius-sm);
  background: var(--sunk);
}

.blog-post ul + p,
.blog-post ul + ul {
  margin-top: 1rem;
}

.prose .blog-post-more {
  margin-top: 2.5rem;
}

/* The admin editor's Preview (api/app/routers/admin_blog.py): a line
   across the top, in place of the site's header. */
.blog-preview-bar {
  padding: 0.625rem var(--gutter);
  background: var(--coral-soft);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
}
