/* ------------------------------------------------------------------ *
 * Theme 01 — editorial / flat / light
 * ------------------------------------------------------------------ */

:root {
  --bg:           #fbfaf7;
  --surface:      #ffffff;
  --ink:          #161717;
  --ink-soft:     #3f4244;
  --ink-muted:    #76797b;
  --rule:         #e7e2d6;
  --rule-soft:    #efece4;
  --accent:       #0e5c3a;
  --accent-hover: #0a4429;
  --select-bg:    #d6e6dc;

  --max-w:        720px;
  --wide-w:       1100px;

  --font-display: "Fraunces", "Source Serif 4", Georgia, serif;
  --font-body:    "Public Sans", -apple-system, BlinkMacSystemFont,
                  "Segoe UI", sans-serif;
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--select-bg); color: var(--ink); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness .12s ease, color .12s ease;
}
a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  text-decoration: none;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
}

/* ---------- header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* Mobile nav toggle: visually-hidden checkbox + hamburger label.
   Desktop: button is hidden, nav is always visible.
   Mobile: button shows, nav hides until checkbox is checked. */
.nav-toggle {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  margin: -1px;
}
.nav-toggle-btn {
  display: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: transparent;
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  transition: border-color .15s ease;
}
.nav-toggle-btn:hover { border-color: var(--ink); }
.nav-toggle-btn span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .15s ease;
  transform-origin: center;
}
.nav-toggle:focus-visible ~ .nav-toggle-btn {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.site-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}
.site-logo:hover { color: var(--ink); text-decoration: none; }
.site-logo__dot { color: var(--accent); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
}
.site-nav a {
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.site-nav a:hover {
  border-bottom-color: var(--accent);
  color: var(--ink);
}
.site-nav a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- article ---------- */
.article {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.article__meta span + span::before {
  content: "·";
  margin-right: 16px;
  color: var(--ink-muted);
}

.article h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--ink);
}
.article .lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 28px;
}

.article h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
  color: var(--ink);
}
.article h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  margin: 32px 0 10px;
  color: var(--ink);
}

.article p { margin: 0 0 18px; }
.article ul, .article ol {
  margin: 0 0 20px;
  padding-left: 22px;
}
.article li { margin-bottom: 6px; }
.article li::marker { color: var(--ink-muted); }

.article hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 40px 0;
}

.article figure {
  margin: 36px 0;
}
.article figure img {
  width: 100%;
  border: 1px solid var(--rule-soft);
}
.article figcaption {
  margin-top: 10px;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-muted);
  text-align: center;
}

.article strong { font-weight: 600; color: var(--ink); }

/* ---------- tables ---------- */
.article table {
  width: 100%;
  margin: 36px 0;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}
.article thead th {
  background: #f3efe6;
  padding: 16px 20px;
  text-align: left;
  vertical-align: middle;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.article tbody td {
  padding: 18px 20px;
  text-align: left;
  vertical-align: top;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule-soft);
}
.article tbody tr:last-child td {
  border-bottom: none;
}
.article tbody td:first-child {
  font-weight: 600;
  color: var(--ink);
}
@media (max-width: 720px) {
  .article table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
  }
  .article thead th { padding: 12px 14px; font-size: 13px; }
  .article tbody td { padding: 14px; }
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  margin-top: 40px;
}
.site-footer__inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 36px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.footer-nav a {
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
}
.footer-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer__disclaimer {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 760px;
  margin: 0;
}
.site-footer__copy {
  font-size: 13px;
  color: var(--ink-muted);
  border-top: 1px solid var(--rule);
  padding-top: 14px;
  margin: 0;
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-header__inner {
    padding: 14px 20px;
    gap: 12px;
  }
  .nav-toggle-btn {
    display: inline-flex;
  }
  .site-nav {
    display: none;
    flex-basis: 100%;
    order: 3;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
  }
  .nav-toggle:checked ~ .site-nav {
    display: block;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .site-nav li {
    border-bottom: 1px solid var(--rule-soft);
  }
  .site-nav li:last-child { border-bottom: none; }
  .site-nav a {
    display: block;
    padding: 12px 4px;
    border-bottom: none;
    font-size: 16px;
  }
  .site-nav a:hover { border-bottom: none; }
  .site-nav a.is-active { border-bottom: none; }
  /* Hamburger → X transform when checked */
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .article {
    padding: 36px 20px 60px;
  }
  .article h1 { font-size: 32px; }
  .article .lead { font-size: 17px; }
  .article h2 { font-size: 24px; }
  .article h3 { font-size: 18px; }
}
