/* ---------------------------------------------------------------
   Site styles. Brand name lives in site.json only.

   Design language ported from the owner's reference build: teal on a
   white ground with paper/pale bands, Fraunces display headings with
   negative tracking, a wide 1180px container over a ~68ch reading
   column, and accent-topped cards.

   Contrast (WCAG 2):
     --ink   #1f2328 on white 15.4:1 · on --paper 14.6:1
     --teal  #1b5158 on white  8.6:1 · on --paper  8.1:1 · on --pale 8.0:1
     white on --teal 8.6:1 (footer)
   --accent and --line are rules, borders and marks only — never text.

   Type floor: the root is 18px, so .89rem = 16.02px and .94rem = 16.9px.
   Nothing on the site resolves below 16px. Do not shrink the root.
   ------------------------------------------------------------- */

/* Self-hosted OFL fonts. woff2 (@fontsource build, latin subset) first;
   the product's TTF is the fallback src. See fonts/LICENSES.md. */
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"),
       url("/fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"),
       url("/fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"),
       url("/fonts/AtkinsonHyperlegible-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-600-normal.woff2") format("woff2"),
       url("/fonts/FrauncesText-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal: #1b5158;
  --teal-dark: #123e44;
  --ink: #1f2328;
  --accent: #b08a5f;
  --paper: #f8f6f0;
  --pale: #edf2ef;
  --line: #ccd5cf;
  --white: #fff;
  --art: #e8ede7;

  --font-body: "Atkinson Hyperlegible", Verdana, "Segoe UI", Tahoma, sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;

  font-size: 18px;
  color: var(--ink);
  background: var(--white);
  font-family: var(--font-body);
  line-height: 1.65;
}

* { box-sizing: border-box; }
body { margin: 0; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 600;          /* our cut is Fraunces SemiBold, see README */
  line-height: 1.16;
  color: var(--teal);
  text-wrap: balance;
  margin: 0 0 1rem;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2.35rem, 4.5vw, 3.65rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3vw, 2.55rem); letter-spacing: -0.025em; }
h3 { font-size: 1.55rem; }
h4, h5, h6 { font-size: 1.2rem; }

p { margin: 0 0 1.2rem; }
a { color: var(--teal); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 700; }
img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; }
button, a, input, summary { touch-action: manipulation; }

/* ---- Buttons ---- */
button, .button {
  min-height: 50px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  background: var(--teal);
  color: #fff;
  border: 2px solid var(--teal);
  padding: 0.65rem 1.3rem;
  text-decoration: none;
  border-radius: 3px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.button.secondary { background: transparent; color: var(--teal); }
.button.secondary:hover { background: var(--pale); border-color: var(--teal-dark); color: var(--teal-dark); }

/* ---- Focus and skip link ---- */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
a:focus, button:focus, input:focus { outline: 3px solid var(--ink); outline-offset: 5px; }
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible) { outline: none; }
.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10;
  background: #fff;
  padding: 1rem;
}
.skip:focus { top: 1rem; }

/* ---- Layout ---- */
.wrap { width: min(1180px, 100% - 64px); margin-inline: auto; }

/* ---- Header ---- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 105px;
}
.brand {
  font-family: var(--font-head);
  font-size: 1.65rem;
  color: var(--teal);
  text-decoration: none;
  letter-spacing: -0.045em;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  white-space: normal;
}
.brand-mark {
  display: inline-block;
  width: 29px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}
.nav { display: flex; align-items: center; gap: 1.8rem; flex-wrap: wrap; }
.nav a:not(.button) { text-decoration: none; white-space: nowrap; }
.nav a:hover { text-decoration: underline; }
.nav .button { font-size: 1rem; padding: 0.5rem 1rem; }
.nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; }

/* ---- Eyebrow ---- */
.eyebrow {
  font-size: 0.89rem;      /* 16px at the 18px root */
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.1rem;
  display: flex;
  gap: 0.7rem;
  align-items: center;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  flex: none;
}

/* ---- Hero ---- */
.hero { background: var(--paper); border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 4.2rem;
  align-items: center;
  padding-block: 3.4rem 3rem;
}
.hero-copy > p { max-width: 37rem; font-size: 1.12rem; }
.hero-copy h1 { max-width: 15ch; }

.hero-art {
  margin: 0;
  background: var(--art);
  border: 1px solid #dce2d8;
  padding: 2rem 2.8rem 1.2rem;
  position: relative;
}
.hero-art img {
  width: 290px;
  margin: auto;
  box-shadow: 0 12px 25px #173f4425;
  transform: rotate(-3deg);
}
.hero-art figcaption { color: var(--teal); text-align: center; font-size: 0.89rem; margin: 1.6rem 0 0; }
.hero-art .caption-title {
  font-family: var(--font-head);
  font-size: 1.35rem;
  display: block;
  margin-bottom: 0.15rem;
}

