/* AsoHarbor design system. The rules behind this file are in DESIGN.md; read it
   before adding anything here. Every value is a token, and templates carry no
   CSS of their own (the CSP forbids inline styles). */

/* ── Font ────────────────────────────────────────────────────────────────────
   Inter variable, self-hosted (SIL OFL, see fonts/Inter-LICENSE.txt). Subset to
   Latin + Latin Extended, so App Store names in Turkish, Polish or Vietnamese
   still render; CJK and Arabic fall through to the system font, which is what
   we want rather than shipping a 20MB face. */
@font-face {
  font-family: "Inter var";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter-var-latin.woff2") format("woff2");
}

:root {
  /* colour */
  --c-bg: #ffffff;
  --c-bg-subtle: #f9fafb;
  --c-bg-inverted: #111827;
  --c-surface: #ffffff;

  --c-text: #111827;
  --c-text-body: #374151;
  --c-text-muted: #6b7280;
  --c-text-faint: #9ca3af;

  --c-border: #e5e7eb;
  --c-border-strong: #d1d5db;

  --c-accent: #2563eb;
  --c-accent-hover: #1d4ed8;
  --c-accent-tint: #dbeafe;
  --c-accent-ink: #1e40af;

  --c-success: #059669;
  --c-danger: #dc2626;
  --c-danger-tint: #fee2e2;
  --c-warning: #d97706;
  --c-warning-tint: #fef3c7;

  /* type. Tracking tightens as size grows; use these rather than a raw size. */
  --font-sans: "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI",
    system-ui, sans-serif;

  --f-display-size: 3.75rem;
  --f-display-lh: 1;
  --f-display-ls: -0.025em;
  --f-h1-size: 2.25rem;
  --f-h2-size: 1.5rem;
  --f-h3-size: 1.125rem;
  --f-lede-size: 1.25rem;
  --f-sm-size: 0.875rem;
  --f-xs-size: 0.75rem;

  /* radius */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 12px;
  --r-full: 9999px;

  /* elevation. --ring is the default edge on everything: inset, so it never
     changes the box size the way a border does. */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --ring: inset 0 0 0 1px rgb(0 0 0 / 0.05);
  --ring-strong: inset 0 0 0 1px var(--c-border-strong);
  --ring-accent: inset 0 0 0 1px var(--c-accent);

  /* spacing, 4px scale */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-16: 4rem;

  /* layout */
  --w-wide: 72rem;
  --w-prose: 44rem;

  color-scheme: light;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */

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

body,
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--c-text-body);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  /* Tabular figures everywhere: rank numbers and deltas must not jitter between
     crawls, and prices must line up in the pricing table. */
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

/* login.js toggles the OTP steps with the `hidden` property, so `hidden` has to
   beat any display rule we set on those forms. */
[hidden] { display: none !important; }

button, input, select, textarea { font: inherit; color: inherit; }

/* ── Layout ───────────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: var(--s-6);
}

.wrap.prose { max-width: var(--w-prose); }

main { flex: 1; padding-block: var(--s-10) var(--s-16); }

/* ── Typography ───────────────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  color: var(--c-text);
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: var(--f-h1-size);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--f-h2-size);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h3 { font-size: var(--f-h3-size); line-height: 1.4; }
h4 { font-size: 1rem; }

p { text-wrap: pretty; }

a { color: var(--c-accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--c-accent-hover); }

strong { font-weight: 600; color: var(--c-text); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--c-bg-subtle);
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
  padding: 0.1em 0.35em;
}

/* The small uppercase accent label that sits above a section heading. Copied
   straight from the reference; it is most of what makes sections read as
   deliberate rather than stacked. */
.eyebrow {
  display: block;
  font-size: var(--f-xs-size);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--s-2);
}

.lede {
  font-size: var(--f-lede-size);
  line-height: 1.6;
  color: var(--c-text-muted);
}

.muted { color: var(--c-text-muted); }
.small { font-size: var(--f-sm-size); }

