:root {
  --bg: #f6f1e8;
  --ink: #14213d;
  --ink-soft: #4c5b7a;
  --card: rgba(255, 252, 245, 0.86);
  --line: rgba(20, 33, 61, 0.12);
  --accent: #0f766e;
  --accent-strong: #0a4f59;
  --accent-soft: #d7f3ef;
  --warm: #f4a261;
  --error: #b42318;
  --shadow: 0 20px 50px rgba(20, 33, 61, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(244, 162, 97, 0.35), transparent 24%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.18), transparent 22%),
    linear-gradient(180deg, #fcfaf6 0%, var(--bg) 100%);
}

a {
  color: inherit;
}

.site-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.hero,
.page-top,
.card {
  backdrop-filter: blur(8px);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero,
.page-top {
  padding: 40px;
  border-radius: 28px;
}

.hero h1,
.page-top h1 {
  margin: 0 0 12px;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 700px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-strong);
}

.hero-actions,
.stack {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-weight: 700;
}

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

.button-secondary {
  background: transparent;
}

.section {
  margin-top: 28px;
}

.section-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  border-radius: 24px;
  padding: 24px;
}

.feature-card h3 {
  margin: 8px 0 10px;
  font-size: 1.5rem;
}

.card-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-strong);
}

.card-list {
  padding-left: 18px;
  color: var(--ink-soft);
}

.text-link,
.back-link {
  font-weight: 700;
  text-decoration: none;
  color: var(--accent-strong);
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 28px;
}

.field {
  display: grid;
  gap: 8px;
  width: 100%;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.form-card .button {
  width: 100%;
}

.hint,
.status,
.copy-block p,
.station-row p {
  color: var(--ink-soft);
}

.status {
  min-height: 24px;
}

.status.error {
  color: var(--error);
}

.hidden {
  display: none;
}

.result-top,
.metrics-grid,
.station-row {
  display: flex;
  gap: 16px;
}

.result-top {
  align-items: center;
  justify-content: space-between;
}

.badge {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.badge[data-severity="high"] {
  background: #fee4e2;
  color: #b42318;
}

.badge[data-severity="moderate"] {
  background: #fef0c7;
  color: #b54708;
}

.badge[data-severity="low"] {
  background: #dcfae6;
  color: #067647;
}

.metrics-grid {
  flex-wrap: wrap;
  margin: 24px 0;
}

.metric {
  min-width: 180px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
}

.metric-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

.copy-block + .copy-block {
  margin-top: 24px;
}

.station-list {
  display: grid;
  gap: 12px;
}

.station-row {
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
}

.station-row strong,
.metric strong {
  display: block;
  margin-top: 4px;
}

.station-reading {
  font-weight: 700;
}

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

  .hero,
  .page-top,
  .card {
    padding: 24px;
  }
}

.markdown-page {
  padding: 32px;
}

.markdown-page h2,
.markdown-page h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.markdown-page h2:first-child,
.markdown-page h3:first-child {
  margin-top: 0;
}

.markdown-page p,
.markdown-page li {
  color: var(--ink-soft);
  line-height: 1.75;
}

.markdown-page ol,
.markdown-page ul {
  padding-left: 22px;
}

.markdown-page code {
  padding: 0.1rem 0.35rem;
  border-radius: 8px;
  background: rgba(20, 33, 61, 0.08);
  font-family: "Courier New", monospace;
  font-size: 0.95em;
}

.markdown-page pre {
  overflow-x: auto;
  padding: 16px 18px;
  border-radius: 18px;
  background: #15223c;
  color: #f6f7fb;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.markdown-page pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}
