/* New Phone Scout — one stylesheet for every page.
   Type: SF Pro on Apple devices (system font), Inter everywhere else (closest free SF Pro lookalike).
   Color: iOS-style neutrals plus one accent, "in stock" green. */

/* Inter (SIL Open Font License), latin subset, self-hosted so no third-party stylesheet blocks
   the first paint. Apple devices match -apple-system first and never download it. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin.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;
}

:root {
  /* The product name. Change it here; every [data-brand] span and page title uses it. */
  --brand: "New Phone Scout";

  color-scheme: light dark;
  --bg: #ffffff;
  --fill: #f5f5f7;
  --fill-2: #e8e8ed;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --line: #d2d2d7;
  --accent: #1a7f37;
  --accent-dot: #30c552;
  --danger: #d70015;
  --notif: rgba(242, 242, 245, 0.86);
  --notif-ring: rgba(0, 0, 0, 0.06);
  --on-ink: #ffffff;
  --seg-on: #ffffff;
  --shade: rgba(0, 0, 0, 0.08);
  --swatch-ring: rgba(0, 0, 0, 0.12);
  /* The referral accent (Apple system blue), only in the referral bits: never buttons, never "in stock".
     The home page's badge is its one solid fill. */
  --ref: #007aff;
  --ref-ink: #0066cc;
  --ref-tint: rgba(0, 122, 255, 0.07);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Inter", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "Inter", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fill: #1c1c1e;
    --fill-2: #2c2c2e;
    --ink: #f5f5f7;
    --ink-2: #98989d;
    --line: #38383a;
    --accent: #30d158;
    --accent-dot: #30d158;
    --danger: #ff6961;
    --notif: rgba(44, 44, 46, 0.86);
    --notif-ring: rgba(255, 255, 255, 0.08);
    --on-ink: #000000;
    --seg-on: #48484a;
    --shade: rgba(0, 0, 0, 0.5);
    --swatch-ring: rgba(255, 255, 255, 0.28);
    --ref: #0a84ff;
    --ref-ink: #409cff;
    --ref-tint: rgba(10, 132, 255, 0.16);
  }
}

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

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.012em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

main { flex: 1; }

h1, h2, h3 { font-family: var(--font-display); margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; letter-spacing: inherit; color: inherit; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

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

[data-brand]:empty::before { content: var(--brand); }

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

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.wrap-wide { max-width: 1120px; }
.wrap-narrow { max-width: 480px; }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { flex: none; width: 22px; height: 22px; margin-top: -2px; }
.brand-mark-dot, .notif-mark circle { fill: var(--accent-dot); }

.live-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-dot);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-dot) 22%, transparent);
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  padding: 8px 0;
}
@media (hover: hover) { .nav-link:hover { color: var(--ink-2); } }

/* Footer: link columns on a soft fill, after Tailscale's and Notion's on Mobbin. On phones it's
   the logo and "Create an alert" on one row, then Apple-style sections you tap open (`initFooter`
   folds the <details>); from 640px the sections are plain open columns under that row, and from
   960px the tagline and live line come back beside them. */
.foot {
  margin-top: 56px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: var(--fill);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
}
.foot-inner { padding-top: 20px; }
.foot-top { display: grid; gap: 16px; }
/* Phones: just the logo and "Create an alert", one row, level with the sections below. */
.foot-about { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* On the narrowest phones the name wraps to two lines rather than pushing the button down. */
.foot-about .brand { min-width: 0; line-height: 1.15; }
.foot-about .btn { flex: none; }
.foot-tag, .foot-live { display: none; }
.foot a { color: var(--ink-2); text-decoration: none; transition: color 0.15s ease; }
.foot .brand { color: var(--ink); }
.foot .btn-primary { color: var(--on-ink); }
@media (hover: hover) {
  .foot a:not(.btn):not(.brand):hover { color: var(--ink); }
}

/* Phones: one section per column, a hairline between, the heading a full-width tap row. */
.foot-cols { border-bottom: 1px solid var(--line); }
.foot-col { border-top: 1px solid var(--line); }
.foot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  list-style: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.foot-head::-webkit-details-marker { display: none; }
.foot-head::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 1.75px solid var(--ink-2);
  border-bottom: 1.75px solid var(--ink-2);
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.2s ease;
}
.foot-col[open] > .foot-head::after { transform: translateY(25%) rotate(-135deg); }
.foot-col ul { list-style: none; margin: 0; padding: 0 0 16px; display: grid; gap: 0; }
.foot-col li a { display: block; padding: 7px 0; font-size: 15px; }
.foot-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.foot-bottom {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
}
.foot-bottom p { margin: 0; max-width: 72ch; }

@media (min-width: 640px) {
  .foot { margin-top: 72px; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .foot-inner { padding-top: 48px; }
  .foot-top { gap: 32px; }
  .foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; border-bottom: 0; }
  .foot-col { border-top: 0; }
  .foot-head { min-height: 0; margin-bottom: 14px; font-size: 13px; letter-spacing: -0.005em; cursor: default; }
  .foot-head::after { content: none; }
  .foot-col ul { gap: 10px; padding: 0; }
  .foot-col li a { display: inline; padding: 0; font-size: 14px; }
  .foot-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 32px;
    margin-top: 44px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }
}
/* Desktop: the about block stands beside the columns, with its tagline and live line. Below this
   it's the compact row (logo left, button right), so nothing stacks above the columns. */
@media (min-width: 960px) {
  .foot-inner { padding-top: 64px; }
  .foot-top { grid-template-columns: minmax(260px, 1fr) minmax(0, 2.3fr); gap: 64px; }
  .foot-about { display: grid; justify-items: start; align-content: start; gap: 12px; max-width: 340px; }
  .foot-tag { display: block; text-wrap: pretty; }
  .foot-live { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; color: var(--ink); }
  .foot-about .btn { margin-top: 4px; }
}

/* ---------- Type ---------- */

