:root {
  --bg: #f8faf8;
  --surface: #ffffff;
  --surface-soft: #eef5f0;
  --text: #17211c;
  --muted: #64716b;
  --border: #d9e2dc;
  --accent: #12624b;
  --accent-strong: #0b4635;
  --warning: #a93d31;
  --shadow: 0 20px 50px rgba(18, 98, 75, 0.08);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
.button {
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

button.secondary,
.button.secondary {
  background: var(--surface);
  color: var(--accent-strong);
  border-color: var(--border);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(18, 98, 75, 0.28);
  outline-offset: 3px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 250, 248, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1160px, calc(100% - 28px));
  min-height: 56px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.nav a {
  text-decoration: none;
}

.hero,
.page-intro {
  padding: 72px 0 52px;
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 420px;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 840px;
  margin-bottom: 22px;
  font-size: 56px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 28px;
  line-height: 1.24;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.35;
}

.lead {
  max-width: 780px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.action-row,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

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

.metric-panel div,
.plain-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}

.metric-panel div {
  min-height: 124px;
  display: grid;
  align-content: center;
  box-shadow: var(--shadow);
}

.metric-panel strong {
  display: block;
  font-size: 34px;
  line-height: 1.15;
}

.metric-panel span,
.muted-text {
  color: var(--muted);
}

.section {
  padding: 56px 0;
}

.muted {
  background: var(--surface-soft);
}

.navigator-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.calculator-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.scenario-list,
.plan-panel,
.deadline-panel,
.deadline-result {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 22px;
  box-shadow: var(--shadow);
}

.scenario-list {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 10px;
}

.scenario-card {
  width: 100%;
  min-height: auto;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  padding: 14px;
}

.scenario-card span,
.scenario-card small {
  display: block;
}

.scenario-card small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
}

.scenario-card.is-active {
  border-color: var(--accent);
  background: #eef7f2;
}

.directory-grid,
.area-grid,
.two-column,
.stats-grid,
.feedback-grid {
  display: grid;
  gap: 18px;
}

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

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

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

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

.text-link {
  text-decoration-color: rgba(18, 98, 75, 0.3);
  text-underline-offset: 4px;
}

.tag {
  border-radius: 999px;
  background: #e9f3ee;
  color: var(--accent-strong);
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}

.ordered-list,
.check-list,
.link-stack,
.copy-box {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
}

.ordered-list {
  padding-left: 22px;
}

.check-list {
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
}

.notice {
  margin: 20px 0;
  border-left: 4px solid var(--warning);
  background: #fff7f5;
  padding: 14px 16px;
}

.notice p {
  margin-bottom: 0;
}

.link-stack a {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  text-decoration: none;
}

.link-stack a::after {
  content: "↗";
  color: var(--muted);
}

.feedback-form,
.field {
  display: grid;
  gap: 8px;
}

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

.field {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--surface-soft);
  font-size: 14px;
}

.data-table.compact {
  margin-top: 16px;
}

.is-danger {
  color: var(--warning);
}

.is-warning {
  color: #8b5d00;
}

.is-ok {
  color: var(--accent-strong);
}

.prose {
  max-width: 760px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner,
.footer-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner p {
  margin: 0;
}

.footer-links a {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
  }

  .hero,
  .page-intro {
    padding: 48px 0 38px;
  }

  .hero-grid,
  .navigator-grid,
  .calculator-grid,
  .two-column,
  .feedback-grid {
    grid-template-columns: 1fr;
  }

  .scenario-list {
    position: static;
  }

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

  h1 {
    font-size: 42px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .nav {
    width: 100%;
    gap: 14px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 24px;
  }

  .lead {
    font-size: 16px;
  }

  .metric-panel,
  .directory-grid,
  .area-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .button,
  .action-row .button,
  .action-row button {
    width: 100%;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
