:root {
  --bg: #0a0b0f;
  --bg-soft: #0f1117;
  --surface: #14161f;
  --surface-2: #1a1d28;
  --border: #242938;
  --border-soft: #1c2030;
  --text: #e9ecf4;
  --muted: #98a1b3;
  --muted-2: #8a92a3;
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --ring: #c4b5fd;
  --teal: #1ecba5;
  --teal-soft: rgba(30, 203, 165, 0.12);
  --amber: #ffb020;
  --danger: #ff5f7a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(900px 500px at 12% -12%, rgba(124, 92, 255, 0.12), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; }
::selection { background: rgba(124, 92, 255, 0.4); color: #fff; }

/* One focus ring for everything, keyboard only, high contrast on dark. */
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}

h1, h2, h3, h4 { margin: 0 0 0.5rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 650; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: 760px; }
main { flex: 1; padding: 36px 0 72px; }
[id] { scroll-margin-top: 96px; }

/* Screen-reader only, still focusable when it needs to be. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}
.skip:focus { transform: none; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(10, 11, 15, 0.86);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; gap: 18px; min-height: 62px; }
.brand { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.03em; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: #fff; background: var(--accent-soft); }
.nav-right { display: flex; align-items: center; gap: 10px; }

.bell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 1rem;
}
.bell:hover { color: var(--text); background: var(--surface); }
.bell .dot {
  position: absolute; top: 1px; right: -2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent);
  color: #fff; font-size: 0.68rem; font-weight: 700;
  display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
}

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: #0a0b0f; font-weight: 800; font-size: 0.85rem;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  font: inherit; font-size: 0.93rem; font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}
.btn:hover { color: #fff; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary {
  background: linear-gradient(135deg, #7a56f0, #5c3ade);
  color: #fff;
  box-shadow: 0 8px 22px rgba(92, 58, 222, 0.32);
}
.btn-primary:hover { background: linear-gradient(135deg, #7250e8, #5334d4); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn-danger { background: transparent; border-color: rgba(255, 95, 122, 0.45); color: var(--danger); }
.btn-danger:hover { background: rgba(255, 95, 122, 0.12); color: #ffc2cc; }
.btn-sm { min-height: 34px; padding: 7px 12px; font-size: 0.84rem; }
.btn-block { width: 100%; }
.btn:disabled {
  opacity: 0.6;
  border-style: dashed;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ---------------------------------------------------------------- surfaces */
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card-flat { background: var(--surface); }
.card h3 { margin-bottom: 0.35rem; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.muted { color: var(--muted); }
.tiny { font-size: 0.78rem; }
.small { font-size: 0.87rem; }
.strong { font-weight: 650; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: grid; gap: 12px; }
.push { margin-left: auto; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* Two-line titles and three-line blurbs instead of a hard mid-word cut. */
.clamp-2, .clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; line-clamp: 3; }
.wrap-anywhere { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.6rem, 3.4vw, 2rem); margin-bottom: 4px; }
.page-head p { margin: 0; }
.page-head .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 54px 0 26px; }
.hero h1 { max-width: 900px; }
.hero h1 em { font-style: normal; color: #b9a6ff; }
.hero .lede { font-size: clamp(1.02rem, 1.8vw, 1.24rem); color: var(--muted); max-width: 660px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: #7fe6cc;
  background: var(--teal-soft);
  border: 1px solid rgba(30, 203, 165, 0.25);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}

.stat-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--border-soft);
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
}
.stat { background: var(--surface); padding: 18px 20px; }
.stat .k { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 0.76rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }

