/* IJAN theme — bold editorial design translated from the TanStack prototype.
   No preprocessor; plain CSS with custom properties. */

:root {
  --brand-yellow: #fcf775;
  --brand-red: #ff7575; /* pink now used throughout instead of maroon */
  --brand-coral: #ff7575;
  --ink: #433f3b;
  --paper: #ffffff;
  --paper-warm: #cdcdc8;
  --border: rgba(67, 63, 59, 0.15);
  --font-sans: "Barlow Condensed", "Futura", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: "Alfarn", "Barlow Condensed", system-ui, sans-serif;
  --wrap: 80rem; /* max-w-7xl (1280px) */
}

@font-face {
  font-family: "Alfarn";
  src: url("../fonts/alfarn.otf") format("opentype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Alfarn";
  src: url("../fonts/alfarnitalic.otf") format("opentype");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

h1, h2, h3, h4, h5, h6, .section-title { font-family: var(--font-display); letter-spacing: 0; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
button { font: inherit; cursor: pointer; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* -------------------- Alert bar -------------------- */
.alert {
  background: var(--brand-yellow);
  color: var(--ink);
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}
.alert__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 0.75rem;
}
.alert a { text-decoration: underline; text-underline-offset: 4px; }
.alert a:hover { text-decoration: none; }

/* -------------------- Header -------------------- */
.site-header {
  background: var(--paper);
  border-bottom: 4px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.5rem;
  height: 5rem;
}
@media (min-width: 640px) { .site-header__inner { height: 7rem; } }
.ijan-logo, .custom-logo-link { display: inline-flex; }
.ijan-logo img, .custom-logo-link img { height: 4rem; width: auto; }
@media (min-width: 640px) { .ijan-logo img, .custom-logo-link img { height: 6rem; } }

.primary-nav { display: none; justify-content: flex-end; gap: 1.75rem; align-items: center; }
@media (min-width: 1024px) { .primary-nav { display: flex; } }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.75rem; align-items: center; }
.primary-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}
.primary-nav a:hover { color: var(--brand-red); text-decoration: none; }
.donate-btn {
  background: var(--brand-coral);
  color: var(--paper) !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
  padding: 0.5rem 1rem;
  border: 0;
}
.donate-btn:hover { text-decoration: none; background: var(--ink); }

.menu-toggle {
  justify-self: end;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  padding: 0.375rem 0.75rem;
  background: var(--paper);
  color: var(--ink);
}
@media (min-width: 1024px) { .menu-toggle { display: none; } }

.mobile-nav { display: none; border-top: 2px solid var(--ink); background: var(--paper); }
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 1rem 1.5rem; display: flex; flex-direction: column; }
.mobile-nav a {
  padding: 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
  border-bottom: 1px solid var(--border);
}
.mobile-nav li:last-child a { border-bottom: 0; }
.mobile-nav .donate-btn { display: block; text-align: center; margin: 1rem 1.5rem; padding: 0.75rem 1rem; }

/* -------------------- Hero -------------------- */
.hero {
  background: var(--brand-yellow);
  border-bottom: 4px solid var(--ink);
  padding: 4rem 0;
}
@media (min-width: 1024px) { .hero { padding: 6rem 0; } }
.hero__grid { display: grid; gap: 3rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1024px) { .hero__grid { grid-template-columns: 7fr 5fr; } }
.kicker {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
  margin: 0 0 2rem;
  max-width: 20ch;
}
.hero p {
  font-size: 1.25rem;
  line-height: 1.35;
  margin: 0 0 2.5rem;
  max-width: 40ch;
}
@media (min-width: 1024px) { .hero p { font-size: 1.5rem; } }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 1rem; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.75rem;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1.25rem 0.75rem 0.75rem;
  font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0;
}
.btn-primary::before {
  content: ""; display: block; width: 1rem; height: 1rem;
  background: var(--brand-yellow); border-radius: 999px;
}
.btn-primary:hover { text-decoration: none; }
.btn-outline {
  display: inline-block;
  border: 2px solid var(--ink); color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0;
  transition: background 0.15s, color 0.15s;
}
.btn-outline:hover { background: var(--ink); color: var(--brand-yellow); text-decoration: none; }
.hero__img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border: 4px solid var(--ink);
}