.display {
  font-size: clamp(40px, 5.6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.title {
  font-size: clamp(30px, 4.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.page-title {
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.lede {
  font-size: 19px;
  line-height: 1.42;
  color: var(--ink-2);
  max-width: 34em;
  text-wrap: pretty;
}
@media (min-width: 880px) { .lede { font-size: 21px; } }

.sub { color: var(--ink-2); text-wrap: pretty; }
.muted { color: var(--ink-2); }
.small { font-size: 15px; }
.fine { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.nums { font-variant-numeric: tabular-nums; }

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

.btn {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, opacity 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-secondary { background: var(--fill-2); color: var(--ink); }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 15px; }
@media (hover: hover) {
  .btn-primary:hover:not(:disabled) { opacity: 0.86; }
  .btn-secondary:hover:not(:disabled) { background: color-mix(in srgb, var(--fill-2) 80%, var(--ink) 8%); }
}

.link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link:disabled { color: var(--ink-2); text-decoration: none; cursor: default; }
.link-danger { color: var(--danger); text-decoration: none; }

.icon-btn {
  appearance: none;
  border: 0;
  background: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: -10px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn svg { width: 22px; height: 22px; }
@media (hover: hover) { .icon-btn:hover { background: var(--fill); } }

/* ---------- Form fields ---------- */

.label {
  display: block;
  margin: 0 0 8px 2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}

.input {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--fill);
  color: var(--ink);
  font-size: 19px;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.input::placeholder { color: color-mix(in srgb, var(--ink-2) 65%, transparent); }
/* Country picker: an .input with a chevron (mid-gray reads on light and dark fills). */
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 46px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 8' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 14px 8px;
}
.field { margin-top: 18px; }
.input:focus { border-color: var(--ink); background: var(--bg); }
.input[aria-invalid="true"] { border-color: var(--danger); }

.code-input {
  text-align: center;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.42em;
  padding-left: calc(18px + 0.42em);
  font-variant-numeric: tabular-nums;
  min-height: 68px;
}

.status {
  min-height: 22px;
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-2);
}
.status.err { color: var(--danger); }
.status.ok { color: var(--accent); }
.status + .link { margin-top: 4px; }

/* ---------- Landing ---------- */

/* Centered and stacked at every width: the words, then the phone with its notification. */
.hero {
  display: grid;
  justify-items: center;
  gap: 28px;
  padding-top: 24px;
  padding-bottom: 40px;
  text-align: center;
}
.hero .display { max-width: 14em; margin-inline: auto; text-wrap: balance; }
.hero .lede { margin: 18px auto 0; }
.cta { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.hero .cta { justify-content: center; }

.hero-art {
  position: relative;
  margin: 0;
  max-width: 560px;
  width: 100%;
  justify-self: center;
  text-align: start;
}
.hero-shot {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: 50% 52%;
}
.hero-msg {
  position: absolute;
  left: 0;
  right: 12%;
  bottom: -6px;
  display: grid;
  justify-items: start;
}

@media (min-width: 880px) {
  .hero {
    gap: 48px;
    padding-top: 72px;
    padding-bottom: 88px;
  }
  .hero-msg { left: -6%; right: 18%; bottom: 2%; }
}

/* iOS-style notification banner (the home share card in brand/og.html matches it) */
.notif {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  width: min(100%, 360px);
  padding: 11px 14px 12px 11px;
  border-radius: 22px;
  background: var(--notif);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: 0 10px 30px var(--shade), 0 0 0 0.5px var(--notif-ring);
  color: var(--ink);
}
.notif p { margin: 0; }
.notif-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
  color: #1d1d1f;
}
.notif-mark { width: 28px; height: 28px; }
.notif-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); }
.notif-title { margin-top: 1px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.notif-body { font-size: 15px; line-height: 1.3; letter-spacing: -0.01em; }

.hero-msg .notif {
  opacity: 0;
  transform: translateY(-14px) scale(0.96);
  transform-origin: 50% 0;
  animation: pop 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.1) 0.6s forwards;
}

@keyframes pop { to { opacity: 1; transform: none; } }

/* Home: real alerts we sent. The heading, numbers and copy, centered, beside a stack of the latest real alerts. */
.proof { display: grid; gap: 24px 64px; grid-template-areas: "copy" "feed"; text-align: center; }
.proof-copy { grid-area: copy; }
.proof-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 32px; margin-top: 24px; }
.proof-stats p { display: flex; flex-direction: column; }
.proof-num {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.proof-label { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.proof-live { justify-content: center; }
.proof-live .live-dot { animation: live-pulse 2.4s ease-in-out infinite; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-dot) 0%, transparent); } }
/* New alerts drop in at the top while the page is open (app.js); the one leaving fades out of the flow. */
.proof-feed { grid-area: feed; position: relative; display: grid; align-content: start; gap: 10px; margin: 0; padding: 0; list-style: none; text-align: start; }
.proof-feed .notif {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  background: var(--fill);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  text-decoration: none;
}
@media (hover: hover) { .proof-feed a.notif:hover { background: var(--fill-2); } }
@media (min-width: 880px) {
  /* The numbers sit level with the middle of the cards. */
  .proof { grid-template-columns: 1fr 1fr; grid-template-areas: "copy feed"; align-items: center; }
}

/* Home: the dated stock answer and the restock stat above the config chips (seo::home_with_live). */
.centered > .home-restocks { margin-top: 16px; font-size: 15px; }
/* The dot sits level with the first line however many lines the answer wraps to. */
.centered > .home-status { justify-content: center; align-items: flex-start; max-width: 40em; margin-inline: auto; text-align: start; text-wrap: pretty; }
.centered > .home-status .live-dot { flex: none; margin-top: 0.45em; }

/* Home: customer posts from X, quoted as cards. */
.wins { display: grid; gap: 12px; max-width: 840px; margin: 24px auto 0; padding: 0; list-style: none; text-align: start; }
@media (min-width: 760px) { .wins { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
.win { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; height: 100%; margin: 0; padding: 18px 20px; border-radius: 18px; background: var(--fill); }
.win p { font-size: 17px; line-height: 1.45; text-wrap: pretty; }
.win p::before { content: "“"; }
.win p::after { content: "”"; }
.win footer a { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; font-size: 14px; }
.win-name { font-weight: 600; }
.win-meta { color: var(--ink-2); }
@media (hover: hover) { .win footer a:hover .win-meta { text-decoration: underline; } }
.wins-more { max-width: 840px; margin: 12px auto 0; }
.wins-more summary { width: fit-content; margin: 0 auto; padding: 8px 16px; border-radius: 999px; background: var(--fill); font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.wins-more summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .wins-more summary:hover { background: var(--fill-2); } }
.wins-more[open] summary { display: none; }
.wins-more .wins { margin-top: 0; }
/* Stock pages: the same cards before the footer (seo::with_page_posts), lined up under the heading. */
.page-wins .wins { max-width: none; margin: 0; }

/* /reviews (seo::reviews_page): centered like the home page's sections, the counts as big numbers. */
.reviews-head { padding-top: 24px; }
@media (min-width: 880px) { .reviews-head { padding-top: 40px; } }
.reviews-head > .sub { max-width: 34em; font-size: 19px; line-height: 1.42; }
@media (min-width: 880px) { .reviews-head > .sub { font-size: 21px; } }
.reviews-head .proof-stats { margin-top: 32px; gap: 24px 48px; }
.reviews-head .proof-stats p { align-items: center; text-align: center; }
/* On a phone the numbers stay on one row, a little smaller. */
@media (max-width: 519px) {
  .reviews-head .proof-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; }
  .reviews-head .proof-num { font-size: 34px; }
  .reviews-head .proof-label { font-size: 13px; }
}
.centered > .reviews-counts { margin-top: 20px; font-size: 15px; }
.reviews-end { padding-bottom: 56px; }
.reviews-end > .cta { flex-direction: column; }

.section { padding-top: 56px; padding-bottom: 16px; }
@media (min-width: 880px) { .section { padding-top: 96px; } }
.section .sub { margin-top: 10px; max-width: 36em; }
.section .config-links { margin-top: 24px; }

/* Home sections with a centered heading. What's inside keeps its own alignment unless named here. */
.centered > .title, .centered > .sub { text-align: center; margin-inline: auto; }
.centered > .sub { text-wrap: balance; }
.centered > .cta { justify-content: center; }
.centered > .plans, .centered > .faq { margin-inline: auto; }
.centered .plan { align-items: center; text-align: center; }
/* The eight configs as an even grid: 2 across on phones, 4 across (two rows) wider. */
.centered > .config-links { display: grid; grid-template-columns: repeat(2, 1fr); max-width: 720px; margin-inline: auto; }
.centered > .config-links .chip-link { justify-content: center; }
@media (min-width: 760px) { .centered > .config-links { grid-template-columns: repeat(4, 1fr); } }

.steps {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 24px;
}
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.step-n {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fill);
  font-weight: 600;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 19px; letter-spacing: -0.02em; line-height: 1.3; margin-top: 5px; }
.steps p { margin-top: 4px; color: var(--ink-2); }
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .steps li { grid-template-columns: 1fr; gap: 16px; }
}

.lineup {
  margin-top: 28px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  scroll-snap-type: x mandatory;
}
.lineup::-webkit-scrollbar { display: none; }
.lineup figure { margin: 0; flex: 0 0 132px; scroll-snap-align: start; text-align: center; }
.lineup img { width: 132px; height: 132px; object-fit: contain; }
.lineup figcaption { margin-top: 4px; font-size: 14px; font-weight: 500; }
@media (min-width: 880px) {
  .lineup { overflow: visible; margin-inline: 0; padding-inline: 0; justify-content: space-between; }
  .lineup figure { flex: 1 1 0; }
  .lineup img { width: 100%; height: auto; aspect-ratio: 1; }
}

