:root {
  color: #000;
  background: #ece3cf;
  font-family: Georgia, 'Times New Roman', serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: #0011ff; text-decoration: none; border-bottom: 1px solid currentColor; }
p, li, .rich-paragraph { font-size: 1.125rem; line-height: 1.35; }
p { margin: 0 0 22px; }
.rich-paragraph { margin: 0 0 22px; }
.rich-paragraph > :first-child { margin-top: 0; }
.rich-paragraph > :last-child { margin-bottom: 0; }
.rich-paragraph p, .rich-paragraph div { font-size: inherit; line-height: inherit; }
.rich-paragraph img, li img, h1 img, h2 img, h3 img { display: block; width: auto; max-width: 100%; height: auto; margin: 18px auto; border-radius: 8px; }
ul, ol { margin: 0 0 28px; padding-left: 25px; }
li { margin-bottom: 7px; padding-left: 2px; }
.shell { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }
.loading { min-height: 100vh; display: grid; place-items: center; font-size: 1.125rem; }
.loading.error { color: #8b1e1e; }

.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 10px 14px; background: #fff; color: #000; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 100; top: 0; background: rgba(254, 251, 243, .97); border-bottom: 1px solid rgba(101, 78, 30, .2); box-shadow: 0 2px 12px rgba(60, 43, 8, .08); backdrop-filter: blur(10px); }
.header-inner { min-height: 48px; display: flex; align-items: center; gap: 22px; }
.main-nav { display: flex; flex: 1; align-items: center; justify-content: flex-start; gap: 12px; }
.main-nav a { padding: 7px 11px; color: #2c2416; border: 1px solid transparent; border-radius: 999px; font: 400 .875rem/1 Georgia, 'Times New Roman', serif; white-space: nowrap; transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease; }
.main-nav a:hover, .main-nav a:focus-visible { color: #654e1e; background: #f2e6cb; border-color: #b8a071; outline: none; }
.main-nav a.is-active { color: #fff; background: #654e1e; border-color: #654e1e; }
.header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; color: #654e1e; background: transparent; border: 1px solid #a99367; border-radius: 50%; cursor: pointer; transition: color .2s ease, background .2s ease, transform .2s ease; }
.icon-button:hover, .icon-button:focus-visible { color: #fff; background: #654e1e; outline: 3px solid rgba(101, 78, 30, .22); outline-offset: 2px; }
.accessibility-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.menu-toggle { display: none; align-content: center; gap: 4px; }
.menu-toggle span { width: 20px; height: 2px; display: block; background: currentColor; transition: transform .25s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.accessibility-panel { position: fixed; z-index: 200; top: 56px; right: max(16px, calc((100vw - 1160px) / 2)); width: min(360px, calc(100vw - 32px)); padding: 20px; color: #211b10; background: #fffdf8; border: 2px solid #654e1e; border-radius: 12px; box-shadow: 0 18px 50px rgba(38, 26, 3, .25); font-family: Arial, sans-serif; }
.accessibility-panel[hidden] { display: none; }
.accessibility-panel__header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; font-size: 1rem; }
.panel-close { width: 34px; height: 34px; padding: 0; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 50%; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.accessibility-option, .speech-controls { display: grid; gap: 9px; margin-bottom: 15px; }
.font-controls { display: grid; grid-template-columns: 1fr 74px 1fr; align-items: center; gap: 7px; }
.font-controls button, .accessibility-action { min-height: 42px; padding: 9px 12px; color: #211b10; background: #f6edda; border: 1px solid #8c7445; border-radius: 7px; cursor: pointer; }
.font-controls button:hover, .font-controls button:focus-visible, .accessibility-action:hover, .accessibility-action:focus-visible, .panel-close:focus-visible { outline: 3px solid #c4a35f; outline-offset: 2px; }
.font-value { text-align: center; font-weight: 700; }
.contrast-toggle { width: 100%; margin-bottom: 15px; }
.speech-controls > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.accessibility-action:disabled { opacity: .45; cursor: not-allowed; }
.accessibility-status { min-height: 1.2em; margin: 4px 0 0; font-size: .875rem; }

.hero-section { padding: 20px 0 22px; background: #ece3cf; }
.hero { display: grid; grid-template-columns: minmax(0, 575px) 375px; gap: 68px; align-items: center; justify-content: start; }
.hero-copy { padding: 10px 0; }
h1 { margin: 0 0 38px; text-align: left; line-height: 1.42; }
h1 span { display: block; }
.hero-title-top { color: #654e1e; font-size: 1.5rem; font-weight: 700; }
.hero-title-bottom { color: #000; font-size: 1.375rem; font-weight: 400; white-space: pre-line; }
.hero-document h1 { font-size: 1.375rem; font-weight: 400; }
.hero-document h1 > strong { display: block; color: #654e1e; font-size: 1.5rem; font-weight: 700; }
.hero-document h1 > span { display: block; color: #000; font-size: 1.375rem; font-weight: 400; white-space: pre-line; }
.hero-document h1 + p { margin-bottom: 7px; }
.hero-document ul { margin-bottom: 44px; }
.hero-document ul + p { margin-bottom: 0; font-size: 1.125rem; line-height: 1.75; }
.hero-copy > .hero-intro { margin-bottom: 7px; }
.hero-copy ul { margin-bottom: 44px; }
.contact-lines { font-size: 1.125rem; line-height: 1.75; }
.portrait { margin: 0; }
.portrait img { display: block; width: 100%; max-width: 375px; margin: 0 auto; border-radius: 10px; }

.content-section { padding: 17px 0 20px; }
.text-column { max-width: 800px; }
h2 { margin: 0 0 20px; color: #654e1e; text-align: center; font-size: 1.375rem; line-height: 1.2; }
.results-section { padding-top: 6px; background: #ecdec0; }
.lessons-section { background: #fff8e8; }
.about-section { background: #f6f2f2; }
.steps-section { background: #f0fae4; }
.reviews-section { background: #fcf4e2; }
.content-section, .site-footer { scroll-margin-top: 76px; }
.reviews-list { display: grid; gap: 2px; }
.review { padding: 0 0 12px; }
.review h3 { margin: 0 0 5px; font-size: 1.125rem; }
.review p { white-space: pre-line; }
.visual-document > :first-child { margin-top: 0; }
.visual-document > :last-child { margin-bottom: 0; }
.visual-document img { display: block; width: auto; max-width: 100%; height: auto; margin: 18px auto; border-radius: 8px; }
.feedback-document h3 { margin: 0 0 5px; font-size: 1.125rem; }
.feedback-document h3:not(:first-of-type) { margin-top: 12px; }
.feedback-document p { white-space: pre-line; }

.site-footer { min-height: 210px; padding: 18px 0 50px; background: #fefbf3; }
.site-footer nav { display: flex; align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 55px; font-size: 1rem; }
.site-footer .footer-copyright { margin: 0; font-size: 1rem; }
.footer-document p { margin-bottom: 10px; font-size: 1rem; }
.footer-document p:last-child { margin-top: 55px; }

.high-contrast { color: #fff; background: #000; }
.high-contrast body, .high-contrast .hero-section, .high-contrast .results-section, .high-contrast .lessons-section, .high-contrast .about-section, .high-contrast .steps-section, .high-contrast .reviews-section, .high-contrast .site-footer { color: #fff; background: #000; }
.high-contrast .site-header { color: #fff; background: #000; border-color: #fff; box-shadow: none; }
.high-contrast h2, .high-contrast .hero-title-top, .high-contrast .hero-document h1 > strong { color: #ffeb3b; }
.high-contrast .hero-title-bottom, .high-contrast .hero-document h1 > span { color: #fff; }
.high-contrast a { color: #65e8ff; }
.high-contrast .main-nav a { color: #fff; border-color: #fff; }
.high-contrast .main-nav a:hover, .high-contrast .main-nav a:focus-visible, .high-contrast .main-nav a.is-active { color: #000; background: #ffeb3b; border-color: #ffeb3b; }
.high-contrast .icon-button { color: #ffeb3b; border-color: #ffeb3b; }
.high-contrast .icon-button:hover, .high-contrast .icon-button:focus-visible { color: #000; background: #ffeb3b; outline-color: #fff; }
.high-contrast .accessibility-panel { color: #fff; background: #000; border-color: #ffeb3b; }
.high-contrast .font-controls button, .high-contrast .accessibility-action { color: #000; background: #ffeb3b; border-color: #fff; }
.high-contrast .panel-close { color: #fff; }

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

@media (max-width: 850px) {
  .hero { grid-template-columns: minmax(0, 1fr) 310px; gap: 32px; }
  .shell { width: min(100% - 32px, 760px); }
  .header-inner { gap: 10px; }
  .main-nav { gap: 2px; }
  .main-nav a { padding-inline: 7px; font-size: .8rem; }
}

@media (max-width: 760px) {
  body.menu-open { overflow: hidden; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: inline-grid; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; max-height: 0; overflow: hidden; display: grid; align-items: stretch; justify-content: stretch; gap: 0; padding: 0 16px; background: #fefbf3; border-bottom: 0 solid rgba(101, 78, 30, .35); box-shadow: 0 12px 25px rgba(60, 43, 8, .14); opacity: 0; visibility: hidden; transition: max-height .35s ease, padding .35s ease, opacity .2s ease, visibility .2s ease; }
  .main-nav.is-open { max-height: calc(100vh - 48px); overflow-y: auto; padding-block: 10px 16px; border-bottom-width: 1px; opacity: 1; visibility: visible; }
  .main-nav a { padding: 14px 12px; border: 0; border-bottom: 1px solid rgba(101, 78, 30, .18); border-radius: 0; font-size: 1rem; }
  .main-nav a:last-child { border-bottom: 0; }
  .high-contrast .main-nav { background: #000; border-color: #fff; }
  .high-contrast .main-nav a { border-color: #fff; }
}

@media (max-width: 680px) {
  .hero-section { padding-top: 12px; }
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-copy { order: 1; }
  .portrait { order: 2; }
  .portrait img { width: min(100%, 375px); }
  h1 { margin-bottom: 30px; }
  .contact-lines { line-height: 1.65; }
  .content-section { padding: 18px 0; }
}

@media (max-width: 420px) {
  .shell { width: calc(100% - 24px); }
  ul, ol { padding-left: 22px; }
  .header-inner { min-height: 46px; }
  .icon-button { width: 36px; height: 36px; }
  .accessibility-panel { top: 54px; right: 8px; width: calc(100vw - 16px); }
}