/* -------------------- Content grid -------------------- */
.content { padding: 4rem 0; }
.content__grid { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .content__grid { grid-template-columns: 8fr 4fr; } }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  border-bottom: 2px solid var(--ink); padding-bottom: 1rem; margin-bottom: 2.5rem;
}
.section-head h2 { font-size: 1.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0; margin: 0; }
.section-head .more {
  font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
  text-decoration-color: var(--brand-red);
}

.story-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .story-grid { grid-template-columns: 1fr 1fr; } }
.story a { display: block; }
.story a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.story__img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border: 2px solid var(--ink); margin-bottom: 1.25rem;
  background: var(--paper-warm);
}
.story__kicker { font-size: 0.75rem; font-weight: 700; color: var(--brand-red); text-transform: uppercase; letter-spacing: 0; }
.story__visual { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--brand-yellow); color: var(--ink); }
.story__visual::before { content: ""; position: absolute; inset: 0 0 0 76%; background: var(--brand-coral); border-left: 2px solid var(--ink); }
.story__visual::after { content: ""; position: absolute; left: 1.25rem; right: 1.25rem; bottom: 3.2rem; border-top: 1px solid var(--ink); }
.story__visual-icon { position: relative; width: 28%; max-width: 7rem; height: auto; transform: translateY(-.4rem); transition: transform .2s ease; }
.story__visual-brand { position: absolute; left: 1.25rem; top: .8rem; font-family: var(--font-display); font-size: 1rem; }
.story__visual-label { position: absolute; left: 1.25rem; right: 3rem; bottom: .9rem; font-size: .875rem; font-weight: 700; text-transform: uppercase; line-height: 1.15; }
.story__visual-arrow { position: absolute; right: 1.25rem; bottom: .65rem; font-size: 1.5rem; line-height: 1; }
.story a:hover .story__visual-icon { transform: translateY(-.65rem); }
@media(prefers-reduced-motion: reduce) { .story__visual-icon { transition: none; } .story a:hover .story__visual-icon { transform: translateY(-.4rem); } }
.story h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin: 0.75rem 0; max-width: 40ch; }
.story p { font-size: 1rem; color: var(--ink); max-width: 56ch; margin: 0 0 1rem; }
.story time { font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0; color: var(--ink); }

/* -------------------- Sidebar -------------------- */
.sidebar-block {
  background: var(--ink); color: var(--paper); padding: 2rem;
  position: sticky; top: 7.5rem;
}
.sidebar-block h2 {
  font-size: 1.25rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0;
  border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 1rem; margin: 0 0 1.5rem;
}
.sidebar-block ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.sidebar-block h4 { margin: 0 0 0.5rem; font-size: 1.125rem; font-weight: 700; color: var(--brand-yellow); }
.sidebar-block li:nth-child(even) h4 { color: var(--brand-red); }
.sidebar-block p { margin: 0 0 0.75rem; font-size: 0.875rem; color: var(--paper); line-height: 1.55; }
.sidebar-block .cta {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
  text-decoration-color: var(--brand-yellow);
}
.sidebar-block li:nth-child(even) .cta { text-decoration-color: var(--brand-red); }

/* -------------------- Archive tiles (years / chapters) -------------------- */
.tile-grid {
  display: grid;
  gap: 1px;
  background: var(--ink);
  border: 2px solid var(--ink);
  grid-template-columns: repeat(3, 1fr);
}
@media (min-width: 640px) { .tile-grid { grid-template-columns: repeat(6, 1fr); } }
.tile-grid.chapters { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .tile-grid.chapters { grid-template-columns: repeat(4, 1fr); } }
.tile {
  background: var(--paper); padding: 1rem; text-align: center;
  transition: background 0.15s;
}
.tile:hover { background: var(--brand-yellow); text-decoration: none; }
.tile .num { font-size: 1.25rem; font-weight: 700; }
.tile .meta { font-size: 0.75rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); margin-top: 0.25rem; }

