:root {
  font-family: Inter, system-ui, sans-serif;
  color: #263c34;
  background: #f7f5ee;
  font-synthesis: none;
  --green: #245b4b;
  --paper: #fffdf7;
  --line: #d7ddcf;
  --muted: #526558;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 300px;
}
a {
  color: var(--green);
  text-underline-offset: 0.2em;
}
a:focus-visible {
  outline: 3px solid #a75020;
  outline-offset: 5px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  max-width: 850px;
  margin-bottom: 1.4rem;
}
h2 {
  font-size: clamp(1.65rem, 2.5vw, 2.15rem);
  margin-bottom: 1.1rem;
}
h3 {
  font-size: 1.2rem;
  line-height: 1.4;
}
p,
li {
  line-height: 1.8;
}
p {
  margin-bottom: 1.2rem;
}
main,
.site-header,
.site-footer,
.guide-nav {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 40px;
}
.site-header {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #263c34;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.5rem;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  font-family: Georgia, serif;
  color: var(--green);
  font-size: 2.4rem;
  letter-spacing: -0.25em;
  padding-right: 0.25em;
  line-height: 1;
}
.brand-mark span {
  color: #9b512f;
  transform: translateY(0.15em);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.language-link {
  font-weight: 600;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 14px 23px;
  border-radius: 9px;
  background: var(--green);
  border: 1px solid var(--green);
  color: #fffdf7;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}
.button:hover {
  background: #194536;
}
.button.secondary {
  background: transparent;
  color: var(--green);
}
.button.secondary:hover {
  background: #eceee0;
}
.guide-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  border-block: 1px solid var(--line);
  padding-block: 18px;
  font-size: 0.95rem;
}
.guide-nav a {
  text-decoration: none;
  padding: 4px 0;
  color: var(--muted);
}
.guide-nav [aria-current="page"] {
  font-weight: 700;
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
.hero {
  padding: 64px 0 42px;
  max-width: 900px;
}
.hero.home-hero {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
  gap: 65px;
  align-items: center;
  padding-bottom: 64px;
}
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.13em;
  font-weight: 700;
  color: #765238;
  margin-bottom: 20px;
}
.intro {
  font-size: 1.18rem;
  line-height: 1.8;
  max-width: 720px;
  color: #455c4f;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
  align-items: center;
}
.routine-card {
  background: #eceee0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  transform: rotate(1deg);
}
.routine-card .eyebrow {
  font-size: 0.75rem;
  text-align: center;
}
.bag {
  width: 140px;
  height: 140px;
  display: block;
  margin: 0 auto 16px;
}
.routine-card ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.routine-card li {
  counter-increment: step;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #cdd5c3;
  font-weight: 600;
}
.routine-card li:before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.8rem;
  background: #fffdf7;
  color: var(--green);
}
.card-note {
  text-align: center;
  font-size: 0.9rem;
  margin: 20px 0 0;
  color: var(--muted);
}
.article-body {
  max-width: 800px;
}
.article-section {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.article-section p {
  font-size: 1.04rem;
}
.steps-list {
  padding-left: 1.6em;
}
.steps-list li {
  padding: 5px 0;
}
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: #e3eadc;
  border-radius: 12px;
  padding: 36px;
  margin-top: 35px;
}
.cta p {
  margin-bottom: 0;
}
.cta .button {
  flex-shrink: 0;
}
.related {
  margin-top: 65px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.related-grid > a {
  display: flex;
  flex-direction: column;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  text-decoration: none;
}
.related-grid > a:hover {
  border-color: var(--green);
}
.related-grid p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}
.related-grid span {
  margin-top: auto;
  font-weight: 600;
  text-decoration: underline;
}
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 38px;
  padding-bottom: 35px;
  margin-top: 75px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
}
.site-footer p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 13px 0 0;
}
.site-footer nav {
  display: flex;
  align-items: start;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer nav a {
  font-size: 0.95rem;
}
.prototype-note {
  grid-column: 1/-1;
  font-size: 0.85rem !important;
}
.skip-link {
  position: absolute;
  left: 15px;
  top: -100px;
  padding: 12px 18px;
  background: var(--paper);
  z-index: 5;
}
.skip-link:focus {
  top: 12px;
}
.not-found {
  max-width: 800px;
  padding-block: 80px;
}
h1,
h2,
h3,
a,
p,
li {
  overflow-wrap: break-word;
}
@media (max-width: 850px) {
  main,
  .site-header,
  .site-footer,
  .guide-nav {
    padding-inline: 24px;
  }
  .site-header {
    padding-block: 24px;
    flex-wrap: wrap;
  }
  .hero.home-hero {
    gap: 30px;
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .cta {
    align-items: start;
    flex-direction: column;
  }
  .site-footer {
    grid-template-columns: 1fr;
  }
  .header-actions {
    gap: 18px;
  }
  .hero {
    padding-top: 42px;
  }
}
@media (max-width: 600px) {
  main,
  .site-header,
  .site-footer,
  .guide-nav {
    padding-inline: 20px;
  }
  .site-header {
    gap: 20px;
  }
  .brand {
    font-size: 1.4rem;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .header-actions .button {
    padding: 10px 16px;
  }
  .guide-nav {
    gap: 10px 20px;
    line-height: 1.5;
  }
  .hero.home-hero {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-bottom: 40px;
  }
  .hero {
    padding-bottom: 25px;
  }
  h1 {
    font-size: 2.65rem;
  }
  .routine-card {
    transform: none;
    max-width: 380px;
    width: 100%;
    margin-inline: auto;
  }
  .cta {
    padding: 25px;
  }
  .related {
    margin-top: 45px;
  }
  .site-footer {
    margin-top: 50px;
  }
  .site-footer nav {
    gap: 16px;
  }
  .intro {
    font-size: 1.1rem;
  }
  .actions .button {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}
@media print {
  .site-header,
  .guide-nav,
  .site-footer,
  .cta,
  .related,
  .skip-link {
    display: none;
  }
  body {
    background: white;
    color: black;
  }
  main {
    padding: 0;
  }
  .hero {
    padding: 0;
  }
  .article-section {
    break-inside: avoid;
  }
  .routine-card {
    display: none;
  }
  .hero.home-hero {
    display: block;
  }
  .article-body {
    max-width: none;
  }
}

.guide-search {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: #edf2e7;
  border-radius: 16px;
}
.guide-search label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.guide-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.guide-search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0.9rem;
  border: 1px solid #526558;
  border-radius: 8px;
  font: inherit;
}
.guide-search button {
  padding: 0.9rem 1rem;
  border: 1px solid #245b4b;
  border-radius: 8px;
  background: #fffdf7;
  color: #245b4b;
  font: inherit;
  cursor: pointer;
}
.guide-search input:focus-visible,
.guide-search button:focus-visible {
  outline: 3px solid #a75020;
  outline-offset: 3px;
}
.guide-search [role="status"] {
  margin: 0.75rem 0 0;
}
.guide-library [hidden] {
  display: none;
}

.article-toc {
  max-width: 850px;
  margin: 0 0 3rem;
  padding: 1.5rem;
  background: #edf2e7;
  border: 1px solid #d7ddcf;
  border-radius: 16px;
}
.article-toc li {
  margin-block: 0.7rem;
}
.article-section {
  scroll-margin-top: 1rem;
}
@media print {
  .article-toc {
    display: none;
  }
}

.guide-search .guide-depth {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  min-height: 44px;
  cursor: pointer;
}
.guide-search .guide-depth input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  accent-color: #245b4b;
}

/* Merged topics: each keeps its heading and old address as an anchor. */
.merged-topic {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 40px;
}
.merged-topic h3 {
  font-size: 1.15rem;
  margin: 24px 0 6px;
}
.related-grid p.covers {
  font-size: 0.85rem;
}
