:root {
  color-scheme: light dark;
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-soft: #efebe1;
  --text: #23251f;
  --muted: #62675d;
  --hairline: #ded8c9;
  --accent: #2f7d5d;
  --accent-strong: #1f6047;
  --warm: #a65f2a;
  --focus: #c8862f;
  --shadow: 0 18px 48px rgb(43 38 28 / 10%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101411;
    --surface: #181e1a;
    --surface-soft: #202820;
    --text: #eef2ec;
    --muted: #aab4aa;
    --hairline: #313b33;
    --accent: #7ac49b;
    --accent-strong: #a6dfbd;
    --warm: #d8a062;
    --focus: #e0b86d;
    --shadow: 0 18px 48px rgb(0 0 0 / 24%);
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 55%, transparent), transparent 320px),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  text-size-adjust: 100%;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--warm);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  transform: translateY(-150%);
  padding: 10px 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0 34px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgb(0 0 0 / 14%);
}

.brand-name {
  display: block;
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.25;
}

.brand-subtitle {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.site-nav a,
.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.button-link:hover {
  color: var(--accent-strong);
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--hairline));
}

.site-nav a[aria-current="page"] {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--hairline));
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: end;
  padding: 38px 0 42px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--warm);
  font-size: 0.82rem;
  font-weight: 750;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.15rem, 7vw, 4.9rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.lead {
  margin: 18px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
}

.hero-mark {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 0.86rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 44px;
  align-items: start;
  padding: 42px 0 0;
}

.document {
  max-width: 780px;
}

.document p {
  margin: 0;
}

.document h2 {
  margin: 2.15em 0 0.55em;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.35;
  letter-spacing: 0;
}

.document h2:first-child {
  margin-top: 0;
}

.document p + p {
  margin-top: 0.85em;
}

.toc {
  position: sticky;
  top: 24px;
  padding: 18px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.toc ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.35em;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.toc a {
  color: inherit;
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 34px 0 0;
}

.link-card {
  display: grid;
  gap: 14px;
  min-height: 220px;
  padding: 24px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.link-card:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--hairline));
  transform: translateY(-2px);
}

.link-card h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.3;
}

.link-card p {
  margin: 0;
  color: var(--muted);
}

.link-card .button-link {
  width: fit-content;
  margin-top: auto;
  color: var(--accent-strong);
  background: transparent;
}

.note {
  margin: 28px 0 0;
  max-width: 760px;
  padding: 16px 18px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 54px;
  padding-top: 20px;
  color: var(--muted);
  border-top: 1px solid var(--hairline);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 760px) {
  .site {
    padding: 18px 16px 40px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 24px;
  }

  .site-nav {
    justify-content: flex-start;
    width: 100%;
  }

  .site-nav a {
    flex: 1 1 auto;
    justify-content: center;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px 0 34px;
  }

  .hero-mark {
    width: 84px;
    height: 84px;
    order: -1;
  }

  .content-grid,
  .home-grid {
    grid-template-columns: 1fr;
  }

  .content-grid {
    gap: 28px;
  }

  .toc {
    position: static;
    order: -1;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #111111;
  }

  .site {
    width: auto;
    padding: 0;
  }

  .site-header,
  .toc,
  .site-footer {
    display: none;
  }

  .hero,
  .content-grid {
    display: block;
    padding: 0;
    border: 0;
  }

  .hero-mark,
  .page-meta {
    display: none;
  }

  a {
    color: inherit;
  }
}
