:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-soft: #fbfaf7;
  --text: #171717;
  --muted: #5f645f;
  --border: #ded9ce;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --good: #11643f;
  --warning: #8a5a00;
  --problem: #a52424;
  --focus: #0f766e;
  --shadow: 0 16px 40px rgba(23, 23, 23, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.site-header {
  background: rgba(247, 245, 240, 0.95);
  border-bottom: 1px solid var(--border);
}

.header-inner,
.footer-inner,
.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.nav a,
.footer-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.nav a[aria-current="page"],
.nav a:hover,
.footer-links a:hover {
  color: var(--text);
}

.hero {
  padding: 72px 0 42px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: 36px;
  align-items: center;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 4.7rem);
  max-width: 820px;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.13rem;
}

.hero-copy {
  color: var(--muted);
  font-size: 1.14rem;
  max-width: 720px;
  margin: 20px 0 0;
}

.scanner-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.url-form {
  display: grid;
  gap: 14px;
}

label {
  display: block;
  color: var(--text);
  font-weight: 800;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  background: #fff;
  border: 1px solid #cfc8ba;
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  min-height: 48px;
  padding: 12px 14px;
}

textarea {
  min-height: 180px;
  resize: vertical;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
}

button,
.button-link {
  align-items: center;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  text-decoration: none;
  white-space: nowrap;
}

button:hover,
.button-link:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

button.secondary {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

button.secondary:hover {
  background: var(--surface-soft);
  border-color: #c6bfb1;
  color: var(--text);
}

.trust {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 6px 0 0;
}

.inline-alert {
  border-radius: 6px;
  display: none;
  font-weight: 700;
  margin: 14px 0 0;
  padding: 12px 14px;
}

.inline-alert.is-visible {
  display: block;
}

.inline-alert.error {
  background: #fff1f1;
  border: 1px solid #efb4b4;
  color: #7c1f1f;
}

.inline-alert.info {
  background: #edf7f5;
  border: 1px solid #b8dfda;
  color: #104f4a;
}

.section {
  padding: 48px 0;
}

.section.tight {
  padding-top: 26px;
}

.section-header {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-header p,
.content p,
.card p {
  color: var(--muted);
}

.results {
  display: none;
}

.results.is-visible {
  display: block;
}

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

.next-step-panel {
  background: #edf7f5;
  border: 1px solid #b8dfda;
  border-radius: 8px;
  color: #104f4a;
  margin-bottom: 16px;
  padding: 18px;
}

.next-step-panel h3 {
  color: #104f4a;
  margin-bottom: 8px;
}

.next-step-panel p {
  margin: 0 0 10px;
}

.next-step-panel ol {
  margin: 0 0 12px 1.25rem;
  padding: 0;
}

.next-step-panel li {
  margin: 5px 0;
}

.next-step-panel a {
  color: #073d39;
  font-weight: 800;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
}

.metric-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-value {
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 1.2;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1;
  padding: 8px 10px;
}

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

.badge.warning {
  background: #fff4d8;
  color: var(--warning);
}

.badge.problem {
  background: #fde7e7;
  color: var(--problem);
}

.details-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-top: 16px;
}

.details-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

.detail-row {
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 8px;
  grid-template-columns: 170px 1fr;
  padding: 9px 0;
}

.detail-row:last-child {
  border-bottom: 0;
}

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

.detail-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.code-block {
  background: #171717;
  border-radius: 8px;
  color: #f8f8f2;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
  max-height: 340px;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
}

.snippet-textarea {
  background: #171717;
  border-color: #171717;
  color: #f8f8f2;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
  min-height: 340px;
  white-space: pre;
}

.manual-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
}

.manual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.mt-16 {
  margin-top: 16px;
}

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

.content {
  max-width: 840px;
}

.content-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 18px 0;
  padding: 22px;
}

.content-section ul {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-text {
  color: var(--muted);
  margin: 0;
  max-width: 470px;
}

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

@media (max-width: 880px) {
  .header-inner,
  .footer-inner,
  .hero-grid,
  .details-layout,
  .split {
    grid-template-columns: 1fr;
  }

  .header-inner,
  .footer-inner {
    display: grid;
    justify-items: start;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 44px;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .wrap {
    width: min(100% - 24px, 1120px);
  }

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

  button,
  .button-link {
    width: 100%;
  }

  .scanner-panel,
  .manual-box,
  .content-section,
  .card {
    padding: 16px;
  }
}
