/* The Duelpoint dashboard: the same design system as the website (web/marketing/app/globals.css).
   Blue is your agent, orange the other side, the point between them our referee. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fafaf8;
  --bg-tint: #f3f3f0;
  --surface: #ffffff;
  --surface-2: #f6f6f4;
  --ink: #0b0c0f;
  --ink-2: #33363f;
  --muted: #676b76;
  --line: rgb(11 12 15 / 8%);
  --line-2: rgb(11 12 15 / 14%);
  --agent: #2f55d4;
  --agent-mark: #3461e9;
  --other: #b8440f;
  --other-mark: #f15a22;
  --loss: #b42318;
  --ok: #17663a;
  --warn-bg: #fff6e5;
  --warn-ink: #6b4400;
  --glow-a: rgb(52 97 233 / 14%);
  --glow-b: rgb(241 90 34 / 11%);
  --shadow-sm: 0 1px 2px rgb(11 12 15 / 5%);
  --shadow:
    0 0 0 1px rgb(11 12 15 / 6%), 0 2px 4px rgb(11 12 15 / 4%), 0 12px 32px -8px rgb(11 12 15 / 10%),
    0 40px 80px -32px rgb(11 12 15 / 16%);
  --radius: 16px;
  --radius-lg: 22px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07080a;
    --bg-tint: #0b0c0f;
    --surface: #0f1014;
    --surface-2: #14161b;
    --ink: #f2f3f5;
    --ink-2: #c3c6cf;
    --muted: #8d92a0;
    --line: rgb(255 255 255 / 7%);
    --line-2: rgb(255 255 255 / 13%);
    --agent: #8aa3ff;
    --agent-mark: #5b7cff;
    --other: #ff9461;
    --other-mark: #ff6a2b;
    --loss: #ff7b70;
    --ok: #5fd38d;
    --warn-bg: #2b2108;
    --warn-ink: #f5d58a;
    --glow-a: rgb(70 105 255 / 20%);
    --glow-b: rgb(255 106 43 / 14%);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow:
      0 0 0 1px rgb(255 255 255 / 7%), 0 2px 4px rgb(0 0 0 / 30%), 0 16px 40px -10px rgb(0 0 0 / 55%),
      0 50px 100px -40px rgb(0 0 0 / 70%);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  font-optical-sizing: auto;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.035em;
  line-height: 1.08;
  font-weight: 620;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  letter-spacing: -0.045em;
  margin-bottom: 10px;
}

h2 {
  font-size: 1.3rem;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

p {
  margin: 0;
}

p + p {
  margin-top: 10px;
}

.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.mono {
  font-family: var(--mono);
}

/* ---- frame ------------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar .in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.05em;
}

.wordmark svg {
  width: 32px;
  height: 22px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14.5px;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 999px;
}

.topnav a:hover {
  color: var(--ink);
  background: var(--line);
}

.topnav a.cta {
  margin-left: 6px;
  color: var(--bg);
  background: var(--ink);
  font-weight: 550;
}

main {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) clamp(16px, 4vw, 32px) 80px;
}

main.wide {
  max-width: 1120px;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 22px clamp(16px, 4vw, 32px);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
}

.foot a {
  white-space: nowrap;
}

/* ---- cards and forms ----------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 32px);
  margin: 18px 0;
}

section.card > h2:first-child {
  margin-top: 0;
}

label {
  display: block;
  font-weight: 550;
  font-size: 14.5px;
  margin: 18px 0 7px;
}

form > label:first-child,
.card > label:first-child {
  margin-top: 0;
}

input,
select,
textarea {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: box-shadow 0.15s ease;
}

textarea {
  height: auto;
  padding: 12px 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow:
    inset 0 0 0 1.5px var(--agent-mark),
    0 0 0 4px color-mix(in srgb, var(--agent-mark) 18%, transparent);
}

input::placeholder {
  color: var(--muted);
}

/* checkboxes: drawn to match */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px !important;
  height: 20px;
  padding: 0;
  margin: 0 10px 0 0;
  flex: none;
  vertical-align: -4px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line-2);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}

