:root {
  color: #17201b;
  background: #f2f4ef;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: #08724d;
  font-weight: 800;
}

.site-header {
  align-items: center;
  background: #fbfcf8;
  border-bottom: 1px solid #d8ded4;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 14px max(20px, calc((100vw - 1120px) / 2));
}

.site-header img {
  display: block;
  height: 42px;
  max-width: min(100%, 330px);
  object-fit: contain;
  object-position: left center;
}

.site-header nav,
.page-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-header nav a,
.page-footer nav a {
  color: #35423a;
  font-size: 13px;
  text-decoration: none;
}

.content-shell {
  margin: 0 auto;
  max-width: 920px;
  padding: 44px 24px 64px;
}

.content-kicker {
  color: #a76500;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}

h1 {
  color: #17201b;
  font-size: 38px;
  line-height: 1.2;
  margin: 0 0 16px;
}

h2 {
  color: #0f2b1f;
  font-size: 24px;
  line-height: 1.35;
  margin: 0 0 12px;
}

h3 {
  color: #0f2b1f;
  font-size: 18px;
  line-height: 1.4;
  margin: 0 0 8px;
}

p,
li,
dd,
dt {
  color: #35423a;
  font-size: 15px;
  line-height: 1.85;
}

.page-lead {
  color: #35423a;
  font-size: 17px;
  line-height: 1.8;
  margin: 0;
  max-width: 760px;
}

.content-nav {
  background: #edf3ee;
  border: 1px solid #d8ded4;
  border-radius: 8px;
  margin: 28px 0 34px;
  padding: 16px 18px;
}

.content-nav b {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

.content-nav ol,
.content-nav ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
}

.content-nav li {
  font-size: 14px;
  line-height: 1.55;
}

.content-section {
  border-top: 1px solid #d8ded4;
  margin-top: 34px;
  padding-top: 28px;
}

.content-section:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.step-list {
  counter-reset: steps;
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.step-list li {
  background: #ffffff;
  border: 1px solid #d8ded4;
  border-radius: 8px;
  counter-increment: steps;
  min-width: 0;
  padding: 18px 18px 18px 68px;
  position: relative;
}

.step-list li::before {
  align-items: center;
  background: #0f2b1f;
  border-radius: 8px;
  color: #ffffff;
  content: counter(steps);
  display: flex;
  font-size: 16px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  left: 18px;
  position: absolute;
  top: 19px;
  width: 34px;
}

.step-list p {
  margin: 0;
}

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

.term-grid article,
.two-column > div {
  background: #ffffff;
  border: 1px solid #d8ded4;
  border-radius: 8px;
  min-width: 0;
  padding: 18px;
}

.term-grid p,
.two-column p {
  margin: 0;
}

.formula {
  background: #0f2b1f;
  border-radius: 8px;
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  line-height: 1.7;
  margin: 16px 0;
  overflow-x: auto;
  padding: 16px;
  white-space: pre-wrap;
}

.formula strong {
  color: #ffffff;
}

.note {
  background: #fff0cf;
  border-left: 4px solid #a76500;
  margin-top: 18px;
  padding: 14px 16px;
}

.note p {
  margin: 0;
}

.data-table {
  border-collapse: collapse;
  margin-top: 16px;
  width: 100%;
}

.data-table th,
.data-table td {
  border: 1px solid #d8ded4;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #edf3ee;
  color: #17201b;
  font-size: 13px;
}

.data-table td {
  color: #35423a;
  font-size: 14px;
  line-height: 1.6;
}

.action-link {
  align-items: center;
  background: #0f2b1f;
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  margin-top: 20px;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
}

.page-footer {
  background: #e9eee8;
  border-top: 1px solid #d8ded4;
  padding: 24px max(20px, calc((100vw - 1120px) / 2));
}

.page-footer p {
  font-size: 13px;
  margin: 0 0 10px;
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }

  .site-header img {
    height: 36px;
  }

  .content-shell {
    padding: 30px 16px 48px;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 22px;
  }

  .page-lead {
    font-size: 16px;
  }

  .term-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }

  .page-footer {
    padding: 20px 16px;
  }
}
