/* The Hydrated Gut: matte cream, charcoal line, one warm accent. Large type for readers over 50. */
@font-face { font-family: "Merriweather"; src: url("/assets/fonts/merriweather-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Merriweather"; src: url("/assets/fonts/merriweather-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Merriweather"; src: url("/assets/fonts/merriweather-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Lato"; src: url("/assets/fonts/lato-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --cream: #F7F4EF;
  --cream-deep: #EFEAE1;
  --ink: #2A2E33;
  --ink-soft: #4A4F55;
  --line: #D8D2C6;
  --accent: #8F4A33;
  --serif: "Merriweather", Georgia, "Times New Roman", serif;
  --sans: "Lato", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--serif); font-size: 1.06rem; line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--cream); padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 44rem; }
.narrow-left { max-width: 44rem; }
.center { text-align: center; }

h1, h2 { line-height: 1.25; text-wrap: balance; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin-top: 1.9em; }
.section > .wrap > h2:first-child, .section h1 + h2 { margin-top: 0.4em; }
p, ul { margin: 0 0 1.1em; }
ul { padding-left: 1.3em; }
li { margin-bottom: 0.45em; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--cream); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; display: inline-flex; align-items: center; gap: 0.6rem; }
.brand img { width: 44px; height: 44px; display: block; }
.site-header nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 1.4rem; margin: 0; padding: 0; }
.site-header nav li { margin: 0; }
.site-header nav a { font-family: var(--sans); font-size: 1rem; letter-spacing: 0.04em; color: var(--ink); text-decoration: none; padding: 0.5rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.site-header nav a:hover { border-bottom-color: var(--ink); }
@media (max-width: 480px) { .site-header nav ul { gap: 0 1.2rem; } .site-header nav a { line-height: 1.5; } }

/* Sections */
.hero { padding: clamp(2.5rem, 8vw, 5rem) 0 clamp(2rem, 6vw, 3.5rem); }
.section { padding: clamp(2rem, 6vw, 3.5rem) 0; }
.tint { background: var(--cream-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.8em; }
.lede { font-size: 1.15rem; color: var(--ink); }
.note { font-family: var(--sans); font-size: 0.95rem; color: var(--ink-soft); }
.subtitle { font-style: italic; color: var(--ink-soft); }
.tag { display: inline-block; vertical-align: middle; font-family: var(--sans); font-weight: 400; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; border: 1.5px solid var(--ink); border-radius: 3px; padding: 0.1rem 0.55rem; margin-left: 0.4rem; }
.points { list-style: none; padding: 0; }
.points li { padding-left: 1.1rem; border-left: 2px solid var(--line); margin-bottom: 0.9em; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4em; }
.center + .center, p.center { justify-content: center; }
.button { display: inline-block; font-family: var(--sans); font-size: 1rem; letter-spacing: 0.03em; text-decoration: none; background: var(--ink); color: var(--cream); padding: 0.8rem 1.3rem; border: 1.5px solid var(--ink); border-radius: 3px; min-height: 48px; }
.button:hover { background: var(--accent); border-color: var(--accent); color: var(--cream); }
.button.ghost { background: transparent; color: var(--ink); }
.button.ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* Book shelf (home page) */
.shelf { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
.shelf li { margin: 0; }
.shelf a { display: block; text-decoration: none; color: var(--ink); font-family: var(--sans); font-size: 0.95rem; line-height: 1.35; text-align: center; }
.shelf img { border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(42, 46, 51, 0.10); margin-bottom: 0.7rem; background: #fff; }
.shelf a:hover span { text-decoration: underline; }

/* Books page */
.book { display: grid; grid-template-columns: 260px 1fr; gap: 2.2rem; align-items: start; padding: 2.2rem 0; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.book h2 { margin-top: 0; }
.book-cover img { border: 1px solid var(--line); box-shadow: 0 2px 12px rgba(42, 46, 51, 0.12); background: #fff; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.2rem 0 2.6rem; font-family: var(--sans); font-size: 0.95rem; color: var(--ink-soft); line-height: 1.6; }
.site-footer .disclaimer { max-width: 44rem; color: var(--ink); }
.foot-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; margin: 1.2rem 0; }
.foot-links li { margin: 0; }
.foot-links a { display: inline-block; padding: 0.35rem 0; }
.follow-label { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 1.4rem 0 0.5rem; }
.social { list-style: none; padding: 0; margin: 0 0 1.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; }
.social li { margin: 0; }
.social a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0.45rem 0.9rem 0.45rem 0.7rem; border: 1.5px solid var(--line); border-radius: 4px; color: var(--ink); text-decoration: none; background: var(--cream); }
.social a:hover { border-color: var(--ink); background: #fff; }
.social svg { flex: none; }
.copy { margin: 0; }

/* Articles */
.teaser { border-top: 1px solid var(--line); padding: 1.6rem 0 0.4rem; }
.teaser h2 { margin: 0 0 0.2em; }
.teaser h2 a { color: var(--ink); text-decoration: none; }
.teaser h2 a:hover { text-decoration: underline; }
.article h2 { margin-top: 1.7em; }
.article blockquote { margin: 1.4em 0; padding: 0.2em 0 0.2em 1.2rem; border-left: 3px solid var(--line); font-style: italic; }
.aside { margin: 2.4em 0 0; padding: 1.1rem 1.3rem 0.1rem; border: 1px solid var(--line); background: var(--cream-deep); font-family: var(--sans); font-size: 0.98rem; line-height: 1.6; }
.related { margin-top: 2.6em; border-top: 1px solid var(--line); }
.related > h2 { font-family: var(--sans); font-weight: 400; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin: 1.4rem 0 0.4rem; }
.related-book { display: grid; grid-template-columns: 120px 1fr; gap: 1.4rem; align-items: start; padding: 1.2rem 0; }
.related-book + .related-book { border-top: 1px solid var(--line); }
.related-book h3 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 0.3em; }
.related-book h3 a { color: var(--ink); text-decoration: none; }
.related-book h3 a:hover { text-decoration: underline; }
.related-book .subtitle { font-size: 0.98rem; line-height: 1.5; margin-bottom: 0.2em; }
.related-book .actions { margin-top: 0.8em; }
.related-cover img { border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(42, 46, 51, 0.10); background: #fff; }
.keep-going { margin-top: 2.6em; border-top: 1px solid var(--line); }
.keep-going > h2 { font-family: var(--sans); font-weight: 400; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin: 1.4rem 0 0.6rem; }
.keep-going ul { list-style: none; padding: 0; margin: 0; }
.keep-going li { padding: 0.7rem 0; line-height: 1.5; }
.keep-going li + li { border-top: 1px solid var(--line); }
.keep-going .kind { margin-right: 0.5em; }
.article-list { list-style: none; padding: 0; }
.article-list li { border-top: 1px solid var(--line); margin: 0; }
.article-list li:last-child { border-bottom: 1px solid var(--line); }
.article-list a { display: block; padding: 0.85rem 0; color: var(--ink); text-decoration: none; }
.article-list a:hover { text-decoration: underline; }

/* Sign-up form */
.signup { margin: 1.6em 0 1.2em; padding: 1.4rem 1.4rem 0.6rem; border: 1.5px solid var(--ink); border-radius: 4px; background: #fff; }
.signup label { display: block; font-family: var(--sans); font-size: 1rem; letter-spacing: 0.03em; margin-bottom: 0.5rem; }
.signup-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 0.9rem; }
.signup input[type=email] { flex: 1 1 16rem; min-height: 52px; padding: 0.7rem 0.9rem; font-family: var(--sans); font-size: 1.1rem; color: var(--ink); background: var(--cream); border: 1.5px solid var(--ink-soft); border-radius: 3px; }
.signup input[type=email]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.signup .button { min-height: 52px; cursor: pointer; font-size: 1.05rem; }

@media (max-width: 860px) {
  .shelf { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .book { grid-template-columns: 1fr; gap: 1.2rem; }
  .book-cover { max-width: 60%; }
  .related-book { grid-template-columns: 84px 1fr; gap: 1rem; }
  .shelf { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.author-box { margin: 2.4em 0 0; padding: 1.1rem 1.3rem 0.1rem; border-left: 3px solid var(--accent); background: var(--cream-deep); font-family: var(--sans); font-size: 0.98rem; line-height: 1.6; }
.author-box + .aside { margin-top: 1em; }
.author-box::after { content: ""; display: block; clear: both; }
.author-photo { float: left; width: 96px; height: 96px; border-radius: 50%; margin: 0.1rem 1rem 0.9rem 0; object-fit: cover; }
.about-photo { float: right; width: 160px; height: 160px; border-radius: 50%; margin: 0 0 1rem 1.4rem; object-fit: cover; }
@media (max-width: 480px) { .about-photo { float: none; display: block; margin: 0 auto 1rem; } }
.kind { display: inline-block; font-family: var(--sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); border: 1px solid var(--ink-soft); border-radius: 3px; padding: 0.05em 0.5em; margin-right: 0.35em; vertical-align: 0.12em; white-space: nowrap; }
.article h2#sources ~ ul, .article .sources { font-family: var(--sans); font-size: 0.95rem; line-height: 1.6; }
.kind-key { font-family: var(--sans); font-size: 0.9rem; line-height: 1.9; color: var(--ink-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0.6em 0; margin: 1.2em 0 1.8em; }
.kind-key strong { color: var(--ink); }
.shelf img.cover-3d, .book-cover img.cover-3d, .related-cover img.cover-3d, img.cover-3d { border: 0; box-shadow: none; background: transparent; }
.watch { margin: 1.2em 0 1.8em; }
.watch p { font-size: 1rem; line-height: 1.6; margin: 0.6em 0 0; }
.watch-pic { position: relative; display: block; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 10px rgba(42, 46, 51, 0.15); }
.watch-pic img { display: block; width: 100%; height: auto; }
.watch-pic .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: rgba(42, 46, 51, 0.85); }
.watch-pic .play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #F7F4EF; }
.watch-pic:hover .play, .watch-pic:focus .play { background: #c4302b; }
.site-map { margin: 2.2em 0 2.6em; }
.site-map > h2 { font-family: var(--sans); font-weight: 400; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); text-align: center; margin: 0 0 1rem; }
.site-map .hub { text-align: center; margin: 0; }
.site-map .hub span { display: inline-block; background: var(--ink); color: var(--cream); font-family: var(--serif); font-weight: 700; font-size: 1.05rem; padding: 0.55em 1.3em; border-radius: 999px; }
.site-map .hub small { display: block; font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.4em; }
.site-map .hub::after { content: ""; display: block; width: 0; height: 26px; margin: 0.5em auto 0; border-left: 2px dashed var(--line); }
.site-map .rooms { list-style: none; margin: 0; padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; border: 2px dashed var(--line); border-radius: 18px; }
.site-map .room { background: var(--cream-deep); border-radius: 12px; padding: 1rem 1.1rem; margin: 0; }
.site-map .room-head { display: flex; align-items: center; gap: 0.6em; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; }
.site-map .room-head:hover span { text-decoration: underline; }
.site-map .room-head svg { flex: none; width: 38px; height: 38px; padding: 7px; border-radius: 50%; background: var(--cream); fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.site-map .room p { font-size: 0.95rem; line-height: 1.55; margin: 0.5em 0 0; }
.site-map .room-links { font-family: var(--sans); font-size: 0.9rem; }
@media (max-width: 560px) { .site-map .rooms { grid-template-columns: 1fr; padding: 12px; } }
