/* ════════════════════════════════════════════════════════════
   BLOG POST  ·  shared article system
   Each post sets --pa (accent) and --pa-pale on .post-root.
   ════════════════════════════════════════════════════════════ */

.post-root {
  --pa:      var(--sage);
  --pa-pale: var(--sage-pale);
  --pa-ink:  var(--sage-dark);
  background: var(--white);
}

/* ── reading progress ─────────────────────────────────────── */
.post-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--pa);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ── hero ─────────────────────────────────────────────────── */
.post-hero {
  position: relative;
  background: var(--pa-pale);
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(44,62,53,0.07);
}
.post-hero-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
}
.post-hero-inner { position: relative; max-width: 780px; }
.post-crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: gap 0.2s ease, color 0.2s ease;
}
.post-crumb:hover { gap: 0.65rem; color: var(--pa-ink); }
.post-crumb svg { width: 13px; height: 13px; }

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.post-tag {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border-radius: 50px;
  padding: 0.28rem 0.8rem;
  background: var(--pa);
  color: var(--white);
}
.post-readtime {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.post-readtime svg { width: 13px; height: 13px; }

.post-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  color: var(--slate);
  margin: 0 0 1.25rem;
}
.post-title em { font-style: italic; color: var(--pa-ink); }
.post-standfirst {
  font-size: 1.12rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-body);
  max-width: 62ch;
  margin: 0;
}

/* ── layout ───────────────────────────────────────────────── */
.post-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
  padding: 4rem 0 5rem;
}
.post-body { max-width: 68ch; min-width: 0; }

/* ── sticky contents ──────────────────────────────────────── */
.post-toc {
  position: sticky;
  top: calc(var(--nav-h) + 1.75rem);
  background: var(--off-white);
  border: 1px solid rgba(107,143,113,0.14);
  border-radius: var(--r-md);
  padding: 1.35rem 1.25rem 1.45rem;
}
.post-toc-h {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1rem;
}
.post-toc-h::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pa);
  flex: none;
}
.post-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.post-toc li { counter-increment: toc; }
.post-toc a {
  position: relative;
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem 0.5rem 0.55rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.post-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--pa);
  opacity: 0.55;
  padding-top: 0.14em;
  flex: none;
  transition: opacity 0.2s ease;
}
.post-toc a:hover { background: rgba(255,255,255,0.75); color: var(--slate); }
.post-toc a:hover::before { opacity: 1; }
.post-toc a.active {
  background: var(--white);
  color: var(--pa-ink);
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(44,62,53,0.07);
}
.post-toc a.active::before { opacity: 1; }
.post-toc a:focus-visible { outline: 2px solid var(--pa); outline-offset: 2px; }

/* ── prose ────────────────────────────────────────────────── */
.post-body h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.55rem, 2.9vw, 2rem);
  line-height: 1.2;
  color: var(--slate);
  margin: 3.25rem 0 1rem;
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}
.post-body h2:first-child { margin-top: 0; }
.post-body h3 {
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--slate);
  margin: 2rem 0 0.7rem;
}
.post-body p {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-body);
  margin: 0 0 1.2rem;
}
.post-body a:not(.post-btn) {
  color: var(--pa-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(44,62,53,0.28);
  transition: text-decoration-color 0.2s;
}
.post-body a:not(.post-btn):hover { text-decoration-color: var(--pa); }
.post-body strong { font-weight: 600; color: var(--slate); }

.post-lead {
  font-size: 1.14rem !important;
  font-weight: 300;
  line-height: 1.72 !important;
  color: var(--slate) !important;
}

/* ── lists ────────────────────────────────────────────────── */
.post-body ul, .post-body ol { margin: 0 0 1.4rem; padding: 0; list-style: none; }
.post-body ul > li, .post-body ol > li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.65rem;
  font-size: 0.97rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-body);
}
.post-body ul > li::before {
  content: '';
  position: absolute;
  left: 0.15rem; top: 0.72em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pa);
}
.post-body ol { counter-reset: pl; }
.post-body ol > li { counter-increment: pl; }
.post-body ol > li::before {
  content: counter(pl);
  position: absolute;
  left: 0; top: 0.18em;
  width: 1.15rem; height: 1.15rem;
  border-radius: 50%;
  background: var(--pa-pale);
  color: var(--pa-ink);
  font-size: 0.66rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ── callout ──────────────────────────────────────────────── */
.post-callout {
  background: var(--pa-pale);
  border-radius: var(--r-md);
  padding: 1.6rem 1.75rem;
  margin: 2rem 0 2.25rem;
  border-left: 3px solid var(--pa);
}
.post-callout-h {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pa-ink);
  margin: 0 0 0.7rem;
}
.post-callout-h svg { width: 15px; height: 15px; flex: none; }
.post-callout p:last-child, .post-callout ul:last-child { margin-bottom: 0; }

