:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #5d6760;
  --subtle: #e1e6df;
  --paper: #fbfcf8;
  --panel: #ffffff;
  --panel-soft: #f3f7f3;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --blue: #2563eb;
  --amber: #b7791f;
  --red: #c2413b;
  --shadow: 0 18px 45px rgba(23, 32, 27, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--subtle);
  background: rgba(251, 252, 248, 0.96);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0;
}

.topnav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.topnav a {
  text-decoration: none;
}

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

main {
  width: 100%;
}

.scanner-shell {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(420px, 1.15fr) minmax(320px, 0.85fr);
  gap: 22px;
  align-items: start;
  padding: clamp(24px, 4vw, 54px);
}

.intro {
  padding-top: 14px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 560px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.14;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
}

.intro-copy {
  max-width: 580px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 17px;
}

.privacy-note {
  max-width: 520px;
  padding: 12px 14px;
  border: 1px solid #b6d9d4;
  border-radius: 8px;
  background: #eef8f6;
  color: #245c58;
  font-size: 14px;
}

.scanner-panel,
.result-panel {
  border: 1px solid var(--subtle);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.scanner-panel {
  padding: 20px;
}

.panel-header,
.section-title-row,
.score-block,
.bottom-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.panel-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.field-wide {
  margin-bottom: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5cf;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 190px;
  resize: vertical;
  padding: 12px;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.checkbox-row {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 14px;
  border: 1px solid var(--subtle);
  border-radius: 8px;
  background: var(--panel-soft);
}

.checkbox-row legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.checkbox-row label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #344039;
  font-size: 14px;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--teal);
}

.button-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

button,
.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 7px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

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

.primary-button {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
  padding: 0 16px;
}

.primary-button:hover {
  background: var(--teal-dark);
}

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

.ghost-button {
  border: 1px solid transparent;
  background: #eef4f2;
  color: var(--teal-dark);
  padding: 0 12px;
}

.ghost-button.small {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
}

.full {
  width: 100%;
}

.result-panel {
  position: sticky;
  top: 84px;
  min-height: 520px;
  overflow: hidden;
}

.empty-state,
.result-state {
  padding: 20px;
}

.empty-state img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--subtle);
  border-radius: 8px;
  background: var(--panel-soft);
}

.empty-state h2 {
  margin-top: 18px;
}

.empty-state p {
  margin: 10px 0 0;
  color: var(--muted);
}

.score-block {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--subtle);
}

.score-ring {
  display: grid;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  place-items: center;
  border: 8px solid var(--teal);
  border-radius: 999px;
  background: #f7fbfa;
  color: var(--ink);
}

.score-ring span {
  font-size: 26px;
  font-weight: 850;
  line-height: 1;
}

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

.metric {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--subtle);
  border-radius: 8px;
  background: var(--panel-soft);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 19px;
}

.result-section {
  margin-top: 18px;
}

.findings-list,
.question-list {
  display: grid;
  gap: 10px;
  margin: 11px 0 0;
  padding-left: 20px;
}

.findings-list li,
.question-list li {
  color: #344039;
}

.findings-list strong {
  color: var(--ink);
}

.copy-status {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
}

.review-cta {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #b6d9d4;
  border-radius: 8px;
  background: #eef8f6;
}

.review-cta p {
  margin: 9px 0 14px;
  color: #245c58;
  font-size: 14px;
}

.info-band,
.bottom-band {
  margin: 0 clamp(18px, 4vw, 54px) 24px;
  padding: clamp(22px, 4vw, 38px);
  border-top: 1px solid var(--subtle);
}

.info-band {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(320px, 1.4fr);
  gap: 24px;
}

.info-copy h2 {
  max-width: 520px;
}

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

.check-grid article {
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--subtle);
  border-radius: 8px;
  background: #fff;
}

.check-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.bottom-band {
  border-bottom: 1px solid var(--subtle);
}

.bottom-band h2 {
  max-width: 640px;
}

.footer {
  padding: 18px clamp(18px, 4vw, 54px) 34px;
  color: var(--muted);
  font-size: 13px;
}

.footer p {
  margin: 0;
}

@media (max-width: 1120px) {
  .scanner-shell {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  }

  .intro {
    grid-column: 1 / -1;
    padding-top: 0;
  }
}

@media (max-width: 860px) {
  .scanner-shell,
  .info-band {
    grid-template-columns: 1fr;
  }

  .result-panel {
    position: static;
    min-height: auto;
  }

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

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    width: 100%;
    justify-content: space-between;
  }

  .scanner-shell {
    padding: 18px;
  }

  .scanner-panel,
  .result-panel {
    border-radius: 8px;
  }

  .field-grid,
  .check-grid,
  .cost-snapshot {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .score-block,
  .section-title-row,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row button,
  .panel-header button,
  .section-title-row button {
    width: 100%;
  }
}
