/* cavecals.com content pages. Colors and type follow the home page (backend/src/app/landing.css). */
@font-face { font-family: Schoolbell; src: url(/_c/fonts/Schoolbell-Regular.ttf) format("truetype"); font-display: swap; }
:root {
  --ink: #302319; --orange: #b84718; --cream: #fbf8f2; --muted: #72665b; --line: #e3d6c6; --card: #fffdf9;
  color-scheme: light; background: var(--cream); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); }
a { color: var(--orange); }
img { max-width: 100%; height: auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 10; }

/* Header */
.site-header { max-width: 1200px; margin: auto; padding: 24px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { display: inline-flex; flex-shrink: 0; }
.wordmark img { display: block; height: 30px; width: auto; }
.site-header nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.site-header nav a { color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-header nav a:hover { color: var(--orange); }
.site-header .header-download { background: var(--orange); color: #fff; padding: 0 18px; border-radius: 999px; font-weight: 700; }
.site-header .header-download:hover { color: #fff; filter: brightness(1.08); }

/* Article */
.site-main { padding: 8px 20px 0; }
.seo-article { max-width: 720px; margin: 0 auto; }
.seo-breadcrumbs { font-size: 14px; color: var(--muted); margin: 12px 0 18px; }
.seo-breadcrumbs a { color: var(--muted); }
.seo-article h1 { font-family: Schoolbell, cursive; font-weight: 400; font-size: clamp(36px, 7vw, 56px); line-height: 1.08; margin: 0 0 12px; letter-spacing: -.01em; }
.seo-byline, .seo-reviewed { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.seo-reviewed { margin-bottom: 28px; }
.seo-body { font-size: 18px; line-height: 1.65; margin-top: 24px; }
.seo-body h2 { font-family: Schoolbell, cursive; font-weight: 400; font-size: 32px; line-height: 1.15; margin: 40px 0 10px; }
.seo-body h3 { font-size: 20px; margin: 28px 0 6px; }
.seo-body p, .seo-body ul, .seo-body ol { margin: 0 0 18px; }
.seo-body li { margin-bottom: 8px; }
.seo-body blockquote { margin: 24px 0; padding: 16px 20px; background: var(--card); border-left: 4px solid var(--orange); border-radius: 0 12px 12px 0; }
.seo-body blockquote p:last-child { margin-bottom: 0; }
.seo-body img { display: block; width: auto; max-width: min(100%, 300px); margin: 8px auto 24px; border-radius: 20px; box-shadow: 0 8px 28px rgb(48 35 25 / 14%); }
.seo-body code { background: #f1e7da; padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.seo-table { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.seo-table table { border-collapse: collapse; width: 100%; font-size: 16px; }
.seo-table th, .seo-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; min-width: 8.5em; }
.seo-table th:first-child, .seo-table td:first-child { min-width: 6.5em; }
.seo-table tr:last-child td { border-bottom: 0; }
.seo-table th { background: #f6eee3; font-weight: 700; }
.seo-sources { max-width: 720px; margin: 36px auto 0; font-size: 15px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.seo-sources h2 { font-size: 18px; margin: 8px 0; color: var(--ink); }
.seo-sources li { margin-bottom: 6px; overflow-wrap: anywhere; }
.seo-badges, .store-badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 20px; }
.seo-badges img, .store-badges img { height: 44px; width: auto; display: block; }
.seo-hub { list-style: none; padding: 0; margin: 20px 0; }
.seo-hub li { padding: 16px 0; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.5; color: var(--muted); }
.seo-hub li a { font-size: 20px; font-weight: 700; color: var(--ink); }
.seo-draft { background: #ffe9b8; border: 1px solid #e3b44f; color: #5b3d00; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.seo-tool { margin: 20px 0 28px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }

/* Get the app */
.get-the-app { max-width: 720px; margin: 48px auto 0; padding: 28px 24px; background: #f4e7d6; border-radius: 20px; text-align: center; }
.get-the-app h2 { font-family: Schoolbell, cursive; font-weight: 400; font-size: 34px; margin: 0 0 4px; }
.get-the-app p { margin: 0 0 14px; color: var(--muted); }
.get-the-app .store-badges { justify-content: center; margin-bottom: 0; }

/* Footer */
.site-footer { max-width: 1200px; margin: 48px auto 0; padding: 0 32px 28px; display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: center; justify-content: space-between; }
.footer-brand { font-family: Schoolbell, cursive; font-size: 23px; }
.social-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.social-links a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); }
.social-links a:hover { color: var(--orange); background: #f1e4d5; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 15px; }
.footer-links a { color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; color: var(--muted); font-size: 13px; border-top: 1px solid #c5ac925c; padding-top: 18px; }
.footer-bottom a { color: var(--muted); }

@media (max-width: 640px) {
  .site-header { padding: 18px 16px; }
  .wordmark img { height: 24px; }
  .site-header nav { gap: 14px; font-size: 14px; }
  .site-header nav a:not(.header-download) { display: none; }
  .site-main { padding: 0 16px; }
  .seo-body { font-size: 17px; }
  .site-footer { padding: 0 16px 24px; justify-content: center; text-align: center; }
  .footer-links, .footer-bottom { justify-content: center; }
}

/* Goal weight by date calculator (src/tools/goal-weight-date.js) */
.gwd { display: grid; gap: 14px; font-size: 16px; }
.gwd fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.gwd legend { font-weight: 700; padding: 0; margin-bottom: 4px; width: 100%; }
.gwd fieldset label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.gwd input[type=radio] { width: 20px; height: 20px; accent-color: var(--orange); margin: 0; }
.gwd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.gwd-grid label, .gwd-wide { display: grid; gap: 6px; font-weight: 700; }
.gwd-grid label[hidden] { display: none; }
.gwd .unit { font-weight: 400; color: var(--muted); }
.gwd input[type=number], .gwd input[type=date], .gwd select {
  font: inherit; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid #cdbba6; border-radius: 10px;
  min-height: 44px; padding: 8px 12px; width: 100%; }
.gwd input:focus-visible, .gwd select:focus-visible { outline: 3px solid #e9a27f; outline-offset: 1px; }
.gwd-result { margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: #f6eee3; }
.gwd-result p { margin: 0 0 8px; line-height: 1.5; }
.gwd-result p:last-child { margin-bottom: 0; }
.gwd-big { font-size: 20px; }
.gwd-big strong { font-family: Schoolbell, cursive; font-size: 46px; font-weight: 400; color: var(--orange); line-height: 1; }
