/* ZaKenya CMS concept — shared design system */
:root {
  --bg: #f5f2eb;
  --bg-elevated: #fffcf7;
  --ink: #1a1c18;
  --ink-2: #3a3f38;
  --ink-3: #6e7568;
  --line: rgba(26, 28, 24, 0.08);
  --line-strong: rgba(26, 28, 24, 0.14);
  --forest: #0d3f30;
  --forest-soft: #1a5c46;
  --accent: #b8862d;
  --white: #ffffff;
  --danger: #b42318;
  --max: 1080px;
  --max-read: 680px;
  --pad: clamp(1.25rem, 4vw, 2rem);
  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --r: 16px;
  --r-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  border-radius: 4px;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }

.shell { width: min(var(--max), calc(100% - var(--pad) * 2)); margin-inline: auto; }
.shell-read { width: min(var(--max-read), calc(100% - var(--pad) * 2)); margin-inline: auto; }
.shell-wide { width: min(1120px, calc(100% - var(--pad) * 2)); margin-inline: auto; }

/* Notice */
.notice {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--line);
  background: var(--bg-elevated);
}
.notice a {
  color: var(--forest);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.notice a:hover { border-bottom-color: var(--forest); }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 242, 235, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 1.5rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--forest);
  color: #f5e6b8;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.nav a { opacity: 0.88; transition: opacity 0.2s var(--ease), color 0.2s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; color: var(--ink); }
.nav a[aria-current="page"] { font-weight: 600; }
.top-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--forest);
  padding: 0.45rem 0.9rem;
  border-radius: 980px;
  background: rgba(13, 63, 48, 0.08);
  transition: background 0.2s var(--ease);
}
.top-cta:hover { background: rgba(13, 63, 48, 0.12); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
  border: 0;
  cursor: pointer;
}
.btn:hover { transform: scale(1.02); }
.btn:active { transform: scale(0.98); }
.btn-fill { background: var(--forest); color: var(--white); }
.btn-fill:hover { background: var(--forest-soft); }
.btn-line {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.btn-line:hover { background: rgba(26, 28, 24, 0.03); }

/* Section chrome */
.section { padding: clamp(2rem, 5vw, 3.25rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-bar h2 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
}
.section-bar a {
  font-size: 14px;
  font-weight: 600;
  color: var(--forest);
}
.section-bar a:hover { text-decoration: underline; text-underline-offset: 3px; }

.page-head {
  padding: clamp(2rem, 5vw, 3rem) 0 1.25rem;
}
.page-head .label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.page-head h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  max-width: 18ch;
}
.page-head .deck {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ink-2);
  max-width: 38ch;
  line-height: 1.45;
}

/* Cards / list (shared) */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem 1.15rem;
}
.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--line), 0 16px 40px rgba(26, 28, 24, 0.07);
}
.card-media {
  aspect-ratio: 3 / 2;
  background: #d9d4c8 center/cover no-repeat;
}
.card-body {
  padding: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.4rem;
}
.card-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}
.card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
}
.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-3);
  flex: 1;
}
.card-meta {
  margin-top: 0.65rem;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
}

.list {
  display: grid;
  background: var(--bg-elevated);
  border-radius: var(--r);
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
}
.list a {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s var(--ease);
}
.list a:last-child { border-bottom: 0; }
.list a:hover { background: rgba(13, 63, 48, 0.03); }
.list-thumb {
  width: 88px;
  height: 66px;
  border-radius: var(--r-sm);
  background: #d9d4c8 center/cover no-repeat;
}
.list h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 0.25rem;
}
.list .sub { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.list .time { font-size: 12px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }

/* Breadcrumb */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  padding: 1rem 0 0;
}
.crumbs a { color: var(--forest); font-weight: 600; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 2px; }
.crumbs .sep { opacity: 0.45; }

