/* homebydouglas.com: a warm workshop palette, a humanist sans for text and a slab serif for headings.
   System font stacks only (no font files to load); font-size-adjust keeps every fallback at the
   same x-height so a swap between them never reflows the page. */
:root {
  --ink: #23302a;
  --muted: #4f5d55;
  --paper: #fbf8f2;
  --panel: #f1eadc;
  --line: #d9cfbd;
  --green: #24493a;
  --green-ink: #ffffff;
  --rust: #9a4318;
  --focus: #b8560f;
  --text: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, sans-serif;
  --slab: Rockwell, "Rockwell Nova", "Roboto Slab", "DejaVu Serif", "Sitka Small", serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--text);
  font-size-adjust: 0.5;
}
h1, h2, h3 { font-family: var(--slab); font-size-adjust: 0.48; line-height: 1.2; color: var(--green); text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); margin: 0.4em 0 0.4em; }
h2 { font-size: 1.45rem; margin: 1.8em 0 0.5em; }
h3 { font-size: 1.15rem; margin: 0 0 0.35em; }
p, li { text-wrap: pretty; }
a { color: var(--rust); text-underline-offset: 0.15em; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

.hbd-wrap { max-width: 68rem; margin-inline: auto; padding-inline: 1.25rem; }
.hbd-skip { position: absolute; inset-inline-start: 1rem; inset-block-start: -3rem; background: var(--green); color: var(--green-ink); padding: 0.5rem 1rem; z-index: 1; }
.hbd-skip:focus { inset-block-start: 0.5rem; }

.hbd-header { background: var(--green); color: var(--green-ink); }
.hbd-header-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding-block: 0.85rem; }
.hbd-brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--green-ink); text-decoration: none; font: 700 1.3rem/1.2 var(--slab); font-size-adjust: 0.48; }
.hbd-brand:hover { color: var(--green-ink); }
.hbd-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.hbd-nav a { color: var(--green-ink); text-decoration: none; padding-block: 0.6rem; border-block-end: 2px solid transparent; }
.hbd-nav a:hover, .hbd-nav a[aria-current="page"] { border-block-end-color: #f0c79c; color: var(--green-ink); }

.hbd-main { padding-block: 1.5rem 3rem; }
.hbd-hero { display: grid; gap: 1.5rem; align-items: center; padding-block: 1rem 1.5rem; }
@media (min-width: 52rem) { .hbd-hero { grid-template-columns: 1.2fr 1fr; } }
.hbd-hero-img { aspect-ratio: 3 / 2; width: 100%; border-radius: 0.75rem; }
.hbd-lede { font-size: 1.2rem; color: var(--muted); max-width: 38rem; }

.hbd-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.hbd-card { background: #fff; border: 1px solid var(--line); border-block-start: 5px solid var(--rust); border-radius: 0.5rem; padding: 1.1rem 1.2rem; }
.hbd-card h3 a { color: var(--green); text-decoration: none; }
.hbd-card h3 a:hover { text-decoration: underline; }
.hbd-card p { margin: 0.4em 0 0; }
.hbd-panel { background: var(--panel); border-radius: 0.75rem; padding: 0.25rem 1.5rem 1rem; margin-block-start: 2.5rem; }

.hbd-prose { max-width: 42rem; }
.hbd-prose li + li { margin-block-start: 0.35em; }
.hbd-crumb { margin: 0; font-size: 0.95rem; }
.hbd-byline { color: var(--muted); margin-block-start: 0; }
.hbd-cite { text-decoration: none; margin-inline-start: 0.1em; }
.hbd-table { border-collapse: collapse; width: 100%; margin-block: 1rem; font-size: 0.97rem; }
.hbd-table caption { text-align: start; font-weight: 700; padding-block-end: 0.4rem; }
.hbd-table th, .hbd-table td { border: 1px solid var(--line); padding: 0.5rem 0.6rem; text-align: start; vertical-align: top; }
.hbd-table thead th { background: var(--panel); }
.hbd-note { background: var(--panel); border-inline-start: 5px solid var(--green); border-radius: 0.25rem; padding: 0.25rem 1rem; margin-block: 2rem; }
.hbd-sources ol { padding-inline-start: 1.4rem; font-size: 0.97rem; }
.hbd-small { font-size: 0.92rem; color: var(--muted); }

/* The contact form the core prints on /contact/ (pages_contact_form). */
.contact-form { display: grid; gap: 1rem; max-width: 34rem; margin-block: 1.5rem; }
.contact-field { display: grid; gap: 0.3rem; margin: 0; }
.contact-field label { font-weight: 700; }
.contact-form input, .contact-form textarea { font: inherit; font-size: max(1rem, 1em); padding: 0.6rem 0.7rem; border: 1px solid #6f6a5f; border-radius: 0.35rem; background: #fff; color: var(--ink); width: 100%; }
.contact-form textarea { resize: vertical; min-height: 10rem; }
.contact-form input:user-invalid, .contact-form textarea:user-invalid { border-color: #a1260d; border-width: 2px; }
.contact-form button { font: inherit; font-weight: 700; min-height: 48px; padding: 0.6rem 1.4rem; border: 0; border-radius: 0.35rem; background: var(--green); color: var(--green-ink); cursor: pointer; }
.contact-form button:hover { background: #183528; }

.config-error { background: #fff1ec; border: 2px solid #a1260d; padding: 1rem; border-radius: 0.4rem; }

.hbd-footer { background: var(--panel); border-block-start: 1px solid var(--line); padding-block: 1.5rem; font-size: 0.95rem; }
.hbd-footer p { margin: 0.4rem 0; }
.hbd-footer-links a { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
