:root {
  --theme: #002676;
  --ink: #171714;
  --muted: #68665f;
  --line: #cbc8bf;
  --paper: #f3f1eb;
  --surface: #faf9f5;
  --focus-background: #e3e0d7;
  --white: #fff;
  --success: #31724a;
  --danger: #9a3828;
}

.rerun-card { overflow-wrap: anywhere; }
.rerun-card .scenario-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.rerun-card .scenario-heading { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.rerun-card .scenario-heading h3 { margin: 0; font-size: 16px; flex: 1 1 210px; }
.rerun-card .scenario-device { font-size: 12px; color: var(--muted); }
.rerun-card .scenario-steps { margin-top: 10px; font-size: 14px; }
.rerun-card .scenario-steps summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rerun-card .scenario-steps summary:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.rerun-card .scenario-steps ol, .rerun-card .scenario-steps ul { padding-left: 22px; }
.rerun-card .scenario-steps li { margin: 5px 0; }
.rerun-card .scenario-check-label { font-weight: 600; }
.rerun-card [data-rerun-duration], .rerun-card [data-rerun-website] { color: var(--muted); font-size: 14px; }
.rerun-card [data-rerun-fresh] { display: inline-block; margin-top: 16px; }
.rerun-card .rerun-tasks { margin: 0; padding-left: 22px; }
.rerun-card .rerun-tasks li { margin: 10px 0; }
.rerun-card .rerun-tasks p { margin: 2px 0 0; font-size: 14px; }
.rerun-card .rerun-task-questions { color: var(--muted); }

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body {
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}
button, input, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
[hidden] { display: none !important; }
/* Use a neutral fill for focus instead of browser or theme-colored rings. */
:focus { outline: none; }
:is(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible { background-color: var(--focus-background); color: var(--ink); }

.action-section {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}
.account {
  position: fixed;
  z-index: 1;
  top: 24px;
  right: max(24px, calc((100vw - 1180px) / 2));
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.account-reports {
  margin-right: 3px;
  color: var(--theme);
  font-weight: 700;
  text-decoration: none;
}
.account-reports:hover { text-decoration: underline; text-underline-offset: 3px; }
.account-reports:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.account-trigger {
  width: 34px;
  height: 34px;
  padding: 3px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: transparent;
}
.account-trigger:hover { background: rgba(0, 38, 118, .08); }
.account-trigger:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--theme);
  font-size: 9px;
  font-weight: 700;
  overflow: hidden;
}
.avatar > * { grid-area: 1 / 1; }
.avatar-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.account-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  right: 0;
  width: min(300px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(0, 16, 52, .18);
}
.account-menu-email {
  margin: 0;
  padding: 14px 16px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.account-menu-links { padding: 6px; }
.account-menu-footer { border-top: 1px solid var(--line); }
.account-menu-item {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
}
.account-menu-item:hover { background: #ece9e1; }
.account-menu-item:focus-visible, .account-credits:focus-visible {
  outline: none;
  background-color: var(--focus-background);
  color: var(--ink);
}
.account-menu-item svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.6;
}
.account-sign-out { color: var(--danger); }
.account-credits {
  padding: 14px 16px 15px;
  display: block;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.account-credits:hover { background: #f0ede6; }
.account-credits-heading, .account-credit-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.account-credits-heading { font-size: 13px; }
.account-credits-heading strong { font-weight: 700; }
.account-credits-heading > span { color: var(--muted); font-variant-numeric: tabular-nums; }
.account-credit-track {
  height: 7px;
  margin-top: 11px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #dfdcd3;
}
.account-credit-track > span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--theme);
  transition: width 180ms ease;
}
.account-credit-meta {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}
.account-credit-meta > span:last-child {
  color: var(--theme);
  font-size: 14px;
}
.text-button {
  padding: 0;
  border: 0;
  color: var(--theme);
  background: transparent;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-button:hover { color: var(--ink); }
.text-button:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }

main { flex: 1; display: flex; }
h1, h2, h3, p { margin-top: 0; }

.action-section {
  position: relative;
  padding: 52px 0 64px;
  display: grid;
  grid-template-columns: minmax(320px, .86fr) minmax(440px, 1.14fr);
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}
.eyebrow {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.action-intro { min-width: 0; }
.action-intro h1 {
  max-width: 560px;
  margin-bottom: 12px;
  font-size: clamp(44px, 4.4vw, 60px);
  line-height: .98;
  letter-spacing: -.045em;
}
.intro-copy {
  max-width: 440px;
  margin-bottom: 0;
  color: #44423d;
  font-size: 18px;
  line-height: 1.5;
}

.action-card {
  width: 100%;
  max-width: 610px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}
.card-heading {
  margin-bottom: 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.card-heading h3 {
  margin-bottom: 5px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.card-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.status-heading { display: grid; grid-template-columns: 12px 1fr; gap: 14px; }
.status-pulse {
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--theme);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }

label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.label-row {
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.label-row > span {
  color: var(--muted);
  font-size: 11px;
}
.label-row label { margin-bottom: 0; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: var(--white);
  font-size: 16px;
}
input { height: 52px; padding: 0 14px; }
textarea { min-height: 145px; padding: 14px; resize: vertical; line-height: 1.5; }
input:focus-visible, textarea:focus-visible { background-color: var(--focus-background); }
input::placeholder, textarea::placeholder { color: #77746d; opacity: 1; }
.provider-button {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid var(--theme);
  border-radius: 0;
  background: var(--white);
  font-size: 15px;
  font-weight: 700;
}
.provider-button:hover { color: var(--white); background: var(--theme); }
.provider-button + .provider-button,
[data-other-auth-methods] > .provider-button { margin-top: 10px; }
.provider-button img { transition: filter .12s ease; }
.provider-button:hover img { filter: invert(1); }
.provider-button:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.divider {
  margin: 25px 0;
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 11px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.input-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.input-action input { border-right: 1px solid var(--line); }
.inline-button {
  min-width: 108px;
  border: 1px solid var(--theme);
  border-radius: 0;
  color: var(--white);
  background: var(--theme);
  font-size: 15px;
  font-weight: 700;
}
.inline-button:hover { color: var(--theme); background: transparent; }
.inline-button:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.code-sent { margin: 11px 0 0; color: var(--muted); font-size: 11px; }
.code-sent { margin: 0 0 22px; font-size: 13px; line-height: 1.5; }
.code-input {
  height: 60px;
  margin-bottom: 14px;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .4em;
}
.code-actions { margin-top: 15px; display: flex; justify-content: space-between; }
.code-actions .text-button:disabled { cursor: default; text-decoration: none; }
.auth-back { margin-top: 30px; }
.auth-card label,
.auth-card input:not(.code-input),
.auth-card .provider-button,
.auth-card .inline-button,
.auth-card .primary-button { font-size: 15px; }
.auth-card .card-heading p,
.auth-card .divider,
.auth-card .auth-legal,
.auth-card .code-sent,
.auth-card .text-button,
.auth-card .notice { font-size: 13px; }
.auth-legal { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-legal a { color: var(--theme); text-underline-offset: 2px; }
.auth-legal a:hover { color: var(--ink); }
.request-form { display: grid; gap: 24px; }
.request-form label,
.request-form input,
.request-form textarea,
.request-form .primary-button { font-size: 15px; }
.request-form input:not([type="radio"]),
.request-form textarea { border-radius: 8px; }
.request-form .label-row > span,
.request-form .character-count { font-size: 13px; }
.field { position: relative; }
.audience-field .label-row, .plan-field .label-row, .simulation-count-field .label-row { position: relative; }
.audience-field textarea { display: block; min-height: 80px; }
.field-label { display: flex; align-items: center; gap: 6px; }
.field-help summary { display: grid; place-items: center; width: 24px; height: 24px; color: var(--muted); list-style: none; cursor: pointer; border-radius: 50%; }
.field-help summary::-webkit-details-marker { display: none; }
.field-help summary:hover, .field-help[open] summary { color: var(--theme); }
.field-help summary:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.field-help summary svg { display: block; width: 18px; height: 18px; }
.field-help-content { position: absolute; z-index: 2; top: calc(100% + 6px); left: 0; width: min(320px, 100%); margin: 0; padding: 12px 14px; border: 1px solid var(--line); background: var(--white); color: var(--muted); box-shadow: 0 4px 12px rgba(23, 23, 20, .1); font-size: 13px; line-height: 1.5; }
.request-options-toggle { display: flex; align-items: center; gap: 12px; margin: -12px 0; padding: 12px 0; font-size: 15px; font-weight: 600; list-style: none; cursor: pointer; }
.request-options-toggle::-webkit-details-marker { display: none; }
.request-options-toggle:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.request-options-toggle::after { content: ""; width: 7px; height: 7px; margin: -4px 3px 0 auto; border-right: 1.5px solid var(--theme); border-bottom: 1.5px solid var(--theme); transform: rotate(45deg); }
.request-options[open] .request-options-toggle::after { margin-top: 4px; transform: rotate(225deg); }
.request-options-fields { display: grid; gap: 24px; margin-top: 12px; }
.simulation-count-field input { width: 100px; }
.device-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.device-field legend { padding: 0; margin-bottom: 10px; font-size: 15px; font-weight: 600; }
.device-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.device-options label { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0; padding: 10px 14px; border: 1px solid var(--line); cursor: pointer; }
.device-options label:has(input:checked) { border-color: var(--theme); background: var(--paper); }
.device-options label:has(input:focus-visible) { background-color: var(--focus-background); }
.device-options input { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--theme); }
.test-account-field { display: grid; gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.test-account-heading { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 15px; }
.test-account-heading strong { font-weight: 600; }
.test-account-heading > span { color: var(--muted); font-size: 13px; }
.test-account-security { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.test-account-security { padding: 12px 14px; border-left: 2px solid var(--theme); background: var(--paper); color: var(--ink); }
.template-picker { display: grid; gap: 8px; margin-bottom: 12px; }
.template-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.template-chips button { min-height: 36px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--white); font-size: 13px; }
.template-chips button:hover { border-color: var(--theme); color: var(--theme); }
.template-chips button[aria-pressed="true"] { border-color: var(--theme); color: var(--white); background: var(--theme); }
.template-chips button { cursor: pointer; }
.template-chips button:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.template-undo { margin: 0; color: var(--muted); font-size: 13px; }
.template-undo .text-button { font-size: 13px; }
.textarea-wrap { position: relative; }
.textarea-wrap textarea { display: block; }
.character-count {
  position: absolute;
  right: 10px;
  bottom: 9px;
  padding: 2px 4px;
  color: var(--muted);
  background: var(--white);
  font-size: 12px;
  line-height: 1.2;
}
.primary-button, .secondary-button {
  min-height: 52px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--theme);
  border-radius: 0;
  color: var(--white);
  background: var(--theme);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.primary-button:hover { color: var(--theme); background: transparent; }
.primary-button:focus-visible, .secondary-button:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.primary-button span { font-size: 18px; font-weight: 400; }
.submit-area .primary-button {
  width: 100%;
  min-height: 58px;
  padding-inline: 20px;
  font-size: 17px;
}
.submit-area .primary-button span {
  font-size: 28px;
  line-height: 1;
}
.secondary-button { width: 100%; justify-content: center; color: var(--theme); background: transparent; }
.secondary-button:hover { color: var(--white); background: var(--theme); }
.notice {
  margin: -14px 0 22px;
  padding: 11px 13px;
  border: 1px solid;
  font-size: 12px;
  line-height: 1.5;
}
.error-notice { color: var(--danger); border-color: #c98f84; background: #f7e8e3; }
.request-summary { margin: 0 0 27px; border-top: 1px solid var(--line); }
.request-summary > div {
  padding: 13px 0;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.request-summary dt { color: var(--muted); font-size: 10px; }
.request-summary dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; }
.test-instructions-toggle { list-style: none; cursor: pointer; }
.test-instructions-toggle::-webkit-details-marker { display: none; }
.test-instructions-toggle:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.test-instructions-preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.test-instructions-action { display: flex; align-items: center; gap: 6px; min-height: 44px; color: var(--theme); font-weight: 700; }
.test-instructions-action::before { content: "▸"; }
.test-instructions-toggle:hover .test-instructions-action { text-decoration: underline; }
.test-instructions-hide,
.test-instructions-details[open] .test-instructions-show,
.test-instructions-details[open] .test-instructions-preview { display: none; }
.test-instructions-details[open] .test-instructions-hide { display: inline; }
.test-instructions-details[open] .test-instructions-action::before { transform: rotate(90deg); }
.test-instructions-content { display: flow-root; }
.test-instructions-content :is(p, ul, ol, pre, blockquote, table) { margin: 0 0 12px; }
.test-instructions-content :is(h1, h2, h3, h4, h5, h6) { margin: 18px 0 8px; font-size: 1.1em; line-height: 1.4; letter-spacing: normal; }
.test-instructions-content > :first-child { margin-top: 0; }
.test-instructions-content > :last-child { margin-bottom: 0; }
.test-instructions-content :is(ul, ol) { padding-left: 20px; }
.test-instructions-content li { margin: 4px 0; }
.test-instructions-content li > :is(ul, ol) { margin-bottom: 0; }
.test-instructions-content .instruction-task { list-style: none; }
.test-instructions-content input[type="checkbox"] { width: 13px; height: 13px; margin: 0 5px 0 -18px; padding: 0; vertical-align: middle; accent-color: var(--theme); }
.test-instructions-content a { color: var(--theme); }
.test-instructions-content code { font-size: .95em; background: var(--paper); }
.test-instructions-content pre { padding: 12px; overflow-x: auto; background: var(--paper); }
.test-instructions-content pre code { white-space: pre; overflow-wrap: normal; }
.test-instructions-content blockquote { padding-left: 12px; border-left: 2px solid var(--line); color: var(--muted); }
.test-instructions-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.test-instructions-content :is(th, td) { padding: 6px 8px; border: 1px solid var(--line); text-align: left; }
.progress-track { width: 100%; height: 3px; overflow: hidden; background: #d7d5cf; }
.progress-track span { display: block; width: 18%; height: 100%; background: var(--theme); transition: width .5s ease; }
.progress-meta { margin: 10px 0 26px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.report-button { margin-top: 18px; }
.status-card .secondary-button { margin-top: 12px; }
.status-card.is-complete .status-pulse { background: var(--success); animation: none; }
.status-card.is-failed .status-pulse { background: var(--danger); animation: none; }
.subscription-dialog, .agent-dialog {
  width: min(820px, calc(100% - 36px));
  max-height: calc(100svh - 36px);
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(10, 18, 35, .24);
}
.subscription-dialog::backdrop, .agent-dialog::backdrop { background: rgba(0, 16, 52, .55); }
.subscription-panel { position: relative; padding: clamp(28px, 5vw, 48px); }
.subscription-close, .agent-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}
.subscription-close:hover, .agent-close:hover { color: var(--theme); }
.subscription-close:focus-visible, .agent-close:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.subscription-heading { max-width: 600px; margin-bottom: 30px; }
.subscription-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1;
  letter-spacing: -.04em;
}
.subscription-heading > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}
.subscription-dialog { width: min(860px, calc(100% - 36px)); }
.subscription-heading h2 { font-size: clamp(30px, 4vw, 42px); }
.subscription-heading p { margin: 0 0 6px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.subscription-balance strong { color: var(--ink); }
.subscription-error { margin: 0 0 18px; }
.subscription-note { margin: 0 0 18px; padding: 11px 13px; border: 1px solid var(--line); background: var(--white); font-size: 13px; }
.subscription-note a, .subscription-option > p a { color: var(--theme); font-weight: 700; text-underline-offset: 3px; }
.subscription-intervals { margin-bottom: 14px; display: inline-flex; border: 1px solid var(--line); background: var(--white); }
.subscription-intervals button { min-height: 36px; padding: 0 16px; border: 0; color: var(--muted); background: transparent; font-size: 13px; font-weight: 700; }
.subscription-intervals button[aria-pressed="true"] { color: var(--white); background: var(--theme); }
.subscription-intervals button:focus-visible { outline: 2px solid var(--theme); outline-offset: 2px; }
.subscription-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.subscription-option { min-width: 0; padding: 22px; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--white); }
.subscription-option-label { margin: 0 0 14px; color: var(--theme); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.subscription-option h3 { margin: 0 0 4px; font-size: 30px; line-height: 1.05; letter-spacing: -.025em; }
.subscription-price small { margin-left: 2px; color: var(--muted); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.subscription-option > p:not(.subscription-option-label) { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.subscription-option > p.subscription-billed { margin-bottom: 14px; font-size: 12px; }
.subscription-option .subscription-buy, .subscription-call-button { width: 100%; min-height: 44px; margin-top: auto; }
.subscription-call-button { justify-content: space-between; }
.subscription-call-button span { font-size: 18px; font-weight: 400; }
.subscription-packs-section { margin-top: 26px; }
.subscription-packs-section h3 { margin: 0 0 10px; font-size: 18px; }
.subscription-packs { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.subscription-packs li { padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.subscription-packs li strong { margin-right: 6px; }
.subscription-packs .subscription-buy { width: auto; min-height: 36px; padding: 0 14px; }
.subscription-portal { margin-top: 22px; min-height: 44px; }
.billing-notice { position: absolute; z-index: 2; top: 10px; right: 0; max-width: 610px; margin: 0; color: var(--success); border-color: #8fb79c; background: #e6f0e8; }

.reports-topbar {
  background: var(--paper);
}
.reports-topbar-inner {
  width: min(1180px, calc(100% - 48px));
  min-height: 66px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.reports-brand {
  display: flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}
.reports-brand img { display: block; width: 85px; height: auto; }
.reports-brand:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
body[data-page="reports"] .account {
  position: relative;
  top: auto;
  right: auto;
}

body[data-page="home"] main { display: block; }
body[data-page="home"] .action-section { min-height: calc(100svh - 66px); }
.reports-main { display: block; }
.reports-shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  padding-bottom: 72px;
}
.reports-hero {
  padding: 68px 0 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  border-bottom: 1px solid var(--line);
}
.reports-hero h1 {
  margin-bottom: 0;
  font-size: clamp(52px, 6vw, 72px);
  line-height: .96;
  letter-spacing: -.045em;
}
.new-test-button, .open-report-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--theme);
  color: var(--white);
  background: var(--theme);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.new-test-button { min-width: 174px; gap: 9px; padding: 13px 15px; }
.new-test-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 1.75;
}
.open-report-button { min-width: 136px; padding: 11px 13px; }
.report-row-actions { display: grid; grid-template-columns: auto auto; align-items: center; gap: 8px; }
.report-failure { color: var(--danger); font-size: 13px; line-height: 1.5; }
.report-menu { position: relative; }
.report-menu-trigger { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 26px; line-height: 1; }
.report-menu-trigger:hover, .report-menu-trigger[aria-expanded="true"] { color: var(--theme); background: rgba(0, 38, 118, .06); }
.report-menu-dropdown { position: absolute; z-index: 5; top: calc(100% + 6px); right: 0; min-width: 150px; padding: 4px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 6px 18px rgba(23, 23, 20, .1); }
.delete-report-button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; color: var(--danger); background: transparent; font-size: 13px; text-align: left; }
.delete-report-button svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.delete-report-button:hover, .delete-report-button:focus-visible { background: rgba(154, 56, 40, .07); }
.report-menu-trigger:focus-visible, .delete-report-button:focus-visible, .delete-report-dialog button:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.report-deletion-status { margin: 0; color: var(--success); font-size: 13px; }
.report-deletion-status:not(:empty) { margin-top: 24px; }
.delete-report-dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100svh - 32px); padding: 28px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.delete-report-dialog::backdrop { background: rgba(0, 16, 52, .45); }
.delete-report-dialog h2 { margin: 0 0 16px; font-size: 26px; letter-spacing: -.02em; }
.delete-report-dialog p { font-size: 14px; overflow-wrap: anywhere; }
.delete-report-detail { color: var(--muted); }
.delete-report-error { color: var(--danger); }
.delete-report-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.delete-report-actions button { min-height: 44px; padding: 11px 16px; border: 1px solid var(--line); color: var(--theme); background: transparent; font-size: 13px; font-weight: 700; }
.delete-report-actions .delete-report-confirm { border-color: var(--danger); color: var(--white); background: var(--danger); }
.report-progress {
  min-width: 136px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--theme);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.report-progress-pulse {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--theme);
  animation: pulse 1.8s ease-in-out infinite;
}
.new-test-button:hover, .open-report-button:hover { color: var(--theme); background: transparent; }
.new-test-button:focus-visible, .open-report-button:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.reports-status { padding: 34px 0; color: var(--muted); font-size: 13px; }
.reports-error { margin: 30px 0 0; }
.reports-list { border-bottom: 1px solid var(--line); }
.report-row {
  padding: 30px 0;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
  border-bottom: 1px solid var(--line);
}
.report-row:last-child { border-bottom: 0; }
.report-row-meta { display: grid; gap: 4px; min-width: 0; align-self: start; padding-top: 4px; }
.report-row-meta time {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.5;
  text-transform: uppercase;
}
.report-row-meta time { white-space: nowrap; }
.report-created-by, .report-device {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.report-row-content { min-width: 0; }
.report-row-content > h2 {
  margin-bottom: 9px;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.report-row-brief {
  max-width: 710px;
  margin-bottom: 0;
  overflow-wrap: anywhere;
  color: #44423d;
  font-size: 14px;
  line-height: 1.5;
}
.reports-empty {
  max-width: 680px;
  padding: 58px 0 0;
}
.reports-empty h2 {
  margin-bottom: 12px;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: -.025em;
}
.reports-empty > p:not(.eyebrow) { margin-bottom: 26px; color: #44423d; }

@media (max-width: 900px) {
  .action-section {
    padding: 68px 0 76px;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 48px;
  }
  .action-card { max-width: 680px; }
  .action-intro h1 { max-width: 680px; }
  .intro-copy { max-width: 560px; }
  body[data-page="home"] .action-section { min-height: auto; }
  .report-row { grid-template-columns: 160px minmax(0, 1fr); gap: 24px; }
  .report-row-actions { grid-column: 2; width: max-content; }
}

@media (max-width: 640px) {
  .account { top: 18px; right: 18px; }
  /* One scrollable row keeps the form short on phones. */
  .template-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -2px; padding: 2px; scrollbar-width: none; }
  .template-chips::-webkit-scrollbar { display: none; }
  .template-chips button { flex: none; }
  .action-section { width: calc(100% - 36px); }
  .action-section { padding: 42px 0 56px; gap: 36px; }
  .action-intro h1 { font-size: clamp(48px, 15vw, 64px); }
  .intro-copy { font-size: 17px; }
  .action-card { padding: 24px; }
  .input-action { grid-template-columns: 1fr; gap: 9px; }
  .input-action input { border-right: 1px solid var(--line); }
  .inline-button { min-height: 48px; }
  .reports-topbar-inner, .reports-shell { width: calc(100% - 36px); }
  .reports-topbar-inner { min-height: 58px; }
  .agent-setup-trigger { padding-inline: 10px; }
  body[data-page="reports"] .account { position: relative; top: auto; right: auto; }
  .reports-hero {
    padding: 44px 0 36px;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 26px;
  }
  .reports-hero h1 { font-size: clamp(48px, 15vw, 64px); }
  .new-test-button { width: 100%; }
  .report-row {
    padding: 25px 0 28px;
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .report-row-meta { padding: 0; }
  .report-row-content > h2 { font-size: 23px; }
  .report-row-actions { grid-column: 1; width: 100%; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
  .reports-empty { padding-top: 42px; }
  .reports-empty h2 { font-size: 32px; }
  .subscription-dialog { width: calc(100% - 20px); max-height: calc(100svh - 20px); }
  .subscription-panel { padding: 30px 20px 24px; }
  .subscription-heading { margin-bottom: 22px; padding-right: 20px; }
  .subscription-heading h2 { font-size: 36px; }
  .subscription-options { grid-template-columns: 1fr; }
  .subscription-option { padding: 20px; }
}

@media (max-width: 360px) {
  .agent-setup-trigger { padding-inline: 8px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .action-section { padding: 24px 0 36px; gap: 18px; }
  .eyebrow { margin-bottom: 8px; }
  .action-intro h1 { margin-bottom: 8px; font-size: 42px; }
  .intro-copy { font-size: 15px; line-height: 1.4; }
  .action-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status-pulse, .report-progress-pulse { animation: none; }
  .progress-track span { transition: none; }
}

/* Coding-agent onboarding opens from the sidebar without replacing the form. */
.agent-setup-trigger {
  margin-left: auto;
  padding: 9px 13px;
  flex-shrink: 0;
  border: 1px solid var(--theme);
  color: var(--theme);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.agent-setup-trigger:hover { background: rgba(0, 38, 118, .08); }
.agent-setup-trigger:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.agent-dialog { width: min(680px, calc(100% - 36px)); }
body:has(.agent-dialog[open]) { overflow: hidden; }
.agent-panel { position:relative; padding:clamp(24px, 5vw, 40px); text-align:left; overflow-wrap:anywhere; }
.agent-panel h2 { font-size:24px; margin-top:0; padding-right:32px; }
.agent-panel pre { white-space:pre-wrap; overflow-wrap:anywhere; padding:16px; background:#f1f0eb; border-radius:8px; font:14px/1.6 monospace; }
.agent-panel p { line-height:1.6; }
[hidden] { display:none !important; }

/* Shared workspace controls use the same typography and palette as the reports. */
[data-workspace-menu] { display: grid; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
[data-workspace-menu] > span { overflow-wrap: anywhere; font-weight: 700; }
[data-workspace-menu] select { max-width: 100%; padding: 9px; font: inherit; color: var(--ink); background: var(--white); border: 1px solid var(--line); }
[data-workspace-menu] button { text-align: left; padding: 0; border: 0; background: transparent; color: var(--theme); }
.workspace-dialog { width: min(720px, calc(100% - 32px)); height: min(580px, calc(100svh - 48px)); max-height: calc(100svh - 32px); padding: 0; overflow: hidden; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.workspace-dialog[open] { display: flex; flex-direction: column; }
.workspace-dialog::backdrop { background: rgba(0, 16, 52, .45); }
.workspace-dialog-header { flex: none; padding: 24px 28px 0; border-bottom: 1px solid var(--line); }
.workspace-dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.workspace-dialog-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.workspace-dialog-heading h2:focus { outline: none; }
.workspace-dialog button { padding: 9px 12px; border: 1px solid var(--line); color: var(--theme); background: transparent; font-size: 13px; }
.workspace-dialog button:focus-visible, .workspace-dialog [role="tabpanel"]:focus-visible { outline: none; background-color: var(--focus-background); color: var(--ink); }
.workspace-dialog-heading button { flex: none; width: 32px; height: 32px; border: 0; padding: 0; font-size: 24px; line-height: 1; }
.workspace-dialog [data-workspace-description] { margin: 4px 0 16px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.workspace-settings-tabs { display: flex; gap: 24px; overflow-x: auto; }
.workspace-settings-tabs [role="tab"] { min-height: 44px; padding: 10px 0; border: 0; border-bottom: 2px solid transparent; color: var(--muted); white-space: nowrap; }
.workspace-settings-tabs [role="tab"]:hover { color: var(--theme); }
.workspace-settings-tabs [aria-selected="true"] { border-bottom-color: var(--theme); color: var(--theme); font-weight: 700; }
.workspace-settings-tabs [role="tab"]:focus, .workspace-settings-tabs [role="tab"]:focus-visible { outline: none; box-shadow: none; }
.workspace-dialog-body { flex: 1; min-height: 0; padding: 24px 28px 28px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.workspace-dialog .workspace-settings-description { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.workspace-dialog [data-settings-error] { margin: 0 0 20px; color: var(--danger); font-size: 13px; }
.workspace-dialog form:not(.workspace-dialog-heading) { display: flex; align-items: end; gap: 10px; margin: 0 0 12px; }
.workspace-dialog form:not(.workspace-dialog-heading) > button { min-height: 52px; }
.workspace-dialog label { flex: 1; min-width: 0; margin-bottom: 0; font-size: 13px; }
.workspace-dialog input, .workspace-dialog textarea, .workspace-dialog [data-workspace-name] { font: inherit; font-size: 14px; font-weight: 400; line-height: 1.5; }
.workspace-dialog input { display: block; width: 100%; margin-top: 6px; padding: 9px; border: 1px solid var(--line); background: var(--white); }
.workspace-dialog form[data-testing-instructions] { display: block; }
.workspace-dialog [data-testing-instructions] label { display: block; }
.workspace-dialog [data-testing-instructions] p { color: var(--muted); font-size: 13px; }
.workspace-dialog textarea { display: block; width: 100%; margin: 12px 0; padding: 12px; border: 1px solid var(--line); background: var(--white); color: var(--ink); resize: vertical; }
.workspace-dialog h3 { margin: 24px 0 8px; font-size: 16px; }
.workspace-dialog [data-workspace-readonly] h3 { margin-top: 0; font-size: 13px; }
.workspace-member { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding: 12px 0; font-size: 13px; }
.workspace-member span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.workspace-dialog [data-leave] { margin-top: 24px; color: var(--danger); }
.workspace-dialog form[data-file-upload] { display: block; }
.workspace-dialog [data-file-upload] label { display: block; margin-bottom: 14px; }
.workspace-dialog [data-file-status], .workspace-dialog [data-file-error] { font-size: 13px; overflow-wrap: anywhere; }
.workspace-dialog [data-file-error] { color: var(--danger); }
.workspace-file { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.workspace-file img, .workspace-file video { width: 88px; height: 72px; object-fit: cover; background: var(--line); flex: none; }
.workspace-file-details { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.workspace-file-details p { margin: 5px 0 0; color: var(--muted); }
.workspace-file button { flex: none; }
@media (max-width: 640px) {
  .workspace-dialog-header { padding: 20px 20px 0; }
  .workspace-dialog-heading h2 { font-size: 22px; }
  .workspace-settings-tabs { gap: 16px; }
  .workspace-dialog-body { padding: 20px; scrollbar-gutter: auto; }
  .workspace-dialog form:not(.workspace-dialog-heading) { flex-wrap: wrap; }
  .workspace-dialog label { flex-basis: 100%; }
  .workspace-member { flex-wrap: wrap; }
  .workspace-member span { flex-basis: 100%; }
}
@media (max-width: 360px) {
  .workspace-dialog-header { padding-inline: 16px; }
  .workspace-dialog-heading h2 { font-size: 20px; }
  .workspace-settings-tabs { gap: 12px; }
  .workspace-settings-tabs [role="tab"] { font-size: 12px; }
  .workspace-dialog-body { padding-inline: 16px; }
}
.target-picker { margin: 0; padding: 0; border: 0; min-width: 0; }
.target-options { display: flex; flex-wrap: wrap; gap: clamp(12px, 2.5vw, 24px); border-bottom: 1px solid var(--line); }
.post-help { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.survey-editor { padding-top: 24px; border-top: 1px solid var(--line); }
.survey-editor > p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.survey-editor h4 { margin: 28px 0 16px; font-size: 16px; }
.survey-editor fieldset { margin: 16px 0; padding: 16px; border: 1px solid var(--line); min-width: 0; }
.survey-editor legend { font-size: 13px; font-weight: 600; padding: 0 6px; }
.survey-editor label { display: block; margin: 16px 0; font-size: 13px; line-height: 1.5; }
.survey-editor label[hidden] { display: none; }
.survey-editor :is(input, textarea, select) { display: block; width: 100%; margin-top: 6px; }
.target-options label { position: relative; margin: 0 0 -1px; cursor: pointer; }
.target-options label:has(input[value="survey"]:disabled) { display: none; }
.target-options input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.target-options span { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 2px 10px; border-bottom: 2px solid transparent; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--muted); }
.target-icon { width: 17px; height: 17px; flex-shrink: 0; }
.target-options small { font-size: 11px; font-weight: 400; }
.target-options label:hover span { color: var(--ink); }
.target-options label:has(input:disabled), .target-options input:disabled { cursor: not-allowed; }
.target-options input:disabled + span { color: var(--muted); opacity: .45; }
.target-options input:checked + span { color: var(--theme); border-bottom-color: var(--theme); }
.target-options input:focus-visible + span { outline: none; background-color: var(--focus-background); color: var(--ink); }
@media (max-width: 360px) {
  .target-options { gap: 8px; }
  .target-options span { gap: 6px; font-size: 13px; }
}