input[type="checkbox"]:checked {
  background: var(--ink);
  box-shadow: none;
}

input[type="checkbox"]:checked::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--bg);
  border-bottom: 2px solid var(--bg);
  transform: translateY(-1px) rotate(-45deg);
}

label:has(> input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  font-weight: 450;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.5;
  cursor: pointer;
}

label:has(> input[type="checkbox"]) input {
  margin-top: 1px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  margin-top: 22px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: 560 15.5px/1 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 14%),
    0 1px 2px rgb(0 0 0 / 20%),
    0 8px 20px -8px rgb(11 12 15 / 45%);
  transition: transform 0.2s var(--ease);
}

button:hover,
.button:hover {
  transform: translateY(-1px);
}

form > button,
.wide-button {
  width: 100%;
}

/* "send again" and similar secondary actions stay quiet */
form[action^="/resend"] > button {
  margin-top: 12px;
  height: 42px;
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-2);
}

form[action^="/resend"] + p,
form[action^="/resend"] + form {
  margin-top: 18px;
}

.meta {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.meta a {
  color: var(--ink-2);
}

.warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14.5px;
}

.ok {
  color: var(--ok);
  font-weight: 650;
}

.no {
  color: var(--loss);
  font-weight: 650;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

td,
th {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

details > summary {
  cursor: pointer;
  font-weight: 560;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

legend {
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 10px;
}

pre {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 14px;
}

ul {
  padding-left: 1.1em;
}

/* ---- sign-up and log-in: the form beside a Duelpoint panel ----------------------------------- */
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

@media (max-width: 900px) {
  .auth {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-aside {
    order: 2;
  }
}

.auth h1 + .lede {
  color: var(--ink-2);
  font-size: 16.5px;
  margin-bottom: 8px;
}

.auth-form .card {
  margin-top: 22px;
}

.switch {
  margin-top: 16px;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
}

.switch a {
  color: var(--ink);
  font-weight: 560;
}

.auth-aside {
  position: sticky;
  top: 96px;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-lg);
  background: #0b0c0f;
  color: #f2f3f5;
  padding: clamp(26px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  .auth-aside {
    background: #121318;
    box-shadow: 0 0 0 1px rgb(255 255 255 / 8%);
  }
}

.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 70% at 0% 0%, rgb(52 97 233 / 30%), transparent 70%),
    radial-gradient(60% 70% at 100% 100%, rgb(241 90 34 / 22%), transparent 70%);
}

.auth-aside .big-mark {
  display: block;
  margin-bottom: 26px;
  color: #f2f3f5;
}

.auth-aside .big-mark svg {
  display: block;
  width: 64px;
  height: 46px;
}

.auth-aside h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin-bottom: 22px;
}

.auth-aside h2 .serif {
  color: #a4a8b4;
}

.auth-aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.auth-aside li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid rgb(255 255 255 / 10%);
  color: #c9ccd4;
  font-size: 14.5px;
}

.auth-aside li b {
  color: #fff;
  font-weight: 600;
}

.auth-aside li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: #f2f3f5;
}

.auth-aside .record {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgb(255 255 255 / 6%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%);
  font: 12px/1.6 var(--mono);
  color: #c9ccd4;
}

.auth-aside .record .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.auth-aside .stamp {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #ff7b70;
  color: #1a0705;
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- buying -------------------------------------------------------------------------------- */
.tiers-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 8px;
}

