:root {
  --color-paper: #FBF7F1;
  --color-paper-alt: #F3EDE3;
  --color-ink: #2A2420;
  --color-ink-soft: #5C544B;
  --color-thread: #A8632F;
  --color-thread-light: #C98A54;
  --color-bead-gold: #C9A15A;
  --color-line: #E4DACB;
  --color-focus: #8A4B22;
  --color-spool-cap: #EADFC8;
  --color-spool-rim: #8A6A3E;

  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Public Sans", system-ui, -apple-system, sans-serif;

  --space-1: 4px; --space-2: 8px; --space-3: 16px;
  --space-4: 24px; --space-5: 40px; --space-6: 64px;

  --content-width: 640px;
}

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

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--color-thread); text-decoration-color: var(--color-line); text-underline-offset: 3px; }
a:hover { color: var(--color-thread-light); text-decoration-color: var(--color-thread-light); }

a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-paper);
  color: var(--color-thread);
  padding: var(--space-2) var(--space-3);
  z-index: 100;
  border: 1px solid var(--color-line);
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.9rem;
}
.skip-link:focus {
  left: var(--space-3);
  top: var(--space-3);
}

/* ---------- Header / woven wordmark ---------- */
/*
  This is a site-wide component, not entry-page-specific: the woven
  wordmark is the site's logo lockup and should appear identically
  on every page. It is fully static (no JS) -- see project style
  guide for why runtime measurement was tried and rejected here.
*/

header.site-header { border-bottom: 1px solid var(--color-line); }

.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.wordmark-woven {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  text-decoration: none;
}

.wordmark-text {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--color-ink);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.ltr {
  position: relative;
  display: inline;
}
.ltr--over  { z-index: 2; }  /* thread paints BEHIND these letters */
.ltr--under { z-index: 0; }  /* thread paints IN FRONT OF these letters */

/*
  Fixed em-based height, NOT a percentage of the wrapper's box --
  Fraunces' internal font metrics leave a lot of "invisible" space
  above its visible cap-height, so percentage-based sizing here
  previously landed the artwork in dead space above the letters.
  Fixed text, fixed size, hand-tuned SVG -- no JS measurement needed.
*/
.wordmark-thread-svg {
  position: absolute;
  left: -4px;
  top: 0.02em;
  width: calc(100% + 8px);
  height: 1em;
  overflow: visible;
  z-index: 1;
  pointer-events: none;
}

.wordmark-beads-svg {
  position: absolute;
  left: -4px;
  top: 0.02em;
  width: calc(100% + 8px);
  height: 1em;
  overflow: visible;
  z-index: 10;
  pointer-events: none;
}

nav.site-nav { display: flex; gap: var(--space-4); font-size: 0.9rem; }
nav.site-nav a { color: var(--color-ink-soft); text-decoration: none; }
nav.site-nav a:hover { color: var(--color-thread); }
nav.site-nav a[aria-current="page"] { color: var(--color-thread); font-weight: 600; }

/* ---------- Main (shared base; pages may add their own inner rules) ---------- */

main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}

/* ---------- Footer ---------- */

footer.site-footer { border-top: 1px solid var(--color-line); background: var(--color-paper-alt); }
.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-4);
  font-size: 0.8rem;
  color: var(--color-ink-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.footer-links a { color: var(--color-ink-soft); text-decoration: none; margin-right: var(--space-3); }
.footer-links a:hover { color: var(--color-thread); }

/* ---------- About blurb ---------- */
/*
  Shared, site-wide component -- appears on both entry pages and the
  homepage with identical markup/copy. Lives here (not in a
  page-specific file) so there is exactly one place defining what
  this component looks like.
*/

.about-blurb {
  background: var(--color-paper-alt);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: var(--space-6);
}

.about-blurb-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
}

.about-blurb-inner p {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-ink-soft);
  margin: 0 0 var(--space-3);
}
.about-blurb-inner p:last-of-type { margin-bottom: var(--space-4); }
.about-blurb-inner strong { color: var(--color-ink); font-weight: 600; }
.about-blurb-inner em { font-style: italic; color: var(--color-ink); }

.about-blurb-inner blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-thread);
  border-left: 2px solid var(--color-thread);
  padding-left: var(--space-4);
  margin: 0;
}

/*
  Desktop content-width bump -- shared across all pages. NOTE: entry.css
  defines its OWN 720px media query for entry-page-specific properties
  (--indent-scale, title/statement font sizes). If this breakpoint value
  is ever changed, update it in both files.
*/
@media (min-width: 720px) {
  :root {
    --content-width: 780px;
  }
}

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