/* ---------------------------------------------------------------- value */
.value-hero {
  background:
    radial-gradient(520px 220px at 8% -20%, rgba(124, 92, 255, 0.14), transparent 68%),
    linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.value-hero.compact { padding: 20px 22px; }
.value-label {
  font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted-2);
}
.value-big {
  font-size: clamp(2.3rem, 6vw, 3.4rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.value-big.md { font-size: clamp(1.9rem, 4.4vw, 2.4rem); }
.value-big.sm { font-size: 1.55rem; }
.unit { font-size: 0.4em; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 0.2em; white-space: nowrap; }
.value-range { color: var(--muted); font-size: 0.88rem; margin-top: 6px; }
.value-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 14px; }

.metric { padding: 12px 0; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; gap: 12px; }
.metric:first-child { border-top: none; }
.metric .k { color: var(--muted); font-size: 0.86rem; }
.metric .v { font-weight: 650; text-align: right; }

/* Score: the number plus a scale, so the bar never has to explain itself. */
.score { margin-top: 16px; }
.score-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.score-head .l {
  font-size: 0.72rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted-2);
}
.score-head .v { font-size: 0.84rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.score-note { margin: 6px 0 0; font-size: 0.76rem; color: var(--muted-2); }

.progress {
  position: relative;
  height: 10px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}
.progress > i { display: block; height: 100%; background: var(--accent); }
.progress.ruler::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0 calc(25% - 1px),
    rgba(233, 236, 244, 0.2) calc(25% - 1px) 25%
  );
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.metrics .k { font-size: 0.74rem; color: var(--muted-2); }
.metrics .v { font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- forms */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.req { color: var(--muted-2); font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit; font-size: 0.94rem;
  transition: border-color 0.12s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--ring);
  outline-offset: 1px;
}
input[aria-invalid="true"] { border-color: var(--danger); }
::placeholder { color: var(--muted-2); opacity: 1; }
textarea { resize: vertical; min-height: 110px; }
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.hint { font-size: 0.78rem; color: var(--muted-2); margin-top: 5px; }
.row-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  cursor: pointer; font-size: 0.9rem;
}
.check:hover { border-color: #333a4d; }
.check input { width: 18px; height: 18px; flex: none; accent-color: var(--accent); }

.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.3fr) auto; gap: 12px; align-items: end; }
.filter-actions { display: flex; align-items: center; gap: 8px; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.mode-legend { font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  margin: 0 0 6px;
}
.auth-card h1 { font-size: clamp(1.55rem, 3vw, 1.95rem); margin-bottom: 0.35rem; }

table.breakdown td { padding: 8px 0; font-size: 0.86rem; }
table.breakdown td:first-child { padding-right: 14px; }

/* Disclosure: used for "How this was valued" and long briefs. */
details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: "";
  width: 0; height: 0;
  flex: none;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.15s ease;
}
details[open] > summary::before { transform: rotate(90deg); }
details > summary:hover { color: var(--text); }