/* ── key-point card grid ──────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin: 2rem 0 2.4rem;
}
/* even-count grids sit better two-up than three-plus-orphan */
.post-grid--half { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 560px) { .post-grid--half { grid-template-columns: 1fr; } }
.post-tile {
  background: var(--off-white);
  border: 1px solid rgba(107,143,113,0.14);
  border-radius: var(--r-md);
  padding: 1.35rem 1.4rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.post-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-tile-ico {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--pa-pale);
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
}
.post-tile-ico svg { width: 17px; height: 17px; stroke: var(--pa-ink); }
.post-tile h4 {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--slate);
  margin: 0 0 0.4rem;
}
.post-tile p {
  font-size: 0.85rem !important;
  line-height: 1.6 !important;
  margin: 0 !important;
  color: var(--text-muted) !important;
}

/* ── numbered steps ───────────────────────────────────────── */
.post-steps { display: flex; flex-direction: column; gap: 0.9rem; margin: 2rem 0 2.4rem; counter-reset: st; }
.post-step {
  counter-increment: st;
  display: grid;
  grid-template-columns: 2.4rem minmax(0,1fr);
  gap: 1.1rem;
  align-items: start;
  background: var(--off-white);
  border-radius: var(--r-md);
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(107,143,113,0.12);
}
.post-step::before {
  content: counter(st, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--pa);
  line-height: 1;
}
.post-step h4 { font-size: 0.97rem; font-weight: 600; color: var(--slate); margin: 0 0 0.3rem; }
.post-step p { font-size: 0.9rem !important; line-height: 1.65 !important; margin: 0 !important; }

/* ── pull quote ───────────────────────────────────────────── */
.post-pull {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.38;
  color: var(--pa-ink);
  margin: 2.5rem 0;
  padding: 0 0 0 1.5rem;
  border-left: 3px solid var(--pa);
  font-style: italic;
}

/* ── stat strip ───────────────────────────────────────────── */
.post-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2.25rem 0 2.5rem;
}
.post-stat {
  background: var(--pa-pale);
  border-radius: var(--r-md);
  padding: 1.4rem 1.3rem;
  text-align: center;
}
.post-stat-n {
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--pa-ink);
  display: block;
  margin-bottom: 0.4rem;
}
.post-stat-l {
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ── end matter ───────────────────────────────────────────── */
.post-cta {
  background: var(--pa);
  border-radius: var(--r-md);
  padding: 2.25rem 2rem;
  margin: 3rem 0 2.5rem;
  text-align: center;
}
.post-cta h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--white);
  margin: 0 0 0.7rem;
}
.post-cta p {
  color: rgba(255,255,255,0.88) !important;
  font-size: 0.95rem !important;
  max-width: 46ch;
  margin: 0 auto 1.5rem !important;
}
.post-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  color: var(--pa-ink);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.14); }
.post-btn svg { width: 15px; height: 15px; }

.post-disclaimer {
  font-size: 0.82rem !important;
  font-weight: 300;
  line-height: 1.65 !important;
  color: var(--text-muted) !important;
  background: var(--off-white);
  border-radius: var(--r-sm);
  padding: 1rem 1.2rem;
  margin: 2rem 0 0 !important;
}

