:root {
  color-scheme: light;
  --paper: #fbf7ef;
  --paper-light: #fffcf6;
  --ink: #1b2a20;
  --ink-soft: #55605a;
  --tomato: #ae432c;
  --tomato-dark: #a83a13;
  --herb: #2e7d4f;
  --herb-light: #e6f1e4;
  --line: #ebe3d3;
  font-family: "DM Sans", "Avenir Next", Avenir, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 "DM Sans", "Avenir Next", Avenir, sans-serif;
}

a { color: var(--tomato-dark); text-underline-offset: 0.22em; }
a:focus-visible { outline: 3px solid var(--tomato-dark); outline-offset: 4px; }
::selection { color: var(--paper-light); background: var(--herb); }

.guide-skip {
  position: fixed;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-150%);
  background: var(--herb);
  color: var(--paper-light);
  font-weight: 700;
}
.guide-skip:focus { transform: translateY(0); }

.guide-header,
.guide-footer {
  width: min(100% - 48px, 1120px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.guide-header {
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.guide-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}
.guide-brand span {
  color: var(--herb);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.03em;
}
.guide-header nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.guide-shell {
  width: min(100% - 48px, 1120px);
  margin: 0 auto;
}

.guide-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 0 16px;
  color: var(--ink-soft);
  font-size: 0.84rem;
}
.guide-breadcrumbs a { color: inherit; }

.guide-heading {
  max-width: 820px;
  padding: 27px 0 34px;
}
.guide-heading h1 {
  max-width: 16ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.9rem, 6.1vw, 5.1rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.99;
  text-wrap: balance;
}
.guide-deck {
  max-width: 62ch;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 1.13rem;
  line-height: 1.65;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(220px, 1fr);
  align-items: start;
  gap: clamp(42px, 8vw, 112px);
  padding: 4px 0 54px;
}
.guide-prose { min-width: 0; }
.guide-prose section {
  padding: 25px 0 27px;
  border-top: 1px solid var(--line);
}
.guide-prose h2,
.guide-aside h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.guide-prose p {
  max-width: 70ch;
  margin: 12px 0 0;
  color: var(--ink-soft);
  line-height: 1.75;
}
.guide-boundary { border-bottom: 1px solid var(--line); }

.guide-aside {
  position: sticky;
  top: 24px;
  margin-top: 26px;
  padding: 19px 20px 21px;
  background: var(--herb-light);
}
.guide-aside h2 { font-size: 1.45rem; }
.guide-aside ul {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 19px;
  color: var(--ink);
  line-height: 1.55;
}
.guide-aside li::marker { color: var(--tomato-dark); }
.guide-aside p {
  margin: 17px 0 0;
  padding-top: 13px;
  border-top: 1px solid #a9b3a3;
  color: var(--herb);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.55;
}

.guide-next {
  padding: 23px 0 29px;
  border-top: 1px solid var(--ink);
}
.guide-next p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.guide-next a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tomato-dark);
  font-size: 1.2rem;
  font-weight: 750;
}
.guide-next a span { font-size: 0.9em; }

.guide-footer {
  min-height: 72px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}
.guide-footer > a { color: var(--ink); font-weight: 750; text-decoration: none; }
.guide-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }

@media (max-width: 1080px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .guide-aside { position: static; max-width: 720px; margin: 3px 0 25px; }
}

@media (max-width: 720px) {
  .guide-header,
  .guide-footer,
  .guide-shell { width: min(100% - 36px, 600px); }
  .guide-header { min-height: 68px; gap: 12px; }
  .guide-brand { gap: 8px; font-size: 0.98rem; }
  .guide-brand span { font-size: 0.68rem; }
  .guide-header nav a { font-size: 0.84rem; white-space: nowrap; }
  .guide-breadcrumbs { padding-top: 20px; }
  .guide-heading { padding: 22px 0 23px; }
  .guide-heading h1 { max-width: 13ch; font-size: clamp(2.65rem, 11vw, 4.1rem); }
  .guide-deck { margin-top: 15px; font-size: 1.04rem; }
  .guide-layout { grid-template-columns: 1fr; gap: 0; padding-bottom: 38px; }
  .guide-prose section { padding: 21px 0 23px; }
  .guide-prose h2 { font-size: 1.65rem; }
  .guide-prose p { font-size: 1rem; }
  .guide-aside { margin: 3px 0 25px; }
}

@media (max-width: 375px) {
  .guide-header,
  .guide-footer,
  .guide-shell { width: min(100% - 28px, 600px); }
  .guide-brand { flex-wrap: wrap; column-gap: 7px; row-gap: 0; }
  .guide-brand span { font-size: 0.63rem; }
  .guide-header nav a { font-size: 0.79rem; }
  .guide-heading h1 { font-size: 2.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
