/* AI trend-report agent: Scaylar prototype. Colors and type follow scaylar.com. */

:root {
  --blue: #0556f3;
  --blue-hover: #0445c2;
  --blue-deep: #033492;
  --blue-light: #e9f3ff;
  --ink: #0b1220;
  --ink-2: #334155;
  --muted: #4b5565;
  --line: #e3e8ef;
  --line-strong: #c9d2de;
  --bg: #f5f7fb;
  --card: #ffffff;
  --ok: #0f7b3f;
  --ok-bg: #e7f6ed;
  --warn: #8a4b00;
  --warn-bg: #fff4e0;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 10px 30px rgba(11, 18, 32, 0.05);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  color-scheme: light;
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 600;
}

h2 {
  font-size: 20px;
  font-weight: 600;
}

h3 {
  font-size: 19px;
  font-weight: 600;
}

p {
  margin: 0;
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--blue-hover);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff;
}

[tabindex='-1']:focus {
  outline: none;
  box-shadow: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: none;
}

.icon svg {
  width: 100%;
  height: 100%;
}

/* ---------- header ---------- */

/* sticky, so the "Sample data" label is on screen wherever the page is scrolled */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.proto-name {
  min-width: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
}

.topbar .badge-sample {
  margin-left: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.badge-proto {
  background: var(--blue-light);
  color: var(--blue-deep);
}

.badge-sample {
  background: var(--warn-bg);
  color: #7a4100;
  border: 1px dashed #c98a2e;
}

.badge-sample svg {
  width: 15px;
  height: 15px;
}

/* ---------- screen links ---------- */

.screens-nav {
  padding-top: 20px;
}

.screens-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.screens-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.screens-nav a:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.nav-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
}

.screens-nav a[aria-current='page'] {
  border-color: var(--blue);
  color: var(--blue-deep);
  background: var(--blue-light);
}

.screens-nav a[aria-current='page'] .nav-num {
  background: var(--blue);
  color: #fff;
}

/* ---------- shared pieces ---------- */

main {
  padding-top: 24px;
  padding-bottom: 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  min-width: 0;
}

.card h2 {
  margin-bottom: 14px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head h2 {
  margin-bottom: 0;
}

.stack {
  display: grid;
  gap: 24px;
  align-content: start;
  min-width: 0;
}

.eyebrow {
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lede {
  color: var(--ink-2);
  font-size: 18px;
  max-width: 760px;
  margin-top: 12px;
}

.lede.small {
  font-size: 15px;
  color: var(--muted);
  margin-top: 8px;
}

.page-head {
  margin: 8px 0 28px;
}

.page-head h1 {
  margin-top: 8px;
}

.note {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
}

.chip-sample {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px dashed #c98a2e;
  background: var(--warn-bg);
  color: #7a4100;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  white-space: nowrap;
  vertical-align: middle;
}

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pill-review {
  background: var(--blue-light);
  color: var(--blue-deep);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-hover);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--blue-deep);
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue-deep);
}

.btn-quiet {
  background: transparent;
  color: var(--ink-2);
  padding-left: 12px;
  padding-right: 12px;
}

.btn-quiet:hover {
  color: var(--ink);
  text-decoration: underline;
}

.label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 10px;
}

