:root {
  --sand: #fff4e8;
  --sand-2: #f8e7d6;
  --surface: #ffffff;
  --ink: #263334;
  --muted: #52605f;
  --teal: #0a6266;
  --teal-dark: #06484b;
  --copper: #a63b22;
  --copper-dark: #812a17;
  --mint: #e2f1ef;
  --line: #d6deda;
  --white: #ffffff;
  --shadow: 0 22px 65px rgba(44, 55, 53, .09);
  --radius: 18px;
  --content: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--sand);
  font-family: Inter, "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal); text-underline-offset: .18em; }
a:hover { color: var(--teal-dark); }
button, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 3px solid #ff9c73; outline-offset: 3px; }
::selection { background: #c7e9e5; color: var(--ink); }

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 1000;
  padding: 10px 16px; color: var(--white); background: var(--ink);
  border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.notice {
  color: var(--white); background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.notice[hidden] { display: none; }
.notice__inner {
  width: min(var(--content), calc(100% - 40px)); margin: 0 auto;
  min-height: 58px; display: flex; align-items: center; gap: 20px;
}
.notice p { flex: 1; margin: 10px 0; font-size: 14px; line-height: 1.45; }
.notice__close {
  display: none; flex: 0 0 44px; width: 44px; height: 44px;
  align-items: center; justify-content: center; border: 0; border-radius: 50%;
  color: var(--white); background: transparent; cursor: pointer; font-size: 26px;
}
html.js .notice__close { display: inline-flex; }
.notice__close:hover { background: rgba(255,255,255,.12); }

.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,244,232,.95);
  border-bottom: 1px solid rgba(38,51,52,.12); backdrop-filter: blur(16px);
}
.header__inner {
  width: min(var(--content), calc(100% - 40px)); min-height: 82px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand__mark {
  position: relative; width: 40px; height: 40px; border: 2px solid var(--teal);
  border-left-color: transparent; border-right-color: transparent; border-radius: 13px;
}
.brand__mark::before, .brand__mark::after {
  content: ""; position: absolute; top: 10px; width: 9px; height: 16px;
  border: 2px solid var(--teal);
}
.brand__mark::before { left: 5px; border-right: 0; border-radius: 8px 0 0 8px; }
.brand__mark::after { right: 5px; border-left: 0; border-radius: 0 8px 8px 0; }
.brand__dot { position: absolute; left: 17px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--copper); }
.brand__text { line-height: 1.12; }
.brand__name { display: block; font-size: 20px; font-weight: 760; letter-spacing: -.02em; }
.brand__sub { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a, .nav summary {
  display: inline-flex; min-height: 44px; align-items: center; padding: 8px 12px;
  border-radius: 9px; color: var(--ink); font-size: 15px; font-weight: 650;
  text-decoration: none; cursor: pointer;
}
.nav a:hover, .nav summary:hover, .nav a[aria-current="page"] { background: var(--surface); color: var(--teal); }
.nav details { position: relative; }
.nav summary { list-style: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: "⌄"; margin-left: 7px; font-size: 16px; }
.nav__drop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 250px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow);
}
.nav__drop a { display: flex; }
.menu-toggle {
  display: none; min-width: 48px; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer;
}
html:not(.js) .menu-toggle { display: none; }

.container { width: min(var(--content), calc(100% - 40px)); margin-inline: auto; }
.narrow { max-width: 820px; }
.section { padding: 86px 0; }
.section--white { background: var(--surface); }
.section--ink { color: var(--white); background: var(--ink); }
.section--compact { padding: 56px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px;
  color: var(--teal); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 24px; height: 3px; background: currentColor; border-radius: 3px; }