.post-refs { margin-top: 2.5rem; border-top: 1px solid rgba(107,143,113,0.18); padding-top: 1.5rem; }
.post-refs summary {
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.post-refs summary::-webkit-details-marker { display: none; }
.post-refs summary::after {
  content: '';
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.post-refs[open] summary::after { transform: rotate(-135deg); }
.post-refs ol { margin-top: 1.1rem; }
.post-refs li { font-size: 0.8rem !important; line-height: 1.6 !important; word-break: break-word; }

/* ── prev / next ──────────────────────────────────────────── */
.post-next { background: var(--off-white); padding: 3.5rem 0; border-top: 1px solid rgba(107,143,113,0.12); }
.post-next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.post-next-card {
  background: var(--white);
  border: 1px solid rgba(107,143,113,0.14);
  border-radius: var(--r-md);
  padding: 1.5rem 1.6rem;
  text-decoration: none;
  display: block;
  transition: transform 0.25s, box-shadow 0.25s;
}
.post-next-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-next-lbl {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.55rem;
}
.post-next-card h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.12rem;
  line-height: 1.25;
  color: var(--slate);
  margin: 0;
}

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 1000px) {
  .post-layout { grid-template-columns: 1fr; gap: 0; padding: 3rem 0 4rem; }
  .post-toc { display: none; }
}
@media (max-width: 640px) {
  .post-hero { padding: 3rem 0 2.5rem; }
  .post-callout { padding: 1.3rem 1.35rem; }
  .post-cta { padding: 1.8rem 1.4rem; }
  .post-step { grid-template-columns: 1.9rem minmax(0,1fr); gap: 0.85rem; padding: 1.1rem 1.15rem; }
}

/* ── download card ────────────────────────────────────────── */
.post-dl {
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) auto;
  gap: 1.25rem;
  align-items: center;
  background: var(--white);
  border: 1px solid rgba(107,143,113,0.2);
  border-radius: var(--r-md);
  padding: 1.5rem 1.6rem;
  margin: 2.25rem 0 2.5rem;
  box-shadow: 0 2px 14px rgba(44,62,53,0.05);
}
.post-dl-ico {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: var(--pa-pale);
  display: grid; place-items: center;
}
.post-dl-ico svg { width: 25px; height: 25px; stroke: var(--pa-ink); }
.post-dl-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--slate);
  margin: 0 0 0.25rem !important;
  line-height: 1.35;
}
.post-dl-meta {
  font-size: 0.78rem !important;
  font-weight: 400;
  color: var(--text-muted) !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.post-dl-chip {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--pa-pale);
  color: var(--pa-ink);
  padding: 0.16rem 0.5rem;
  border-radius: 4px;
}
.post-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--pa);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.72rem 1.35rem;
  border-radius: 50px;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.post-dl-btn svg { width: 15px; height: 15px; }
.post-dl-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(44,62,53,0.16); }
/* pending: the file is not on the server yet, so offer nothing that 404s */
.post-dl-btn[aria-disabled="true"] {
  background: rgba(107,143,113,0.13);
  color: var(--text-muted);
  cursor: default;
  pointer-events: none;
}
@media (max-width: 620px) {
  .post-dl { grid-template-columns: 44px minmax(0,1fr); gap: 0.9rem 1rem; padding: 1.25rem; }
  .post-dl-ico { width: 44px; height: 44px; }
  .post-dl-ico svg { width: 20px; height: 20px; }
  .post-dl-btn { grid-column: 1 / -1; justify-content: center; }
}

/* ── hero photo ───────────────────────────────────────────── */
.post-hero-inner.has-photo {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 3.5rem;
  align-items: center;
}
.post-hero-copy { min-width: 0; max-width: 62ch; }
.post-hero-photo { margin: 0; }
.post-hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 760 / 640;
  object-fit: cover;
  border-radius: var(--r-md);
  box-shadow: 0 18px 46px rgba(44,62,53,0.2);
}
@media (max-width: 940px) {
  .post-hero-inner.has-photo { grid-template-columns: 1fr; gap: 2.25rem; }
  .post-hero-photo { max-width: 380px; }
}
@media (max-width: 560px) {
  .post-hero-photo { max-width: none; }
  .post-hero-photo img { aspect-ratio: 16 / 11; }
}

/* ════════════════════════════════════════════════════════════
   ASSISTIVE TECHNOLOGY  ·  post-specific components
   ════════════════════════════════════════════════════════════ */

