/* ============================================================
   Church AI Toolkit — design system
   Warm, pastoral, typography-first. Mobile-first, WCAG AA.
   ============================================================ */

:root {
  /* Palette: grounded, liturgically aware */
  --ink: #2b2333;          /* deep plum-black for text */
  --ink-soft: #55495f;
  --paper: #faf7f2;        /* warm cream */
  --paper-raised: #ffffff;
  --plum: #4b2e5a;         /* primary */
  --plum-deep: #372144;
  --gold: #b8860b;         /* accent */
  --gold-soft: #f3e8cf;
  --terracotta: #a4442e;   /* urgent accent */
  --terracotta-deep: #8a3722;
  --line: #e5ddd2;

  --green: #2e6b46;  --green-bg: #e8f2ea;
  --yellow: #8a6d1a; --yellow-bg: #f8f0d8;
  --amber: #a05716;  --amber-bg: #f9e9d8;
  --red: #a3302c;    --red-bg: #f9e3e1;

  --serif: "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(43, 35, 51, 0.06), 0 8px 24px rgba(43, 35, 51, 0.07);
  --shadow-lift: 0 2px 4px rgba(43, 35, 51, 0.08), 0 14px 34px rgba(43, 35, 51, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.prose-narrow { max-width: 760px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--plum); color: #fff; padding: 0.6rem 1rem;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--plum-deep);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 18px rgba(43, 35, 51, 0.25);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 0.75rem; padding-bottom: 0.75rem; flex-wrap: wrap;
}
.wordmark {
  font-family: var(--sans); font-weight: 700; font-size: 1.25rem;
  letter-spacing: 0.01em; text-decoration: none; color: #fff; white-space: nowrap;
}
.wordmark-ai { color: #e9c46a; }

.site-nav { font-family: var(--sans); }
.nav-toggle {
  display: none; font: inherit; color: #fff; background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 6px;
  padding: 0.4rem 0.9rem; cursor: pointer;
}
.nav-menu {
  display: flex; align-items: center; gap: 1.1rem;
  list-style: none; margin: 0; padding: 0; flex-wrap: wrap;
}
.nav-menu a { color: #f2ecf7; text-decoration: none; font-size: 0.95rem; }
.nav-menu a:hover, .nav-menu a:focus { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.nav-menu a.active { color: #e9c46a; }
.nav-search input {
  font: inherit; font-size: 0.9rem; padding: 0.35rem 0.7rem;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12); color: #fff; width: 9.5rem;
}
.nav-search input::placeholder { color: #cfc3da; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-block; }
  .nav-menu {
    display: none; width: 100%; flex-direction: column; align-items: flex-start;
    padding: 0.75rem 0 0.5rem;
  }
  .nav-menu.open { display: flex; }
  .site-nav { width: 100%; }
  .header-inner { align-items: baseline; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600;
  font-size: 0.95rem; text-decoration: none; border-radius: 999px;
  padding: 0.55rem 1.25rem; border: 2px solid transparent; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn-lg { font-size: 1.05rem; padding: 0.75rem 1.6rem; }
.btn-primary { background: var(--plum); color: #fff; }
.btn-primary:hover { background: var(--plum-deep); }
.btn-urgent { background: var(--terracotta); color: #fff; }
.btn-urgent:hover { background: var(--terracotta-deep); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: rgba(75, 46, 90, 0.07); }
.site-header .btn-urgent { color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(233, 196, 106, 0.18), transparent 60%),
    linear-gradient(160deg, var(--plum-deep) 0%, var(--plum) 70%, #5d3a6e 100%);
  color: #f6f1ea;
  padding: 4rem 0 4.5rem;
}
.hero-grid {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 0.75rem;
}
.hero .eyebrow { color: #e9c46a; }
.hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); line-height: 1.12; margin: 0 0 1rem; }
.lede { font-size: 1.2rem; line-height: 1.6; max-width: 38em; }
.hero .lede { color: #e8ddf0; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.75rem; }
.hero .btn-ghost { color: #f6f1ea; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.hero-figure { margin: 0; }
.hero-figure img {
  border-radius: var(--radius); box-shadow: var(--shadow-lift);
  aspect-ratio: 4 / 3; object-fit: cover;
}
.hero-figure figcaption {
  font-family: var(--sans); font-size: 0.8rem; color: #cbbdd8; margin-top: 0.6rem;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding: 3rem 0 2.25rem; }
.page-hero h1 { font-size: clamp(1.9rem, 3.5vw, 2.7rem); line-height: 1.15; margin: 0 0 0.75rem; }
.page-hero .lede { color: var(--ink-soft); margin: 0; }
.page-hero .eyebrow a { color: inherit; }
.page-hero .hero-actions { margin-top: 1.5rem; }
.page-hero-urgent {
  background: linear-gradient(160deg, #fdf6ee, #f9ece0);
  border-bottom: 1px solid var(--line);
}
.byline { font-family: var(--sans); font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.75rem; }

/* ---------- Sections & cards ---------- */
.section-heading { font-size: 1.6rem; margin: 0 0 1rem; }
.section-heading-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.see-all { font-family: var(--sans); font-size: 0.95rem; color: var(--plum); text-decoration: none; font-weight: 600; }
.see-all:hover { text-decoration: underline; }
.section-sub { color: var(--ink-soft); max-width: 46em; margin-top: 0; }

.card-grid { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.card-grid.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card-grid.three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card-grid.four { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }

.moments { padding: 3.5rem 0 1rem; }
.moment-card, .resource-card, .case-card {
  display: block; background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem 1.5rem 1.4rem;
  color: inherit; text-decoration: none; box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.moment-card:hover, .resource-card:hover, .case-card:hover {
  box-shadow: var(--shadow-lift); transform: translateY(-2px);
}
.moment-card h3, .resource-card h3, .case-card h3 { margin: 0.2rem 0 0.6rem; font-size: 1.25rem; line-height: 1.3; }
.moment-card p, .resource-card p, .case-card p { margin: 0 0 0.5rem; color: var(--ink-soft); font-size: 0.98rem; }
.moment-kicker, .resource-type, .case-number {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold);
  margin: 0;
}
.moment-urgent { border-top: 4px solid var(--terracotta); }
.moment-urgent .moment-kicker { color: var(--terracotta); }
.card-cta { font-family: var(--sans); font-size: 0.9rem; font-weight: 600; color: var(--plum); }
.resource-subtitle { font-style: italic; }

.welcome { padding: 2.5rem 0 0.5rem; }
.welcome .container { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 2.25rem; box-shadow: var(--shadow); }
.welcome-prose p:first-of-type { font-size: 1.15rem; }

.featured-cases { padding: 3rem 0; }
.case-quote { margin: 0 0 0.6rem; padding-left: 0.9rem; border-left: 3px solid var(--gold); font-style: italic; color: var(--ink-soft); font-size: 0.95rem; }

.strip { background: var(--plum-deep); color: #ece4f2; padding: 2rem 0; }
.strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.strip-inner p { margin: 0; max-width: 44em; }
.strip .btn-ghost { color: #fff; }
.strip .btn-ghost:hover { background: rgba(255,255,255,0.12); }
.strip-inline {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap; border-radius: var(--radius); padding: 1.75rem 2rem; margin-top: 2.5rem;
}
.strip-inline h2 { margin: 0 0 0.4rem; font-size: 1.3rem; }
.strip-inline p { margin: 0; color: #d8ccdf; }

.section-resources { padding: 2.25rem 0 3.5rem; }

/* ---------- Crisis note ---------- */
.crisis-note { background: var(--red-bg); border-block: 1px solid #eccfcc; padding: 0.9rem 0; }
.crisis-note p { margin: 0; font-family: var(--sans); font-size: 0.95rem; color: #6d2422; }

/* ---------- Level cards ---------- */
.levels-overview { padding: 3rem 0 1rem; }
.level-card { border-radius: var(--radius); padding: 1.4rem 1.4rem 1.2rem; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: var(--shadow); border-top-width: 5px; }
.level-card h3 { margin: 0; font-family: var(--sans); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.level-name { font-weight: 700; margin: 0.35rem 0 0.5rem; }
.level-card p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }
.level-card .level-name { color: var(--ink); }
.level-green { border-top-color: var(--green); } .level-green h3 { color: var(--green); }
.level-yellow { border-top-color: var(--yellow); } .level-yellow h3 { color: var(--yellow); }
.level-amber { border-top-color: var(--amber); } .level-amber h3 { color: var(--amber); }
.level-red { border-top-color: var(--red); } .level-red h3 { color: var(--red); }
.levels-caveat { margin-top: 1.25rem; font-style: italic; }

/* ---------- Prose ---------- */
.prose { font-size: 1.0625rem; }
.prose h1 { font-size: 1.8rem; line-height: 1.2; margin: 2.2rem 0 0.9rem; }
.prose h2 { font-size: 1.45rem; line-height: 1.25; margin: 2.2rem 0 0.8rem; }
.prose h3 { font-size: 1.15rem; margin: 1.8rem 0 0.6rem; }
.prose p, .prose ul, .prose ol { max-width: 70ch; }
.prose li { margin-bottom: 0.35rem; }
.prose a { color: var(--plum); }
.prose blockquote {
  margin: 1.5rem 0; padding: 0.9rem 1.4rem; border-left: 4px solid var(--gold);
  background: var(--gold-soft); border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
.prose blockquote p { margin: 0.35rem 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 1.5rem 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.55rem 0.75rem; text-align: left; vertical-align: top; }
.prose th { background: var(--gold-soft); font-family: var(--sans); font-size: 0.85rem; }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* ---------- Tile grids inside prose (series hub pages) ---------- */
.prose .tile-grid { margin: 2rem 0 2.5rem; }
.prose .resource-card { color: inherit; text-decoration: none; }
.prose .resource-card h3 { margin: 0.2rem 0 0.4rem; }
.prose .resource-card p { margin: 0 0 0.5rem; }
.tile-question { font-style: italic; color: var(--plum); font-size: 1.02rem; }
.tile-featured { grid-column: 1 / -1; border-top: 4px solid var(--gold); }
@media (max-width: 640px) { .tile-featured { grid-column: auto; } }

/* ---------- Level sections (Four Pastoral Levels page) ---------- */
.level-section {
  border-left: 6px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.4rem 1.6rem 1.1rem 1.75rem;
  margin: 2.25rem 0;
}
.level-section > h2 {
  display: flex; align-items: center; gap: 0.55em;
  margin-top: 1rem;
}
.level-section > h2::before {
  content: ''; flex: none; width: 0.7em; height: 0.7em;
  border-radius: 50%; background: currentColor;
}
.level-section-green  { border-color: var(--green);  background: linear-gradient(105deg, var(--green-bg) 0%, rgba(232,242,234,0) 85%); }
.level-section-yellow { border-color: var(--yellow); background: linear-gradient(105deg, var(--yellow-bg) 0%, rgba(248,240,216,0) 85%); }
.level-section-amber  { border-color: var(--amber);  background: linear-gradient(105deg, var(--amber-bg) 0%, rgba(249,233,216,0) 85%); }
.level-section-red    { border-color: var(--red);    background: linear-gradient(105deg, var(--red-bg) 0%, rgba(249,227,225,0) 85%); }
.level-section-green  > h2 { color: var(--green); }
.level-section-yellow > h2 { color: var(--yellow); }
.level-section-amber  > h2 { color: var(--amber); }
.level-section-red    > h2 { color: var(--red); }

/* Four-color ribbon under the page title when level sections are present */
.page-hero-levels .container::after {
  content: ''; display: block; height: 7px; max-width: 280px;
  margin-top: 1.5rem; border-radius: 999px;
  background: linear-gradient(90deg,
    var(--green) 0 25%, var(--yellow) 25% 50%,
    var(--amber) 50% 75%, var(--red) 75% 100%);
}

/* ---------- Case study page ---------- */
.case-hero { background: linear-gradient(160deg, #f7f2fa, #efe6f3); border-bottom: 1px solid var(--line); }
.case-pull-quote {
  margin: 1.5rem 0 0; font-size: 1.25rem; line-height: 1.5; font-style: italic;
  color: var(--plum-deep); padding-left: 1.1rem; border-left: 4px solid var(--gold);
}
.glance {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.5rem 1.75rem; margin: 2rem 0 2.5rem;
}
.glance-title { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin: 0 0 1rem; }
.glance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; margin: 0; }
.glance-grid .glance-wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .glance-grid { grid-template-columns: 1fr; } }
.glance-grid dt { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin-bottom: 0.2rem; }
.glance-grid dd { margin: 0; }
.composite-note { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 2.5rem; }

.case-list { display: flex; flex-direction: column; gap: 1.25rem; }
.case-row {
  display: grid; grid-template-columns: auto 1fr; gap: 1.5rem;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.6rem 1.75rem; color: inherit; text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.case-row:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.case-row-number { font-family: var(--sans); font-size: 1.9rem; font-weight: 800; color: var(--gold); line-height: 1; }
.case-row h2 { margin: 0 0 0.3rem; font-size: 1.35rem; }
.case-row p { margin: 0 0 0.5rem; color: var(--ink-soft); }
.case-meta { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.meta-chip { font-family: var(--sans); font-size: 0.8rem; background: var(--gold-soft); border-radius: 999px; padding: 0.25rem 0.8rem; color: var(--ink); }
@media (max-width: 560px) { .case-row { grid-template-columns: 1fr; gap: 0.5rem; } }

/* ---------- Tags & related ---------- */
.tag-list { list-style: none; display: flex; gap: 0.5rem; flex-wrap: wrap; padding: 0; margin: 2rem 0 0; }
.tag { font-family: var(--sans); font-size: 0.8rem; background: var(--gold-soft); color: var(--ink); border-radius: 999px; padding: 0.3rem 0.9rem; }
.related { background: #f3eee6; border-top: 1px solid var(--line); margin-top: 3rem; padding: 2.5rem 0 3rem; }

/* ---------- Glossary ---------- */
.glossary { margin: 0; }
.glossary-entry { border-bottom: 1px solid var(--line); padding: 1.4rem 0; }
.glossary-entry dt { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.4rem; }
.glossary-entry dd { margin: 0; color: var(--ink-soft); }
.glossary-entry dd p { margin: 0; max-width: 70ch; }

/* ---------- About ---------- */
.about-figure { margin: 2.5rem 0; }
.about-figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.about-figure figcaption { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.6rem; }
.license-box { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem 2rem; box-shadow: var(--shadow); }
.license-box h2 { margin-top: 0; font-size: 1.3rem; }

/* ---------- Search ---------- */
.search-form { display: flex; gap: 0.75rem; margin-top: 1.5rem; max-width: 560px; }
.search-form input {
  flex: 1; font: inherit; padding: 0.6rem 1rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--paper-raised);
}
.search-form input:focus { outline: 2px solid var(--plum); }
.search-results { display: flex; flex-direction: column; gap: 1.25rem; }
.search-result {
  display: block; background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem 1.6rem;
  color: inherit; text-decoration: none;
}
.search-result:hover { box-shadow: var(--shadow-lift); }
.search-result h2 { margin: 0.2rem 0 0.5rem; font-size: 1.25rem; }
.search-result p { margin: 0 0 0.4rem; color: var(--ink-soft); font-size: 0.98rem; }
.search-snippet mark { background: var(--gold-soft); padding: 0 0.15em; }

/* ---------- Triage ---------- */
.triage { padding: 2.5rem 0 3.5rem; }
.triage-container { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 2.5rem; align-items: start; }
@media (max-width: 880px) { .triage-container { grid-template-columns: 1fr; } }
.triage-app { min-height: 300px; }
.triage-card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 2rem 2.25rem;
}
.triage-progress { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin: 0 0 0.75rem; }
.triage-card h2 { margin: 0 0 0.75rem; font-size: 1.5rem; line-height: 1.25; }
.triage-card .triage-help { color: var(--ink-soft); margin: 0 0 1.5rem; }
.triage-options { display: flex; flex-direction: column; gap: 0.75rem; }
.triage-option {
  font: inherit; text-align: left; background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.25rem; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.triage-option:hover, .triage-option:focus { border-color: var(--plum); background: #f4eef8; }
.triage-option strong { display: block; margin-bottom: 0.2rem; }
.triage-option span { color: var(--ink-soft); font-size: 0.95rem; }
.triage-controls { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.triage-back, .triage-restart {
  font-family: var(--sans); font-size: 0.9rem; font-weight: 600; background: none;
  border: none; color: var(--plum); cursor: pointer; padding: 0.25rem 0; text-decoration: underline; text-underline-offset: 3px;
}
.triage-result { border-top: 6px solid var(--plum); }
.triage-result.level-green-r { border-top-color: var(--green); }
.triage-result.level-yellow-r { border-top-color: var(--yellow); }
.triage-result.level-amber-r { border-top-color: var(--amber); }
.triage-result.level-red-r { border-top-color: var(--red); }
.triage-level-tag { display: inline-block; font-family: var(--sans); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; border-radius: 999px; padding: 0.3rem 1rem; margin-bottom: 1rem; }
.level-green-r .triage-level-tag { background: var(--green-bg); color: var(--green); }
.level-yellow-r .triage-level-tag { background: var(--yellow-bg); color: var(--yellow); }
.level-amber-r .triage-level-tag { background: var(--amber-bg); color: var(--amber); }
.level-red-r .triage-level-tag { background: var(--red-bg); color: var(--red); }
.triage-result h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; font-family: var(--sans); }
.triage-result ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.triage-result li { margin-bottom: 0.35rem; }
.triage-inquiry { background: var(--gold-soft); border-radius: var(--radius); padding: 1rem 1.25rem; font-style: italic; margin-top: 1.25rem; }
.triage-crisis { background: var(--red-bg); border-radius: var(--radius); padding: 1rem 1.25rem; margin-top: 1.25rem; font-family: var(--sans); font-size: 0.95rem; color: #6d2422; }
.triage-aside {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.5rem 1.75rem; font-family: var(--sans); font-size: 0.95rem;
}
.triage-aside h2 { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin: 0 0 0.75rem; }
.triage-aside ul { list-style: none; margin: 0; padding: 0; }
.triage-aside li { margin-bottom: 0.6rem; }
.triage-aside a { color: var(--plum); }
.triage-noscript { background: var(--gold-soft); border-radius: var(--radius); padding: 1.25rem 1.5rem; }

/* ---------- Admin ---------- */
.admin-form { display: flex; flex-direction: column; gap: 0.4rem; max-width: 420px; font-family: var(--sans); }
.admin-form-wide { max-width: 860px; }
.admin-form label { font-size: 0.85rem; font-weight: 700; margin-top: 0.9rem; }
.admin-form input, .admin-form textarea, .admin-form select {
  font: inherit; padding: 0.55rem 0.8rem; border-radius: 8px;
  border: 1.5px solid var(--line); background: var(--paper-raised);
}
.admin-form textarea { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9rem; line-height: 1.5; }
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus { outline: 2px solid var(--plum); }
.admin-form .btn { margin-top: 1.25rem; align-self: flex-start; }
.admin-actions { display: flex; gap: 1rem; align-items: center; }
.form-error { font-family: var(--sans); color: var(--red); background: var(--red-bg); border-radius: 8px; padding: 0.6rem 1rem; }
.form-success { font-family: var(--sans); color: var(--green); background: var(--green-bg); border-radius: 8px; padding: 0.6rem 1rem; display: inline-block; }
.admin-table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 0.95rem; background: var(--paper-raised); box-shadow: var(--shadow); border-radius: var(--radius); }
.admin-table th, .admin-table td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); }
.admin-table a { color: var(--plum); font-weight: 600; }
.status { font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 0.2rem 0.75rem; }
.status-published { background: var(--green-bg); color: var(--green); }
.status-draft { background: var(--yellow-bg); color: var(--yellow); }

/* ---------- Admin nav & log ---------- */
.admin-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem;
  font-family: var(--sans); font-size: 0.95rem;
}
.admin-nav nav { display: flex; gap: 1.25rem; }
.admin-nav nav a { color: var(--plum); text-decoration: none; font-weight: 600; }
.admin-nav nav a:hover { text-decoration: underline; }
.admin-nav nav a.active { border-bottom: 3px solid var(--gold); padding-bottom: 0.15rem; }
.admin-identity { display: flex; align-items: center; gap: 1rem; color: var(--ink-soft); }
.btn-sm { font-size: 0.85rem; padding: 0.3rem 0.9rem; }
.role-badge {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  border-radius: 999px; padding: 0.15rem 0.7rem;
}
.role-admin { background: var(--plum); color: #fff; }
.role-editor { background: var(--gold-soft); color: var(--ink); }
.muted { color: var(--ink-soft); font-size: 0.9em; }
.inline-form { display: inline; }
.users-heading { margin-top: 2.5rem; }
.edit-history { margin-top: 2.5rem; font-family: var(--sans); font-size: 0.92rem; }
.edit-history h2 { font-family: var(--serif); font-size: 1.2rem; }
.edit-history ul { list-style: none; padding: 0; }
.edit-history li { border-bottom: 1px solid var(--line); padding: 0.5rem 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--plum-deep); color: #d8ccdf; margin-top: 0; padding: 3rem 0 2.5rem; font-family: var(--sans); font-size: 0.92rem; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 2fr 1fr 1.5fr; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-wordmark { font-weight: 700; font-size: 1.1rem; color: #fff; margin: 0 0 0.6rem; }
.footer-note { margin: 0 0 0.75rem; max-width: 36em; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.45rem; }
.site-footer a { color: #e9c46a; }