.chapter-tile {
  background: var(--paper); padding: 1.5rem; aspect-ratio: 1/1;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: background 0.15s;
}
.chapter-tile:hover { background: var(--brand-yellow); text-decoration: none; }
.chapter-tile .region { font-size: 0.75rem; font-family: ui-monospace, monospace; color: var(--ink); text-transform: uppercase; letter-spacing: 0; }
.chapter-tile .name { font-size: 1.125rem; font-weight: 700; text-transform: uppercase; line-height: 1.15; }
.chapter-tile { gap: 1rem; min-width: 0; height: auto; }
.chapter-tile__description { font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
.chapter-tile__link { font-size: .875rem; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 1024px) { .chapter-tile .name { font-size: 1.25rem; } }

/* -------------------- Chapters section -------------------- */
.chapters-section { padding: 5rem 0; background: var(--paper-warm); border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); }
.section-title { font-size: 2.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0; margin: 0 0 0.75rem; }
@media (min-width: 1024px) { .section-title { font-size: 3rem; } }
.section-lede { font-size: 1.125rem; color: var(--ink); max-width: 52ch; margin: 0; }
.section-head-flex { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 3rem; }

/* -------------------- Article / page templates -------------------- */
.page-hero {
  background: var(--brand-yellow);
  border-bottom: 4px solid var(--ink);
  padding: 3rem 0;
}
.page-hero h1 {
  font-size: 3rem;
  font-weight: 700; line-height: 1; letter-spacing: 0;
  margin: 0.75rem 0 0; max-width: 24ch;
}
.page-hero .meta { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0; font-weight: 700; }

.entry { padding: 3.5rem 0; }
.entry__grid { display: grid; grid-template-columns: 1fr; gap: 3rem; max-width: 68rem; margin: 0 auto; }
@media (min-width: 1024px) { .entry__grid { grid-template-columns: 3fr 1fr; } }
.entry-content { font-size: 1.125rem; line-height: 1.65; max-width: 68ch; }
.entry-content > * + * { margin-top: 1.25em; }
.entry-content h2 { font-size: 1.875rem; font-weight: 700; margin-top: 2.5em; }
.entry-content h3 { font-size: 1.5rem; font-weight: 700; margin-top: 2em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brand-red); text-decoration-thickness: 2px; }
.entry-content img { border: 2px solid var(--ink); margin: 2em 0; }
.entry-content blockquote {
  border-left: 4px solid var(--brand-red);
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-size: 1.375rem; font-weight: 500; font-style: italic;
  margin: 2em 0;
}
.entry-content ul, .entry-content ol { padding-left: 1.5rem; }
.entry-content pre, .entry-content code { font-family: ui-monospace, monospace; font-size: 0.95em; }
.entry-content pre { background: var(--paper-warm); border: 2px solid var(--ink); padding: 1rem; overflow-x: auto; }
.entry-featured { width: 100%; margin-bottom: 2rem; border: 4px solid var(--ink); }

.entry-side { position: sticky; top: 7.5rem; align-self: start; }
.entry-side h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0; color: var(--ink); margin: 0 0 0.75rem; }
.entry-side ul { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 0.5rem; font-size: 0.9rem; }
.entry-side a { text-decoration: underline; text-underline-offset: 3px; }

/* -------------------- Archive listings -------------------- */
.archive-list { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .archive-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .archive-list { grid-template-columns: 1fr 1fr 1fr; } }

.nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 3rem; }
.nav-links a, .nav-links .current { border: 2px solid var(--ink); padding: 0.5rem 0.875rem; font-weight: 700; text-decoration: none; }
.nav-links .current { background: var(--ink); color: var(--paper); }
.nav-links a:hover { background: var(--brand-yellow); }

/* -------------------- Search -------------------- */
.search-form { display: flex; gap: 0.5rem; max-width: 32rem; }
.search-form input[type="search"] {
  flex: 1; padding: 0.75rem 1rem; border: 2px solid var(--ink);
  background: var(--paper); font: inherit; font-size: 0.95rem;
}
.search-form input[type="search"]:focus { outline: 3px solid var(--brand-yellow); outline-offset: -2px; }
.search-form button {
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1.25rem; border: 2px solid var(--ink);
  font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0;
}
.search-form button:hover { background: var(--brand-red); border-color: var(--brand-red); }

.search-hero { padding: 3rem 0; background: var(--brand-yellow); border-bottom: 4px solid var(--ink); }
.search-hero .search-form { max-width: 40rem; margin-top: 1rem; }
.search-hero input[type="search"] { border-color: var(--ink); }
.search-summary { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0; font-weight: 700; margin-top: 0.75rem; }

