/* Adaptive Humans — shared site styles
   Brand: soil-core palette · saskatoon berry accent · Land · Food · Water · Ecology · Resilience */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&family=IBM+Plex+Mono:wght@400;600&display=swap');

:root {
  --ink: #16211b;
  --ink-soft: #46584c;
  --ground: #e7e9e1;
  --paper: #f7f8f3;
  --line: #c8cec1;
  --berry: #5b3a73;
  --berry-lo: #7e5a96;
  --gold: #a8801f;
  --ok: #2f5d3a;
  --h1: #2e2118;
  --h2: #4a3524;
  --h3: #64492f;
  --step: 1.5rem;
  --radius: 3px;
  --max: 1100px;
  --max-wide: 1180px;
  --shadow: 0 2px 12px rgba(22, 33, 27, 0.06);
  --shadow-lg: 0 10px 28px rgba(22, 33, 27, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.85rem, 4.5vw, 2.75rem); color: var(--h1); }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); color: var(--h2); }
h3 { font-size: 1.15rem; color: var(--h3); }

.mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--ink-soft);
  font-weight: 500;
  max-width: 48rem;
}

.inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 var(--step);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 243, 0.96);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.85rem var(--step);
  min-height: 60px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  text-decoration: none;
  color: var(--ink);
}

.brand strong {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand span {
  font-size: 0.68rem;
  color: var(--berry);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-main {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-main a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.nav-main a:hover,
.nav-main a[aria-current="page"] {
  color: var(--berry);
  border-bottom-color: var(--berry);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid;
  border-radius: var(--radius);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  cursor: pointer;
  font-size: 0.98rem;
  text-align: center;
  line-height: 1.3;
}

.btn-primary {
  background: var(--berry);
  border-color: var(--berry);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--berry-lo);
  border-color: var(--berry-lo);
  color: var(--paper);
}

.btn-secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--berry);
  color: var(--berry);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
}

.cta-group {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

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

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 0 2rem;
  margin-top: 3rem;
  font-size: 0.92rem;
}

.footer-container {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: var(--paper);
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 1rem;
  letter-spacing: -0.01em;
}

.footer-tagline {
  color: var(--berry-lo) !important;
  font-weight: 600;
  font-size: 0.95rem !important;
  margin-top: 0.25rem !important;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links h4 {
  color: var(--paper);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  font-family: 'Bricolage Grotesque', sans-serif;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--berry-lo);
}

.footer-links a strong {
  color: var(--paper);
  font-weight: 600;
}

.footer-links a:hover strong {
  color: var(--berry-lo);
}

/* --- Ecosystem strip --- */
.footer-ecosystem {
  margin-bottom: 2.5rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ecosystem-container h4 {
  color: var(--paper);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 1.5rem;
  font-family: 'Bricolage Grotesque', sans-serif;
}

.ecosystem-brands {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.ecosystem-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  text-decoration: none;
}

.ecosystem-brand:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(126, 90, 150, 0.4);
  transform: translateY(-2px);
}

.ecosystem-name {
  color: var(--paper);
  font-weight: 700;
  font-size: 1rem;
}

.ecosystem-role {
  color: var(--berry-lo);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-legal {
  margin-top: 0.5rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--berry-lo);
}

.footer-sep {
  margin: 0 0.5rem;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ecosystem-brands {
    grid-template-columns: 1fr;
  }
}

/* ---------- Page chrome ---------- */

.page-hero {
  padding: 3.25rem 0 2.25rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(91, 58, 115, 0.07), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(168, 128, 31, 0.08), transparent 50%),
    var(--paper);
}

.page-hero .section-eyebrow {
  color: var(--berry);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.page-hero .lead { margin: 0.85rem 0 0; }

.identity-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1.35rem;
  color: var(--ink-soft);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.identity-strip span::before {
  content: "·";
  margin-right: 1.25rem;
  color: var(--line);
}

.identity-strip span:first-child::before { content: none; margin: 0; }

.section {
  padding: 3rem 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-intro {
  max-width: 42rem;
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section--map {
  background:
    linear-gradient(180deg, rgba(47, 93, 58, 0.05), transparent 40%),
    var(--paper);
}

/* ---------- Category nav ---------- */

.cat-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 2rem 0 0;
}

@media (min-width: 640px) {
  .cat-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.cat-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1rem 1.05rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}

.cat-nav a:hover {
  transform: translateY(-2px);
  border-color: var(--berry);
  box-shadow: var(--shadow-lg);
}

.cat-nav .cat-label {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--h2);
}

.cat-nav .cat-desc {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ---------- Start-here pathway ---------- */

.start-here {
  background: var(--ground);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.75rem 0;
}

.start-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 800px) {
  .start-grid { grid-template-columns: repeat(3, 1fr); }
}

.start-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.5rem 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: var(--shadow);
}

.start-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.start-card p {
  margin: 0;
  color: var(--ink-soft);
  flex: 1;
  font-size: 0.98rem;
}

.start-card .btn {
  align-self: flex-start;
  margin-top: 0.35rem;
}

/* ---------- Filters ---------- */