/* cost / risk tier matrix */
.at-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; margin: 2rem 0 1rem; }
.at-tier {
  border: 1px solid rgba(107,143,113,0.2);
  border-radius: var(--r-md);
  padding: 1.35rem 1.3rem;
  background: var(--white);
}
.at-tier-lbl {
  display: inline-block; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.2rem 0.55rem; border-radius: 4px; margin-bottom: 0.7rem;
}
.at-tier h4 { font-size: 1.02rem; font-weight: 600; color: var(--slate); margin: 0 0 0.5rem; }
.at-tier ul { margin: 0 !important; }
.at-tier li { font-size: 0.83rem !important; line-height: 1.55 !important; padding-left: 1.1rem !important; margin-bottom: 0.4rem !important; }
.at-tier li::before { width: 4px !important; height: 4px !important; top: 0.66em !important; }

/* one AT item */
.at-items { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.9rem; margin: 1.5rem 0 2.5rem; }
.at-item {
  background: var(--white);
  border: 1px solid rgba(107,143,113,0.18);
  border-radius: var(--r-md);
  padding: 1.3rem 1.35rem;
  display: flex; flex-direction: column;
  transition: transform 0.22s, box-shadow 0.22s;
}
.at-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.at-item h4 { font-size: 0.98rem; font-weight: 600; color: var(--slate); margin: 0 0 0.45rem; }
.at-item p { font-size: 0.86rem !important; line-height: 1.6 !important; margin: 0 0 0.6rem !important; }
.at-item p:last-of-type { margin-bottom: 0.9rem !important; }
.at-item .at-detail { color: var(--text-muted) !important; }
.at-item .at-detail b { color: var(--slate); font-weight: 600; }
.at-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: auto; }
.at-chip {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.22rem 0.55rem; border-radius: 4px; white-space: nowrap;
}
.at-chip--low  { background: rgba(107,143,113,0.15); color: #3D5C42; }
.at-chip--mid  { background: rgba(224,176,42,0.2);  color: #8A6B00; }
.at-chip--high { background: rgba(232,93,122,0.15); color: #B8284D; }
.at-chip--assess { background: var(--off-white); color: var(--text-muted); border: 1px solid rgba(107,143,113,0.18); }

/* rural panel: the part that is actually about us */
.at-rural {
  background: var(--slate);
  border-radius: var(--r-md);
  padding: 2.1rem 2.2rem;
  margin: 2.25rem 0 2.5rem;
}
.at-rural h3 {
  font-family: var(--font-display); font-weight: 400; font-size: 1.45rem;
  color: #fff; margin: 0 0 0.9rem;
}
.at-rural p { color: rgba(255,255,255,0.84) !important; }
.at-rural ul { margin-bottom: 0 !important; }
.at-rural li { color: rgba(255,255,255,0.84) !important; font-size: 0.92rem !important; }
.at-rural li::before { background: var(--sage-light) !important; }
.at-rural .at-rural-note {
  margin-top: 1.4rem !important; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,0.14);
  font-size: 0.85rem !important; color: rgba(255,255,255,0.66) !important;
}

/* who does what */
.at-roles { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; margin: 2rem 0 2.4rem; }
.at-role { background: var(--pa-pale); border-radius: var(--r-md); padding: 1.5rem 1.55rem; }
.at-role h4 { font-size: 1rem; font-weight: 600; color: var(--pa-ink); margin: 0 0 0.7rem; }
.at-role ul { margin: 0 !important; }
.at-role li { font-size: 0.87rem !important; margin-bottom: 0.5rem !important; }

/* credit line */
.at-credit {
  display: flex; align-items: flex-start; gap: 0.9rem;
  background: var(--off-white); border-left: 3px solid var(--pa);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 1.15rem 1.3rem; margin: 2.25rem 0 0;
}
.at-credit svg { width: 18px; height: 18px; stroke: var(--pa); flex: none; margin-top: 0.15rem; }
.at-credit p { font-size: 0.86rem !important; line-height: 1.6 !important; margin: 0 !important; }

@media (max-width: 720px) {
  .at-tiers, .at-items, .at-roles { grid-template-columns: 1fr; }
  .at-rural { padding: 1.5rem 1.4rem; }
}