/* ── Buttons ──────────────────────────────────────────────────────────────
   .btn is the secondary/default. Everything interactive that is not a link
   should carry it, including bare <button> elements inside forms. */

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-size: var(--f-sm-size);
  font-weight: 600;
  line-height: 1.25rem;
  padding: var(--s-2) var(--s-3);
  border: 0;
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--ring-strong), var(--shadow-xs);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover,
button:hover { background: var(--c-bg-subtle); color: var(--c-text); }

.btn.primary,
button.primary {
  background: var(--c-accent);
  color: #fff;
  box-shadow: var(--shadow-xs);
}

.btn.primary:hover,
button.primary:hover { background: var(--c-accent-hover); color: #fff; }

.btn.quiet,
button.quiet {
  background: none;
  box-shadow: none;
  color: var(--c-text-muted);
  font-weight: 500;
}

.btn.quiet:hover,
button.quiet:hover { background: var(--c-bg-subtle); color: var(--c-text); }

.btn.danger,
button.danger {
  color: var(--c-danger);
  box-shadow: inset 0 0 0 1px var(--c-danger), var(--shadow-xs);
}

.btn.danger:hover,
button.danger:hover { background: var(--c-danger-tint); color: var(--c-danger); }

.btn:disabled,
button:disabled { opacity: 0.5; cursor: not-allowed; }

:where(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* ── Forms ────────────────────────────────────────────────────────────────── */

input[type="email"],
input[type="text"],
input[type="search"],
select {
  padding: var(--s-2) var(--s-3);
  border: 0;
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--ring-strong);
  min-width: 0;
}

input::placeholder { color: var(--c-text-faint); }

input:focus,
select:focus {
  outline: 2px solid var(--c-accent);
  outline-offset: -1px;
}

select:disabled { background: var(--c-bg-subtle); color: var(--c-text-faint); }

label { color: var(--c-text-body); }

/* A form laid out as one row: text field takes the space, button hugs. */
.form-row {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  align-items: center;
}

.form-row > input { flex: 1 1 16rem; }

/* ── Surfaces ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--ring), var(--shadow-xs);
  padding: var(--s-5);
}

.panel {
  background: var(--c-bg-subtle);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}

.alert {
  border-radius: var(--r-lg);
  padding: var(--s-3) var(--s-4);
  font-size: var(--f-sm-size);
  background: var(--c-bg-subtle);
  color: var(--c-text-body);
}

.alert.error {
  background: var(--c-danger-tint);
  color: #991b1b;
}

.alert.warning {
  background: var(--c-warning-tint);
  color: #92400e;
}

.alert a { color: inherit; font-weight: 600; }

/* Kept as a plain colour rule as well: several templates print a bare
   <p class="error"> with no .alert. */
.error { color: var(--c-danger); }

/* ── Chips, badges, stats ─────────────────────────────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font-size: var(--f-sm-size);
  border-radius: var(--r-full);
  background: var(--c-surface);
  box-shadow: var(--ring-strong);
  padding: var(--s-1) var(--s-3);
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--f-xs-size);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--r-full);
  padding: 0.125rem var(--s-2);
  background: var(--c-warning-tint);
  color: #92400e;
}

.stat { display: flex; align-items: baseline; gap: var(--s-2); }
.stat .num {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: -0.02em;
}

/* Server-rendered <polyline> sparkline. Colour comes from currentColor. */
.spark { color: var(--c-accent); width: 100%; }

/* ── Tables ───────────────────────────────────────────────────────────────── */

.table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--f-sm-size);
}

.table th {
  text-align: left;
  font-size: var(--f-xs-size);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  background: var(--c-bg-subtle);
  padding: var(--s-2) var(--s-3);
  white-space: nowrap;
}

.table th:first-child { border-top-left-radius: var(--r-lg); }
.table th:last-child { border-top-right-radius: var(--r-lg); }

.table td {
  padding: var(--s-3);
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-body);
}