.mini-title {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.src {
  display: inline-block;
  min-width: 26px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  vertical-align: 1px;
  white-space: nowrap;
}

/* ---------- screen 1: new report ---------- */

.layout-new {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.options {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.option:hover {
  border-color: var(--blue);
}

.option.is-selected,
.option:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-light);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.option input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

.option-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.option-name {
  font-weight: 600;
}

.option-blurb {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.field {
  margin-top: 24px;
}

.field select {
  width: 100%;
  max-width: 360px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.settings {
  margin: 24px 0 0;
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.settings div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
}

.settings dt {
  color: var(--muted);
  font-size: 14px;
}

.settings dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.form-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.hint {
  color: var(--muted);
  font-size: 14px;
}

.questions {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
  color: var(--ink-2);
}

.questions li::marker {
  color: var(--blue);
  font-weight: 600;
}

.recent {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.recent-link {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.recent-link:hover {
  border-color: var(--blue);
  color: var(--ink);
}

.recent-name {
  font-weight: 600;
  color: var(--blue-deep);
}

.recent-meta,
.recent-when {
  color: var(--muted);
  font-size: 14px;
}

.recent-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

/* ---------- screen 2: run ---------- */

.run-head h1 {
  margin-top: 8px;
}

.progress-row {
  margin-top: 20px;
}

progress {
  display: block;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--blue-light);
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

progress::-webkit-progress-bar {
  background: var(--blue-light);
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: var(--blue);
  border-radius: 999px;
  transition: width 0.1s linear;
}

progress::-moz-progress-bar {
  background: var(--blue);
  border-radius: 999px;
}

.run-meta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.run-stat {
  font-weight: 600;
  font-size: 15px;
}

.run-clock {
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.run-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.done-banner {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--ok-bg);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.done-text {
  flex: 1 1 320px;
  font-weight: 600;
  color: #0b4f29;
}

.done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-ok {
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
}

.icon-ok.big {
  width: 36px;
  height: 36px;
  padding: 8px;
}

.layout-run {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 24px;
  align-items: start;
}

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

.step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.step:first-child {
  border-top: 0;
  padding-top: 0;
}

.step:last-child {
  padding-bottom: 0;
}

.step-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.step.is-active .step-mark {
  border-color: var(--blue-light);
}

.step.is-done .step-mark {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.step-mark .icon {
  width: 16px;
  height: 16px;
}

.spinner {
  width: 30px;
  height: 30px;
  margin: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--blue);
  border-right-color: var(--blue);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.step-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.step-name {
  font-weight: 600;
  line-height: 1.35;
  padding-top: 4px;
}

.step.is-waiting .step-name {
  color: var(--ink-2);
}

.step.is-active .step-name {
  color: var(--blue-deep);
}

.step-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.step-status {
  padding-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.step.is-active .step-status {
  color: var(--blue-deep);
  font-weight: 600;
}

.step.is-done .step-status {
  color: var(--ink-2);
}

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

.tile {
  display: grid;
  gap: 2px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  min-width: 0;
}

.tile-label {
  font-size: 13px;
  color: var(--muted);
}

.tile-value {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tile-unit {
  font-size: 13px;
  color: var(--muted);
}

.log-card {
  background: var(--ink);
  border-color: var(--ink);
  color: #e2e8f0;
}

.log-card h2 {
  color: #fff;
}

.log-note {
  color: #a9b4c4;
  font-size: 13px;
}

.log {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  min-height: 120px;
}

.log-line {
  display: grid;
  grid-template-columns: 58px 62px minmax(0, 1fr);
  gap: 8px;
  padding: 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.log-line:first-child {
  border-top: 0;
}

.log-time {
  color: #a9b4c4;
  font-variant-numeric: tabular-nums;
}

.log-tag {
  color: #9cc3ff;
}

.log-text {
  color: #e2e8f0;
  overflow-wrap: anywhere;
}

.log-line.is-warn .log-text {
  color: #ffd38a;
}

.log-line.is-ok .log-text {
  color: #8ce7b0;
}

/* ---------- screen 3: report ---------- */

.report-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.report-head h1 {
  margin-top: 10px;
}

.report-meta {
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  font-size: 14px;
}

.report-meta div {
  display: flex;
  gap: 6px;
}

.report-meta dt {
  color: var(--muted);
}

.report-meta dd {
  margin: 0;
  font-weight: 500;
}

.headline {
  margin-top: 24px;
  padding: 22px 24px;
  border-radius: var(--radius-sm);
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
}

.headline .mini-title {
  color: var(--blue-deep);
}

.headline-text {
  margin-top: 8px;
  font-family: var(--display);
  font-size: clamp(20px, 2.1vw, 26px);
  font-weight: 600;
  line-height: 1.3;
  max-width: 900px;
}

.summary {
  margin-top: 12px;
  color: var(--ink-2);
  max-width: 860px;
}

.fig {
  font-weight: 700;
  color: var(--ink);
}

.headline-text .fig {
  color: var(--blue-deep);
}

.kpis {
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-width: 0;
}

.kpi dt {
  font-size: 13px;
  color: var(--muted);
}

.kpi dd {
  margin: 2px 0 0;
  font-size: 24px;
  font-weight: 600;
}

.block {
  margin-top: 40px;
}

.block-head {
  margin-bottom: 18px;
}

.block-head h2 {
  font-size: 26px;
}

.block-head p {
  margin-top: 6px;
  color: var(--muted);
}

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

.trend {
  display: flex;
  flex-direction: column;
}

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

.momentum {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.momentum .icon {
  width: 14px;
  height: 14px;
}

.momentum.is-rising {
  background: var(--blue-light);
  color: var(--blue-deep);
}

.momentum.is-steady {
  background: #eef1f5;
  color: var(--ink-2);
}

.momentum.is-cooling {
  background: var(--warn-bg);
  color: var(--warn);
}

.trend-desc {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

.chart-figure {
  margin: 18px 0 0;
}

.chart-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.chart {
  position: relative;
  height: 160px;
  margin-top: 8px;
  padding: 14px 40px 28px 34px;
  border-radius: var(--radius-sm);
}

.plot {
  position: relative;
  height: 100%;
}

.plot svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.grid-line {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.area {
  fill: rgba(5, 86, 243, 0.1);
}

.line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.y-label {
  position: absolute;
  left: -34px;
  width: 26px;
  transform: translateY(-50%);
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.x-label {
  position: absolute;
  top: calc(100% + 8px);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.x-first {
  left: 0;
}

.x-last {
  right: 0;
}

.end-dot,
.hover-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px #fff;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.end-label {
  position: absolute;
  left: calc(100% + 10px);
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.crosshair {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--ink-2);
  opacity: 0.45;
  pointer-events: none;
}

.tip {
  position: absolute;
  top: -10px;
  z-index: 2;
  display: grid;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 6px 18px rgba(11, 18, 32, 0.12);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  transform: translate(-50%, -100%);
  pointer-events: none;
}

.tip strong {
  font-size: 15px;
}

.tip span {
  color: var(--muted);
}

.tip.at-start {
  transform: translate(0, -100%);
}

.tip.at-end {
  transform: translate(-100%, -100%);
}

.chart:focus-visible {
  outline-offset: 0;
}

.chart-table summary,
.check-details summary {
  display: inline-block;
  cursor: pointer;
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
}

.chart-table summary:hover,
.check-details summary:hover {
  color: var(--blue-hover);
  text-decoration: underline;
}

.chart-table {
  margin-top: 4px;
}

.chart-table table {
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.chart-table th,
.chart-table td {
  padding: 4px 18px 4px 0;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.chart-table th {
  font-weight: 500;
  color: var(--muted);
}

.stats {
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  min-width: 0;
}

.stat-label {
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

.stat-value {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

.stat-value .src {
  font-size: 11px;
  vertical-align: 3px;
}

.trend .mini-title {
  margin-top: 20px;
}

.evidence {
  margin: 8px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--ink-2);
  font-size: 15px;
}

.three {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.bullets {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--ink-2);
  font-size: 15px;
}

.two {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.check-result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--ok-bg);
  color: #0b4f29;
  font-size: 18px;
}

.check-note {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 15px;
}

.check-details {
  margin-top: 14px;
}

/* clear of the sticky header when #report-checks scrolls here */
.checks {
  scroll-margin-top: 96px;
}

.table-wrap {
  margin-top: 10px;
}

.check-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

.check-table thead th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.check-table th:first-child,
.check-table td:first-child {
  padding-left: 0;
}

.check-table tbody th {
  font-weight: 400;
}

.check-label {
  display: block;
  font-weight: 500;
}

.check-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.check-table .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.check-table s {
  color: var(--muted);
}

.result {
  white-space: nowrap;
  color: var(--ok);
  font-weight: 600;
}

.result .icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}

.is-fixed .result {
  color: var(--warn);
}

.source-intro {
  color: var(--muted);
  font-size: 14px;
}

.sources {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.source {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
}

.src-lg {
  align-self: start;
  min-width: 36px;
  padding: 4px 0;
  font-size: 13px;
}

.source-name {
  font-weight: 600;
}

.source-name .chip-sample {
  margin-left: 4px;
}

.source-detail {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
}

.report-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 14px;
}

.foot-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  padding-bottom: 32px;
}

.foot p {
  max-width: 760px;
}

.foot strong {
  color: var(--ink-2);
}

/* ---------- smaller screens ---------- */

@media (max-width: 960px) {
  .layout-new,
  .layout-run,
  .two {
    grid-template-columns: minmax(0, 1fr);
  }

  .three {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .option-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  main {
    padding-top: 16px;
  }

  .card {
    padding: 20px;
    border-radius: 16px;
  }

  .stack,
  .layout-new,
  .layout-run,
  .trend-grid,
  .two {
    gap: 16px;
  }

  .lede {
    font-size: 16px;
  }

  .screens-nav {
    padding-top: 14px;
  }

  .screens-nav ol {
    gap: 6px;
  }

  .screens-nav a {
    padding-right: 10px;
    font-size: 13px;
    gap: 6px;
  }

  .settings div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .run-actions {
    margin-left: 0;
    width: 100%;
  }

  .step {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .step-status {
    grid-column: 2;
    padding-top: 0;
  }

  .tile-value {
    font-size: 20px;
  }

  .log-line {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 0 8px;
  }

  .log-tag {
    grid-column: 2;
    grid-row: 1;
  }

  .log-text {
    grid-column: 2;
  }

  .headline {
    padding: 18px;
  }

  .kpi dd {
    font-size: 20px;
  }

  .block-head h2 {
    font-size: 22px;
  }

  .chart {
    padding-right: 34px;
  }

  .stats {
    gap: 8px;
  }

  .stat {
    padding: 10px;
  }

  .stat-value {
    font-size: 18px;
  }

  .stat-label {
    font-size: 12px;
  }

  .check-table th,
  .check-table td {
    padding-left: 4px;
    padding-right: 4px;
  }

  /* phones: the result column shows its icon only; the word stays for screen readers */
  .check-table .result-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .check-table .result .icon {
    margin-right: 0;
  }

  .check-table s {
    display: block;
  }

  .foot-inner {
    flex-direction: column;
  }

  .topbar-inner {
    min-height: 0;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 6px 8px;
  }

  .topbar .badge {
    font-size: 12px;
    padding: 4px 10px;
  }

  .topbar .badge-sample {
    order: 2;
  }

  .topbar .proto-name {
    order: 3;
    flex-basis: 100%;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .spinner {
    animation: none;
    border-color: var(--blue);
    border-left-color: var(--blue-light);
    border-bottom-color: var(--blue-light);
  }
}