@media (max-width: 640px) {
  .tiers-tabs {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tiers-tabs a {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  background: var(--surface);
  box-shadow:
    0 0 0 1px var(--line-2),
    var(--shadow-sm);
}

.tiers-tabs a b {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tiers-tabs a span {
  font-size: 13px;
  color: var(--muted);
}

.tiers-tabs a[aria-current="page"] {
  box-shadow:
    0 0 0 1.5px var(--ink),
    var(--shadow);
}

.tiers-tabs a.soon {
  opacity: 0.62;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 560px) {
  .choices {
    grid-template-columns: minmax(0, 1fr);
  }
}

.choices label,
.opts label {
  margin: 0;
  padding: 14px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.15s ease;
}

.choices label:has(input:checked),
.opts label:has(input:checked) {
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  color: var(--ink);
}

.opts {
  display: grid;
  gap: 10px;
}

.opts label + select {
  margin-top: 4px;
}

fieldset + fieldset {
  margin-top: 26px;
}

/* the price, as a receipt */
.receipt {
  font-family: var(--mono);
  font-size: 13.5px;
}

.receipt td {
  padding: 12px 0;
}

.receipt td:last-child {
  text-align: right;
  white-space: nowrap;
  padding-left: 16px;
}

.receipt tr.total td {
  border-bottom: 0;
  border-top: 1px dashed var(--line-2);
  padding-top: 16px;
  font-family: var(--sans);
  font-size: 1.6rem;
  font-weight: 620;
  letter-spacing: -0.04em;
}

.receipt tr.total td:first-child {
  font-size: 15px;
  font-weight: 560;
  letter-spacing: 0;
  vertical-align: middle;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 4px;
}

.facts span {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  color: var(--ink-2);
}

.standin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px dashed var(--line-2);
  font: 12px/1.4 var(--mono);
  color: var(--muted);
}

.amount-big {
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  font-weight: 620;
  letter-spacing: -0.055em;
  line-height: 1;
  margin: 10px 0 6px;
  font-variant-numeric: tabular-nums;
}

/* Help pages: a note the reader must not miss (the test-agent rule). */
aside.note {
  border-left: 3px solid var(--other-mark);
  background: var(--surface-2);
  border-radius: 0 10px 10px 0;
  padding: 2px 16px;
  margin: 18px 0;
}

.card ol,
.card ul {
  padding-left: 1.25em;
}

.card li + li {
  margin-top: 6px;
}

.crumb {
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.crumb a {
  color: var(--muted);
}

.prose > :first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.15rem;
  margin: 32px 0 8px;
}

.prose h3 + p,
.prose h3 + ul,
.prose h3 + ol {
  margin-top: 0;
}

.prose p,
.prose li {
  max-width: 68ch;
}

/* ---- engagement, run and account pages (2026-10-31) ------------------------------------------- */

.eng-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.eng-head h1 {
  margin-bottom: 0;
}

.eng-meta {
  margin: 8px 0 10px;
  color: var(--ink-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.chip {
  font-size: 13px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--ink-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill.done {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
}

.pill.go {
  color: var(--agent);
  background: color-mix(in srgb, var(--agent-mark) 12%, transparent);
}

.pill.wait {
  color: var(--muted);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* the five steps of an engagement */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
  padding: 0;
  margin: 22px 0 6px;
  counter-reset: none;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 3px solid var(--line-2);
  min-width: 0;
}

.steps li span {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 650;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.steps li.done {
  color: var(--ink-2);
  border-top-color: var(--ok);
}

.steps li.done span {
  background: var(--ok);
  color: var(--surface);
  box-shadow: none;
}

.steps li.now {
  color: var(--ink);
  font-weight: 600;
  border-top-color: var(--agent-mark);
}

.steps li.now span {
  background: var(--agent-mark);
  color: #fff;
  box-shadow: none;
}

@media (max-width: 560px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .steps li {
    border-top: 0;
    border-left: 3px solid var(--line-2);
    padding: 4px 0 4px 10px;
  }
  .steps li.done {
    border-left-color: var(--ok);
  }
  .steps li.now {
    border-left-color: var(--agent-mark);
  }
}

/* a finished section folded away, one click to open */
details.fold {
  padding-top: 18px;
  padding-bottom: 18px;
}

details.fold > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

details.fold > summary::-webkit-details-marker {
  display: none;
}

details.fold[open] > summary {
  margin-bottom: 8px;
}

.todo {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: 12px;
  padding: 4px 16px;
  margin: 14px 0;
}

/* the test setup form: related fields side by side */
.grid2,
fieldset.group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  align-items: end;
}

fieldset.group {
  border: 0;
  border-top: 1px solid var(--line-2);
  border-radius: 0;
  margin: 18px 0 0;
  padding: 6px 0 0;
}

fieldset.group > legend {
  font-weight: 650;
  font-size: 14px;
  color: var(--ink-2);
  padding: 0 8px 0 0;
}

.setup h3 {
  margin: 34px 0 0;
}

@media (max-width: 560px) {
  .grid2,
  fieldset.group {
    grid-template-columns: 1fr;
  }
}

/* results and runs */
ul.results,
ul.months,
ul.buyable,
ul.engagements,
ul.fails {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

ul.results > li + li {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 4px;
}

.actions .button {
  margin-top: 0;
  height: 42px;
}

.button.quiet,
button.quiet {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-2);
}

details.danger-zone {
  margin-top: 12px;
}

details.danger-zone > summary {
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

details.danger-zone form {
  margin-top: 8px;
}

button.danger {
  color: var(--loss);
  background: transparent;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--loss) 45%, transparent);
  height: 42px;
}

ul.months li,
ul.buyable li,
ul.engagements li,
ul.fails li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

ul.months li > :first-child,
ul.engagements li > :first-child {
  flex: 1;
}

ul.months li:last-child,
ul.buyable li:last-child,
ul.engagements li:last-child,
ul.fails li:last-child {
  border-bottom: 0;
}

ul.buyable .meta,
ul.engagements .meta {
  display: block;
  margin: 0;
}

/* the result at a glance */
.score {
  display: flex;
  align-items: center;
  gap: 18px;
}

.score .big {
  font-size: clamp(44px, 9vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.working {
  height: 4px;
  border-radius: 999px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--agent-mark), var(--other-mark), var(--agent-mark));
  background-size: 200% 100%;
  animation: working 1.6s linear infinite;
}

@keyframes working {
  to {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .working {
    animation: none;
  }
}

.next {
  margin: 10px 0 0;
  color: var(--ink-2);
}

/* phones: the menu scrolls sideways inside the header instead of widening the page */
@media (max-width: 560px) {
  .topbar .wordmark {
    flex: none;
  }
  .topnav {
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    font-size: 14px;
    gap: 0;
  }
  .topnav::-webkit-scrollbar {
    display: none;
  }
  .topnav a {
    padding: 7px 9px;
  }
  .score {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

.score + h3 {
  margin-top: 26px;
}

.reading {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 14.5px;
}

/* Step 16: comparing two runs */
.duo-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 14px 0 6px;
}

.duo-compare b {
  font-size: 30px;
  letter-spacing: -0.03em;
}

table.compare td,
table.compare th {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.pill.loss {
  color: var(--loss);
  background: color-mix(in srgb, var(--loss) 12%, transparent);
}

/* Step 14: the invoice and receipt (printable) */
.invoice-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.invoice-head h1 {
  font-family: var(--mono);
  letter-spacing: -0.02em;
  margin: 2px 0 4px;
}

.invoice .eyebrow {
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.invoice .seller {
  text-align: right;
  color: var(--ink-2);
}

.invoice .billto {
  margin: 22px 0 6px;
}

.invoice .billto p:last-child {
  margin-top: 4px;
}

.receipt th {
  text-align: left;
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--line-2);
}

.receipt th:last-child {
  text-align: right;
}

.receipt tr.sub td {
  color: var(--muted);
}

@media (max-width: 520px) {
  .invoice .seller {
    text-align: left;
  }
}

@media print {
  header, footer, nav, .crumb, .switch {
    display: none !important;
  }

  .invoice {
    box-shadow: none;
    border: 0;
  }
}
