:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #4b5563;
  --line: #d1d5db;
  --soft: #e5e7eb;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --green: #16a34a;
  --yellow: #ca8a04;
  --red: #dc2626;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner,
.intro,
.checker,
.rubric,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 700;
}

.intro {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 42px;
  align-items: center;
  padding: 58px 0 74px;
}

.intro h1,
.section-heading h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.02;
}

.intro h1 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 86px);
}

.intro__lede {
  max-width: 680px;
  margin: 22px 0 0;
  font-size: 20px;
  line-height: 1.6;
  color: var(--muted);
}

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

.intro__actions,
.control-row,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.intro__actions {
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  text-decoration: none;
  border-color: var(--accent);
}

.button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.button--primary:hover {
  background: var(--accent-strong);
}

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

.intro__panel {
  padding: 26px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.score-preview {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.score-preview__number {
  font-size: 86px;
  line-height: 1;
  font-weight: 900;
}

.score-preview__label {
  color: var(--green);
  font-weight: 900;
  text-transform: uppercase;
}

.preview-bars {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}

.preview-bars span {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--value), var(--soft) var(--value));
}

.checker {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  gap: 24px;
  padding: 28px 0 82px;
}

.checker__input,
.checker__results,
.result-card,
.rubric-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.checker__input,
.checker__results {
  padding: 22px;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

label {
  display: block;
  margin: 22px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

textarea {
  width: 100%;
  min-height: 520px;
  resize: vertical;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f9fafb;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

.control-row {
  margin-top: 14px;
}

.privacy-note,
.source-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.checker__results {
  display: grid;
  gap: 16px;
}

.result-card {
  padding: 18px;
}

.result-card--score {
  display: grid;
  gap: 14px;
}

.result-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.score-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

#score-value {
  font-size: 58px;
  line-height: 1;
}

#score-status {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

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

.mini-card {
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.mini-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
}

.mini-card span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mini-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.status-good {
  background: var(--green);
}

.status-warn {
  background: var(--yellow);
}

.status-miss {
  background: var(--red);
}

.result-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.result-card__header h3 {
  margin: 0;
  font-size: 20px;
}

.fix-list {
  margin: 16px 0;
  padding-left: 24px;
  color: var(--ink);
}

.fix-list li {
  margin: 8px 0;
  line-height: 1.5;
}

pre {
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  color: #f9fafb;
  white-space: pre-wrap;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.rubric {
  padding: 0 0 84px;
}

.guide {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 84px;
}

.guide h1,
.guide h2 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: 0;
}

.guide h1 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 74px);
}

.guide h2 {
  margin-top: 46px;
  font-size: clamp(28px, 4vw, 40px);
}

.guide p,
.checklist-table span {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.guide__lede {
  max-width: 760px;
  margin: 22px 0 0;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.checklist-table {
  display: grid;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.checklist-table div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

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

.checklist-table strong {
  color: var(--ink);
}

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

.rubric-grid article {
  padding: 18px;
}

.rubric-grid h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.rubric-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 880px) {
  .top-nav {
    display: none;
  }

  .intro,
  .checker {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: auto;
    padding-top: 44px;
  }

  textarea {
    min-height: 420px;
  }

  .rubric-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header__inner,
  .intro,
  .checker,
  .rubric,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  .checker__input,
  .checker__results {
    padding: 16px;
  }

  .guide {
    width: min(100% - 22px, 920px);
    padding-top: 44px;
  }

  .checklist-table div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .result-card__header,
  .score-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
