/* Base: typography, page background, container, GeneratePress overrides. */

html { -webkit-text-size-adjust: 100%; }

body,
button,
input,
select,
textarea {
  font-family: var(--font-body);
}

body {
  background: var(--sand);
  color: var(--ink);
  font-size: var(--text-base);
  line-height: var(--leading-body);
}

a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

h1, h2, h3, h4 { color: var(--ink); margin: 0; }
p { margin: 0; }
img, svg, video { max-width: 100%; height: auto; }

.fo-h1 {
  font-size: var(--h1);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
}
.fo-h2 {
  font-size: var(--h2);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: var(--leading-snug);
}
.fo-h3 { font-size: var(--h3); font-weight: 800; letter-spacing: -0.02em; }
.fo-lead { font-size: var(--text-md); line-height: 1.5; color: var(--muted); }
.fo-muted { color: var(--muted); }
.fo-mono { font-family: var(--font-mono); }

/* Container */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  box-sizing: border-box;
}

/* Breadcrumb */
.fo-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--text-sm); color: var(--muted); }
.fo-crumbs a { color: var(--muted); text-decoration: none; }
.fo-crumbs a:hover { color: var(--teal); }

/* Prose (how-it-works, guides, plain pages) */
.fo-prose { display: flex; flex-direction: column; gap: 14px; color: var(--ink-soft); font-size: var(--text-base); line-height: 1.65; }
.fo-prose h2 { font-size: var(--h2); font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin-top: 8px; }
.fo-prose h3 { font-size: var(--h3); font-weight: 800; color: var(--ink); margin-top: 4px; }
.fo-prose ul, .fo-prose ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.fo-prose img { border-radius: var(--radius-card); }
.fo-prose code { font-family: var(--font-mono); font-size: 0.92em; background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.fo-prose pre { background: var(--ink); color: var(--white); border-radius: var(--radius-card); padding: 16px; overflow-x: auto; font-family: var(--font-mono); font-size: 14px; }
.fo-prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.fo-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.fo-prose th, .fo-prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.fo-prose th { font-weight: 700; color: var(--ink); }

.fo-formula {
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  font-family: var(--font-mono);
  font-size: 15px;
  text-align: center;
  color: var(--ink);
}

.fo-disclaimer { font-size: 12px; line-height: 1.5; color: var(--muted); }

/* Screen-reader only */
.fo-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* GeneratePress overrides: our templates are full-bleed and print their own layout. */
body.fo-full #page,
body.fo-full .site-content,
body.fo-full #content {
  max-width: none;
  padding: 0;
  margin: 0;
}
body.fo-full .site-content { display: block; }
body.fo-full .fo-main { display: block; width: 100%; }
.grid-container { max-width: var(--wrap); }

/* Plain pages */
.fo-page__inner { max-width: 760px; padding-top: var(--section-y); padding-bottom: 64px; display: flex; flex-direction: column; gap: 24px; }