h1, h2, h3 { margin-top: 0; color: var(--ink); line-height: 1.12; letter-spacing: -.035em; }
h1 { max-width: 1040px; margin-bottom: 26px; font-size: clamp(2.35rem, 5.1vw, 4.55rem); font-weight: 760; }
h2 { margin-bottom: 22px; font-size: clamp(1.8rem, 3vw, 2.55rem); }
h3 { margin-bottom: 12px; font-size: clamp(1.25rem, 2vw, 1.55rem); }
p { margin: 0 0 1.1em; }
.lead { max-width: 760px; color: var(--muted); font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.55; }
.lede { max-width: 740px; color: var(--muted); font-size: 20px; }
.kicker { color: var(--teal); font-weight: 750; letter-spacing: .03em; }
.microcopy { margin-top: 18px; color: var(--muted); font-size: 14px; }
.prose { max-width: 760px; }
.prose p, .prose li { color: #344344; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.7em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .6em; }
.note {
  margin: 30px 0; padding: 22px 24px; background: var(--mint);
  border-left: 4px solid var(--teal); border-radius: 0 14px 14px 0;
}
.warning { background: #fff0e9; border-left-color: var(--copper); }
.crumbs { padding: 22px 0 0; color: var(--muted); font-size: 14px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #899391; }
.crumbs a { color: var(--muted); }

.hero { padding: 62px 0 80px; }
.hero__panel {
  position: relative; overflow: hidden; padding: clamp(30px, 5vw, 68px);
  background: var(--surface); border: 1px solid rgba(38,51,52,.12); border-radius: 24px;
  box-shadow: var(--shadow);
}
.hero__panel::after {
  content: ""; position: absolute; width: 190px; height: 190px; right: -58px; top: -74px;
  border: 28px solid var(--mint); border-radius: 50%; opacity: .75;
}
.hero__content { position: relative; z-index: 1; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 32px 0 34px; }
.button {
  display: inline-flex; min-height: 54px; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border: 2px solid transparent; border-radius: 10px;
  color: var(--white); background: var(--copper); font-size: 16px; font-weight: 760;
  text-decoration: none; cursor: pointer;
}
.button:hover { color: var(--white); background: var(--copper-dark); }
.button--secondary { color: var(--teal); background: transparent; border-color: var(--teal); }
.button--secondary:hover { color: var(--white); background: var(--teal); }
.button--ghost { min-height: 46px; color: var(--teal); background: transparent; border-color: var(--line); }
.button--ghost:hover { color: var(--teal-dark); background: var(--mint); }
.text-link { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; }

.topic-index { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.topic-index a { min-height: 88px; padding: 17px 18px; color: var(--ink); text-decoration: none; border-right: 1px solid var(--line); }
.topic-index a:last-child { border-right: 0; }
.topic-index a:hover { background: var(--mint); }
.topic-index span { display: block; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.topic-index strong { display: block; margin-top: 7px; font-size: 16px; line-height: 1.25; }
.observation {
  display: grid; grid-template-columns: 170px 1fr auto; gap: 24px; align-items: center;
  margin-top: 30px; padding: 24px; background: var(--mint); border-radius: 14px;
}
.observation__label { color: var(--teal); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.observation p { margin: 0; }
.observation small { display: block; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.step { padding: 30px; background: var(--surface); }
.step__num { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; margin-bottom: 30px; color: var(--white); background: var(--teal); border-radius: 50%; font-size: 14px; font-weight: 800; }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: start; }
.rail { display: grid; gap: 14px; }
.rail a { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; color: var(--ink); font-weight: 720; text-decoration: none; border-bottom: 1px solid var(--line); }
.rail a::after { content: "→"; color: var(--teal); }
.rail a:hover { color: var(--teal); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 22px 44px 22px 0; font-weight: 720; cursor: pointer; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 8px; top: 17px; color: var(--teal); font-size: 27px; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { max-width: 760px; padding: 0 36px 18px 0; color: var(--muted); }

.article-head { padding: 48px 0 60px; }
.article-head h1 { max-width: 980px; font-size: clamp(2.2rem, 4.4vw, 3.85rem); }
.article-layout { display: grid; grid-template-columns: minmax(0, 780px) 260px; gap: 92px; align-items: start; }
.toc { position: sticky; top: 112px; padding-left: 22px; border-left: 1px solid var(--line); font-size: 14px; }
.toc strong { display: block; margin-bottom: 12px; }
.toc a { display: block; padding: 7px 0; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--teal); }
.number-list { counter-reset: item; padding: 0; list-style: none; }
.number-list li { position: relative; min-height: 48px; padding: 2px 0 22px 60px; }
.number-list li::before { counter-increment: item; content: counter(item); position: absolute; left: 0; top: 0; width: 40px; height: 40px; display: grid; place-items: center; color: var(--white); background: var(--teal); border-radius: 12px; font-weight: 800; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.choice-card { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }

.diagnostic-shell { max-width: 930px; margin: 0 auto; }
.topic-picker h2 { font-size: 30px; }
.topic-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.topic-button {
  min-height: 112px; padding: 20px; text-align: left; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface); cursor: pointer;
}
.topic-button:hover { border-color: var(--teal); background: var(--mint); }
.topic-button strong { display: block; margin-bottom: 6px; font-size: 19px; }
.topic-button span { color: var(--muted); font-size: 14px; }
.interactive { display: none; }
html.diagnostic-ready .interactive { display: block; }
html.diagnostic-ready .no-js-guide { display: none; }
.diagnostic-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.diagnostic-head p { margin: 0; color: var(--muted); }
.history-label { margin: 26px 0 10px; color: var(--teal); font-size: 13px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.check-row { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.check-row--done { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; padding: 17px 18px; }
.check-row--done p { margin: 0; font-size: 15px; }
.check-row--done small { display: block; color: var(--muted); }
.edit-button { min-width: 86px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--teal); background: transparent; cursor: pointer; font-weight: 700; }
.edit-button:hover { background: var(--mint); }
.current-check { padding: clamp(22px, 4vw, 36px); border: 2px solid var(--teal); }
.current-check__action { margin-bottom: 8px; color: var(--teal); font-size: 14px; font-weight: 780; }
.current-check h2 { margin-bottom: 24px; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.answer-list { display: grid; gap: 10px; }
.answer-button { min-height: 54px; padding: 13px 16px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.answer-button:hover, .answer-button[aria-pressed="true"] { border-color: var(--teal); background: var(--mint); }
.result { margin-top: 18px; padding: clamp(24px, 4vw, 38px); color: var(--white); background: var(--ink); border-radius: var(--radius); }
.result h2 { color: var(--white); }
.result p { max-width: 700px; color: #e5ecea; }
.result .button--secondary { color: var(--white); border-color: rgba(255,255,255,.65); }
.result .button--secondary:hover { background: rgba(255,255,255,.12); }
.diagnostic-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.live-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fallback-topic { margin: 24px 0 38px; padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.fallback-topic h2 { font-size: 26px; }
.fallback-topic h3 { margin-top: 24px; font-size: 20px; }

.related { margin-top: 70px; padding-top: 32px; border-top: 1px solid var(--line); }
.related__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related__links a { min-height: 110px; padding: 18px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 13px; font-weight: 700; text-decoration: none; }
.related__links a:hover { border-color: var(--teal); color: var(--teal); }

.contact-card { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-list { margin: 0; }
.contact-list div { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list div:last-child { border-bottom: 0; }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }

.site-footer { padding: 58px 0 26px; color: #e7efed; background: var(--ink); }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 42px; }
.footer__brand .brand { color: var(--white); }
.footer__brand .brand__sub { color: #bfcac7; }
.footer__brand p { max-width: 360px; margin-top: 20px; color: #bfcac7; font-size: 14px; }
.footer__col strong { display: block; margin-bottom: 12px; color: var(--white); font-size: 14px; }
.footer__col a { display: block; padding: 5px 0; color: #ced8d5; font-size: 14px; text-decoration: none; }
.footer__col a:hover { color: var(--white); }
.footer__bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); color: #aab7b4; font-size: 12px; }

@media (max-width: 960px) {
  .brand__sub { display: none; }
  .article-layout { grid-template-columns: 1fr; gap: 30px; }
  .toc { position: static; order: -1; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .split { grid-template-columns: 1fr; gap: 42px; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer__col:last-child { grid-column: 2 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .container, .header__inner, .notice__inner { width: min(100% - 32px, var(--content)); }
  .header__inner { min-height: 70px; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav { display: none; position: absolute; left: 16px; right: 16px; top: calc(100% + 1px); padding: 12px; flex-direction: column; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 14px 14px; box-shadow: var(--shadow); }
  .nav[data-open="true"] { display: flex; }
  .nav a, .nav summary { width: 100%; }
  .nav details { width: 100%; }
  .nav__drop { position: static; width: 100%; padding: 4px 0 4px 14px; border: 0; box-shadow: none; }
  html:not(.js) .header__inner { flex-wrap: wrap; padding: 10px 0; }
  html:not(.js) .nav { display: flex; position: static; width: 100%; box-shadow: none; border-radius: 12px; }
  .section { padding: 58px 0; }
  .hero { padding: 28px 0 50px; }
  .hero__panel { padding: 28px 20px; border-radius: 18px; }
  .hero__panel::after { display: none; }
  .topic-index { grid-template-columns: 1fr 1fr; }
  .topic-index a:nth-child(2) { border-right: 0; }
  .topic-index a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .observation { grid-template-columns: 1fr; gap: 8px; }
  .steps, .choice-grid, .topic-buttons, .related__links { grid-template-columns: 1fr; }
  .step { padding: 24px; }
  .diagnostic-head { align-items: flex-start; flex-direction: column; }
  .check-row--done { grid-template-columns: 1fr; gap: 10px; }
  .edit-button { width: 100%; }
  .contact-list div { grid-template-columns: 1fr; gap: 5px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__col:last-child { grid-column: auto; }
  .footer__bottom { flex-direction: column; }
}

@media (max-width: 380px) {
  .container, .header__inner, .notice__inner { width: min(100% - 24px, var(--content)); }
  .brand__mark { width: 36px; height: 36px; }
  .brand__name { font-size: 18px; }
  .topic-index { grid-template-columns: 1fr; }
  .topic-index a { border-right: 0; border-bottom: 1px solid var(--line); }
  .topic-index a:last-child { border-bottom: 0; }
  .actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .notice, .site-header, .site-footer, .actions, .diagnostic-tools { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 24px 0; }
}