.filters {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0.5rem;
  padding: 1.15rem 1.2rem;
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
}

.filters-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  min-width: 5.5rem;
}

.filter-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.filter-chip:hover {
  border-color: var(--berry);
  color: var(--berry);
}

.filter-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.filter-search {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}

.filter-search:focus {
  outline: 2px solid rgba(91, 58, 115, 0.35);
  border-color: var(--berry);
}

.filter-status {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0.75rem 0 0;
}

/* ---------- Resource cards ---------- */

.resource-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 720px) {
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.resource-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.35rem 1.3rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
  min-height: 100%;
}

.resource-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: #b6bdb0;
}

.resource-card.is-featured {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(91, 58, 115, 0.05), rgba(247, 248, 243, 0.95) 55%),
    var(--paper);
  border-color: rgba(91, 58, 115, 0.28);
  padding: 1.55rem 1.5rem 1.4rem;
}

@media (min-width: 720px) {
  .resource-card.is-featured {
    display: grid;
    grid-template-columns: 1.4fr auto;
    grid-template-rows: auto auto auto auto;
    column-gap: 1.5rem;
    align-items: start;
  }

  .resource-card.is-featured .card-cta {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: center;
  }
}

.resource-card.is-map-featured {
  background:
    linear-gradient(135deg, rgba(47, 93, 58, 0.08), rgba(247, 248, 243, 0.95) 60%),
    var(--paper);
  border-color: rgba(47, 93, 58, 0.28);
}

.card-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ok);
  font-weight: 600;
  background: rgba(47, 93, 58, 0.1);
  border: 1px solid rgba(47, 93, 58, 0.2);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  width: fit-content;
}

.resource-card h3 {
  margin: 0;
  font-size: 1.12rem;
}

.resource-card.is-featured h3 {
  font-size: 1.3rem;
}

.resource-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 2px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--ground);
}

.tag--location {
  border-color: rgba(91, 58, 115, 0.25);
  color: var(--berry);
  background: rgba(91, 58, 115, 0.06);
}

.tag--type {
  border-color: rgba(47, 93, 58, 0.25);
  color: var(--ok);
  background: rgba(47, 93, 58, 0.06);
}

.sublinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sublinks li {
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--ground);
  border: 1px solid var(--line);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.card-cta {
  margin-top: 0.25rem;
}

.card-cta .btn {
  width: 100%;
}

@media (min-width: 720px) {
  .resource-card.is-featured .card-cta .btn {
    width: auto;
    white-space: nowrap;
  }
}

.resource-card[hidden],
.resource-section[hidden] {
  display: none !important;
}

.help-section {
  padding: 3rem 0;
  background: var(--ground);
  border-top: 1px solid var(--line);
}

.help-box {
  max-width: 48rem;
}