.table tbody tr:hover td { background: var(--c-bg-subtle); }

.scroll-x { overflow-x: auto; }

/* ── Lists of app-like rows (search results, competitors) ─────────────────── */

.results { list-style: none; padding: 0; margin: 0; }

.result {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--c-border);
}

.result:last-child { border-bottom: 0; }
.result img { border-radius: 22%; box-shadow: var(--ring); }
.result .meta { display: flex; flex-direction: column; min-width: 0; }
.result .meta .muted { font-size: var(--f-sm-size); }
.result .right { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }

/* Anything paused is over a plan limit: present but not being crawled. */
.is-paused { opacity: 0.55; }

/* ── Page shell ───────────────────────────────────────────────────────────── */

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--c-text);
  text-decoration: none;
}

.brand:hover { color: var(--c-text); }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  font-size: var(--f-sm-size);
  font-weight: 500;
  flex-wrap: wrap;
}

/* Nav links read as navigation, not as body links: neutral until hovered. */
.site-nav a {
  color: var(--c-text-body);
  text-decoration: none;
}

.site-nav a:hover { color: var(--c-accent); }
.site-nav form { display: flex; align-items: center; gap: var(--s-3); }

.site-footer {
  border-top: 1px solid var(--c-border);
  padding-block: var(--s-6);
  font-size: var(--f-sm-size);
  color: var(--c-text-muted);
}

.site-footer .wrap {
  display: flex;
  gap: var(--s-4);
  flex-wrap: wrap;
  align-items: center;
}

.site-footer a { color: var(--c-text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--c-text); }
.site-footer .spacer { margin-left: auto; }

/* ── Page head (title + lede, above the content of an inner page) ────────── */

.page-head { margin-bottom: var(--s-8); }
.page-head .lede { margin-top: var(--s-3); }
.page-head .alert { margin-top: var(--s-4); }
.page-head .signup { margin-top: var(--s-5); max-width: 28rem; }

/* ── Prose pages (terms, privacy, unsubscribe, billing done) ──────────────
   Long-form text needs vertical rhythm that the app pages set themselves. This
   is scoped to .prose so it cannot leak into the dashboard's dense layouts. */

.prose h1 { margin-bottom: var(--s-4); }
.prose h2 { margin-top: var(--s-8); margin-bottom: var(--s-3); }
.prose h3 { margin-top: var(--s-6); margin-bottom: var(--s-2); }
.prose p { margin-bottom: var(--s-4); }
.prose ul, .prose ol { margin-bottom: var(--s-4); padding-left: var(--s-5); }
.prose li { margin-bottom: var(--s-2); }
.prose li::marker { color: var(--c-text-faint); }

/* ── Sign-in ──────────────────────────────────────────────────────────────── */

.auth { max-width: 26rem; margin-inline: auto; padding: var(--s-8); }
.auth h1 { font-size: var(--f-h2-size); margin-bottom: var(--s-5); }
.auth .alert { margin-bottom: var(--s-4); }
.auth + p { max-width: 26rem; margin: var(--s-4) auto 0; text-align: center; }

.auth-form { display: grid; gap: var(--s-3); }
.auth-form p { margin-bottom: 0; }

/* ── Landing ──────────────────────────────────────────────────────────────
   The landing page overrides `main`, so it sets its own vertical rhythm. */

.hero { padding-block: var(--s-16) var(--s-12); }

.hero h1 {
  font-size: var(--f-display-size);
  line-height: var(--f-display-lh);
  letter-spacing: var(--f-display-ls);
  max-width: 20ch;
}

.hero .lede { margin-top: var(--s-6); max-width: 46ch; }
.hero .signup { margin-top: var(--s-8); max-width: 30rem; }
.hero .signup + p { margin-top: var(--s-3); max-width: 46ch; }

.band { padding-block: var(--s-12); }

/* Full-bleed dark band. Inside it the text tokens flip, so .lede and .muted
   keep meaning "quieter than the heading" instead of going invisible. */