.search-result {
  border-bottom: 1px solid var(--border);
  padding: 1.75rem 0;
  display: grid; gap: 1.5rem; grid-template-columns: 1fr;
}
@media (min-width: 640px) { .search-result { grid-template-columns: 200px 1fr; } }
.search-result img { border: 2px solid var(--ink); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.search-result h3 { font-size: 1.5rem; font-weight: 700; margin: 0.25rem 0; line-height: 1.2; }
.search-result h3 a { text-decoration: none; }
.search-result h3 a:hover { color: var(--brand-red); }
.search-result .meta { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0; font-weight: 700; color: var(--brand-red); }
.search-result p { color: var(--ink); margin: 0.5rem 0 0; }
mark { background: var(--brand-yellow); padding: 0 0.2em; }

/* -------------------- Footer -------------------- */
.site-footer {
  background: var(--ink); color: var(--paper);
  padding: 5rem 0 3rem;
}
.site-footer h3 {
  font-size: 1.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0;
  margin: 0 0 1.5rem;
}
@media (min-width: 1024px) { .site-footer h3 { font-size: 2.25rem; } }
.site-footer .lede { color: var(--paper); margin: 0 0 2rem; max-width: 44ch; }
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 4rem; margin-bottom: 5rem;
}
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.footer-cols h4 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0; color: rgba(255,255,255,0.4); margin: 0 0 1.25rem; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; font-size: 0.875rem; font-weight: 500; }
.footer-cols a:hover { color: var(--brand-yellow); text-decoration: none; }
.footer-cols li.red a:hover { color: var(--brand-red); }
.site-footer .search-form input { background: rgba(255,255,255,0.05); color: var(--paper); border-color: rgba(255,255,255,0.25); }
.site-footer .search-form input::placeholder { color: rgba(255,255,255,0.5); }
.site-footer .search-form button { background: var(--brand-yellow); color: var(--ink); border-color: var(--brand-yellow); }
.site-footer .search-form button:hover { background: var(--paper); border-color: var(--paper); }

.footer-bottom {
  padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
}
.footer-bottom span { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.footer-bottom .copyright { font-size: 0.625rem; color: rgba(255,255,255,0.4); letter-spacing: 0; }

/* -------------------- Utility -------------------- */
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--brand-coral); outline-offset: 4px; }
.site-header .primary-nav li { position: relative; }.primary-nav .sub-menu { display:none;position:absolute;top:100%;left:0;background:var(--paper);border:2px solid var(--ink);padding:1rem;min-width:14rem;align-items:stretch;flex-direction:column;gap:1rem }.primary-nav li:hover>.sub-menu,.primary-nav li:focus-within>.sub-menu{display:flex}.mobile-nav .sub-menu{padding:.5rem 1rem}.editorial-content{font-size:1.2rem}.editorial-content > .wp-block-heading{max-width:80rem;margin:3rem auto;padding-inline:2rem}.editorial-content .wp-block-image img{border:0}.archive-intro{padding:3rem 0}.archive-cover{max-height:28rem;width:100%;object-fit:contain;margin-top:2rem}.outpost-identity{display:flex;align-items:center;gap:1rem}.outpost-identity img{width:170px;height:auto}.outpost-identity span{color:var(--ink);font-weight:700}.outpost .site-header__inner{height:auto;min-height:6rem}.outpost .primary-nav{gap:1rem}.outpost .primary-nav ul{gap:1rem}.outpost .site-header{position:relative}.outpost .site-footer{padding-block:2.5rem}.outpost .footer-grid{margin-bottom:2rem}.outpost-project-title{padding:1.25rem 0;border-bottom:1px solid var(--border);font-size:1.5rem}.outpost .entry-content{max-width:100%}.outpost .entry__grid{grid-template-columns:1fr}
@media(max-width:767px){.hero h1,.page-hero h1{font-size:2.2rem}.hero__img{aspect-ratio:auto}.outpost-identity img{width:130px}.outpost-identity span{font-size:.8rem}.section-head{flex-wrap:wrap;gap:1rem}.search-form input{min-width:0}.tile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