/* Article */
.article-wrap { padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.article-hero {
  padding: 1.25rem 0 1.75rem;
}
.article-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0.75rem 0 1rem;
  max-width: 18ch;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  margin-bottom: 1.5rem;
}
.article-meta span + span::before {
  content: "·";
  margin-right: 1rem;
  opacity: 0.4;
}
.article-cover {
  border-radius: calc(var(--r) + 2px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--forest) center/cover no-repeat;
  margin-bottom: 2rem;
  box-shadow: 0 0 0 1px var(--line);
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2.5rem;
  align-items: start;
}
.prose {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
}
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 2rem 0 0.75rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--accent);
}
.prose h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--ink);
}
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol {
  margin: 0 0 1.15em;
  padding-left: 1.25em;
}
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--forest);
  background: rgba(13, 63, 48, 0.05);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--forest);
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1.4;
}
.takeaways {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.15rem 1.25rem;
  margin: 0 0 1.75rem;
}
.takeaways h2 {
  font-family: var(--display);
  font-size: 1.05rem;
  margin: 0 0 0.65rem;
  border: 0;
  padding: 0;
  color: var(--forest);
}
.takeaways ul { margin: 0; padding-left: 1.15em; color: var(--ink-2); }
.takeaways li { margin-bottom: 0.35em; }

.share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.share span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 0.25rem;
}
.share a, .share button {
  font-size: 13px;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 980px;
  background: rgba(13, 63, 48, 0.08);
  color: var(--forest);
  min-height: 36px;
}
.share a:hover, .share button:hover { background: rgba(13, 63, 48, 0.12); }

.aside {
  position: sticky;
  top: 72px;
}
.aside-card {
  background: var(--bg-elevated);
  border-radius: var(--r);
  box-shadow: 0 0 0 1px var(--line);
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
}
.aside-card h3 {
  margin: 0 0 0.85rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.aside-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.aside-card li { margin-bottom: 0.55rem; }
.aside-card a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.35;
}
.aside-card a:hover { color: var(--forest); }

/* Forms */
.form-card {
  background: var(--bg-elevated);
  border-radius: calc(var(--r) + 2px);
  box-shadow: 0 0 0 1px var(--line);
  padding: clamp(1.5rem, 3vw, 2rem);
  max-width: 520px;
}
.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.4rem;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1.5px solid var(--line-strong);
  background: var(--white);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  min-height: 48px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.45; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(13, 63, 48, 0.12);
}
.field .hint {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 0.35rem;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}
.form-note {
  font-size: 13px;
  color: var(--ink-3);
  margin: 0;
}

/* Search */
.search-bar {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-elevated);
  border-radius: 980px;
  box-shadow: 0 0 0 1.5px var(--line-strong);
  padding: 0.35rem;
  max-width: 560px;
  margin-bottom: 1.75rem;
}
.search-bar input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0.65rem 1rem;
  min-width: 0;
  outline: none;
}
.search-bar .btn { min-height: 40px; }

/* Empty / 404 */
.center-state {
  text-align: center;
  padding: clamp(3rem, 12vw, 6rem) var(--pad);
  max-width: 28rem;
  margin: 0 auto;
}
.center-state h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}
.center-state p {
  color: var(--ink-3);
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}
.center-code {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Legal prose */
.legal {
  padding-bottom: 3rem;
}
.legal .prose { max-width: var(--max-read); }
.legal .prose h2 { border-left: 0; padding-left: 0; }

/* Pagination */
.pager {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.pager a, .pager span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 1px var(--line);
}
.pager a:hover { background: rgba(13, 63, 48, 0.06); }
.pager .is-current {
  background: var(--forest);
  color: var(--white);
  box-shadow: none;
}

/* Footer */
.foot {
  margin-top: auto;
  padding: 2.5rem 0 2.75rem;
  border-top: 1px solid var(--line);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.foot p {
  margin: 0.6rem 0 0;
  font-size: 14px;
  color: var(--ink-3);
  max-width: 28ch;
  line-height: 1.5;
}
.foot h4 {
  margin: 0 0 0.75rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 0.45rem; }
.foot li a { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.foot li a:hover { color: var(--forest); }
.foot-end {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}

@media (max-width: 900px) {
  .nav { display: none; }
  .grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .aside { position: static; }
  .list a { grid-template-columns: 72px 1fr; }
  .list .time { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .page-head h1, .article-hero h1 { max-width: none; }
}
@media (max-width: 560px) {
  .foot-grid { grid-template-columns: 1fr; }
}