/* Plans */
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
  max-width: 640px;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  border-radius: 20px;
  background: var(--fill);
}
.plan-name { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.plan-price {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}
.plan-price small { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink-2); }
.plan-what { margin-top: 10px; font-size: 15px; line-height: 1.4; }
.slots { display: flex; gap: 5px; margin-top: 14px; }
.slots i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); }
.slots[data-n="2"] i:nth-child(-n+2), .slots[data-n="5"] i, .slots[data-n="10"] i { background: var(--ink); box-shadow: none; }
/* Max sits full width under Starter and Plus; on the home page it's the third column once there's room. */
.plan-max { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .centered > .plans { grid-template-columns: repeat(3, 1fr); max-width: 900px; }
  .centered .plan-max { grid-column: auto; }
}
/* The home page's Max tile is ink to mark the top tier. The plan pickers keep plain tiles, since an
   ink border there means "selected". */
.plan-ink { background: var(--ink); color: var(--on-ink); }
.plan-ink .plan-price small { color: color-mix(in srgb, var(--on-ink) 62%, transparent); }
.plan-ink .slots i { background: var(--on-ink); }

/* ---------- Plan dialog (account: Manage plan) ----------
   A sheet from the bottom on phones, a centered card on wider screens. The picked plan gets the
   same ink border as the plan pickers. */
