:root {
  --ink: #112620;
  --ink-soft: #40534d;
  --paper: #f7f5ee;
  --paper-deep: #ece9df;
  --white: #fffefa;
  --forest: #0b4a3a;
  --forest-deep: #07362d;
  --blue: #183e5a;
  --aqua: #8ad7c1;
  --lime: #d7ed65;
  --line: #cfd8d0;
  --warning: #8a5d17;
  --danger: #983c3c;
  --radius: 1.2rem;
  --shadow: 0 18px 50px rgba(7, 54, 45, .11);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { text-decoration-color: var(--lime); }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: .2rem solid #e0ba20; outline-offset: .18rem; }

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  top: 1rem;
  transform: translateY(-180%);
  padding: .7rem 1rem;
  border-radius: .6rem;
  background: var(--lime);
  color: var(--forest-deep);
  font-weight: 800;
}
.skip-link:focus { transform: none; }
.wrap { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 2rem), 800px); margin-inline: auto; }
.section { padding: clamp(4rem, 8vw, 7.5rem) 0; }
.section.compact { padding: clamp(2.8rem, 5vw, 4.8rem) 0; }
.section.tint { background: var(--paper-deep); }
.section.dark { background: var(--forest-deep); color: var(--white); }
.section-rule { border-top: 1px solid var(--line); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 1rem;
  color: var(--forest);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .12em;
  line-height: 1.3;
  text-transform: uppercase;
}
.eyebrow::before { width: 1.5rem; height: .18rem; background: var(--lime); content: ""; }
.dark .eyebrow { color: var(--aqua); }
h1, h2, h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.06;
}
h1 { font-size: clamp(2.65rem, 7vw, 6.4rem); }
h2 { font-size: clamp(2.1rem, 4.7vw, 4.25rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 2rem); }
p { margin: 0 0 1.15rem; }
.lead { max-width: 780px; color: var(--ink-soft); font-size: clamp(1.12rem, 2vw, 1.42rem); line-height: 1.55; }
.dark .lead { color: #d8e7e1; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr); gap: 3rem; align-items: end; margin-bottom: 2.7rem; }
.section-head > p { color: var(--ink-soft); margin: 0; }
.dark .section-head > p { color: #cee1d9; }
.kicker { margin: .9rem 0 0; color: var(--ink-soft); font-size: 1.08rem; }
.meta { color: var(--ink-soft); font-size: .88rem; }
.dark .meta { color: #c6dad3; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: .15rem .68rem;
  border: 1px solid #b9c9c1;
  border-radius: 999px;
  color: var(--forest);
  font-size: .73rem;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.status-tag { background: #fff8df; border-color: #e0ce80; color: #6b4b13; }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(207, 216, 208, .8);
  background: rgba(247, 245, 238, .94);
  backdrop-filter: blur(16px);
}
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .72rem; text-decoration: none; font-weight: 850; letter-spacing: -.025em; }
.brand-mark {
  position: relative;
  width: 2rem;
  height: 2rem;
  overflow: hidden;
  border-radius: 50% 50% 50% 10%;
  background: var(--forest);
  transform: rotate(-8deg);
}
.brand-mark::before { position: absolute; inset: 43% -10% auto 27%; height: 2px; background: var(--lime); content: ""; transform: rotate(-35deg); }
.brand-mark::after { position: absolute; width: 7px; height: 13px; right: 6px; top: 4px; border: 2px solid var(--aqua); border-width: 0 2px 2px 0; content: ""; transform: rotate(20deg); }
.nav { display: flex; align-items: center; gap: .1rem; }
.nav a, .nav button {
  border: 0;
  background: none;
  color: var(--ink);
  padding: .6rem .55rem;
  font-size: .86rem;
  font-weight: 680;
  text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--forest); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: .2rem; }
.search-trigger { display: inline-flex; align-items: center; gap: .4rem; }
.search-trigger svg { width: 1.05rem; height: 1.05rem; }
.menu-toggle { display: none; border: 1px solid var(--line); border-radius: .55rem; background: var(--white); padding: .55rem .7rem; color: var(--ink); font-weight: 750; }

.hero { position: relative; overflow: hidden; padding: clamp(4.5rem, 9vw, 9rem) 0 5rem; }
.hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(138,215,193,.27), transparent 25rem),
    linear-gradient(120deg, transparent 58%, rgba(215,237,101,.16));
  content: "";
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); gap: clamp(2rem, 7vw, 6.5rem); align-items: center; }
.hero h1 { max-width: 930px; }
.hero .lead { margin-top: 1.6rem; max-width: 730px; }
.hero-note { max-width: 670px; margin-top: 1rem; color: var(--ink-soft); }
.button-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 3rem;
  padding: .72rem 1.1rem;
  border: 1px solid var(--forest);
  border-radius: .65rem;
  background: var(--forest);
  color: var(--white);
  font-weight: 780;
  line-height: 1.2;
  text-decoration: none;
}
.button:hover { background: var(--forest-deep); text-decoration: none; transform: translateY(-1px); }
.button.secondary { background: transparent; color: var(--forest); }
.button.secondary:hover { background: var(--white); }
.button.light { border-color: var(--lime); background: var(--lime); color: var(--forest-deep); }
.button.small { min-height: 2.5rem; padding: .55rem .85rem; font-size: .88rem; }
.hero-visual { min-height: 380px; position: relative; }
.orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(11,74,58,.28);
  border-radius: 50%;
  animation: breathe 8s ease-in-out infinite;
}
.orbit::before { position: absolute; width: 42%; height: 42%; inset: 29%; border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 1.6rem rgba(138,215,193,.35); content: ""; }
.orbit::after { position: absolute; width: 22%; height: 22%; right: 5%; top: 8%; border-radius: 50% 50% 50% 8%; background: var(--lime); content: ""; transform: rotate(22deg); }
.orbit-line { position: absolute; left: 3%; top: 49%; width: 94%; height: 1px; background: rgba(11,74,58,.35); transform: rotate(-29deg); }
.orbit-label { position: absolute; z-index: 2; max-width: 12rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: .65rem; background: rgba(255,254,250,.9); box-shadow: var(--shadow); font-size: .76rem; font-weight: 780; line-height: 1.25; }
.orbit-label.one { left: -3%; top: 16%; }
.orbit-label.two { right: -2%; bottom: 17%; }
@keyframes breathe { 50% { transform: scale(.985) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .orbit { animation: none; } * { transition-duration: 0.01ms !important; } }

.notice {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.2rem;
  border: 1px solid #d6c98e;
  border-left: .35rem solid #c39222;
  border-radius: .9rem;
  background: #fff9e9;
}
.notice-icon { display: grid; width: 2.3rem; height: 2.3rem; place-items: center; border-radius: 50%; background: #f1df9f; color: #5b4211; font-weight: 900; }
.notice strong { display: block; }
.notice p { margin: .1rem 0 0; color: #68562f; font-size: .92rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 1.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 28px rgba(7,54,45,.045);
}
.card:hover { border-color: #9bb3a6; box-shadow: var(--shadow); }
.card .number { margin-bottom: 3rem; color: var(--forest); font-family: Georgia, "Times New Roman", serif; font-size: 2.2rem; }
.card h3 { margin-bottom: .8rem; }
.card p { color: var(--ink-soft); }
.card .card-link { margin-top: auto; color: var(--forest); font-weight: 780; text-decoration-color: var(--lime); }
.theme-card { min-height: 320px; overflow: hidden; }
.theme-card::after { position: absolute; right: -2.2rem; top: -2.2rem; width: 7rem; height: 7rem; border: 1rem solid rgba(138,215,193,.18); border-radius: 50%; content: ""; }
.theme-card .theme-icon { width: 2.2rem; height: 2.2rem; margin-bottom: 2.4rem; color: var(--forest); }
.route-card { min-height: 360px; }
.route-card:nth-child(2) { background: #edf3ee; }
.route-card:nth-child(3) { background: #edf2f5; }
.route-steps { margin: .9rem 0 1.2rem; padding: 0; list-style: none; counter-reset: steps; }
.route-steps li { position: relative; padding: .55rem 0 .55rem 2.1rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .91rem; counter-increment: steps; }
.route-steps li::before { position: absolute; left: 0; color: var(--forest); font-weight: 850; content: counter(steps, decimal-leading-zero); }

.article-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.article-teaser { display: grid; grid-template-columns: 8.2rem 1fr auto; gap: 1.5rem; align-items: center; padding: 1.35rem; background: var(--white); text-decoration: none; }
.article-teaser:hover { background: #f1f4ed; text-decoration: none; }
.article-teaser .index { color: var(--forest); font-family: Georgia, "Times New Roman", serif; font-size: 2.7rem; }
.article-teaser h3 { margin-bottom: .35rem; }
.article-teaser p { margin: 0; color: var(--ink-soft); }
.arrow { display: grid; width: 2.7rem; height: 2.7rem; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 1.25rem; }

.page-hero { padding: clamp(3.8rem, 8vw, 7.2rem) 0 3.6rem; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 1000px; font-size: clamp(2.7rem, 6vw, 5.6rem); }
.page-hero .lead { margin-top: 1.35rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.5rem; color: var(--ink-soft); font-size: .82rem; }
.breadcrumbs span { color: #78877f; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 4rem; align-items: start; }
.prose { max-width: 760px; }
.prose > p { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.08rem, 1.8vw, 1.25rem); line-height: 1.8; }
.prose h2 { margin: 3.4rem 0 1.2rem; font-size: clamp(1.8rem, 3vw, 2.65rem); }
.prose h3 { margin: 2.5rem 0 .8rem; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: .5rem; }
.prose .callout { margin: 2.2rem 0; padding: 1.25rem 1.35rem; border-left: .35rem solid var(--lime); background: #eef3e7; font-family: inherit; font-size: 1rem; }
.toc { position: sticky; top: 105px; padding: 1.2rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--white); }
.toc strong { display: block; margin-bottom: .7rem; }
.toc a { display: block; padding: .35rem 0; color: var(--ink-soft); font-size: .86rem; }
.source-note { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .9rem; }

.reference-list { margin: 0; padding: 0; list-style: none; }
.reference-item { display: grid; grid-template-columns: 3.4rem 1fr auto; gap: 1rem; align-items: start; padding: 1.15rem 0; border-top: 1px solid var(--line); }
.reference-item:first-child { border-top: 0; }
.reference-number { display: grid; width: 2.7rem; height: 2.7rem; place-items: center; border-radius: 50%; background: #dfe9e2; color: var(--forest); font-weight: 850; }
.reference-item p { margin: 0; }
.external { white-space: nowrap; color: var(--forest); font-weight: 750; font-size: .88rem; }

.tool-shell { border: 1px solid var(--line); border-radius: 1.4rem; background: var(--white); box-shadow: var(--shadow); overflow: hidden; }
.tool-head { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 1.5rem; border-bottom: 1px solid var(--line); background: #e8f0e9; }
.tool-head p { margin: .2rem 0 0; color: var(--ink-soft); }
.progress { min-width: 140px; text-align: right; }
.progress-track { width: 140px; height: .45rem; margin-top: .45rem; border-radius: 1rem; background: #cdd9d0; overflow: hidden; }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: var(--forest); transition: width .25s ease; }
.diagnostic-form { padding: 1.4rem; }
.diagnostic-row { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) minmax(220px, .55fr); gap: 1rem; align-items: center; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.diagnostic-row:last-child { border-bottom: 0; }
.diagnostic-index { align-self: start; color: var(--forest); font-weight: 850; }
.diagnostic-row p { margin: 0; }
.diagnostic-row select, .diagnostic-row input { width: 100%; min-height: 2.75rem; border: 1px solid #aab9b1; border-radius: .55rem; background: #fff; padding: .55rem .7rem; color: var(--ink); }
.na-reason { display: none; grid-column: 2 / -1; margin-left: 0; }
.na-reason.visible { display: block; }
.tool-actions { display: flex; flex-wrap: wrap; gap: .7rem; padding: 1.25rem 1.4rem 1.5rem; border-top: 1px solid var(--line); background: #f6f8f3; }
.privacy-note { display: flex; align-items: start; gap: .7rem; padding: 1rem 1.4rem; background: var(--forest-deep); color: #d9e9e2; font-size: .86rem; }
.privacy-note svg { flex: 0 0 auto; width: 1.1rem; margin-top: .2rem; }
.plan-preview { display: none; padding: 1.5rem; border-top: 1px solid var(--line); }
.plan-preview.visible { display: block; }
.plan-item { padding: 1rem 0; border-top: 1px solid var(--line); }
.plan-item:first-child { border-top: 0; }
.plan-item h4 { margin: 0 0 .4rem; font-size: 1rem; }
.plan-item dl { display: grid; grid-template-columns: 125px 1fr; gap: .25rem .8rem; margin: .5rem 0 0; font-size: .88rem; }
.plan-item dt { color: var(--ink-soft); font-weight: 730; }
.plan-item dd { margin: 0; }

.program-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.program { padding: 1.25rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--white); }
.program h3 { font-size: 1.45rem; }
.program dl { display: grid; gap: .55rem; margin-bottom: 0; }
.program dt { color: var(--ink-soft); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.program dd { margin: -.35rem 0 0; }
.week-table { width: 100%; border-collapse: collapse; background: var(--white); }
.week-table th, .week-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.week-table th { background: var(--forest-deep); color: var(--white); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.week-table td:first-child { width: 5rem; color: var(--forest); font-weight: 850; }

.site-footer { background: #082f28; color: #e7f1ec; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 2fr; gap: 4rem; padding: 4rem 0; }
.footer-brand { font-family: Georgia, "Times New Roman", serif; font-size: 1.85rem; }
.footer-grid p { max-width: 370px; color: #bdd0c8; font-size: .9rem; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-links strong { display: block; margin-bottom: .8rem; color: var(--aqua); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.footer-links a { display: block; padding: .25rem 0; color: #e7f1ec; font-size: .9rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem 0; border-top: 1px solid rgba(255,255,255,.15); color: #a8c1b6; font-size: .78rem; }

.search-dialog { width: min(720px, calc(100% - 2rem)); max-height: min(700px, calc(100vh - 2rem)); padding: 0; border: 0; border-radius: 1.1rem; background: var(--white); box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.search-dialog::backdrop { background: rgba(5,30,25,.72); backdrop-filter: blur(4px); }
.search-head { display: grid; grid-template-columns: 1fr auto; gap: .7rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.search-input { width: 100%; min-height: 3.25rem; border: 1px solid #9eafa6; border-radius: .65rem; padding: .7rem 1rem; background: #fff; font-size: 1.05rem; }
.dialog-close { width: 3.25rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--paper); color: var(--ink); font-size: 1.25rem; }
.search-results { max-height: 520px; overflow-y: auto; padding: .5rem 1rem 1rem; }
.search-empty { padding: 2.2rem 1rem; color: var(--ink-soft); text-align: center; }
.search-result { display: block; padding: 1rem .5rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.search-result:hover { background: #f1f5ef; text-decoration: none; }
.search-result strong { display: block; margin: .2rem 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; }
.search-result span { color: var(--ink-soft); font-size: .84rem; }

@media (max-width: 980px) {
  .nav { position: fixed; inset: 78px 0 auto; display: none; align-items: stretch; flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a, .nav button { padding: .8rem; text-align: left; }
  .menu-toggle { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 300px; width: min(75vw, 420px); margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .content-layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 720px) {
  .wrap, .narrow { width: min(calc(100% - 1.25rem), var(--max)); }
  .brand span:last-child { font-size: .93rem; }
  .hero { padding-top: 3.4rem; }
  .hero h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
  .hero-visual { min-height: 255px; }
  .section-head { grid-template-columns: 1fr; gap: 1rem; }
  .grid-3, .grid-4, .program-grid { grid-template-columns: 1fr; }
  .notice { grid-template-columns: auto 1fr; }
  .notice .button { grid-column: 1 / -1; }
  .article-teaser { grid-template-columns: 3.4rem 1fr; gap: .8rem; }
  .article-teaser .index { font-size: 1.8rem; }
  .article-teaser .arrow { display: none; }
  .reference-item { grid-template-columns: 2.8rem 1fr; }
  .reference-item .external { grid-column: 2; }
  .diagnostic-row { grid-template-columns: 2rem 1fr; }
  .diagnostic-row select { grid-column: 2; }
  .na-reason { grid-column: 2; }
  .tool-head { grid-template-columns: 1fr; }
  .progress { text-align: left; }
  .week-table, .week-table thead, .week-table tbody, .week-table tr, .week-table th, .week-table td { display: block; }
  .week-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .week-table tr { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .week-table td { border: 0; padding: .3rem .8rem; }
  .week-table td::before { display: block; color: var(--ink-soft); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; content: attr(data-label); }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; }
}

@media print {
  .site-header, .site-footer, .toc, .button-row, .search-dialog { display: none !important; }
  body { background: #fff; color: #000; }
  .section, .page-hero { padding: 1.5rem 0; }
  a { text-decoration: none; }
  .prose { max-width: none; }
}
