:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #5d6878;
  --paper: #fbfcfd;
  --line: #d9e0e8;
  --panel: #ffffff;
  --blue: #2457c5;
  --green: #167a56;
  --amber: #9a5b00;
  --rose: #b4235a;
  --shadow: 0 18px 45px rgba(24, 33, 47, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(251, 252, 253, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

nav a,
.language {
  text-decoration: none;
}

.language {
  font-weight: 700;
  color: var(--blue);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(24px, 6vw, 72px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(48px, 8vw, 96px) clamp(18px, 6vw, 84px);
  background:
    linear-gradient(120deg, rgba(36, 87, 197, 0.12), transparent 42%),
    linear-gradient(45deg, rgba(22, 122, 86, 0.12), transparent 52%),
    var(--paper);
}

.hero h1 {
  max-width: 780px;
  margin: 8px 0 18px;
  font-size: clamp(2.45rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

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

.hero-actions,
.final {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
}

.primary,
.secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

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

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

.status-panel,
.result,
.template,
.ad-slot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-panel {
  padding: 24px;
}

.status-panel strong {
  font-size: 1.15rem;
}

.status-panel li {
  margin: 12px 0;
  color: var(--muted);
}

.section {
  padding: clamp(48px, 8vw, 88px) clamp(18px, 6vw, 84px);
}

.band {
  background: #eef4f2;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 28px;
}

.section h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.notice,
footer {
  color: var(--muted);
}

.diagnostic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1040px;
}

.question {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.question legend {
  padding: 0 6px;
  font-weight: 800;
}

.question label {
  display: flex;
  gap: 10px;
  margin: 12px 0;
  color: var(--muted);
}

.diagnostic .primary {
  width: fit-content;
}

.result {
  max-width: 760px;
  margin-top: 24px;
  padding: 22px;
}

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

.check-item {
  display: flex;
  gap: 12px;
  min-height: 56px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.progress {
  max-width: 720px;
  margin-top: 22px;
  font-weight: 800;
}

.progress div {
  height: 12px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe5ea;
}

.progress span span,
[data-progress-bar] {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
  transition: width 0.2s ease;
}

.template {
  display: grid;
  gap: 16px;
  padding: 18px;
}

pre {
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  background: #f4f7fa;
  color: #273244;
  font: 0.92rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

td span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.ad-slot {
  margin: 0 clamp(18px, 6vw, 84px);
  padding: 18px;
  color: var(--amber);
  background: #fff8ea;
  text-align: center;
  box-shadow: none;
}

.final {
  justify-content: space-between;
  background: #172033;
  color: #fff;
}

.final p {
  color: #d9e0e8;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px clamp(18px, 6vw, 84px);
  border-top: 1px solid var(--line);
  background: #fff;
}

footer p {
  flex: 1 1 100%;
  margin: 0;
}

.consent {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  max-width: 720px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero,
  .diagnostic,
  .checklist,
  .templates {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .consent {
    left: 12px;
    right: 12px;
    grid-template-columns: 1fr;
  }
}