.sheet {
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 24px);
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(0, 0, 0, 0.45); }
.sheet[open] { animation: sheet-up 0.32s cubic-bezier(0.2, 0.9, 0.3, 1); }
@keyframes sheet-up { from { transform: translateY(48px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
html:has(.sheet[open]) { overflow: hidden; }
.sheet-body { padding: 8px 20px calc(28px + env(safe-area-inset-bottom)); }
.sheet-grab { width: 36px; height: 5px; margin: 0 auto 10px; border-radius: 3px; background: var(--line); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { font-size: 22px; letter-spacing: -0.02em; }
.sheet-x {
  appearance: none;
  border: 0;
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fill-2);
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.sheet .sub { margin-top: 4px; font-size: 15px; }
.sheet-note { display: flex; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--fill); font-size: 15px; line-height: 1.4; }
.sheet-note::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: #ff9500; }
.sheet-note[hidden] { display: none; }
.plan-options { display: grid; gap: 10px; margin-top: 16px; }
.plan-option {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.plan-option.is-on { border-color: var(--ink); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.plan-option:disabled { cursor: default; }
.plan-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-option-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plan-option-name { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.plan-option-name .tag { padding: 2px 8px; font-size: 12px; }
.plan-option-what { margin-top: 1px; font-size: 15px; color: var(--ink-2); }
.plan-option .slots { margin-top: 8px; gap: 4px; }
.plan-option .slots i { width: 8px; height: 8px; }
.plan-option-price { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.03em; white-space: nowrap; }
.plan-option-price small { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.sheet .btn-block { margin-top: 18px; }
.sheet .fine { margin: 10px 2px 0; }
.sheet .status:empty { display: none; }
.sheet-foot { margin-top: 20px; padding-top: 6px; border-top: 1px solid var(--line); }
.sheet-foot[hidden] { display: none; }
.sheet-row {
  appearance: none;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  text-align: left;
  cursor: pointer;
}
.sheet-row + .sheet-row { border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.sheet-row:disabled { opacity: 0.5; cursor: default; }
.sheet-row-danger { color: var(--danger); }
.sheet-chev { font-size: 20px; color: var(--ink-2); opacity: 0.6; }
.sheet-row-danger .sheet-chev { color: var(--danger); }
.sheet-foot .fine { margin-top: 0; }
@media (min-width: 600px) {
  .sheet { margin: auto; border-radius: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); }
  .sheet-grab { display: none; }
  .sheet-body { padding-top: 20px; }
}
@media (prefers-color-scheme: dark) {
  .sheet { background: #111113; box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.12); }
  .plan-option.is-on { background: #000; }
  .sheet-note::before { background: #ff9f0a; }
}

/* A small centered "are you sure?" over a sheet, before a charge (app.js, extra stores). */
.confirm {
  width: calc(100% - 48px);
  max-width: 340px;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.confirm::backdrop { background: rgba(0, 0, 0, 0.35); }
.confirm[open] { animation: confirm-in 0.18s ease-out; }
@keyframes confirm-in { from { transform: scale(0.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .confirm[open] { animation: none; } }
.confirm-body { padding: 26px 20px 20px; text-align: center; }
.confirm-body h2 { font-size: 21px; letter-spacing: -0.02em; }
.confirm-body p { margin-top: 8px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.confirm-body .btn-block { margin-top: 10px; }
.confirm-body .btn-primary { margin-top: 22px; }
@media (prefers-color-scheme: dark) {
  .confirm { background: #1c1c1e; box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.12); }
}
/* Working: a spinner in place of a button's label. The button keeps its color meanwhile. */
.btn.is-busy:disabled { opacity: 1; }
.spin {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Done: a green check that pops in and draws itself. */
.confirm-done { display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px; }
.confirm-done[hidden] { display: none; }
.confirm-done h2 { margin-top: 16px; }
.check-badge {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-dot);
  animation: check-pop 0.36s cubic-bezier(0.2, 0.9, 0.3, 1.35);
}
.check-badge svg { width: 36px; height: 36px; }
.check-badge path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 18;
  stroke-dashoffset: 18;
  animation: check-draw 0.32s 0.2s ease-out forwards;
}
@keyframes check-pop { from { transform: scale(0.4); opacity: 0; } }
@keyframes check-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .spin { animation-duration: 1.6s; }
  .check-badge { animation: none; }
  .check-badge path { animation: none; stroke-dashoffset: 0; }
}

/* Selectable plan (flow + account) */
.plan-pick { cursor: pointer; border: 2px solid transparent; transition: border-color 0.15s ease; align-items: center; text-align: center; }
.plan-pick input { position: absolute; opacity: 0; pointer-events: none; }
.plan-pick:has(input:checked) { border-color: var(--ink); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.plan-pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* FAQ */
.faq { margin-top: 24px; max-width: 720px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 18px 40px 18px 0;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  transform: translateY(-75%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq details p { padding: 0 0 20px; margin-top: -4px; color: var(--ink-2); max-width: 62ch; }

/* ---------- Create-an-alert flow ---------- */

.flow-bar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
  min-height: 60px;
}
.progress { height: 4px; border-radius: 4px; background: var(--fill-2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--ink); transition: width 0.35s ease; }

.flow { padding-top: 12px; padding-bottom: 120px; }
.step-head .sub { margin-top: 8px; }
.step-body { margin-top: 24px; }

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding-top: 24px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 0%, transparent), var(--bg) 22px);
}
.dock .wrap { display: grid; gap: 8px; }

/* Option lists (device, storage) */
.options { display: grid; gap: 10px; }
.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 18px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.option-img { flex: none; width: 64px; height: 64px; object-fit: contain; }
.option-main { flex: 1; min-width: 0; }
.option-main > * { display: block; }
.option-title { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }

/* Color circle in front of a phone's name (stands in for the color name) */
.color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  border-radius: 50%;
  overflow: hidden;
  vertical-align: -1px;
  outline: 1px solid var(--swatch-ring);
  outline-offset: -1px;
}
.color-dot .color-dot-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.option-sub { font-size: 14px; color: var(--ink-2); }
.option-end { font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.option-device { padding: 8px 18px 8px 10px; }
.option-storage .option-title { font-size: 19px; }

/* Product shot + color swatches */
.shot {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.shot img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease;
}
.shot img.is-loading { opacity: 0; }
.shot-sm { max-width: 150px; margin: 0; }

.color-name { margin-top: 4px; text-align: center; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 16px; }
.swatch {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch img, .swatch .swatch-fill {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  outline: 1px solid var(--swatch-ring);
  outline-offset: -1px;
}
.swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow 0.15s ease;
}
.swatch:has(input:checked)::after { box-shadow: inset 0 0 0 2px var(--accent); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.picked {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 10px 10px;
  border-radius: 16px;
  background: var(--fill);
}
.picked img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.picked .option-title { font-size: 16px; }

/* Store list */
.store-list { margin-top: 18px; }
.check {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.check svg { width: 14px; height: 14px; opacity: 0; color: var(--on-ink); }
.option:has(input:checked) .check, .row[aria-pressed="true"] .check { background: var(--ink); border-color: var(--ink); }
.option:has(input:checked) .check svg, .row[aria-pressed="true"] .check svg { opacity: 1; }
.option-store { min-height: 60px; }

/* ---------- Account ---------- */

.page-head { padding-top: 16px; }
.page-head .muted { margin-top: 4px; }

.block { padding-top: 40px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.block-head h2 { font-size: 22px; letter-spacing: -0.02em; }
/* "Choose a plan" centers its heading and line over the centered plan cards. */
.block-center .block-head { justify-content: center; }
.block-center > .sub { text-align: center; text-wrap: balance; }
.count { font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.block-lede { margin: -4px 0 14px; max-width: 40em; color: var(--ink-2); text-wrap: pretty; }
.row-end .count { font-weight: 400; }
.count.is-full { color: var(--ink); font-weight: 600; }

.group { list-style: none; margin: 0; padding: 0; border-radius: 18px; background: var(--fill); overflow: hidden; }
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 16px;
}
.group > li { position: relative; }
.group > li + li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 0;
  height: 1px;
  background: var(--line);
  opacity: 0.7;
}
.group > li.has-thumb + li::before { left: 86px; }
.row-thumb { flex: none; width: 56px; height: 56px; object-fit: contain; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; letter-spacing: -0.015em; }
.row-sub { font-size: 15px; color: var(--ink-2); }
.row-end { flex: none; display: flex; align-items: center; gap: 12px; font-size: 15px; }
.row-empty { color: var(--ink-2); font-size: 15px; padding: 18px 16px; }

a.row, button.row {
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
@media (hover: hover) { a.row:hover, button.row:hover { background: var(--fill-2); } }
.row-add { color: var(--ink); }
.row-add .plus {
  display: grid;
  place-items: center;
  width: 56px;
  height: 32px;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 980px;
  background: var(--fill-2);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.tag-good { color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.tag-good::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-dot); }
.tag-bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }

.demo-note { margin: 0; padding: 8px 16px; text-align: center; font-size: 13px; font-weight: 500; color: var(--ink); background: var(--fill-2); }

.banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--fill);
  font-size: 15px;
  line-height: 1.4;
}
.banner::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--ink-2); }
.banner.ok::before { background: var(--accent-dot); }
.banner.err::before { background: var(--danger); }

.note {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--fill);
  font-size: 15px;
  line-height: 1.4;
}
.note .btn { margin-top: 12px; }
.note-strong { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ---------- Referrals (app.js: the account card, the thanks line, the friend's note; /refer) ----------
   The blue accent (--ref) lives only here: tints, small figures and the home badge, never buttons. */

.ref-eyebrow { margin: 0 0 4px 2px; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--ref-ink); }
.ref-card .block-head { margin-bottom: 14px; justify-content: center; text-align: center; }
.ref-card > .ref-eyebrow { margin-left: 0; text-align: center; }
.ref-deal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-radius: 18px;
  background: var(--ref-tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ref) 14%, transparent);
}
.ref-deal p { margin: 0; padding: 14px 16px 16px; text-align: center; }
.ref-deal p + p { border-left: 1px solid color-mix(in srgb, var(--ref) 16%, transparent); }
.ref-deal b { display: block; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -0.025em; color: var(--ref-ink); }
/* "30% back" is the referrer's money, so it's the green of "in stock" (Bryce's call). */
.ref-deal p + p b { color: var(--accent); }
.ref-deal span { display: block; margin-top: 2px; font-size: 15px; line-height: 1.35; color: var(--ink-2); }
.ref-start { margin-top: 20px; }
.ref-label { margin-top: 24px; }

.ref-link { display: flex; gap: 10px; }
.ref-link .input { flex: 1; min-width: 0; min-height: 50px; border-radius: 14px; font-size: 17px; text-overflow: ellipsis; }
.ref-link-buttons { display: flex; gap: 10px; }
.ref-link .btn { min-height: 50px; padding: 0 20px; }
/* The same width before and after "Copied", so nothing moves. */
.ref-copy { min-width: 116px; }
/* The check beside "Copied" (the account card's Copy and the /refer kit's). */
.copied-mark { display: inline-flex; flex: none; }
.ref-copy svg { width: 16px; height: 16px; flex: none; }
.ref-code { margin: 8px 2px 0; }
.ref-change { margin-top: 0; }
.ref-change summary { cursor: pointer; font-size: 15px; font-weight: 600; width: fit-content; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
.ref-change summary::-webkit-details-marker { display: none; }
.ref-change summary::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform 0.15s ease; }
.ref-change[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.ref-change .zip-row { margin-top: 4px; }
.ref-code-msg { margin: 6px 2px 0; }
.ref-code-msg:empty { min-height: 0; }

.ref-money .row { min-height: 52px; font-size: 17px; }
.ref-money .row-end { font-size: 17px; font-weight: 600; }
.ref-money .ref-ready { min-height: 64px; }
.ref-money .ref-ready .row-main { font-weight: 600; }
.ref-money .ref-ready .row-end { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }
.ref-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}
.ref-counts li { padding: 12px 16px; }
.group.ref-counts > li + li::before { top: 12px; bottom: 12px; left: 0; right: auto; width: 1px; height: auto; }
.ref-counts b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.ref-counts span { display: block; font-size: 13px; color: var(--ink-2); }

.ref-form .row { min-height: 52px; padding-block: 0; gap: 12px; }
.ref-form label { flex: none; width: 76px; font-weight: 600; letter-spacing: -0.015em; }
.ref-field {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  outline: none;
}
.ref-field::placeholder { color: color-mix(in srgb, var(--ink-2) 65%, transparent); }
.ref-field.select { padding-right: 30px; background-position: right 2px center; }
.ref-form .row:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ref-form > .row:first-child { border-radius: 18px 18px 0 0; }
.ref-form > .row:last-child { border-radius: 0 0 18px 18px; }
.ref-save { margin-top: 12px; min-height: 44px; }

/* The payout method (app.js refPicker): the row reads like the field beside it, and opens our own
   menu, frosted like the hero's notification, with a check on the method picked. The group lets
   it hang over the rows below. */
.ref-form { overflow: visible; }
.ref-pick-wrap { position: relative; flex: 1; min-width: 0; align-self: stretch; display: flex; }
.ref-pick { width: 100%; text-align: left; -webkit-tap-highlight-color: transparent; }
.ref-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% - 6px);
  left: -10px;
  min-width: 210px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16), 0 0 0 0.5px var(--notif-ring);
  outline: none;
  transform-origin: 30px 0;
  animation: ref-menu-in 0.16s ease both;
}
.ref-menu [role="option"] {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px 0 12px;
  font-size: 17px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.ref-menu [role="option"] + [role="option"] { box-shadow: inset 0 0.5px 0 var(--line); }
.ref-menu [role="option"]::before { content: ""; flex: none; width: 16px; height: 16px; }
.ref-menu [aria-selected="true"] { font-weight: 600; }
.ref-menu [aria-selected="true"]::before {
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.ref-menu .is-active { background: color-mix(in srgb, var(--ink) 8%, transparent); }
@media (prefers-color-scheme: dark) {
  .ref-menu { background: rgba(44, 44, 46, 0.9); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 0.5px var(--notif-ring); }
}
@keyframes ref-menu-in { from { opacity: 0; transform: scale(0.94); } }
@media (prefers-reduced-motion: reduce) { .ref-menu { animation: none; } }
.ref-card .note { margin-top: 16px; }
.ref-links { margin-top: 16px; }

/* The thanks-for-subscribing line: one tinted row that links to the card. */
.ref-thanks { margin-top: 10px; }
.ref-thanks a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--ref-tint);
  color: var(--ref-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.ref-thanks a::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 3px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}
@media (hover: hover) { .ref-thanks a:hover { background: color-mix(in srgb, var(--ref) 12%, transparent); } }

/* "Referrals are here!" above the home page's headline, linking to /refer. The Worker adds it only
   while REFERRALS is on (seo::home_with_referral_badge). Solid blue, Bryce's pick over the tint. */
.ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 0 13px 0 14px;
  border-radius: 980px;
  background: var(--ref);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 32px;
  text-decoration: none;
}
.ref-badge::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: -1px;
  border-top: 1.75px solid currentColor;
  border-right: 1.75px solid currentColor;
  transform: rotate(45deg);
}
@media (hover: hover) { .ref-badge:hover { opacity: 0.86; } }

/* The friend's note ("20% off from LUKE, applied at checkout."). On the home page it takes no room:
   its negative bottom margin cancels its own height, so the hero never moves when it appears. */
.ref-note {
  width: fit-content;
  max-width: 100%;
  margin: 14px 0 0;
  padding: 0 14px;
  border-radius: 980px;
  background: var(--ref-tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ref) 14%, transparent);
  color: var(--ref-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 32px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: ref-in 0.3s ease both;
}
.hero .ref-note { position: relative; z-index: 1; margin: 14px auto -46px; }
@keyframes ref-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ref-note { animation: none; } }

@media (max-width: 480px) {
  .ref-deal b { font-size: 22px; }
  .ref-deal span { font-size: 14px; }
  .ref-deal p { padding: 12px 14px 14px; }
  .ref-link { flex-direction: column; }
  .ref-link-buttons > .btn { flex: 1; }
  .ref-counts li { padding: 10px 12px; }
  .ref-counts b { font-size: 18px; }
  .ref-counts span { font-size: 12px; }
}

/* /refer: the public page (legal.html's prose), its posting kit and FAQ. */
.refer .ref-eyebrow { margin: 0 0 6px; font-size: 15px; }
.refer .page-title b { font-weight: inherit; color: var(--ref-ink); }
.refer .refer-lede { margin-top: 12px; font-size: 19px; line-height: 1.45; color: var(--ink-2); }
.refer .refer-cta { margin-top: 24px; }
.refer .refer-cta + .fine { margin-top: 10px; }
.refer .deal {
  list-style: none;
  padding: 4px 18px;
  border-radius: 18px;
  background: var(--ref-tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ref) 14%, transparent);
}
.refer .deal li { position: relative; margin: 0; padding: 12px 0 12px 22px; }
.refer .deal li + li { border-top: 1px solid color-mix(in srgb, var(--ref) 16%, transparent); }
.refer .deal li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 21px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ref);
}
.refer .deal b { color: var(--ref-ink); }
.refer .kit { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 10px; }
.refer .kit li + li { margin-top: 0; }
.kit-post {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--fill);
}
.refer .kit-text { flex: 1; min-width: 0; margin: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
/* Where the link sits in each draft. */
.kit-post [data-ref-link] { color: var(--ref-ink); font-weight: 600; }
.kit-post .btn { flex: none; min-width: 112px; min-height: 44px; }
.kit-post .btn svg { width: 15px; height: 15px; flex: none; }
.refer .faq { margin-top: 16px; }
.refer .faq details p { margin-top: -4px; }
@media (max-width: 480px) {
  .kit-post { flex-direction: column; gap: 12px; }
  .kit-post .btn { align-self: stretch; }
}

/* /refer is centered like the home page's sections (Bryce, 2026-10-30): the hero, headings, copy, lists as
   centered grouped rows, the kit drafts and the FAQ. */
.refer { margin-inline: auto; text-align: center; }
.refer .page-title, .refer .refer-lede, .refer h2, .refer h3, .refer p { margin-inline: auto; text-wrap: balance; }
.refer .refer-lede { max-width: 34em; }
.refer .refer-cta { display: flex; justify-content: center; }
.refer .deal li { padding: 12px 0; }
.refer .deal li::before { content: none; }
.refer ul:not(.deal):not(.kit) {
  list-style: none;
  padding: 4px 18px;
  border-radius: 18px;
  background: var(--fill);
}
.refer ul:not(.deal):not(.kit) li { margin: 0; padding: 12px 0; text-wrap: pretty; }
.refer ul:not(.deal):not(.kit) li + li { border-top: 1px solid var(--line); }
.refer .kit-post { flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.refer .kit-text { text-wrap: pretty; }
.refer .faq details { text-align: center; }
.refer .faq summary { padding-inline: 40px; }
.refer .faq details p { text-wrap: pretty; }

/* ---------- Alerts on this device (account page) ---------- */

.device-card {
  margin-top: 20px;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: var(--fill);
}
.device-card.is-off { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--danger); }
/* "On" shows as a green dot before the title. */
.device-card.is-on .device-card-title::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent-dot);
  vertical-align: 2px;
}
.device-card-title { margin: 0 0 4px; font-size: 19px; line-height: 1.25; letter-spacing: -0.02em; }
.device-card .sub { margin: 0; font-size: 15px; line-height: 1.4; }
.device-card .fine { margin: 10px 0 0; }
.device-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.device-card .status { min-height: 0; }

