/* Shared page shell: content width, type scale, footer, and small-screen overflow. */
:root {
  --ah-content: 760px;
  --ah-pad-x: 24px;
  --ah-pad-x-sm: 16px;
  --ah-ink: #161412;
  --ah-paper: #F2EEE6;
  --ah-footer: #161412;
  --ah-footer-text: #F2EEE6;
}

body {
  font-size: 17px;
  line-height: 1.55;
}

.container {
  width: min(var(--ah-content), 100%);
  max-width: var(--ah-content);
  margin-inline: auto;
  padding: 32px var(--ah-pad-x) 48px;
  box-sizing: border-box;
  min-width: 0;
  overflow-wrap: break-word;
}
main.wrap {
  width: min(var(--ah-content), calc(100% - 32px));
  max-width: var(--ah-content);
  margin-inline: auto;
  padding-top: 32px;
  padding-bottom: 48px;
  box-sizing: border-box;
  min-width: 0;
  overflow-wrap: break-word;
}

.container > h1,
main.wrap > h1,
main.wrap h1 {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 8vw, 56px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  max-width: 100%;
  overflow-wrap: break-word;
}
.container h2,
main.wrap h2 {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  max-width: 100%;
}
.container h3,
main.wrap h3 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  max-width: 100%;
}
.faq-item > summary h3 {
  font-family: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.container img,
main.wrap img,
.container video,
main.wrap video {
  max-width: 100%;
  height: auto;
}
.container pre,
main.wrap pre,
.container .example,
main.wrap .example,
.table-wrap,
#before-after .table-wrap {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.guide-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  font-size: 16px;
}
.privacy,
.helper,
.note,
.crumbs,
#form-errors,
#report-status {
  font-size: 16px;
}
button,
.container a.btn,
main.wrap a.btn,
.vbtn,
.line-btn,
.text-btn,
summary {
  min-height: 44px;
}

footer.site-footer {
  background: var(--ah-footer);
  color: var(--ah-footer-text);
}
footer.site-footer .footcols {
  max-width: 1296px;
  margin: 0 auto;
  padding: 48px max(16px, 4vw);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  box-sizing: border-box;
}
footer.site-footer .serif {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  color: var(--ah-footer-text);
}
footer.site-footer .site-footer-name { margin: 0 0 8px; font-size: 28px; line-height: 1.1; }
footer.site-footer .site-footer-tag { margin: 0 0 8px; font-size: 20px; font-style: italic; line-height: 1.3; }
footer.site-footer .footer-email { margin: 0; color: var(--ah-footer-text); font-size: 16px; line-height: 1.5; }
footer.site-footer .footlab {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ah-footer-text);
  margin: 0 0 12px;
}
footer.site-footer .footcols a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--ah-footer-text);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.3;
}
footer.site-footer .footcols a:hover { color: #D4A645; }
footer.site-footer .footer-email a {
  display: inline;
  min-height: 0;
  color: var(--ah-footer-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 16px;
}

:where(h1, h2, [id]):not(#check):not(#health-check):not(#check-questions) { scroll-margin-top: 96px; }

@media (max-width: 768px) {
  .container { padding: 24px var(--ah-pad-x-sm) 40px; }
  .container a.btn,
  main.wrap .actions .btn { width: 100%; text-align: center; justify-content: center; }
  .faq-item > summary h3 { font-size: 17px; }
  footer.site-footer .footcols {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-bottom: 88px;
  }
}

#hauslight-frame { width: 60px; height: 60px; }
@media (max-width: 640px) {
  #hauslight-frame { visibility: hidden; width: 0; height: 0; }
}