.help-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin: 1.25rem 0 1.5rem;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.help-flow .flow-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.help-flow .flow-label {
  color: var(--berry);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.help-flow .flow-arrow {
  align-self: center;
  color: var(--ink-soft);
  font-weight: 500;
}

.attribution {
  padding: 2.25rem 0 1rem;
  border-top: 1px solid var(--line);
}

.attribution-box {
  max-width: 48rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.attribution-box h2 {
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.attribution-box p { margin: 0; }

.precedents-box {
  max-width: 52rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.precedents-box ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.precedents-box li {
  margin-bottom: 0.85rem;
}

.precedents-box a {
  color: var(--berry);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.precedents-box a:hover {
  color: var(--berry-lo);
}

.precedents-box p { margin: 0; }

/* ---------- Home page ---------- */

.home-hero {
  padding: 4.5rem 0 3.5rem;
  text-align: left;
  background:
    radial-gradient(ellipse 70% 55% at 0% 0%, rgba(91, 58, 115, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 30%, rgba(168, 128, 31, 0.1), transparent 50%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.home-hero h1 {
  max-width: 18ch;
  margin-bottom: 1rem;
}

.home-hero .lead {
  max-width: 38rem;
  margin-bottom: 0;
}

.home-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 720px) {
  .home-cards { grid-template-columns: repeat(3, 1fr); }
}

.home-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.home-card h3 { margin-bottom: 0.4rem; }
.home-card p { color: var(--ink-soft); margin: 0 0 1rem; }

/* ---------- Civilizational Knowledge Library ---------- */

.knowledge-section {
  padding: 2.75rem 0;
}

.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.resource-list li {
  padding: 0.85rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.55;
  box-shadow: var(--shadow);
}

.resource-list a {
  color: var(--berry);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.resource-list a:hover {
  color: var(--berry-lo);
  border-bottom-color: var(--berry-lo);
}

.section-note {
  margin: 0.5rem 0 1.25rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--ground);
  border-left: 3px solid var(--berry);
  border-radius: 0 4px 4px 0;
}

.size-tag {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.1rem 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
}

/* Priority cards */

.priority-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .priority-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .priority-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.priority-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 4px;
  padding: 1.15rem 1.2rem 1.1rem;
  box-shadow: var(--shadow);
}

.priority-card p {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.priority-card .priority-items {
  color: var(--ink);
  font-weight: 500;
}

.priority-badge {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.priority-r1 { border-left-color: #b3261e; }
.priority-r1 .priority-badge {
  color: #b3261e;
  background: rgba(179, 38, 30, 0.08);
  border: 1px solid rgba(179, 38, 30, 0.25);
}

.priority-r2 { border-left-color: #c05621; }
.priority-r2 .priority-badge {
  color: #c05621;
  background: rgba(192, 86, 33, 0.08);
  border: 1px solid rgba(192, 86, 33, 0.25);
}

.priority-r3 { border-left-color: var(--gold); }
.priority-r3 .priority-badge {
  color: #8a6a1a;
  background: rgba(168, 128, 31, 0.1);
  border: 1px solid rgba(168, 128, 31, 0.3);
}

.priority-r4 { border-left-color: var(--berry); }
.priority-r4 .priority-badge {
  color: var(--berry);
  background: rgba(91, 58, 115, 0.08);
  border: 1px solid rgba(91, 58, 115, 0.25);
}

.priority-r5 { border-left-color: var(--ok); }
.priority-r5 .priority-badge {
  color: var(--ok);
  background: rgba(47, 93, 58, 0.08);
  border: 1px solid rgba(47, 93, 58, 0.25);
}

/* Data table */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 640px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table thead th {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--ground);
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(91, 58, 115, 0.03);
}

.data-table td.num {
  text-align: right;
  white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: var(--ink);
}

.data-table a {
  color: var(--berry);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.data-table a:hover {
  color: var(--berry-lo);
  border-bottom-color: var(--berry-lo);
}

.priority-tag {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.priority-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.p-essential {
  color: #b3261e;
  background: rgba(179, 38, 30, 0.08);
  border: 1px solid rgba(179, 38, 30, 0.25);
}

.p-high {
  color: #8a6a1a;
  background: rgba(168, 128, 31, 0.1);
  border: 1px solid rgba(168, 128, 31, 0.3);
}

.p-medium {
  color: var(--berry);
  background: rgba(91, 58, 115, 0.08);
  border: 1px solid rgba(91, 58, 115, 0.25);
}

.p-curate {
  color: var(--ok);
  background: rgba(47, 93, 58, 0.08);
  border: 1px solid rgba(47, 93, 58, 0.25);
}

.p-r1 {
  color: #b3261e;
  background: rgba(179, 38, 30, 0.08);
  border: 1px solid rgba(179, 38, 30, 0.25);
}

.p-r2 {
  color: #c05621;
  background: rgba(192, 86, 33, 0.08);
  border: 1px solid rgba(192, 86, 33, 0.25);
}

.p-r3 {
  color: #8a6a1a;
  background: rgba(168, 128, 31, 0.1);
  border: 1px solid rgba(168, 128, 31, 0.3);
}

.p-r4 {
  color: var(--berry);
  background: rgba(91, 58, 115, 0.08);
  border: 1px solid rgba(91, 58, 115, 0.25);
}

.p-r5 {
  color: var(--ok);
  background: rgba(47, 93, 58, 0.08);
  border: 1px solid rgba(47, 93, 58, 0.25);
}

/* Resource pane meta tags */

.resource-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.resource-list li .priority-tag,
.resource-list li .size-tag,
.resource-list li .bulk-tag {
  margin-left: 0.3rem;
}

/* Bulk-download tags */

.bulk-tag {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
  text-decoration: none;
}

.b-easy {
  color: #1d5c3a;
  background: rgba(47, 93, 58, 0.1);
  border: 1px solid rgba(47, 93, 58, 0.3);
}

.b-moderate {
  color: #8a6a1a;
  background: rgba(168, 128, 31, 0.1);
  border: 1px solid rgba(168, 128, 31, 0.3);
}

.b-hard {
  color: var(--berry);
  background: rgba(91, 58, 115, 0.08);
  border: 1px solid rgba(91, 58, 115, 0.25);
}

/* Tier legend */

.tier-legend {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.tier-legend h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--h2);
  margin: 0 0 0.6rem;
}

.tier-legend ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tier-legend li {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.tier-legend .bulk-tag {
  margin-right: 0.35rem;
}

/* Todo list */

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 42rem;
}

.todo-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  box-shadow: var(--shadow);
}

.todo-list input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--ok);
}

/* Scale hierarchy */

.scale-hierarchy {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 42rem;
}

.scale-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.scale-block p {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.scale-label {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--h2);
}

.scale-size {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--berry);
}

.scale-arrow {
  align-self: center;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1;
}

.scale-online { border-left: 4px solid var(--line); }
.scale-ark { border-left: 4px solid var(--gold); }
.scale-reboot { border-left: 4px solid var(--berry); }
.scale-seed { border-left: 4px solid var(--ok); }

/* ---------- Utilities ---------- */

.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;
}

@media (max-width: 520px) {
  .nav-main { gap: 0.75rem; }
  .nav-main a { font-size: 0.88rem; }
  .page-hero { padding: 2.25rem 0 1.75rem; }
  .section { padding: 2.25rem 0; }
}