.section-dark {
  background: var(--c-bg-inverted);
  padding-block: var(--s-16);
  --c-text: #ffffff;
  --c-text-body: #d1d5db;
  --c-text-muted: #9ca3af;
  color: var(--c-text-body);
}

.section-dark h2 { max-width: 20ch; }
.section-dark .lede { margin-top: var(--s-5); max-width: 62ch; }
.section-dark .muted { margin-top: var(--s-4); font-size: var(--f-sm-size); }

.features {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--s-4);
}

.features .card { border-radius: var(--r-xl); padding: var(--s-6); }
.features h3 { margin-bottom: var(--s-2); }
.features p { color: var(--c-text-muted); }

.steps {
  margin-top: var(--s-5);
  padding-left: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: var(--s-4);
  max-width: 60ch;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: baseline;
  gap: var(--s-3);
  color: var(--c-text-muted);
}

/* The step number as a tinted disc, so the list reads as a sequence. */
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--r-full);
  background: var(--c-accent-tint);
  color: var(--c-accent-ink);
  font-size: var(--f-sm-size);
  font-weight: 600;
  align-self: start;
}

.cta { padding: var(--s-10); text-align: center; }
.cta .lede { margin: var(--s-4) auto 0; max-width: 56ch; }
.cta .signup { margin: var(--s-6) auto 0; max-width: 30rem; justify-content: center; }

/* ── Dashboard ────────────────────────────────────────────────────────────── */

.apps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.changed { margin-bottom: var(--s-8); }
.changed h2 { font-size: var(--f-h3-size); margin-bottom: var(--s-3); }

.change-list { list-style: none; padding: 0; display: grid; gap: var(--s-2); }

.change-list li {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  flex-wrap: wrap;
  font-size: var(--f-sm-size);
}

/* The changed field name ("title", "description") as a quiet tag, so the app
   name stays the thing the eye lands on. */
.field {
  font-size: var(--f-xs-size);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-accent-ink);
  background: var(--c-accent-tint);
  border-radius: var(--r-sm);
  padding: 0.0625rem var(--s-2);
}

.change-list .muted { margin-left: auto; font-size: var(--f-xs-size); }

.cards {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: var(--s-4);
}

.app-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: box-shadow 120ms ease;
}

.app-card:hover { box-shadow: var(--ring), var(--shadow-md); }

.card-main {
  display: block;
  padding: var(--s-5) var(--s-5) var(--s-3);
  color: inherit;
  text-decoration: none;
}

.card-head { display: flex; align-items: center; gap: var(--s-3); }
.card-head img { border-radius: 22%; box-shadow: var(--ring); flex: none; }
.card-title { display: flex; flex-direction: column; min-width: 0; }
.card-title strong { overflow-wrap: anywhere; }
.card-head .badge { margin-left: auto; flex: none; }

.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-4);
}

.card-body .spark { height: 28px; }