/* ---------------------------------------------------------------- alerts */
.alert { border-radius: var(--radius-sm); padding: 13px 16px; margin-bottom: 18px; font-size: 0.9rem; border: 1px solid; }
.alert-error { background: rgba(255, 95, 122, 0.09); border-color: rgba(255, 95, 122, 0.35); color: #ffc2cc; }
.alert-ok { background: var(--teal-soft); border-color: rgba(30, 203, 165, 0.32); color: #a7f0dd; }
.alert-info { background: var(--accent-soft); border-color: rgba(124, 92, 255, 0.35); color: #d5cbff; }
.alert strong { font-weight: 700; }
.alert a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 650; letter-spacing: 0.02em;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.badge-live { background: var(--teal-soft); border-color: rgba(30, 203, 165, 0.35); color: #6fe3c6; }
.badge-grow { background: var(--accent-soft); border-color: rgba(124, 92, 255, 0.35); color: #c0b0ff; }
.badge-warn { background: rgba(255, 176, 32, 0.12); border-color: rgba(255, 176, 32, 0.35); color: #ffc25c; }
.badge-danger { background: rgba(255, 95, 122, 0.12); border-color: rgba(255, 95, 122, 0.35); color: #ffb0bf; }
.badge-muted { background: transparent; }

.glyph {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; flex: none;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 0.76rem; font-weight: 800; letter-spacing: 0.02em; color: var(--muted);
}
.glyph.lg { width: 52px; height: 52px; font-size: 0.86rem; }

/* ---------------------------------------------------------------- tables/lists */
.list { display: grid; gap: 1px; background: var(--border-soft); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.list-item { background: var(--surface); padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
.list-item:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; overflow-wrap: anywhere; }
.list-item .right { margin-left: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
caption { text-align: left; }
th { text-align: left; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); padding: 10px 12px; border-bottom: 1px solid var(--border); font-weight: 650; }
td { padding: 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
td strong, td .strong { font-variant-numeric: tabular-nums; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.014); }
tr:last-child td { border-bottom: none; }

/* ---------------------------------------------------------------- campaign */
.campaign-card { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.campaign-card h3 { margin: 0; }
.campaign-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.campaign-card .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.campaign-card p { margin: 0; }
.campaign-card .foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.reward { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.reward small { display: block; font-weight: 500; color: var(--muted); font-size: 0.76rem; line-height: 1.35; }

.brief { max-width: 68ch; line-height: 1.65; color: #d6dbe6; white-space: pre-wrap; overflow-wrap: anywhere; }

.steps { display: grid; gap: 10px; }
.step {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.step .tick {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 800;
  border: 1px solid var(--border); color: var(--muted-2);
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}
.step.done .tick { background: var(--teal); border-color: var(--teal); color: #06251d; }
.step.done .title { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.step.next { border-color: rgba(124, 92, 255, 0.45); background: rgba(124, 92, 255, 0.07); }
.step.next .tick { border-color: var(--accent); color: var(--text); }
.step .title { font-weight: 600; font-size: 0.92rem; }
.step .title a { text-decoration: underline; text-underline-offset: 3px; }

.stat-inline { text-align: right; }
.stat-inline .v { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.stat-inline .l { font-size: 0.76rem; color: var(--muted-2); }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--border-soft); padding: 26px 0; color: var(--muted-2); font-size: 0.82rem; }
.foot .row-between { flex-wrap: wrap; gap: 12px; }
.foot a:hover { color: var(--text); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* The nav is the only route to the rest of the product on a phone. */
  .nav-inner { flex-wrap: wrap; gap: 8px 12px; padding: 8px 0 0; }
  .nav-links { order: 3; flex: none; width: 100%; padding-bottom: 6px; }
  .nav-links a { min-height: 44px; padding: 10px 13px; }
  .nav-right { margin-left: auto; }
}

@media (max-width: 700px) {
  /* Tables become labelled rows; the header stays for screen readers. */
  table.stack thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; }
  table.stack tr { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
  table.stack tr:last-child { border-bottom: none; }
  table.stack td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    padding: 3px 0;
    border: 0;
    text-align: left;
  }
  table.stack td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted-2);
    padding-top: 2px;
  }
  table.stack td[data-label=""]::before { content: none; }
  table.stack td[colspan] { grid-template-columns: minmax(0, 1fr); }
  table.stack td[colspan]::before { content: none; }
  table.stack .right { text-align: left; }
  table.stack .nowrap { white-space: normal; }
  table.stack tr.pitch-row { padding: 0 0 12px; }
  table.stack tr.pitch-row td { padding-left: 0; }
  tbody tr:hover td { background: transparent; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  main { padding: 24px 0 56px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .row-fields, .checkbox-grid, .filters { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 30px; }
  .card { padding: 18px; }
  .value-hero, .value-hero.compact { padding: 18px; }
  .page-head { align-items: flex-start; }
  .stat { padding: 14px 16px; }
  .stat .k { font-size: 1.2rem; }
  .list-item { flex-wrap: wrap; align-items: flex-start; }
  .list-item .title { white-space: normal; }
  .list-item .right { margin-left: auto; }
  .metrics { gap: 8px 10px; }
  .metrics .v { font-size: 0.95rem; }
  .filters .btn { width: 100%; }
  .brief { font-size: 0.95rem; }
}

/* 360px: the narrowest phone we design for. */
@media (max-width: 400px) {
  .wrap { padding: 0 14px; }
  .nav-inner { gap: 6px 8px; }
  .brand { font-size: 1rem; }
  .nav-right { gap: 6px; }
  .nav-right .btn-sm { padding: 6px 10px; }
  .value-big { font-size: 2.1rem; }
  .value-big.md { font-size: 1.75rem; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metrics .k { font-size: 0.68rem; }
  .metrics .v { font-size: 0.9rem; }
  .reward { font-size: 1rem; }
  .campaign-card .foot { flex-wrap: wrap; }
  .list-item .right { width: 100%; margin-left: 54px; text-align: left; }
}

/* Touch targets: 44px minimum wherever the pointer is a finger. */
@media (pointer: coarse), (max-width: 640px) {
  .btn, .btn-sm { min-height: 44px; padding: 10px 14px; }
  .nav-links a { min-height: 44px; }
  .bell { width: 44px; height: 44px; }
  details > summary { min-height: 44px; }
  .foot a { display: inline-flex; align-items: center; min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .btn:hover, .btn:active { transform: none; }
  details > summary::before { transition: none; }
}