/* ---- Facts strip ---- */
.facts {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
  font-size: 0.94rem;
  color: var(--teal);
}
.facts span { display: flex; align-items: center; gap: 0.6rem; }
.facts b { font-weight: 400; color: var(--teal); }

/* ---- Sections ---- */
.section { padding-block: 3.6rem; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.section-head h2 { margin: 0; }

.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.8rem; }
.category { border-top: 2px solid var(--accent); padding-top: 1.3rem; }
.category .number {
  display: block;
  font-size: 0.89rem;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: 0.65rem;
}
.category p { max-width: 48ch; }
.text-link { font-weight: 700; }

/* ---- Post cards ---- */
.latest { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.post-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.4rem;
  align-items: center;
  max-width: 900px;
}
.post-card + .post-card { margin-top: 2.4rem; }
.post-card-image { background: var(--art); padding: 1.1rem 2rem; }
.post-card img { max-height: 220px; width: auto; margin: auto; }
.post-card h3 { font-size: 1.9rem; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; }
.tag {
  display: inline-block;
  font-size: 0.89rem;
  border: 1px solid var(--teal);
  padding: 0.12rem 0.55rem;
  border-radius: 2px;
  color: var(--teal);
  margin-right: 0.5rem;
}
.meta { font-size: 0.89rem; line-height: 1.55; color: var(--teal); margin-bottom: 0.8rem; }

.publisher { display: flex; gap: 3rem; justify-content: space-between; padding-block: 2.5rem; }
.publisher p { max-width: 68ch; margin: 0; }

/* ---- Offer strip ---- */
.offer-strip { background: var(--pale); border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.offer-strip .wrap {
  display: flex;
  gap: 1.3rem;
  justify-content: center;
  align-items: center;
  padding-block: 0.65rem;
}
.offer-strip a { font-weight: 700; }

/* ---- Footer ---- */
.site-footer { background: var(--teal); color: #fff; padding: 2.4rem 0; }
.site-footer a { color: #fff; }
.site-footer .brand { color: #fff; }
.footer-top { display: flex; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.65rem 1.4rem; font-size: 0.94rem; }
.footer-note { max-width: 72ch; font-size: 0.89rem; line-height: 1.6; margin: 0; }
.footer-note + .footer-note { margin-top: 0.6rem; }

/* ---- Page heading and reading column ---- */
.page-heading { padding-top: 3rem; padding-bottom: 2rem; }
.page-heading p { max-width: 65ch; font-size: 1.1rem; }
.reading { max-width: 68ch; margin: 0 auto; padding: 0 0 3rem; }
.reading h2 { font-size: 2rem; margin-top: 2.5rem; }
.reading h3, .reading h4, .reading h5, .reading h6 { margin-top: 1.8rem; }
.reading p, .reading li { overflow-wrap: anywhere; }
.reading ul, .reading ol { padding-left: 1.4rem; }
.reading li + li { margin-top: 0.4rem; }
.reading blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.6rem 0;
  padding: 1rem 1.3rem;
  background: var(--paper);
}
.reading blockquote p:last-child { margin-bottom: 0; }
.reading hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.reading code { font-size: 0.94rem; overflow-wrap: anywhere; background: var(--pale); padding: 0.1em 0.35em; border-radius: 3px; }
.reading figure { margin: 2rem auto; }
.reading figcaption { font-size: 0.94rem; color: var(--teal); margin-top: 0.5rem; }

/* ---- Tables: scroll inside their own container ---- */
.table-scroll { overflow-x: auto; margin: 1.7rem 0; border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; line-height: 1.55; }
th, td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); min-width: 135px; vertical-align: top; }
th { background: var(--pale); color: var(--teal); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* ---- Notes, callouts, sample banner ---- */
.note { padding: 1.2rem 1.5rem; background: var(--paper); border-left: 3px solid var(--accent); margin: 1.4rem 0; }
.note p:last-child { margin: 0; }
.sample-banner { background: var(--paper); padding: 1rem 1.3rem; border-left: 3px solid var(--accent); margin: 0 0 1.8rem; }
.sample-banner p:last-child { margin: 0; }
.empty { background: var(--paper); padding: 1.4rem 1.6rem; }
.topic-section { border-top: 1px solid var(--line); padding-block: 2rem; }
.topic-section h2 { margin-top: 0; }

/* ---- Pin images ---- */
.post-image, .pin-figure { max-width: min(350px, 100%); margin: 2rem auto; }
.pin-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 1.5rem; }
.pin-list li { margin: 0; }
.pin-list figure { margin: 0; max-width: 240px; }
.pin-list img { border: 1px solid var(--line); }

/* ---- Forms ---- */
.signup { margin-top: 1.35rem; }
.signup label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.form-row { display: flex; gap: 0.6rem; }
.form-row input {
  min-width: 0;
  flex: 1;
  width: 100%;
  border: 1px solid var(--teal);
  border-radius: 3px;
  padding: 0.6rem 0.8rem;
  background: #fff;
  min-height: 54px;
  color: var(--ink);
}
input::placeholder { color: var(--teal); opacity: 1; }
.consent { font-size: 0.89rem; line-height: 1.55; margin: 0.65rem 0 0; max-width: 65ch; }
.hp { display: none !important; }
.signup-box { background: var(--pale); padding: 2rem; margin-top: 2.5rem; }
.signup-box h2 { margin: 0 0 0.8rem; }
.privacy-inline { font-size: 0.89rem; line-height: 1.55; margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1rem; }

/* ---- Landing (/free/) ---- */
.landing .site-header { text-align: center; }
.landing .header-inner { justify-content: center; min-height: 80px; }
.landing-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding-block: 2.7rem;
}
.landing-grid h1 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); }
.landing-grid .hero-art { max-width: 400px; }
.page-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 3rem;
  counter-reset: pages;
  padding: 0;
  margin: 2rem 0;
  list-style: none;
}
.page-list li {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0.6rem;
  border-top: 1px solid var(--line);
  padding: 1rem 0;
  counter-increment: pages;
}
.page-list li::before {
  content: counter(pages, decimal-leading-zero);
  color: var(--teal);
  font-size: 1.25rem;
  font-family: var(--font-head);
}
.page-list h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 0.2rem;
  color: var(--ink);
}
.page-list p { margin: 0; font-size: 1rem; }
.landing-end { max-width: 700px; margin: 0 auto; padding: 0 0 3rem; }
.landing-end .signup-box { margin-top: 0; }

