/* Poems by Collins Rotich: the same design family as crotich.com, Nyama Chama
   and the NSE tracker. Navy and gold, white cards on a light grey page, Archivo. */
@font-face { font-family: 'Archivo'; src: url(fonts/archivo-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url(fonts/archivo-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url(fonts/archivo-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url(fonts/archivo-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --page: #f3f4f6; --card: #ffffff; --ink: #0d1b2e; --muted: #5b6675; --faint: #8a94a3; --rule: #e5e7eb; --wash: #f6f7f9;
  --navy: #02182f; --navy-2: #0b2a4f; --gold: #d9a54e; --gold-ink: #8a6116; --gold-wash: #fbf5e8;
  --radius: 10px; --shadow: 0 1px 2px rgb(13 27 46 / 0.04), 0 1px 3px rgb(13 27 46 / 0.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --page: #07111f; --card: #0e1c30; --ink: #e8edf3; --muted: #a8b4c4; --faint: #808da0; --rule: #21324d; --wash: #112138; --gold-ink: #ecc480; --gold-wash: #1a2232; color-scheme: dark; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 1rem/1.6 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; }
h2 { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--card); padding: 0.4rem 0.8rem; z-index: 10; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* Header */
.masthead { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 5; }
.inner, .page, .colophon { width: 100%; max-width: 68rem; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
.masthead .inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; padding-top: 0.55rem; padding-bottom: 0.55rem; }
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.wordmark small { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-left: 0.35rem; }
.mark { display: inline-grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 6px; background: var(--gold); color: var(--navy); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 0 0.1rem; }
.masthead nav a { color: #c9d1db; text-decoration: none; font-weight: 500; font-size: 0.94rem; padding: 0 0.65rem; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; }
.masthead nav a:hover { color: #fff; border-bottom-color: var(--gold); }
.masthead nav a[aria-current='page'] { color: #fff; border-bottom-color: var(--gold); }

.page { padding-top: 1.75rem; padding-bottom: 3rem; }
main, .stream { display: flex; flex-direction: column; gap: 1.25rem; }

/* Hero */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem 2rem; align-items: center; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); }
.hero > div:only-child { grid-column: 1 / -1; }
.portrait { display: block; width: 10rem; }
.portrait img { display: block; width: 100%; height: auto; border-radius: 50%; border: 3px solid var(--gold); }
.kicker { margin: 0; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold-ink); }
.kicker a { color: inherit; }
.hero .kicker { color: var(--gold); }
.hero h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); font-weight: 700; letter-spacing: -0.03em; margin: 0.25rem 0 0.5rem; }
.hero .lede { margin: 0; color: #dbe2ea; font-size: 1.05rem; max-width: 42rem; }
.hero-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.1rem 0 0; }

.button, button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.15rem; border-radius: 6px; border: 1px solid var(--navy); background: var(--navy); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--navy-2); }
.button.gold, button { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.button.gold:hover, button:hover { background: #e6b766; }
.button.ghost { background: transparent; border-color: rgb(255 255 255 / 0.35); color: #fff; }
.button.ghost:hover { background: transparent; border-color: var(--gold); }
.button.ghost-dark { background: transparent; color: var(--ink); border-color: var(--rule); }
.button.ghost-dark:hover { background: transparent; border-color: var(--gold); }
@media (prefers-color-scheme: dark) {
  .button:not(.gold):not(.ghost):not(.ghost-dark) { background: var(--wash); border-color: var(--rule); }
}

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.kpi { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; min-width: 0; }
.kpi-label { margin: 0; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.kpi-value { margin: 0.3rem 0 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; overflow-wrap: anywhere; }
.kpi-value a { text-decoration: none; }
.kpi-value a:hover { text-decoration: underline; }
.kpi-note { margin: 0.3rem 0 0; font-size: 0.84rem; color: var(--muted); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.3rem 1.3rem; min-width: 0; }
.card > h2 { margin-bottom: 0.8rem; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 0.8rem; }
.count { font-size: 0.8rem; color: var(--muted); }

/* Reading layout: the stream of poems with a sidebar */
.reading { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.25rem; align-items: start; }
.stream { min-width: 0; }
.side { display: grid; gap: 1.25rem; position: sticky; top: 4.5rem; min-width: 0; }

.pagehead h1 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; letter-spacing: -0.02em; margin: 0.2rem 0 0; }
.pagehead h1 span { display: inline-block; font-size: 0.9rem; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 0.3rem; }
.note { margin: 0.6rem 0 0; color: var(--muted); max-width: 46rem; }

/* A poem */
.poem { padding: 1.8rem 2rem 1.6rem; scroll-margin-top: 5rem; }
.num { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; margin: 0; font-size: 0.82rem; color: var(--muted); }
.chip { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-ink); background: var(--gold-wash); border-radius: 99px; padding: 0.15rem 0.6rem; }
.tags a { color: var(--muted); text-decoration: none; }
.tags a:hover { color: var(--ink); text-decoration: underline; }
.poem .title { font-size: clamp(1.4rem, 3.6vw, 1.8rem); font-weight: 700; letter-spacing: -0.02em; margin: 0.7rem 0 1.1rem; color: var(--ink); text-transform: none; }
.poem .title a { text-decoration: none; }
.poem .title a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
/* Set as on the original WordPress blog: the lines of a stanza close
   together, every line (and any part that wraps) flush left, and a clear
   gap of almost two lines between stanzas. */
.verse { font-size: 1.06rem; line-height: 1.55; max-width: 38rem; }
.verse p { margin: 0 0 1.9em; }
.verse p:last-child { margin-bottom: 0; }
.verse .l { display: block; }
.verse a { text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.dateline { margin: 1.4rem 0 0; padding-top: 0.9rem; border-top: 1px solid var(--rule); font-size: 0.82rem; color: var(--muted); }

/* Page turning */
.folio { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.8rem 1rem; }
.folio .pg { font-size: 0.85rem; color: var(--muted); }
.turn { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.turn a { display: flex; flex-direction: column; gap: 0.2rem; text-decoration: none; padding: 0.9rem 1.1rem; transition: border-color 0.15s ease; }
.turn a:hover { border-color: var(--gold); }
.turn [rel='next'] { text-align: right; grid-column: 2; }
.turn .dir { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-ink); }
.turn .t { font-weight: 600; }

/* Lists of poems */
.toc, .themes, .plain { list-style: none; margin: 0; padding: 0; }
.toc li + li, .themes li + li, .plain li + li { border-top: 1px solid var(--rule); }
.toc a, .themes a { display: flex; align-items: baseline; gap: 0.75rem; padding: 0.5rem 0; text-decoration: none; }
.toc li:first-child a, .themes li:first-child a { padding-top: 0; }
.toc li:last-child a, .themes li:last-child a { padding-bottom: 0; }
.toc .t, .themes .t { flex: 1 1 auto; min-width: 0; }
.toc a:hover .t, .themes a:hover .t { text-decoration: underline; text-decoration-color: var(--gold); }
.toc .no, .themes .no { flex: none; font-size: 0.8rem; font-variant-numeric: tabular-nums; color: var(--muted); background: var(--wash); border-radius: 99px; padding: 0.05rem 0.5rem; }
.dots { display: none; }
.plain li { padding: 0.45rem 0; }
.plain li:first-child { padding-top: 0; }

.years { columns: 2; column-gap: 1.25rem; }
.years .year { break-inside: avoid; margin-bottom: 1.25rem; }
.years .year:last-child { margin-bottom: 0; }
.year h2 { color: var(--ink); font-size: 1.15rem; letter-spacing: -0.01em; text-transform: none; font-weight: 700; }

.theme-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.theme-grid li { display: flex; }
.theme-grid a { display: flex; flex-direction: column; gap: 0.3rem; width: 100%; text-decoration: none; transition: border-color 0.15s ease; }
.theme-grid a:hover { border-color: var(--gold); }
.theme-grid .count { align-self: flex-start; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-ink); background: var(--gold-wash); border-radius: 99px; padding: 0.15rem 0.6rem; }
.theme-grid .t { font-weight: 700; font-size: 1.1rem; margin-top: 0.2rem; }
.theme-grid .n { color: var(--muted); font-size: 0.92rem; }

.prose p { margin: 0 0 1rem; font-size: 1.04rem; line-height: 1.75; }
.prose p:last-child { margin-bottom: 0; }

/* Subscribe */
.subscribe { border-top: 3px solid var(--gold); }
.subscribe h2 { margin: 0; }
.subscribe p { margin: 0.35rem 0 0.9rem; color: var(--muted); font-size: 0.95rem; }
.subscribe form { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.subscribe input[type='email'] { flex: 1 1 12rem; min-width: 0; min-height: 44px; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 0 0.8rem; }
.subscribe input::placeholder { color: var(--faint); }
.subscribe button { flex: 1 1 auto; }

/* Short pages and admin */
.leaf.narrow { max-width: 40rem; margin: 0 auto; }
.confirm { padding-top: 1rem; }
.notice { border: 1px solid var(--rule); border-left: 3px solid var(--gold); border-radius: 6px; background: var(--gold-wash); padding: 0.75rem 1rem; }
.notice.error { border-left-color: #c0392b; background: transparent; }
.publish { display: grid; gap: 1rem; padding-top: 1.2rem; }
.publish label { display: grid; gap: 0.3rem; font-size: 0.9rem; font-weight: 600; }
.publish input, .publish textarea { font: inherit; font-weight: 400; color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 0.6rem 0.7rem; }
.publish textarea { line-height: 1.6; }
.publish .check { display: flex; align-items: center; gap: 0.6rem; font-weight: 400; }
.publish .check input { width: 1.1rem; height: 1.1rem; accent-color: var(--gold); }
.publish button { justify-self: start; }
.publish select { font: inherit; font-weight: 400; color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 0.6rem 0.7rem; min-height: 44px; }

/* Like and share, under each poem */
.actions { margin-top: 0.9rem; }
.act-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.act { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; padding: 0 0.9rem; border-radius: 99px; border: 1px solid var(--rule); background: transparent; color: var(--ink); font: inherit; font-size: 0.88rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.act:hover { background: transparent; border-color: var(--gold); }
.act .i { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.act.like[aria-pressed='true'] { border-color: var(--gold); background: var(--gold-wash); color: var(--gold-ink); }
.act.like[aria-pressed='true'] .i { fill: #c0392b; stroke: #c0392b; }
.like-n:empty { display: none; }
.like-n { color: var(--muted); font-weight: 500; }
.share-to { margin: 0.7rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.9rem; font-size: 0.85rem; color: var(--muted); }
.share-to span { font-weight: 600; }
.share-to a { color: var(--ink); text-decoration-color: var(--gold); min-height: 32px; display: inline-flex; align-items: center; }
.like-form { margin-top: 0.8rem; padding: 0.9rem 1rem; border-radius: 8px; background: var(--wash); border: 1px solid var(--rule); }
.like-form p { margin: 0 0 0.7rem; font-size: 0.9rem; color: var(--muted); }
.like-form .row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.like-form input[type='email'] { flex: 1 1 12rem; min-width: 0; min-height: 44px; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 0 0.8rem; }
.like-form button { flex: 1 1 auto; }
.like-msg { margin: 0.8rem 0 0; font-size: 0.9rem; border-left: 3px solid var(--gold); padding-left: 0.7rem; }
.leaf .like-form { background: transparent; border: 0; padding: 1rem 0 0; }

/* Stats */
.leaf.wide { max-width: 68rem; margin: 0 auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.tabs a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 0.8rem; border: 1px solid var(--rule); border-radius: 99px; font-size: 0.85rem; text-decoration: none; }
.tabs a[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.scroll { overflow-x: auto; }
table.stats { width: 100%; min-width: 26rem; border-collapse: collapse; font-size: 0.9rem; overflow-wrap: normal; word-break: normal; }
table.stats th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--rule); }
table.stats td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.stats .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.stats td:first-child { min-width: 8rem; }
table.stats.when td:first-child { white-space: nowrap; min-width: 0; color: var(--muted); }
table.stats.when td.n, table.stats.when th.n { text-align: left; white-space: normal; }
.card h2.sub { margin-top: 1.2rem; }
.card h2 .tz { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--faint); margin-left: 0.4rem; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 6rem; }
.bars span { flex: 1; min-width: 2px; height: max(2px, var(--h)); background: var(--gold); border-radius: 2px 2px 0 0; }
.tracked { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); align-items: end; }
.made { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.made input { flex: 1 1 18rem; min-width: 0; font: inherit; font-size: 0.88rem; color: var(--ink); background: var(--wash); border: 1px solid var(--rule); border-radius: 6px; padding: 0.6rem 0.7rem; }

/* Footer */
.colophon { border-top: 1px solid var(--rule); padding-top: 1.25rem; padding-bottom: 2.5rem; color: var(--muted); font-size: 0.88rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; }
.colophon p { margin: 0; }
.colophon .links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.colophon a { text-decoration: none; }
.colophon a:hover { text-decoration: underline; }

@media (max-width: 960px) {
  .reading { grid-template-columns: 1fr; }
  .side { position: static; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .theme-grid { grid-template-columns: 1fr; }
  .years { columns: 1; }
}
@media (max-width: 640px) {
  .masthead { position: static; }
  .masthead .inner { justify-content: center; }
  .masthead nav { justify-content: center; }
  .masthead nav a { padding: 0 0.5rem; font-size: 0.9rem; }
  .page { padding-top: 1rem; }
  .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 1.4rem 1.1rem; }
  .hero-links { justify-content: center; }
  .portrait { width: 7rem; }
  main, .stream, .kpis, .turn, .reading, .theme-grid, .side { gap: 0.75rem; }
  .years .year { margin-bottom: 0.75rem; }
  .kpi { padding: 0.85rem; }
  .kpi-value { font-size: 1.1rem; }
  .card { padding: 1rem; }
  .poem { padding: 1.25rem 1.1rem 1.1rem; }
  .verse { font-size: 1.02rem; }
  .turn { grid-template-columns: 1fr; }
  .turn [rel='next'] { grid-column: 1; }
  .folio { justify-content: center; }
  .folio .pg { order: -1; width: 100%; text-align: center; }
}
@media print {
  .masthead, .hero-links, .folio, .turn, .side, .colophon .links, .skip, .actions { display: none; }
  body { background: #fff; }
  .reading { display: block; }
  .card { box-shadow: none; border: 0; }
  .poem { break-inside: avoid; }
}
