/* Quaker Maker — one stylesheet for the whole site.
   Look: "Shaker simple". Cream paper, plain serif type, and horizontal accent bars in
   brick red, ochre and slate blue (the old milk-paint colours of Shaker and Quaker furniture).
   The earlier brass-and-gears steampunk look is kept in style-steampunk.css.
   No frameworks, no scripts, no external requests: fonts are self-hosted in /fonts. */

/* ---------- Fonts (SIL Open Font License; licenses are in /fonts) ---------- */
@font-face { font-family: "Lora"; src: url("../fonts/lora-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../fonts/work-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../fonts/work-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }

:root {
  --cream: #fbf8f1;
  --linen: #f1ebdc;
  --card: #ffffff;
  --ink: #2b2b2b;
  --ink-soft: #5a554c;
  --rule: #d6cfc0;

  --brick: #8c3b2a;
  --brick-dark: #6e2d1f;
  --ochre: #c9a24a;
  --ochre-dark: #8a6a1c;
  --slate: #4f6b7a;
  --slate-dark: #3a5260;
  --sage: #6b8a4f;
  --sky: #6f93ae;
  --plum: #8a6f9e;

  /* names used by page markup (inline card bands) */
  --verdigris: var(--slate);
  --terracotta: var(--brick);
  --orange-bright: var(--ochre);

  --radius: 3px;
  --max: 68rem;
  --display: "Lora", Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --label: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Lora", Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: var(--label);

  /* the three-colour horizontal bar used across the site */
  --bars: linear-gradient(90deg, var(--brick) 0 33.4%, var(--ochre) 33.4% 66.7%, var(--slate) 66.7% 100%);
}

*, *::before, *::after { box-sizing: border-box; }

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

body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--serif); font-size: 1.125rem; line-height: 1.65; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--slate-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--brick); }
:focus-visible { outline: 3px solid var(--brick); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.2; color: var(--ink); margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 4vw + 0.8rem, 3.1rem); line-height: 1.12; }
h2 { font-size: clamp(1.45rem, 1.6vw + 1rem, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.narrow { max-width: 44rem; }

.skip-link { position: absolute; left: -999px; top: 0.5rem; background: var(--brick); color: #fff; padding: 0.5rem 1rem; z-index: 100; font-family: var(--label); }
.skip-link:focus { left: 0.5rem; }

/* ---------- Header / nav ---------- */
.site-header { background: var(--cream); border-bottom: 1px solid var(--rule); position: relative; }
.site-header::before { content: ""; display: block; height: 6px; background: var(--bars); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 0.9rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--display); font-weight: 600; font-size: 1.6rem; color: var(--brick); text-decoration: none; }
.brand::before { content: ""; width: 2.6rem; height: 2.6rem; flex: none; background: url("../images/quaker-woodcut.png") center/cover no-repeat; border: 1px solid var(--rule); border-radius: 2px; }
.brand:hover { color: var(--brick-dark); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; }
.site-nav a { font-family: var(--label); color: var(--ink); text-decoration: none; padding: 0.3rem 0; border-bottom: 3px solid transparent; font-size: 0.95rem; }
.site-nav a:hover { color: var(--brick); border-bottom-color: var(--ochre); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--sec, var(--brick)); font-weight: 600; }
/* the current menu item is underlined in its section's colour */
.sec-slate { --sec: var(--slate); }
.sec-ochre { --sec: var(--ochre); }
.sec-brick { --sec: var(--brick); }
.sec-sage { --sec: #6b8a4f; }
.sec-sky { --sec: #6f93ae; }

/* ---------- Hero and page heads ---------- */
.hero { padding-block: clamp(2rem, 5vw, 3.8rem); background: var(--cream); }
.page-head { padding-block: 2.2rem 1.8rem; background: var(--linen); border-bottom: 1px solid var(--rule); position: relative; }
.page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 5px; background: var(--accent, var(--slate)); }
.page-head::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 5px; background: var(--accent, var(--slate)); }
/* each section of the site gets its own bar colour; Projects (and every project page) is slate by default */
.page-head.accent-ochre { --accent: var(--ochre); }
.page-head.accent-brick { --accent: var(--brick); }
.page-head.accent-sage { --accent: #6b8a4f; }
.page-head.accent-sky { --accent: #6f93ae; }
.hero h1 { max-width: 18ch; }
.hero p.lead { font-size: 1.25rem; max-width: 38rem; color: var(--ink-soft); }
.hero-grid { display: grid; gap: 2rem 3rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 52rem) { .hero-grid { grid-template-columns: 1.1fr 1fr; } }
.hero-photo { margin: 0 auto; max-width: 30rem; }
.hero-photo img { width: 100%; max-width: 30rem; margin-inline: auto; border: 1px solid var(--rule); background: #fff; padding: 0.6rem; border-radius: var(--radius); }
.hero-photo figcaption { margin-top: 0.5rem; }
.mascot { width: min(15rem, 62%); margin: 0 auto; }
.eyebrow { display: inline-block; font-family: var(--label); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate-dark); margin-bottom: 0.8rem; padding-bottom: 0.3rem; border-bottom: 3px solid var(--ochre); }

.page-head p { color: var(--ink-soft); max-width: 40rem; margin: 0; font-size: 1.15rem; }
.breadcrumb { font-family: var(--label); font-size: 0.9rem; margin-bottom: 0.8rem; }
.breadcrumb a { color: var(--slate-dark); }
.breadcrumb a:hover { color: var(--brick); }

.button { display: inline-block; font-family: var(--label); font-weight: 600; font-size: 0.98rem; background: var(--brick); color: #fff; padding: 0.7rem 1.3rem; border-radius: var(--radius); border: 2px solid var(--brick); text-decoration: none; margin-right: 0.6rem; margin-top: 0.4rem; }
.button:hover { background: var(--brick-dark); border-color: var(--brick-dark); color: #fff; }
.button.secondary { background: transparent; color: var(--slate-dark); border-color: var(--slate); }
.button.secondary:hover { background: var(--slate); border-color: var(--slate); color: #fff; }

/* ---------- Sections ---------- */
section.block { padding-block: clamp(2rem, 5vw, 3.5rem); }
section.block.tint { background: var(--linen); border-block: 1px solid var(--rule); }
.section-intro { max-width: 40rem; color: var(--ink-soft); }

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); margin-top: 1.5rem; }

/* ---------- Cards: white, hairline edge, coloured bar on top ---------- */
.card { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(43,43,43,0.04); }
.card .band { height: 0.55rem; background: var(--ochre); }
.card .body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin-bottom: 0.3rem; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--brick); text-decoration: underline; }
.card p { color: var(--ink-soft); font-size: 1.02rem; }
.card .more { margin-top: auto; font-family: var(--label); font-weight: 600; font-size: 0.92rem; }

.card.placeholder { border-style: dashed; background: transparent; }
.card.placeholder .band { background: var(--rule); }

.principle-card .band { background: var(--slate); }
.principle-card.peace .band { background: #6f93ae; }
.principle-card.integrity .band { background: var(--ochre); }
.principle-card.community .band { background: var(--brick); }
.principle-card.equality .band { background: #8a6f9e; }
.principle-card.stewardship .band { background: #6b8a4f; }
.principle-card.simplicity .band { background: var(--slate); }
.principle-card .question { font-style: italic; color: var(--slate-dark); font-weight: 600; }

/* ---------- Tags ---------- */
.tags { list-style: none; padding: 0; margin: 0 0 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li { font-family: var(--label); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; background: transparent; color: var(--slate-dark); border: 1px solid var(--slate); padding: 0.1rem 0.6rem; border-radius: 999px; }

/* ---------- Project pages ---------- */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }

.facts { background: var(--card); border: 1px solid var(--rule); border-left: 6px solid var(--ochre); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.facts dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.25rem; }
.facts dt { font-family: var(--label); font-weight: 600; font-size: 0.92rem; color: var(--brick); }
.facts dd { margin: 0; }

.reflect { border-left: 6px solid var(--slate); background: var(--linen); padding: 0.9rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.75rem 0; }
.reflect h3 { margin-bottom: 0.3rem; font-family: var(--label); font-weight: 600; font-size: 1rem; letter-spacing: 0.04em; color: var(--slate-dark); }
.reflect p:last-child, .reflect ul:last-child { margin-bottom: 0; }

figure { margin: 1.5rem 0; }
figure img { border-radius: var(--radius); }
figcaption { font-family: var(--label); font-size: 0.86rem; color: var(--ink-soft); margin-top: 0.4rem; }

.todo { background: #fff3c4; border: 1px dashed #8a6d00; padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.92em; }

/* ---------- Gauges (images from the 2023 fair table) ---------- */
.gauge-pair { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.5rem 0; }
.gauge-pair figure { margin: 0; text-align: center; }
.gauge-four { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 62rem) { .gauge-four { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 30rem) { .gauge-four { grid-template-columns: 1fr; } }
.gauge-pair img { width: min(20rem, 100%); margin: 0 auto; border-radius: 0; }

/* ---------- Numbered plates (design principles) ---------- */
.plate-list { list-style: none; counter-reset: plate; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.plate-list li { counter-increment: plate; position: relative; margin: 0; padding: 1rem 1.25rem 1rem 4.6rem; min-height: 4.4rem; display: flex; align-items: center; background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-left: 6px solid var(--ochre); border-radius: var(--radius); }
.plate-list li:nth-child(3n+1) { border-left-color: var(--brick); }
.plate-list li:nth-child(3n+3) { border-left-color: var(--slate); }
.plate-list li::before { content: counter(plate); position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; font-family: var(--label); font-weight: 600; font-size: 1.05rem; color: #fff; background: var(--slate); }
.plate-list em { font-style: normal; color: var(--brick); font-weight: 600; }

/* ---------- Timeline (history page) ---------- */
.timeline { list-style: none; padding: 0; margin: 1.5rem 0 0; border-left: 3px solid var(--ochre); }
.timeline li { position: relative; padding: 0 0 1.4rem 1.4rem; }
.timeline li::before { content: ""; position: absolute; left: -0.62rem; top: 0.45rem; width: 0.95rem; height: 0.95rem; border-radius: 50%; background: var(--brick); border: 2px solid var(--cream); }
.timeline h3 { margin-bottom: 0.15rem; }
.timeline .when { font-family: var(--label); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-dark); }

/* ---------- Resource lists ---------- */
.link-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.link-list li { padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
.link-list a { font-weight: 600; }
.link-list span { display: block; color: var(--ink-soft); font-size: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--linen); color: var(--ink-soft); padding-block: 2rem; margin-top: 0; font-size: 1rem; border-top: 1px solid var(--rule); position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 5px; background: var(--bars); }
.site-footer a { color: var(--slate-dark); }
.site-footer a:hover { color: var(--brick); }
.site-footer p { margin-bottom: 0.5em; }

@media (max-width: 36rem) {
  .facts dl { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 0.6rem; }
  .plate-list li { padding-left: 4.2rem; }
}

@media print {
  .site-header, .site-footer, .skip-link, .mascot { display: none; }
  body { background: #fff; font-size: 11pt; }
  .page-head, .hero { background: none; }
  .page-head::before, .page-head::after { display: none; }
}

/* Illustrated guide who points into the text */
.guide-float { float: right; width: 8.5rem; margin: 0.25rem 0 1rem 1.5rem; text-align: center; }
.guide-float img { border-radius: 0; margin: 0 auto; }
.guide-float figcaption { font-size: 0.85rem; }
@media (max-width: 34rem) { .guide-float { float: none; margin: 1rem auto; width: 9rem; } }
.prose h2 { clear: both; }

/* Embedded timeline */
.timeline-frame { margin: 1.5rem 0 0.5rem; border: 1px solid var(--rule); border-top: 6px solid var(--slate); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.timeline-frame iframe { display: block; width: 100%; height: 650px; }
.timeline-note { font-size: 0.9rem; margin: 0.5rem 0 1.5rem; }
@media (max-width: 40rem) { .timeline-frame iframe { height: 560px; } }

/* ---- Added for Grav: blog cards and post dates ---- */
.card .date, .post-date { font-family: var(--label); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 0.4rem; }
.page-head .post-date { color: var(--ink-soft); margin: 0 0 0.3rem; }

/* ---- Modular home: lead paragraph comes from the module's Markdown ---- */
.hero .lead-block > p:first-child { font-size: 1.25rem; max-width: 38rem; color: var(--ink-soft); }

/* ---- Header search ---- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.55rem; }
.site-search { display: flex; gap: 0.4rem; }
.site-search input { -webkit-appearance: none; appearance: none; font-family: var(--label); font-size: 1rem; line-height: 1.3; width: 13rem; padding: 0.35rem 0.7rem; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-radius: 6px; }
.site-search input::placeholder { color: var(--ink-soft); opacity: 1; }
.site-search input:focus, .site-search input:focus-visible { outline: none; border-color: var(--ochre); box-shadow: 0 0 0 2px rgba(201, 162, 74, 0.4); }
.site-search button { font-family: var(--label); font-size: 0.95rem; font-weight: 600; color: #fff; background: var(--slate); border: 0; border-radius: 6px; padding: 0.35rem 0.85rem; cursor: pointer; }
.site-search button:hover { background: var(--slate-dark); }
@media (max-width: 40rem) { .header-right { align-items: stretch; width: 100%; } .site-search { width: 100%; } .site-search input { flex: 1; width: auto; } }

/* ---- Filter chips and categories ---- */
.filterbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.8rem 1.4rem; margin: 0 0 1.75rem; padding: 0 0 1.25rem; border-bottom: 1px solid var(--rule); }
.filterbar label { display: flex; flex-direction: column; gap: 0.3rem; }
.filterbar label span { font-family: var(--label); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.filterbar select { font-family: var(--label); font-size: 1rem; font-weight: 600; color: var(--slate-dark); background: #fff; border: 1px solid var(--slate); border-radius: 6px; padding: 0.45rem 2rem 0.45rem 0.7rem; min-width: 14rem; max-width: 100%; }
.filterbar button { font-family: var(--label); font-weight: 600; background: var(--slate); color: #fff; border: 0; border-radius: 6px; padding: 0.55rem 1.1rem; cursor: pointer; }
.filter-status { margin: 0 0 0 auto; font-family: var(--label); font-size: 0.9rem; color: var(--ink-soft); }
.filter-status a { color: var(--brick); }
@media (max-width: 40rem) { .filterbar select { min-width: 0; width: 100%; } .filterbar label { flex: 1 1 100%; } .filter-status { margin-left: 0; } }
.card .cats { font-family: var(--label); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brick); margin: 0 0 0.4rem; }
.tags li.cat { background: var(--slate); color: #fff; border-color: var(--slate); }
/* GitHub Markdown Alerts, styled to match quaker-maker-next.
   Paste at the end of user/themes/quaker-maker-next/css/style.css.
   Same shape as .reflect (left bar, linen background), one colour per alert type. */
.md-alert { --alert: var(--slate); border-left: 6px solid var(--alert); background: var(--linen); padding: 0.9rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.75rem 0; }
.md-alert > :last-child { margin-bottom: 0; }
.md-alert-title { display: flex; align-items: center; gap: 0.45rem; margin: 0 0 0.4rem; font-family: var(--label); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; color: var(--alert); }
.md-alert-title svg { fill: currentColor; flex: none; }
.md-alert--note      { --alert: var(--slate); }
.md-alert--tip       { --alert: var(--sage); }
.md-alert--important { --alert: var(--plum); }
.md-alert--warning   { --alert: var(--ochre-dark); }
.md-alert--caution   { --alert: var(--brick); }
.principle-card h3::before {
  font-family: "Font Awesome 7 Free";
  font-weight: 900;
  font-size: 1.2em;
  display: inline-block;
  width: 1.25em;
  margin-right: 0.5em;
  text-align: center;
  vertical-align: -0.08em;
}
.principle-card.simplicity  h3::before { content: "\f06d" / ""; color: #e8741a; }            /* fire, flame orange (not a theme colour) */
.principle-card.peace       h3::before { content: "\f4ba" / ""; color: var(--sky); }         /* dove */
.principle-card.integrity   h3::before { content: "\f13d" / ""; color: var(--ochre-dark); }   /* anchor; alternatives: ruler-vertical \f548, arrows-down-to-line \e4b8 */
.principle-card.community   h3::before { content: "\e533" / ""; color: var(--brick); }        /* people-group */
.principle-card.equality    h3::before { content: "\f24e" / ""; color: var(--plum); }         /* scale-balanced */
.principle-card.stewardship h3::before { content: "\f4d8" / ""; color: var(--sage); }         /* seedling */
/* Center a lone button that follows a hero photo */
.hero-photo + p:has(> a.button) { text-align: center; }
/* Icons on the home page cards */
.card h3 .card-icon { display: inline-block; width: 1.3em; margin-right: 0.45em; font-size: 1.15em; text-align: center; vertical-align: -0.06em; }
.card h3 .card-icon.fa-door-open { color: var(--ochre-dark); }
.card h3 .card-icon.fa-compass-drafting { color: var(--sage); }
.card h3 .card-icon.fa-gift { color: var(--brick); }
/* Copy-ready embed code on project pages */
.embed-code { white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.2rem; font-size: 0.9rem; }