/* "Add to Home Screen" steps for iPhone Safari */
.hs-steps { display: grid; gap: 14px; margin: 16px 0 4px; padding: 0; list-style: none; counter-reset: hs; }
.hs-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; font-size: 15px; line-height: 1.4; counter-increment: hs; }
.hs-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg);
  box-shadow: 0 0 0 0.5px var(--line);
  color: #007aff; /* iOS's own blue, so the icons look like the ones on screen */
}
.hs-icon svg { width: 20px; height: 20px; }
.hs-icon img { width: 100%; height: 100%; border-radius: inherit; }
.hs-icon::after {
  content: counter(hs);
  position: absolute;
  top: -6px;
  left: -6px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 11px;
  font-weight: 700;
}
@media (prefers-color-scheme: dark) { .hs-icon { color: #0a84ff; } }

.row-title .tag { margin-left: 8px; vertical-align: 1px; }
.plan-rate { font-weight: 500; color: var(--ink-2); }

/* Cloudflare's bot check: no space until it asks for a tap, then it sits under the email field */
.human-check.is-asking { margin-top: 14px; }

/* Sign-in: passkey option under the email form */
.passkey-alt { margin-top: 20px; }
.or { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: var(--ink-2); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* The "turn on alerts" step shows what an alert looks like */
.alerts-preview {
  display: grid;
  place-items: center;
  padding: 32px 16px;
  border-radius: 22px;
  background: linear-gradient(160deg, var(--fill), var(--fill-2));
}
.alerts-preview .notif {
  opacity: 0;
  transform: translateY(-14px) scale(0.96);
  transform-origin: 50% 0;
  animation: pop 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.1) 0.25s forwards;
}
.notif-icon img { width: 100%; height: 100%; border-radius: inherit; }

.zip-row { display: flex; gap: 10px; }
.zip-row .input { flex: 1; min-width: 0; }
.zip-row .btn { min-height: 56px; border-radius: 14px; }

/* Account store list: a grouped list with a check on each row. */
.store-group { margin-top: 14px; }
.store-group > li + li::before { left: 54px; }
.store-group .row { -webkit-tap-highlight-color: transparent; }
.store-group .row-title, .store-group .row-sub { display: block; }
.store-group .row-sub, .store-group .row-end { font-weight: 400; }
.store-group .row-end { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 16px 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: 980px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease;
}
.chip[aria-pressed="true"] { border-color: var(--ink); }
.chip-sub { color: var(--ink-2); font-weight: 400; }

.nudge { animation: nudge 0.32s ease; }
@keyframes nudge { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }

body.is-loading main { visibility: hidden; }

/* ---------- Legal ---------- */

.prose { padding-top: 16px; max-width: 680px; }
.prose h2 { margin-top: 40px; font-size: 24px; letter-spacing: -0.02em; }
.prose h3 { margin-top: 24px; font-size: 18px; letter-spacing: -0.015em; }
.prose p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 20px; }
.prose li + li { margin-top: 6px; }
.prose .muted { margin-top: 8px; }

/* ---------- Stock pages (/iphone-duo, server-rendered) ---------- */

.crumbs {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-size: 14px;
  color: var(--ink-2);
}
.crumbs li + li::before { content: "›"; margin-right: 8px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
@media (hover: hover) { .crumbs a:hover { color: var(--ink); text-decoration: underline; } }
.crumbs [aria-current] { color: var(--ink); }

.stock-head { display: grid; gap: 8px; padding-top: 20px; }
.stock-head .lede { margin-top: 14px; }
/* On phones the shot is a short crop, so the store list stays near the top. */
.stock-shot { margin: 12px 0 0; width: 100%; max-width: 240px; justify-self: center; }
.stock-shot img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
@media (min-width: 880px) {
  .stock-head { padding-top: 32px; }
  /* Config pages: a shorter heading, so "In stock now" starts on the first screen. */
  .stock-head.has-shot { grid-template-columns: 1fr 260px; align-items: center; gap: 40px; padding-top: 12px; }
  .stock-shot { max-width: none; margin: 0; }
  .stock-shot img { aspect-ratio: 1; object-fit: contain; }
}

.live-line { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 15px; color: var(--ink-2); }
.live-dot.is-stale { background: var(--ink-2); box-shadow: none; }

/* Config pages' heading: a tight title, one even step between the lines under it, and the price
   under the button. While it's stacked (under 880px) it's centered, like the home page. */
.stock-head.has-shot h1.title { line-height: 1.05; }
.stock-head.has-shot .lede { margin-top: 12px; line-height: 1.33; }
.stock-head.has-shot .live-line { margin-top: 12px; font-size: 14px; }
.stock-head.has-shot .cta { margin-top: 24px; flex-direction: column; align-items: flex-start; gap: 10px; }
.stock-head.has-shot .cta .fine { font-size: 14px; }
@media (max-width: 879px) {
  .stock-head.has-shot { justify-items: center; text-align: center; }
  .stock-head.has-shot h1.title, .stock-head.has-shot .lede { text-wrap: balance; }
  .stock-head.has-shot .live-line { justify-content: center; }
  .stock-head.has-shot .cta { align-items: center; }
}

/* Stock pages: Apple-sized pill buttons (44px, medium label), bigger and tighter section
   headings with more air between them, and rows whose title and subtitle sit together. */
[data-page="stock"] .btn { min-height: 44px; padding: 0 22px; font-weight: 500; letter-spacing: -0.022em; }
[data-page="stock"] .block { padding-top: 56px; }
[data-page="stock"] .block-head { margin-bottom: 14px; }
[data-page="stock"] .block-head h2 { font-size: 24px; line-height: 1.17; font-weight: 600; letter-spacing: -0.02em; }
@media (min-width: 760px) { [data-page="stock"] .block-head h2 { font-size: 28px; line-height: 1.14; } }
[data-page="stock"] .row { min-height: 52px; padding-block: 11px; }
[data-page="stock"] .row-title { line-height: 1.25; }
[data-page="stock"] .row-sub { margin-top: 2px; line-height: 1.33; }
/* "Oct 22" and "20 min ago" stay in one piece when a subtitle wraps. */
[data-page="stock"] .row-sub time { white-space: nowrap; }
[data-page="stock"] .tag { padding: 3px 9px; font-size: 12px; letter-spacing: 0; }
/* The closing note's "Create an alert", centered under its text. */
[data-page="stock"] .note > .btn { display: flex; width: fit-content; margin-inline: auto; }

.stock-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .stock-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
.stock-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.stock-card-head img { width: 56px; height: 56px; object-fit: contain; }
.stock-card-head h3 { font-size: 19px; letter-spacing: -0.02em; }

a.row .row-sub { font-weight: 400; }

/* Config pages: store lists side by side from 880px, reading down the first list then the second.
   On phones the two lists join into one. */
.cols { display: grid; }
.cols > .group + .group { position: relative; border-top-left-radius: 0; border-top-right-radius: 0; }
.cols > .group:first-child:not(:last-child) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.cols > .group + .group::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); opacity: 0.7; }
@media (min-width: 880px) {
  .cols { grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .cols > .group, .cols > .group + .group, .cols > .group:first-child:not(:last-child) { border-radius: 18px; }
  .cols > .group + .group::before { display: none; }
}
/* "Recently in stock": tighter rows, and Unavailable as plain grey text. */
.group-quiet .row { min-height: 0; padding-block: 10px; gap: 10px; }
.group-quiet .row-title { font-size: 16px; }
.group-quiet .row-sub { font-size: 14px; }
.group-quiet .tag:not(.tag-good):not(.tag-wait) { padding: 0; background: none; font-weight: 500; }
/* "Show all" folds the rest of a long list. Its rows are in the page either way. */
details.more { margin-top: 16px; text-align: center; }
details.more > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
details.more > summary::-webkit-details-marker { display: none; }
@media (hover: hover) { details.more > summary:hover { background: var(--fill); } }
.more-chev { width: 12px; height: 8px; transition: transform 0.2s; }
details.more[open] .more-chev { transform: rotate(180deg); }
details.more > .cols, details.more > .index-card { margin-top: 16px; text-align: left; }
details.more-index { margin-top: 4px; }

/* "Other stores" opened: a card of plain columns, headings as small grey capitals. Only a status
   other than Unavailable gets a tag (the section's lede says what no tag means). */
.index-card { padding: 20px 20px 2px; border-radius: 18px; background: var(--fill); }
.index-card .store-index { column-gap: 28px; }
.index-card .store-index + .store-index { margin-top: 8px; }
.index-card .store-index section { padding-bottom: 18px; }
.index-card .store-index h3 { margin-bottom: 8px; font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-2); }
.index-card .store-index ul { gap: 6px; line-height: 1.3; }
.index-card .store-index li > a { color: var(--ink); font-weight: 500; }
.idx-tag { margin-left: 6px; padding: 1px 7px; border-radius: 980px; box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }

