/* Shared styles — starvingafterbreakfast.com resources site.
   Locked to the Starving After Breakfast cover's light palette: warm khaki
   ground, brick-red and brown accents, high-contrast display serif. Single
   light theme on purpose, so the site reads as the same object as the cover. */

:root {
  color-scheme: light;
  --ground:#e7dcc2; --paper:#f3ecdb; --ink:#33281a; --muted:#5f5238;
  --rule:#cdbd98; --accent:#a3302a; --accent-2:#6d4a2b; --accent-wash:#a3302a1a;
  --warn-bg:#f3e5cd; --warn-border:#b5651d; --warn-ink:#7a3d17;
  --display:"Didot","Bodoni MT","Hoefler Text","Playfair Display",Georgia,"Times New Roman",serif;
  --body:Georgia,"Iowan Old Style","Palatino Linotype",Palatino,"Times New Roman",serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--body); font-size: 1.06rem; line-height: 1.62;
}
.serif { font-family: var(--display); }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: .06em; }
a:hover { text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Skip-to-content link — off-screen until focused (WCAG 2.4.1 bypass blocks). */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--accent); color: #fbf6ec; font-weight: 700;
  padding: .7rem 1.1rem; border-radius: 0 0 4px 0; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Visible form label. */
.field-label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: .4rem; }

/* Amazon Associates disclosure bar — appears site-wide, above the fold. */
.disclosure {
  background: var(--accent-wash); border-bottom: 1px solid var(--rule);
  color: var(--muted); font-size: .8rem; text-align: center; padding: .5rem 1rem;
}

header.site { border-bottom: 1px solid var(--rule); background: var(--paper); }
header.site .bar {
  max-width: 52rem; margin: 0 auto; padding: 1rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: baseline; justify-content: space-between;
}
header.site .brand {
  font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: .01em;
  color: var(--accent); text-decoration: none;
}
header.site nav { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .9rem; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--accent); }

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem 5rem; }
.wrap.wide { max-width: 52rem; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.16; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5.5vw, 3rem); margin: 2.6rem 0 .8rem; letter-spacing: -.005em; color: var(--ink); }
h2 { font-size: 1.55rem; margin: 2.6rem 0 .75rem; color: var(--accent-2); }
h3 { font-size: 1.18rem; margin: 1.8rem 0 .5rem; color: var(--accent-2); font-weight: 700; }
.lede { font-size: 1.2rem; color: var(--muted); font-style: italic; }
p { margin: 0 0 1.15rem; }
ul, ol { margin: 0 0 1.15rem; padding-left: 1.4rem; }
li { margin-bottom: .4rem; }
li::marker { color: var(--accent-2); }
hr { border: none; border-top: 1px solid var(--rule); width: 40%; margin: 2.6rem auto; }
small, .fine { font-size: .85rem; color: var(--muted); }
strong { color: var(--ink); }

.card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 1.25rem 1.4rem; margin: 1.1rem 0;
}
.card h3 { margin-top: 0; }

/* Safety callout — deliberately amber, distinct from the brand red. */
.callout {
  background: var(--warn-bg); border-left: 3px solid var(--warn-border); color: var(--warn-ink);
  padding: 1rem 1.15rem; border-radius: 0 4px 4px 0; margin: 1.5rem 0;
}
.callout strong { color: var(--warn-ink); }

.paid { color: var(--muted); font-size: .82em; font-style: italic; white-space: nowrap; }

.btn {
  display: inline-block; background: var(--accent); color: #fbf6ec; border: none;
  padding: .7rem 1.4rem; border-radius: 4px; font: inherit; font-weight: 700;
  letter-spacing: .01em; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.07); text-decoration: none; }

.signup { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 1.5rem; margin: 2rem 0; }
.signup form { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 .5rem; }
.signup input[type=email] {
  flex: 1 1 16rem; padding: .75rem .9rem; font: inherit;
  border: 1px solid var(--rule); border-radius: 4px; background: var(--ground); color: var(--ink);
}

table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.tablewrap { overflow-x: auto; }
th, td { border: 1px solid var(--rule); padding: .5rem .7rem; text-align: left; }
th { background: var(--accent-wash); font-weight: 700; font-family: var(--display); }

footer.site {
  border-top: 1px solid var(--rule); color: var(--muted); font-size: .85rem;
  padding: 2rem 1.25rem; text-align: center;
}
footer.site a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Printable log page. */
@media print {
  .disclosure, header.site, footer.site, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .callout { border-left-color: #000; background: #f3f3f3; color: #000; }
  th, td { border-color: #000; }
  a { color: #000; text-decoration: none; }
}

/* Per-domain theming. The inline <head> script sets data-site on <html> from the
   hostname; default (and no-JS fallback) shows the flagship, Fasting, Honestly.
   Both books currently share the warm palette above; when Fasting, Honestly gets
   its own cover identity, add a [data-site="fh"] override of --accent etc. here. */
.only-sab { display: none; }
[data-site="sab"] .only-sab { display: revert; }
[data-site="sab"] .only-fh { display: none; }