/* ---- Thank-you download ---- */
.download-block { background: var(--pale); padding: 2rem; margin-bottom: 2rem; }
.download-block .button { margin: 0.4rem 0 0.8rem; }
.download-block h2 { margin: 0 0 0.8rem; }

/* ---- Utilities ---- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Consent and footer notices are reading text: keep them at the 18px body size. */
.consent, .footer-note, .privacy-inline { font-size: 1rem; }

@media (max-width: 1000px) {
  .header-inner { gap: 1rem; }
  .nav { gap: 1rem; }
  .hero-grid { gap: 2.5rem; }
  .form-row { flex-direction: column; }
  .hero-art { padding: 1.5rem; }
  .nav .button { display: none; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 0; display: block; padding-block: 1rem 0.8rem; }
  .brand { font-size: 1.45rem; }
  .nav { margin-top: 0.8rem; justify-content: space-between; gap: 0.6rem; font-size: 0.94rem; }
  .hero-grid, .landing-grid { grid-template-columns: 1fr; gap: 2rem; padding-block: 1.8rem 2rem; }
  .hero-copy > p { font-size: 1rem; }
  .hero-copy h1 { max-width: 16ch; }
  .eyebrow { margin-bottom: 0.8rem; }
  .hero-art { max-width: 420px; width: 100%; margin-inline: auto; padding: 1.8rem 2rem 1rem; }
  .hero-art img { width: 245px; }
  .hero-art figcaption { margin-top: 1.2rem; }
  .signup { margin-top: 1rem; }
  .facts { flex-wrap: wrap; justify-content: center; gap: 0.25rem 1rem; font-size: 0.89rem; }
  .section { padding-block: 2.5rem; }
  .section-head { display: block; }
  .section-head h2 { margin-bottom: 0.7rem; }
  .category-grid { grid-template-columns: 1fr; gap: 2rem; }
  .post-card { grid-template-columns: 1fr; gap: 1.4rem; }
  .post-card-image { display: none; }
  .post-card h3 { font-size: 1.65rem; }
  .publisher, .footer-top { display: block; }
  .publisher a { display: inline-block; margin-top: 0.8rem; }
  .footer-links { margin-top: 1.1rem; }
  .offer-strip .wrap { display: block; text-align: center; line-height: 1.5; }
  .offer-strip a { margin-left: 0.3rem; }
  .page-heading { padding-block: 1.7rem 1.5rem; }
  .page-heading p { font-size: 1rem; }
  .reading { padding-bottom: 2rem; }
  .reading h2 { font-size: 1.8rem; }
  .signup-box { padding: 1.3rem; }
  .page-list { grid-template-columns: 1fr; }
  .landing .header-inner { display: flex; padding: 1rem; }
  .landing-grid .hero-art { max-width: 330px; }
  .download-block { padding: 1.4rem; }
  .site-footer { padding-block: 2rem; }
}

@media print {
  .site-header, .site-footer, .offer-strip, .signup, .signup-box, .skip { display: none; }
  body { color: #000; background: #fff; }
  .wrap { width: 100%; }
  a { color: #000; }
  .reading { max-width: none; }
  h1, h2, h3 { break-after: avoid; }
  img { max-height: 500px; }
  p, li { orphans: 3; widows: 3; }
}
