:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #f7faf9;
  --ink: #16211d;
  --muted: #5f6964;
  --soft: #eef0eb;
  --line: #d8ddd5;
  --accent: #0b6f6a;
  --accent-dark: #064f4b;
  --accent-soft: #d9efeb;
  --blue: #315f9f;
  --warn: #99620a;
  --bad: #a43131;
  --good: #157044;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 247, 248, 0.98)),
    repeating-linear-gradient(90deg, rgba(22, 33, 29, 0.04) 0 1px, transparent 1px 96px);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.shell {
  min-height: 100vh;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 64px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(11, 111, 106, 0.22);
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.hero,
.panel,
.results,
.seo-copy {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(26, 38, 33, 0.07);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 34px;
  align-items: stretch;
  padding: 30px;
}

.hero-copy {
  min-width: 0;
  align-self: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: 56px;
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 16px;
  font-size: 17px;
  letter-spacing: 0;
}

.summary,
#verdict-summary {
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.summary {
  margin-bottom: 26px;
}

.check-form {
  max-width: 720px;
}

.check-form label {
  display: block;
  margin-bottom: 9px;
  font-weight: 850;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 54px;
  border: 1px solid #b9c4bf;
  border-radius: 8px;
  padding: 0 15px;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

input:focus {
  border-color: var(--accent);
  outline: 4px solid rgba(11, 111, 106, 0.14);
}

button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

button.secondary:hover {
  background: var(--surface-2);
}

.quota-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.privacy-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.capability-panel {
  align-self: stretch;
  border: 1px solid #c8d5cf;
  border-radius: 10px;
  padding: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faf7 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.capability-panel h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.capability-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.capability-panel li {
  position: relative;
  padding: 14px 0 14px 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.45;
}

.capability-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.seo-copy {
  margin-top: 16px;
  padding: 20px 24px;
}

.seo-copy h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

.seo-copy p {
  max-width: 980px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

body.report-mode .hero,
body.report-mode .seo-copy {
  display: none;
}

.status {
  min-height: 24px;
  margin: 18px 0;
  color: var(--muted);
}

.status.error {
  color: var(--bad);
  font-weight: 800;
}

.hidden {
  display: none;
}

.results {
  padding: 28px;
}

.result-header {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.result-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.verdict-good {
  color: var(--good);
}

.verdict-warn {
  color: var(--warn);
}

.verdict-bad {
  color: var(--bad);
}

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

.metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-2);
}

.metrics span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.metrics strong {
  display: block;
  font-size: 25px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.run-panel {
  margin-bottom: 16px;
}

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

.run-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
}

.run-status-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.run-status h4 {
  margin: 0;
  font-size: 15px;
}

.run-status p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.details-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: none;
}

.ai-report {
  border-color: rgba(11, 111, 106, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(242, 248, 246, 0.92));
}

.ai-report-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.ai-report-head h3 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.22;
}

.confidence {
  flex: 0 0 auto;
  border: 1px solid rgba(11, 111, 106, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-summary {
  color: var(--muted);
  line-height: 1.65;
}

.ai-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.ai-columns h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.compact-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.55;
}

.compact-list li + li {
  margin-top: 7px;
}

.disclaimer {
  margin: 16px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.facts {
  margin: 0;
}

.facts div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.facts div:first-child {
  border-top: 0;
}

dt {
  color: var(--muted);
  font-weight: 800;
}

dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.checklist {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.55;
}

.checklist li + li {
  margin-top: 8px;
}

.signal-list,
.probe-list,
.browser-evidence {
  display: grid;
  gap: 12px;
}

.signal,
.probe,
.browser-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
}

.signal-head,
.probe-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.signal h4,
.probe h4,
.browser-card h4 {
  margin: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.badge.high,
.badge.bad {
  color: #fff;
  background: var(--bad);
}

.badge.medium,
.badge.warn {
  color: #241600;
  background: #f2c76f;
}

.badge.good {
  color: #fff;
  background: var(--good);
}

.badge.low {
  color: var(--muted);
  background: var(--soft);
}

.signal p,
.probe p,
.browser-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.browser-shot {
  display: block;
  width: min(420px, 100%);
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.examples {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.examples li {
  overflow-wrap: anywhere;
}

.empty {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 920px) {
  .hero,
  .details-grid,
  .ai-columns,
  .run-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .capability-panel {
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1160px);
    padding-top: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .results {
    padding: 20px;
  }

  h1 {
    font-size: 36px;
    line-height: 1.08;
  }

  .summary {
    font-size: 15px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .result-header {
    display: block;
  }

  .ai-report-head {
    display: block;
  }

  .confidence {
    display: inline-flex;
    margin-top: 12px;
  }

  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .result-header button {
    width: 100%;
    margin-top: 0;
  }

  .browser-card .probe-head {
    display: block;
  }

  .browser-card .badge {
    display: inline-flex;
    max-width: 100%;
    margin-top: 8px;
    white-space: normal;
    line-height: 1.25;
  }

  .browser-card h4 {
    overflow-wrap: normal;
  }

  .facts div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