/* "Other iPhone Duo models": even tiles, 2 across on phones; from 760px a column per storage
   size and a row per color (--rows). */
.model-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) {
  .model-grid { grid-template-columns: none; grid-template-rows: repeat(var(--rows, 2), auto); grid-auto-flow: column; grid-auto-columns: 1fr; }
}
.mt { display: grid; align-content: start; padding: 14px 16px; border: 1.5px solid transparent; border-radius: 18px; background: var(--fill); color: var(--ink); text-decoration: none; }
@media (hover: hover) { a.mt:hover { background: var(--fill-2); } }
.mt.is-here { border-color: var(--ink); background: none; }
.mt-cap { font-size: 19px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; }
.mt-color { margin-top: 2px; font-size: 15px; line-height: 1.3; color: var(--ink-2); }
.mt-color .color-dot { width: 10px; height: 10px; vertical-align: 0; }
.mt-sub { min-height: 18px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mt-sub.is-in { color: var(--accent); }

/* Phones: "Notify me" follows along once the heading's button scrolls away (app.js). */
.sticky-cta { display: none; }
@media (max-width: 759px) {
  .sticky-cta {
    display: block;
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    transform: translateY(110%);
    transition: transform 0.25s ease;
  }
  .sticky-cta.is-on { transform: none; }
  /* Room under the footer, so the bar never covers its last lines. */
  body:has(.sticky-cta) .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .sticky-cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .sticky-cta { transition: none; } }
.row-chev { flex: none; width: 8px; height: 14px; color: var(--ink-2); opacity: 0.55; }

/* No fresh result yet: outlined, so it never reads as "Unavailable". */
.tag-wait { background: none; box-shadow: inset 0 0 0 1.5px var(--line); }

.config-links { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link { padding: 8px 16px; text-decoration: none; }
@media (hover: hover) { .chip-link:hover { border-color: var(--ink); } }

.store-index { columns: 3 220px; column-gap: 32px; }
.store-index section { break-inside: avoid; padding-bottom: 20px; }
.store-index h3, .store-index h4 { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; }
/* Stores in several countries: each country's name opens its first group, flowing with the columns. */
.store-index .store-index-country { font-size: 19px; letter-spacing: -0.02em; margin: 6px 0 10px; }
.store-index ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 15px; }
.store-index a { text-decoration: none; }
@media (hover: hover) { .store-index a:hover { text-decoration: underline; } }
.store-index h3 a, .store-index h4 a { color: inherit; }

.state-list { columns: 4 160px; column-gap: 32px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.state-list li { padding: 2px 0; break-inside: avoid; }
.state-list a { text-decoration: none; }
@media (hover: hover) { .state-list a:hover { text-decoration: underline; } }
.group + .config-links { margin-top: 12px; }

/* Who sends alerts and how they arrive, under a store or state page's button (PAGE_HOW_LINE). */
.how-line { margin-top: 12px; max-width: 36em; text-wrap: pretty; }
/* "Free to check. Alerts from $5 a month." under a store page's button (STORE_FREE_LINE). */
.free-line { margin-top: 12px; max-width: 36em; }
/* A store, state or metro page's link to the hub in the words people search (HUB_ANCHORS). */
.hub-links { margin: 0; max-width: 40em; color: var(--ink-2); text-wrap: pretty; }
.hub-links a { color: var(--ink); }

/* Restock times: restocks by local hour as columns. Ink, not green: green marks only live things. */
.hours {
  list-style: none;
  margin: 0;
  padding: 18px 14px 12px;
  border-radius: 18px;
  background: var(--fill);
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 3px;
}
/* Every column the same width: a label wider than its column spills over, centered, never widening the bar. */
.hours li { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; min-width: 0; }
.hours-col { position: relative; width: 100%; max-width: 18px; height: 140px; }
.hours-col i { position: absolute; left: 0; right: 0; bottom: 0; min-height: 2px; border-radius: 3px 3px 1px 1px; background: var(--ink); opacity: 0.8; }
.hours-col i.is-zero { opacity: 0.15; }
.hours-label { height: 14px; margin-top: 6px; font-size: 12px; line-height: 14px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (min-width: 760px) {
  .hours { gap: 6px; padding: 22px 20px 14px; }
  .hours-col { height: 180px; }
}

/* A store, state or city restock page (STORE_RESTOCK_PAGES). Its head carries more text than other
   stock pages, so on phones the heading, lede, tiles and chart run smaller, keeping the numbers near
   the top. Tiles: 2 by 2 on phones, a row of 4 wider. Ink like the hour chart: green marks only live things. */
/* Centered: the heading, the lede, the button with its fine print under it, and each tile. */
.restock-head { text-align: center; }
.restock-head h1.title { font-size: 28px; text-wrap: balance; }
.restock-head .lede { margin-inline: auto; }
.restock-head .cta { flex-direction: column; justify-content: center; gap: 10px; }
.restock-tile { text-align: center; }
/* The trail above a centered heading, centered too. */
body:has(.restock-head) .crumbs { justify-content: center; }
.restock-head .lede { margin-top: 10px; font-size: 16px; line-height: 1.4; }
.restock-tiles-block { padding-top: 14px; }
.restock-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.restock-tile { padding: 11px 13px 10px; border-radius: 14px; background: var(--fill); min-width: 0; }
/* Three tiles: the third takes the whole row on phones instead of sitting alone. */
.restock-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tile-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-label { margin: 2px 0 0; font-size: 12.5px; line-height: 1.3; color: var(--ink-2); }
.hours-compact .hours { padding: 14px 12px 10px; }
.hours-compact .hours-col { height: 100px; }
@media (min-width: 760px) {
  .restock-head h1.title { font-size: clamp(30px, 4.6vw, 44px); }
  .restock-head .lede { margin-top: 14px; font-size: 19px; line-height: 1.42; }
  .restock-tiles-block { padding-top: 32px; }
  /* One even row of however many tiles there are. */
  .restock-tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; }
  .restock-tile:last-child:nth-child(odd) { grid-column: auto; }
  .restock-tile { padding: 20px 20px 16px; border-radius: 18px; }
  .tile-value { font-size: 30px; line-height: 1.15; }
  .tile-label { margin-top: 4px; font-size: 14px; }
  .hours-compact .hours { padding: 22px 20px 14px; }
  .hours-compact .hours-col { height: 180px; }
}
@media (min-width: 880px) { .restock-head .lede { font-size: 21px; } }

.block .note, .block .faq { margin-top: 0; }
.note p + .btn { margin-top: 12px; }
/* The after-purchase extra stores offer above the store list (app.js renderStoresOffer). */
.block .stores-offer { margin: 14px 0 12px; }
.note-actions { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.note-actions .btn { margin-top: 0; }

/* ---------- Alert handoff (/go) ---------- */

.go { padding-top: 8px; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.go-head { display: grid; justify-items: center; text-align: center; gap: 10px; }
.go-shot { width: 168px; height: 168px; object-fit: contain; margin-bottom: 4px; }
.go-head .page-title { font-size: 30px; }
.go-head .lede { font-size: 17px; }
.go > .btn-block { margin-top: 28px; }
/* Several stores have it: a big button each. Long store names wrap instead of overflowing. */
.go-stores { display: grid; gap: 10px; margin-top: 28px; }
.go-store { flex-direction: column; gap: 2px; min-height: 64px; padding: 10px 24px; white-space: normal; text-align: center; line-height: 1.2; }
.go-store-place { font-size: 14px; font-weight: 400; letter-spacing: 0; opacity: 0.72; }
.go-hint { margin-top: 10px; text-align: center; }
.go .go-steps { margin-top: 32px; grid-template-columns: none; gap: 18px; }
.go .go-steps li { grid-template-columns: 36px 1fr; gap: 14px; }
.go-steps h3 { font-size: 17px; }
.go-steps p { font-size: 15px; }
.go-foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.go-foot a { color: var(--ink); white-space: nowrap; }

/* ---------- Admin ---------- */

.wrap-admin { max-width: 960px; }
.block-first { padding-top: 24px; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stats + .group { margin-top: 10px; }
@media (min-width: 600px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Paired lists sit side by side on wide screens and stack on phones. */
@media (min-width: 900px) {
  .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
}
.stat { min-width: 0; padding: 14px 16px 16px; border-radius: 18px; background: var(--fill); }
.stat-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.stat-value {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat-sub { margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }

/* A titled stats grid, one of several in a block (the Gmail card's domains). */
.stats-group + .stats-group { margin-top: 22px; }
.stats-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin-bottom: 10px; font-size: 17px; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.stats-head .count { white-space: normal; font-weight: 400; }

.grant-form { display: grid; gap: 10px; }
@media (min-width: 900px) { .grant-form { grid-template-columns: minmax(0, 1fr) 380px auto; align-items: center; } }
.input-sm { min-height: 48px; border-radius: 12px; font-size: 17px; }
.user-filter { margin-bottom: 12px; }

.seg { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--fill-2); }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block;
  padding: 8px 0;
  border-radius: 9px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.seg input:checked + span { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 3px var(--shade); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

.row-num { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.row-email { overflow-wrap: anywhere; }
button.row .row-sub { font-weight: 400; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .hero-msg .notif, .alerts-preview .notif { opacity: 1; transform: none; animation: none; }
  .proof-live .live-dot { animation: none; }
  .nudge { animation: none; }
}

/* ---------- Best iPhone stock tracker (/best-iphone-stock-tracker) ---------- */
/* Every section centered (`.section.centered`, like the home page), hairlines instead of gray boxes. */

.best-section, .best-hero { padding-bottom: 8px; }
.best-hero { padding-top: 24px; text-align: center; }
@media (min-width: 880px) { .best-hero { padding-top: 40px; } }
.best-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.01em; color: var(--ink-2); margin-bottom: 12px; }
.best-hero .sub { max-width: 38em; }
.best-pick { display: flex; width: fit-content; align-items: center; gap: 8px; margin: 32px auto 0; padding: 6px 14px 6px 10px; border-radius: 980px; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; color: var(--ink-2); }
.best-pick strong { color: var(--ink); font-weight: 600; }
.best-pick .brand-mark { width: 18px; height: 18px; margin-top: -1px; color: var(--ink); }
.best-hero .cta { margin-top: 32px; flex-direction: column; align-items: center; gap: 10px; }
.best-by { margin: 20px auto 0; max-width: 34em; text-wrap: balance; }
/* Four big numbers with hairlines between: 2 × 2 on phones, one row from 760px. */
.best-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; max-width: 820px; margin: 16px auto 0; }
.best-stats p { align-items: center; padding: 18px 8px; }
.best-stats p:nth-child(odd) { box-shadow: 1px 0 0 var(--line); }
.best-stats p:nth-child(n+3) { box-shadow: 0 -1px 0 var(--line); }
.best-stats p:nth-child(3) { box-shadow: 1px 0 0 var(--line), 0 -1px 0 var(--line); }
.best-stats .proof-num { font-size: 40px; }
.best-stats .proof-label { font-size: 14px; text-wrap: balance; }
@media (min-width: 760px) {
  .best-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .best-stats p, .best-stats p:nth-child(n) { box-shadow: none; }
  .best-stats p:nth-child(n) + p { box-shadow: -1px 0 0 var(--line); }
  .best-stats .proof-num { font-size: 52px; }
}

/* The table: short cells, stripes, and our column as an outlined card with its own button. It
   scrolls sideways on its own on phones, the label column pinned. */
/* `position: relative` keeps the cells' visually-hidden "Yes"/"No" inside the scroller; without
   it they pin to the page and widen it on phones. */
.cmp-wrap {
  position: relative;
  margin-top: 32px;
  padding: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  text-align: center;
}
.cmp-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.cmp { width: 100%; min-width: 780px; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 1.35; }
.cmp th, .cmp td { padding: 14px 10px; vertical-align: middle; }
.cmp thead th { padding-top: 20px; padding-bottom: 16px; font-size: 15px; font-weight: 600; color: var(--ink); }
.cmp thead a { color: inherit; text-decoration: none; }
@media (hover: hover) { .cmp thead a:hover { text-decoration: underline; } }
.cmp tbody tr:nth-child(odd) > * { background: var(--fill); }
.cmp tbody tr:nth-child(odd) > :first-child { border-radius: 12px 0 0 12px; }
.cmp tbody tr:nth-child(odd) > :last-child { border-radius: 0 12px 12px 0; }
.cmp th[scope="row"] {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 132px;
  min-width: 112px;
  padding-left: 16px;
  text-align: left;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--bg);
}
.cmp-corner { position: sticky; left: 0; z-index: 2; background: var(--bg); }
.cmp td { min-width: 132px; color: var(--ink-2); }
.cmp-v { display: block; font-weight: 600; color: var(--ink); }
.cmp-note { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-2); }
.cmp-quiet { font-size: 13px; color: color-mix(in srgb, var(--ink-2) 75%, transparent); }
.cmp-yes, .cmp-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; vertical-align: middle; }
.cmp-yes { color: var(--ink); background: var(--fill-2); }
.cmp-no { color: var(--ink-2); }
.cmp-icon { width: 16px; height: 16px; }
/* Our column: a card outlined in ink from its header to its button. */
.cmp .is-pick,
.cmp tbody tr:nth-child(odd) > .is-pick {
  position: relative;
  z-index: 1;
  min-width: 150px;
  background: var(--bg);
  border-radius: 0;
  box-shadow: inset 1.5px 0 0 var(--ink), inset -1.5px 0 0 var(--ink);
}
.cmp .is-pick .cmp-yes { color: var(--on-ink); background: var(--ink); }
.cmp thead .is-pick { box-shadow: inset 1.5px 0 0 var(--ink), inset -1.5px 0 0 var(--ink), inset 0 1.5px 0 var(--ink); border-radius: 18px 18px 0 0; padding-top: 16px; }
.cmp tfoot .is-pick { box-shadow: inset 1.5px 0 0 var(--ink), inset -1.5px 0 0 var(--ink), inset 0 -1.5px 0 var(--ink); border-radius: 0 0 18px 18px; padding: 12px 12px 18px; }
.cmp-pick-tag { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--accent); }
.cmp-brand { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.cmp-brand .brand-mark { width: 18px; height: 18px; }
.cmp tfoot .btn { width: 100%; }
.cmp-fine { margin: 14px auto 0; max-width: 46em; text-wrap: balance; }
.cmp-fine a { color: inherit; }

/* Phones: a tighter table, so our column and about one and a half others show before scrolling. */
@media (max-width: 759px) {
  .cmp { min-width: 0; font-size: 13px; }
  .cmp th, .cmp td { padding: 10px 6px; }
  .cmp thead th { padding-top: 14px; padding-bottom: 12px; font-size: 13px; }
  .cmp td { min-width: 96px; }
  .cmp th[scope="row"] { width: 88px; min-width: 88px; padding-left: 10px; font-size: 12px; line-height: 1.3; }
  .cmp .is-pick, .cmp tbody tr:nth-child(odd) > .is-pick { min-width: 112px; }
  .cmp thead .is-pick { padding-top: 12px; border-radius: 14px 14px 0 0; }
  .cmp tfoot .is-pick { padding: 10px 8px 12px; border-radius: 0 0 14px 14px; }
  .cmp-brand { white-space: normal; justify-content: center; line-height: 1.2; }
  .cmp-brand .brand-mark { display: none; }
  .cmp-pick-tag { margin-bottom: 4px; font-size: 11px; }
  .cmp-note { font-size: 11px; }
  .cmp-quiet { font-size: 12px; }
  .cmp-yes, .cmp-no { width: 22px; height: 22px; }
  .cmp tfoot .btn { min-height: 34px; padding: 0 8px; font-size: 13px; }
}

/* Why it's our pick: icon tiles, three across from 760px, no boxes. */
.best-reasons { list-style: none; margin: 40px 0 0; padding: 0; display: grid; align-items: start; gap: 36px 40px; text-align: center; }
.best-reasons li { display: grid; justify-items: center; align-content: start; gap: 10px; max-width: 34em; margin-inline: auto; }
.best-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--fill); color: var(--ink); }
.best-icon svg { width: 24px; height: 24px; }
.best-reasons h3 { font-size: 18px; letter-spacing: -0.015em; }
.best-reasons p { color: var(--ink-2); text-wrap: pretty; }
@media (min-width: 760px) { .best-reasons { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Head to head: two columns with a hairline between, after Mailchimp's. */
.vs-grid { display: grid; margin-top: 32px; text-align: start; border-top: 1px solid var(--line); }
.vs { display: grid; align-content: start; gap: 10px; padding: 24px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
.vs h3 { font-size: 19px; letter-spacing: -0.02em; }
.vs p { color: var(--ink-2); text-wrap: pretty; }
.vs .vs-if { color: var(--ink); }
.vs-site { justify-self: start; font-size: 13px; color: var(--ink-2); }
.vs:target h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
@media (min-width: 760px) {
  .vs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vs { padding: 28px 32px; }
  .vs:nth-child(odd) { padding-left: 0; box-shadow: 1px 0 0 var(--line); }
  .vs:nth-child(even) { padding-right: 0; }
}

/* How we count: big numbers, then two plain paragraphs. */
.best-prose { max-width: 40em; margin: 24px auto 0; display: grid; gap: 12px; text-align: center; color: var(--ink-2); text-wrap: pretty; }

/* How we compared: five numbered points, in a row from 880px. */
.best-method { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 24px; text-align: start; }
.best-method li { display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; align-items: start; }
.best-method h3 { font-size: 16px; letter-spacing: -0.01em; margin-top: 7px; }
.best-method p { grid-column: 2; margin-top: 4px; font-size: 14px; color: var(--ink-2); }
@media (min-width: 880px) {
  .best-method { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; text-align: center; }
  .best-method li { grid-template-columns: 1fr; justify-items: center; row-gap: 10px; }
  .best-method h3 { margin-top: 0; }
  .best-method p { grid-column: 1; margin-top: 0; }
}

.best-section .faq { margin-top: 24px; text-align: start; }
.best-end { padding-bottom: 24px; }
.best-end .cta { flex-direction: column; align-items: center; gap: 10px; }