.card-remove {
  padding: var(--s-2) var(--s-3);
  border-top: 1px solid var(--c-border);
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.card-remove button { font-size: var(--f-xs-size); }
.card-remove button:hover { color: var(--c-danger); background: var(--c-danger-tint); }

.empty { text-align: center; padding-block: var(--s-10); }

/* ── App detail ───────────────────────────────────────────────────────────
   A long single-column page. Sections are separated by a rule rather than
   boxed, so the dense tables stay the visually heaviest thing on the page. */

.backlink { font-size: var(--f-sm-size); margin-bottom: var(--s-4); }
.backlink a { color: var(--c-text-muted); text-decoration: none; }
.backlink a:hover { color: var(--c-accent); }

.app-head {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}

.app-head img { border-radius: 22%; box-shadow: var(--ring); flex: none; }
.app-head h1 { font-size: var(--f-h2-size); }
.app-head .muted { font-size: var(--f-sm-size); }

.app-section { padding-top: var(--s-8); }
.app-section + .app-section { border-top: 1px solid var(--c-border); margin-top: var(--s-8); }
.app-section > h2 { margin-bottom: var(--s-4); }
.app-section > h3 { margin-top: var(--s-6); margin-bottom: var(--s-3); }
.app-section > .alert { margin-bottom: var(--s-4); }

/* The count and "as of" date ride along with the heading at body weight. */
.app-section h2 .muted { font-weight: 400; letter-spacing: normal; }

.note { margin-top: var(--s-3); }
.add-row { margin-top: var(--s-4); }

/* Rank tables. Numeric columns right-align; rank and delta columns are narrow
   and must not wrap. */
.ranks th:nth-child(n + 3),
.ranks td:nth-child(n + 3) { text-align: right; }

.ranks td.rank { font-weight: 600; color: var(--c-text); white-space: nowrap; }
.ranks td.trend { width: 6rem; }
.ranks td.trend .spark { width: 90px; height: 24px; }
.ranks tr.is-paused td { opacity: 0.55; }

.up { color: var(--c-success); font-weight: 600; white-space: nowrap; }
.down { color: var(--c-danger); font-weight: 600; white-space: nowrap; }

/* Your own column in the comparison table, tinted so it is findable while
   scrolling sideways through competitors. */
.compare th.self,
.compare td.self { background: var(--c-accent-tint); color: var(--c-accent-ink); }
.compare tbody tr:hover td.self { background: var(--c-accent-tint); }

/* App names are long ("ShutEye®: Sleep Tracker, Sound"). Left to nowrap, three
   competitors push the table several screens wide; wrapping the headers within
   a capped column keeps the whole comparison visible instead. */
.compare th { white-space: normal; min-width: 6rem; max-width: 9rem; }
.compare th:first-child,
.compare td:first-child { white-space: nowrap; }

/* The change timeline: same row rhythm as .result. */
.timeline { list-style: none; padding: 0; margin: 0; }

.timeline li {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--c-border);
  font-size: var(--f-sm-size);
}

.timeline li:last-child { border-bottom: 0; }

/* Keyword opportunities chart: one row per term with a score bar and the
   signals behind it (demand, page 1 floor, your rank). Wide by design; the
   .scroll-x wrapper in the template keeps narrow screens usable. */
.op-note { color: var(--c-text-body); font-size: var(--f-sm-size); margin-bottom: var(--s-4); }

.opps-chart { display: flex; flex-direction: column; min-width: 46rem; }

.op-row {
  display: grid;
  grid-template-columns:
    minmax(10rem, 1.3fr) minmax(6rem, 1fr) 3rem 6.5rem 5.5rem 4.5rem 5.5rem auto;
  gap: var(--s-3);
  align-items: center;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--c-border);
  font-size: var(--f-sm-size);
}

.op-row:last-child { border-bottom: 0; }
.op-row .right { justify-self: end; }
.op-term { font-weight: 600; color: var(--c-text); }
.op-bar { width: 100%; height: 10px; }
.op-bar-track { fill: var(--c-bg-subtle); }
.op-bar-fill { fill: var(--c-accent); }
.op-score { font-weight: 600; color: var(--c-text); text-align: right; }
.op-sig { color: var(--c-text-body); white-space: nowrap; }

/* Verdicts are state, so they may use a state colour: TARGET (a real, winnable
   gap) is the one worth acting on and reads green. */
.op-verdict {
  font-size: var(--f-xs-size);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  white-space: nowrap;
}
.op-row.is-target .op-verdict { color: var(--c-success); }

/* The rescan control and the quota line it needs to explain itself. Wraps at
   375px rather than pushing the hint off the edge. */
.scan-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-4);
}

.countries {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: var(--s-2) var(--s-4);
  margin-bottom: var(--s-5);
}

.country { display: flex; align-items: center; gap: var(--s-2); font-size: var(--f-sm-size); }
.country input { accent-color: var(--c-accent); }

.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip form { display: inline-flex; }

/* Dashed edge marks a chip as paused, so it reads as different rather than
   just faded, which matters for anyone who cannot rely on the opacity cue. */
.chip.is-paused { box-shadow: none; border: 1px dashed var(--c-border-strong); }

.chip-x,
.chip-add {
  background: none;
  box-shadow: none;
  padding: 0 var(--s-1);
  color: var(--c-text-faint);
  font-weight: 400;
}

.chip-x:hover { background: none; color: var(--c-danger); }
.chip.suggestion { padding: 0; }
.chip-add { padding: var(--s-1) var(--s-3); color: var(--c-accent); font-weight: 500; }
.chip-add:hover { background: none; color: var(--c-accent-hover); }

.danger summary {
  cursor: pointer;
  color: var(--c-danger);
  font-size: var(--f-sm-size);
  font-weight: 500;
}

.danger[open] summary { margin-bottom: var(--s-3); }
.danger p { margin-bottom: var(--s-3); }

/* ── Add app, settings ────────────────────────────────────────────────────── */

.country-pick { display: flex; align-items: center; gap: var(--s-2); }

.stack { margin-top: var(--s-4); }
.field-label { display: flex; align-items: center; gap: var(--s-2); font-size: var(--f-sm-size); }
.confirm { display: flex; align-items: flex-start; gap: var(--s-2); font-size: var(--f-sm-size); }
.confirm input { accent-color: var(--c-danger); margin-top: 0.2em; }

/* Account deletion is irreversible, so it gets a tinted box rather than sitting
   flush with the ordinary settings forms above it. */
.danger-form {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
  background: var(--c-danger-tint);
  border-radius: var(--r-lg);
  padding: var(--s-4);
}

/* ── Pricing ──────────────────────────────────────────────────────────────── */

.plans {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--s-4);
}

.plan { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-6); }
.plan.current { box-shadow: var(--ring-accent), var(--shadow-sm); }
.plan-head { display: flex; align-items: center; gap: var(--s-3); }

.badge.accent { background: var(--c-accent-tint); color: var(--c-accent-ink); }

.price {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--c-text);
}

.price .per {
  font-size: var(--f-sm-size);
  font-weight: 400;
  color: var(--c-text-muted);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin-top: var(--s-2);
  display: grid;
  gap: var(--s-2);
  font-size: var(--f-sm-size);
  color: var(--c-text-body);
}

/* Accent tick instead of a bullet: same job, reads as "included". */
.plan-features li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: var(--s-1);
}

.plan-features li::before {
  content: "✓";
  color: var(--c-accent);
  font-weight: 600;
}

/* A feature the tier does not have. The tick has to go with it: an accent check
   next to "No competitor tracking" reads as included at a glance, whatever the
   words say. */
.plan-features li.off { color: var(--c-text-muted); }
.plan-features li.off::before { content: "–"; color: var(--c-text-muted); }

/* Pushed to the bottom so the buttons line up across cards of unequal height. */
.plan-action { margin-top: auto; padding-top: var(--s-4); }
.block { width: 100%; }

/* ── Small screens ────────────────────────────────────────────────────────── */

@media (max-width: 40rem) {
  :root {
    --f-display-size: 2.25rem;
    --f-h1-size: 1.75rem;
    --f-h2-size: 1.3125rem;
    --f-lede-size: 1.0625rem;
  }

  .wrap { padding-inline: var(--s-4); }
  main { padding-block: var(--s-6) var(--s-10); }
  .site-header .wrap { min-height: 3.5rem; }

  /* The brand broke across two lines once the signed-in email was competing
     for the same row. The email is the least useful thing in the header on a
     phone and Settings is still one tap away, so it goes instead. */
  .brand { white-space: nowrap; }
  .site-nav { gap: var(--s-3); }
  .site-nav .muted { display: none; }

  .hero { padding-block: var(--s-10) var(--s-8); }
  .band { padding-block: var(--s-8); }
  .section-dark { padding-block: var(--s-10); }
  .cta { padding: var(--s-6); }
}
