/*
Theme Name: Krishi Kranti
Theme URI: http://localhost/krishikranti
Author: Krishi Kranti
Description: A modern news-portal theme for a farming publication. Sticky masthead, card-driven layouts, and a four-colour section system that tells organic, advanced, orchard and traditional coverage apart at a glance.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: krishi-kranti
Tags: blog, news, custom-menu, featured-images, translation-ready, grid-layout
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f5f8f6;
  --bg-soft-2: #eef3ef;
  --bg-dark:   #0b1310;

  --ink:   #0d1512;
  --ink-2: #44524b;
  --ink-3: #74827a;
  --ink-4: #9aa69f;

  --line:   #e4eae5;
  --line-2: #d2dbd5;

  --brand:     #0fa45c;
  --brand-700: #0a7a44;
  --brand-50:  #e8f7ef;

  --s-organic:     #0fa45c;
  --s-advanced:    #2563eb;
  --s-orchard:     #e11d48;
  --s-traditional: #d97706;

  /* Active section. Overridden per request. */
  --section:    #0fa45c;
  --section-50: #e8f7ef;

  --display: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --deva:    "Noto Sans Devanagari", var(--sans);

  --r-lg: 16px;
  --r:    12px;
  --r-sm: 8px;
  --r-pill: 999px;

  --sh-sm: 0 1px 2px rgba(13, 21, 18, 0.05);
  --sh:    0 12px 28px -14px rgba(13, 21, 18, 0.22);
  --sh-lg: 0 24px 48px -20px rgba(13, 21, 18, 0.28);

  --wrap: 1240px;
  --gap:  24px;
  --band: clamp(2.75rem, 5vw, 4.5rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --header-h: 68px;
}

/* ==========================================================================
   2. Reset + base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.022em; line-height: 1.15; }

p, ul, ol, blockquote, figure, table { margin: 0; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--brand); color: #fff; }

/* ==========================================================================
   3. Utilities
   ========================================================================== */

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.wrap-read {
  width: min(100% - 2.5rem, 760px);
  margin-inline: auto;
}

.band { padding-block: var(--band); }
.band-sm { padding-block: clamp(2rem, 3.5vw, 3rem); }
.band-soft { background: var(--bg-soft); }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus { top: 1rem; }

/* --- Category chip -------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--chip-tint, var(--section-50));
  color: var(--chip-color, var(--section));
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-sm);
  line-height: 1.3;
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.chip-plain {
  background: transparent;
  padding: 0;
  color: var(--chip-color, var(--section));
}

/* --- Meta line ------------------------------------------------------------ */

.meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
}

.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); flex: none; }

/* --- Eyebrow / rail header ------------------------------------------------ */

.rail {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.rail-title {
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
}

.rail-title::before {
  content: "";
  width: 10px;
  height: 22px;
  border-radius: 3px;
  background: var(--rail-color, var(--brand));
  flex: none;
}

.rail-line { flex: 1; height: 1px; background: var(--line); }

.rail-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  transition: color 0.2s var(--ease), gap 0.2s var(--ease);
}

.rail-link:hover { color: var(--rail-color, var(--brand)); gap: 0.6rem; }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: var(--r-pill);
  padding: 0.8rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover {
  background: var(--brand-700);
  transform: translateY(-1px);
  box-shadow: var(--sh);
}

.btn:active { transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}

.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); box-shadow: none; }

.btn-light {
  background: #fff;
  color: var(--ink);
}

.btn-light:hover { background: #fff; color: var(--brand-700); }

/* ==========================================================================
   4. Masthead
   ========================================================================== */

.topbar {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.75rem;
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 36px;
}

.topbar-date { font-weight: 500; color: rgba(255, 255, 255, 0.6); white-space: nowrap; }

.topbar-latest {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}

.topbar-tag {
  background: var(--brand);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  flex: none;
}

.topbar-headline {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.topbar-headline:hover { color: #fff; }

.topbar-link {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.topbar-link:hover { color: #fff; }

/* --- Sticky header -------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s var(--ease);
}

.masthead.is-stuck { box-shadow: 0 6px 20px -12px rgba(13, 21, 18, 0.3); }

.masthead-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  flex: none;
}

.wordmark-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand-700) 100%);
  display: grid;
  place-items: center;
  flex: none;
}

.wordmark-mark svg { width: 15px; height: 15px; fill: #fff; }

.nav-primary { margin-left: auto; }

.nav-primary ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-primary a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.nav-primary a:hover {
  background: var(--bg-soft);
  color: var(--nav-color, var(--ink));
}

.nav-primary .current-menu-item > a,
.nav-primary .current-cat > a {
  color: var(--nav-color, var(--ink));
  font-weight: 600;
  background: var(--bg-soft);
}

/* --- Header search -------------------------------------------------------- */

.header-search { flex: none; }

.header-search .search-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: 0.35rem 0.35rem 0.35rem 0.8rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.header-search .search-form:focus-within { background: #fff; border-color: var(--line-2); }

.header-search input[type="search"] {
  border: 0;
  background: none;
  width: 130px;
  font-size: 0.8125rem;
  padding: 0.15rem 0;
  min-width: 0;
}

.header-search input[type="search"]:focus { outline: none; }

.header-search button {
  border: 0;
  background: var(--ink);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  transition: background 0.2s var(--ease);
}

.header-search button:hover { background: var(--brand); }
.header-search button svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0.5rem 0.8rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

/* --- Section spectrum ----------------------------------------------------- */

.spectrum {
  display: flex;
  height: 3px;
}

.spectrum span {
  flex: 1;
  background: var(--seg);
  transition: flex-grow 0.5s var(--ease);
}

.spectrum span.is-active { flex-grow: 6; }

/* ==========================================================================
   5. Cards
   ========================================================================== */

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.card:hover {
  border-color: var(--line-2);
  box-shadow: var(--sh);
  transform: translateY(-3px);
}

.card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft-2);
  position: relative;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.card:hover .card-media img { transform: scale(1.05); }

.card-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.018em;
}

.card:hover .card-title { color: var(--chip-color, var(--section)); }

.card-dek {
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot { margin-top: auto; padding-top: 0.35rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}

.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Placeholder artwork when a post has no featured image. */
.plot-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--section) 0%, color-mix(in srgb, var(--section) 55%, #000) 100%);
  position: relative;
}

.plot-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.14) 0 2px, transparent 2px 16px);
}

/* ==========================================================================
   6. Hero
   ========================================================================== */

.hero { padding-block: clamp(1.5rem, 2.5vw, 2.25rem) clamp(0.5rem, 1vw, 0.75rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.lead {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  background: var(--ink);
  min-height: 460px;
  isolation: isolate;
}

.lead-media { position: absolute; inset: 0; }

.lead-media img,
.lead-media .plot-fill {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.lead:hover .lead-media img { transform: scale(1.04); }

.lead::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 12, 9, 0.92) 0%, rgba(6, 12, 9, 0.55) 40%, rgba(6, 12, 9, 0.08) 75%);
  z-index: 1;
}

.lead-body {
  position: relative;
  z-index: 2;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  color: #fff;
}

.lead-title {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.032em;
  max-width: 20ch;
  text-wrap: balance;
}

.lead-dek {
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  max-width: 54ch;
}

.lead .meta { color: rgba(255, 255, 255, 0.7); }
.lead .meta .dot { background: rgba(255, 255, 255, 0.5); }

.lead .chip {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(4px);
}

/* --- Stacked top stories -------------------------------------------------- */

.stack {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.stack-head {
  padding: 0.85rem 1.15rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.stack-item {
  display: grid;
  grid-template-columns: 1fr 78px;
  gap: 0.9rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s var(--ease);
}

.stack-item:last-child { border-bottom: 0; }
.stack-item:hover { background: var(--bg-soft); }

.stack-text { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }

.stack-title {
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.012em;
}

.stack-item:hover .stack-title { color: var(--chip-color, var(--section)); }

.stack-thumb {
  width: 78px;
  height: 62px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-soft-2);
  flex: none;
}

.stack-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   7. Section index (four disciplines)
   ========================================================================== */

.sections-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}

.section-tile {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  border-top: 3px solid var(--tile-color);
  padding: 1.25rem 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.section-tile:hover { box-shadow: var(--sh); transform: translateY(-3px); }

.section-tile-name {
  font-size: 1.0625rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-tile-name::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tile-color);
  flex: none;
}

.section-tile-blurb {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-2);
  margin-top: 0.6rem;
}

.tile-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.tile-list a {
  font-size: 0.875rem;
  font-weight: 550;
  line-height: 1.4;
  display: block;
  transition: color 0.2s var(--ease);
}

.tile-list a:hover { color: var(--tile-color); }

.tile-list time { display: block; font-size: 0.6875rem; color: var(--ink-4); margin-top: 0.25rem; font-weight: 500; }

.tile-foot {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tile-link {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--tile-color);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.2s var(--ease);
}

.tile-link:hover { gap: 0.55rem; }

.tile-count { font-size: 0.75rem; color: var(--ink-4); font-weight: 500; }

/* ==========================================================================
   8. CTA band
   ========================================================================== */

.cta {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  border-radius: var(--r-lg);
  padding: clamp(1.75rem, 4vw, 3rem);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 18px);
  pointer-events: none;
}

.cta > * { position: relative; z-index: 1; }

.cta-title {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.028em;
}

.cta-dek { color: rgba(255, 255, 255, 0.85); margin-top: 0.5rem; max-width: 48ch; }

/* ==========================================================================
   9. Page headers
   ========================================================================== */

.page-head {
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  padding-block: clamp(2rem, 4vw, 3.25rem);
}

.page-head-section { background: var(--section-50); }

.page-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--section);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.page-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--section);
}

.page-title {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.038em;
  line-height: 1.05;
  margin-top: 0.85rem;
}

.page-sub {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 62ch;
  margin-top: 1rem;
}

.page-stat {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-3);
  margin-top: 1.25rem;
}

/* --- Section tabs --------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-block: 0.9rem;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: all 0.2s var(--ease);
}

.tabs a::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tab-color, var(--ink-4));
  flex: none;
}

.tabs a:hover { border-color: var(--tab-color, var(--line-2)); color: var(--tab-color, var(--ink)); }

.tabs .is-active {
  background: var(--tab-color, var(--ink));
  border-color: var(--tab-color, var(--ink));
  color: #fff;
}

.tabs .is-active::before { background: #fff; }

.tabs-bar { border-bottom: 1px solid var(--line); }

/* ==========================================================================
   10. Article
   ========================================================================== */

.article-head { padding-block: clamp(1.75rem, 3vw, 2.75rem) 1.5rem; }

.crumbs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}

.crumbs a:hover { color: var(--section); }
.crumbs .sep { color: var(--ink-4); }

.article-title {
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.06;
  text-wrap: balance;
}

.article-dek {
  font-size: clamp(1.0625rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
  margin-top: 1.1rem;
}

.byline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.byline-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--section) 0%, color-mix(in srgb, var(--section) 55%, #000) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.9rem;
  flex: none;
}

.byline-name { font-weight: 650; font-size: 0.9375rem; }

.article-hero {
  margin-block: 1.5rem;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: var(--bg-soft-2);
}

.article-hero img { width: 100%; height: 100%; object-fit: cover; }

/* --- Body ----------------------------------------------------------------- */

.prose {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
}

.prose > * + * { margin-top: 1.35rem; }

.prose p { color: var(--ink-2); }

.prose h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 750;
  letter-spacing: -0.026em;
  color: var(--ink);
  margin-top: 2.5rem;
}

.prose h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin-top: 2rem;
}

.prose h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--section);
  margin-top: 1.75rem;
}

.prose strong { color: var(--ink); font-weight: 650; }

.prose ul, .prose ol { padding-left: 0; list-style: none; color: var(--ink-2); }
.prose li + li { margin-top: 0.6rem; }

.prose ul > li { position: relative; padding-left: 1.5rem; }

.prose ul > li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--section);
}

.prose ol { counter-reset: step; }

.prose ol > li { position: relative; padding-left: 2.1rem; counter-increment: step; }

.prose ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--section-50);
  color: var(--section);
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.prose a {
  color: var(--section);
  font-weight: 550;
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--section) 35%, transparent);
  transition: box-shadow 0.2s var(--ease);
}

.prose a:hover { box-shadow: inset 0 -2px 0 var(--section); }

.prose blockquote {
  background: var(--bg-soft);
  border-left: 3px solid var(--section);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 1.15rem 1.4rem;
  font-size: 1.15rem;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink);
}

.prose blockquote p { color: inherit; }

.prose figure { margin-block: 2rem; }
.prose img { border-radius: var(--r); }

.prose figcaption,
.prose .wp-caption-text {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-top: 0.6rem;
}

.prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9375rem;
  margin-block: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.prose thead { background: var(--bg-soft); }

.prose th, .prose td {
  text-align: left;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--line);
}

.prose tbody tr:last-child td { border-bottom: 0; }

.prose th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.prose td { color: var(--ink-2); }

.prose code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.875em;
  background: var(--bg-soft-2);
  padding: 0.15em 0.4em;
  border-radius: 5px;
}

.prose pre {
  background: var(--bg-dark);
  color: #e6efe9;
  padding: 1.15rem 1.35rem;
  border-radius: var(--r);
  overflow-x: auto;
  font-size: 0.875rem;
}

.prose pre code { background: none; padding: 0; }

/* Table wrapper so wide tables scroll instead of breaking the column. */
.table-scroll { overflow-x: auto; }

/* Source line at the foot of an article. */
.prose .further {
  margin-top: 2.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-3);
}

.prose .further em { font-style: normal; }

/* --- Homepage introduction ------------------------------------------------
   Heading on top, copy underneath in two columns so the band fills its width
   instead of leaving a short heading stranded beside a tall block of text. */

.intro-copy {
  font-size: 1rem;
  columns: 2;
  column-gap: clamp(2rem, 4vw, 3.5rem);
}

/* Column flow needs bottom margins; the top-margin rule would push the first
   paragraph of the second column out of alignment. Paragraphs are allowed to
   break across the gutter so both columns fill to the same depth. */
.intro-copy > * + * { margin-top: 0; }
.intro-copy > * { margin-bottom: 1.15rem; orphans: 2; widows: 2; }
.intro-copy > *:last-child { margin-bottom: 0; }

/* --- Tags + share --------------------------------------------------------- */

.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem; }

.tag-row a {
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--ink-2);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0.35rem 0.8rem;
  transition: all 0.2s var(--ease);
}

.tag-row a:hover { border-color: var(--section); color: var(--section); background: var(--section-50); }

/* --- Related -------------------------------------------------------------- */

.article-foot { border-top: 1px solid var(--line); margin-top: 3rem; }

/* --- Reading progress ----------------------------------------------------- */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 200;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--section);
  pointer-events: none;
}

/* --- Article grid: body plus a sticky contents rail ----------------------- */

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px) 264px;
  gap: clamp(2rem, 4vw, 3.5rem);
  justify-content: center;
  align-items: start;
}

.article-main { min-width: 0; }

.article-rail {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.toc {
  border-left: 2px solid var(--line);
  padding-left: 1.1rem;
}

.toc-head {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.9rem;
}

.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }

.toc li { counter-increment: toc; }

.toc li + li { margin-top: 0.7rem; }

.toc a {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-3);
  transition: color 0.2s var(--ease);
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-weight: 700;
  font-size: 0.6875rem;
  color: var(--ink-4);
  padding-top: 0.1em;
}

.toc a:hover { color: var(--ink); }

.toc .is-current a { color: var(--section); font-weight: 600; }
.toc .is-current a::before { color: var(--section); }

.rail-cta {
  background: var(--bg-soft);
  border-radius: var(--r);
  padding: 1.1rem 1.15rem;
}

.rail-cta h2 { font-size: 0.9375rem; font-weight: 700; }
.rail-cta p { font-size: 0.8125rem; color: var(--ink-2); margin-top: 0.4rem; line-height: 1.55; }

.rail-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.8rem;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--section);
  transition: gap 0.2s var(--ease);
}

.rail-cta a:hover { gap: 0.55rem; }

/* --- Share row ------------------------------------------------------------ */

.share {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 1.5rem;
}

.share-label {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-3);
  margin-right: 0.25rem;
}

.share-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.share-btn svg { width: 17px; height: 17px; }
.share-btn:hover { border-color: var(--section); color: var(--section); background: var(--section-50); transform: translateY(-2px); }

.share-btn[data-copied="1"] { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }

/* --- Author box ----------------------------------------------------------- */

.author-box {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--bg-soft);
  border-radius: var(--r-lg);
  padding: 1.4rem 1.5rem;
  margin-top: 2.5rem;
}

.author-box .byline-avatar { width: 52px; height: 52px; font-size: 1.05rem; }

.author-box h2 { font-size: 1rem; font-weight: 750; }

.author-box p { font-size: 0.875rem; color: var(--ink-2); line-height: 1.6; margin-top: 0.35rem; }

/* --- Previous / next ------------------------------------------------------ */

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.post-nav a {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.post-nav a:hover { border-color: var(--line-2); box-shadow: var(--sh); transform: translateY(-2px); }

.post-nav .is-next { text-align: right; align-items: flex-end; }

.post-nav-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.post-nav-title { font-size: 0.9375rem; font-weight: 650; line-height: 1.35; letter-spacing: -0.012em; }

.post-nav a:hover .post-nav-title { color: var(--section); }

/* --- Back to top ---------------------------------------------------------- */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--sh);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--section); border-color: var(--section); color: #fff; }
.to-top svg { width: 18px; height: 18px; }

/* ==========================================================================
   11. Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.form-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.35rem, 3vw, 2.25rem);
  box-shadow: var(--sh-sm);
}

/* --- Contact details column ----------------------------------------------- */

.details-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.35rem, 3vw, 1.9rem);
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.details-title {
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.details-list { list-style: none; margin: 0; padding: 0; }

.detail {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0.9rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.detail:last-child { border-bottom: 0; padding-bottom: 0; }

.detail-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-700);
  display: grid;
  place-items: center;
}

.detail-icon svg { width: 18px; height: 18px; }

.detail-body { min-width: 0; }

.detail-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.35rem;
}

.detail-value {
  display: block;
  font-size: 0.9375rem;
  font-weight: 550;
  line-height: 1.55;
  font-style: normal;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.detail-link { transition: color 0.2s var(--ease); }
.detail-link:hover { color: var(--brand-700); text-decoration: underline; }

.detail-note {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-3);
  margin-top: 0.3rem;
}

.field { margin-bottom: 1.15rem; }

.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.field label .req { color: var(--s-orchard); }

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 0.7rem 0.85rem;
  font-size: 0.9375rem;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.field textarea { min-height: 160px; resize: vertical; line-height: 1.6; }

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
                    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--ink-4); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-50);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.field-hint { font-size: 0.75rem; color: var(--ink-3); margin-top: 0.35rem; }

.field-error { font-size: 0.75rem; font-weight: 600; color: #d0342c; margin-top: 0.35rem; }

.field-has-error input,
.field-has-error select,
.field-has-error textarea { border-color: #d0342c; }

.field-has-error input:focus,
.field-has-error select:focus,
.field-has-error textarea:focus { box-shadow: 0 0 0 3px rgba(208, 52, 44, 0.12); }

.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice {
  border-radius: var(--r);
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.notice-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex: none;
  margin-top: 0.1rem;
}

.notice-ok { background: var(--brand-50); }
.notice-ok .notice-icon { background: var(--brand); }
.notice-ok h2 { color: var(--brand-700); }

.notice-bad { background: #fdecea; }
.notice-bad .notice-icon { background: #d0342c; }
.notice-bad h2 { color: #a02a1f; }

.notice h2 { font-size: 0.9375rem; font-weight: 700; }
.notice p { font-size: 0.875rem; color: var(--ink-2); margin-top: 0.25rem; }

/* ==========================================================================
   12. Search, empty states, pagination
   ========================================================================== */

.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-head .search-form,
.empty .search-form {
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  max-width: 420px;
}

.page-head .search-form input[type="search"],
.empty .search-form input[type="search"] {
  flex: 1;
  border: 0;
  background: none;
  font-size: 0.9375rem;
  min-width: 0;
  padding: 0.35rem 0;
}

.page-head .search-form input:focus,
.empty .search-form input:focus { outline: none; }

.page-head .search-form button,
.empty .search-form button {
  border: 0;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 0.5rem 1.1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  flex: none;
}

.page-head .search-form button:hover,
.empty .search-form button:hover { background: var(--brand); }

.empty { padding-block: clamp(3rem, 7vw, 5.5rem); max-width: 56ch; }

.empty-code {
  font-family: var(--display);
  font-size: clamp(3.5rem, 11vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.85;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.empty h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 1.25rem;
}

.empty p { color: var(--ink-2); margin-top: 0.85rem; }
.empty .search-form { margin-top: 1.75rem; }

.pager { display: flex; gap: 0.45rem; padding-top: 2.5rem; flex-wrap: wrap; }

.pager .page-numbers {
  min-width: 40px;
  height: 40px;
  padding-inline: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: all 0.2s var(--ease);
}

.pager .page-numbers:hover { border-color: var(--section); color: var(--section); }

.pager .current { background: var(--section); border-color: var(--section); color: #fff; }

/* ==========================================================================
   13. Footer
   ========================================================================== */

.site-footer { background: var(--bg-dark); color: rgba(255, 255, 255, 0.75); margin-top: var(--band); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
}

.footer-wordmark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #fff;
}

.footer-hi { font-family: var(--deva); font-size: 0.9rem; color: rgba(255, 255, 255, 0.45); margin-top: 0.6rem; }

.footer-blurb { font-size: 0.875rem; line-height: 1.7; color: rgba(255, 255, 255, 0.6); max-width: 38ch; margin-top: 0.9rem; }

.footer-head {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.65rem; }

.footer-list a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s var(--ease);
}

.footer-list a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot, rgba(255, 255, 255, 0.3));
  flex: none;
}

.footer-list a:hover { color: #fff; }

.colophon {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

.colophon a:hover { color: var(--brand); }

/* ==========================================================================
   14. Motion
   ========================================================================== */

.kk-js .reveal { opacity: 0; transform: translateY(14px); }

.kk-js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

/* ==========================================================================
   15. WordPress core classes
   ========================================================================== */

.alignleft { float: left; margin: 0.4rem 1.75rem 1.25rem 0; }
.alignright { float: right; margin: 0.4rem 0 1.25rem 1.75rem; }
.aligncenter { margin-inline: auto; }
.alignwide { width: min(100%, 940px); margin-inline: auto; }
.alignfull { width: 100%; }
.wp-caption { max-width: 100%; }
.sticky, .gallery-caption, .bypostauthor { display: block; }
.wp-block-image { margin-block: 2rem; }

/* ==========================================================================
   16. Responsive
   ========================================================================== */

@media (max-width: 1120px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sections-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  /* The contents rail needs real width to be readable; below this it goes. */
  .article-grid { grid-template-columns: minmax(0, 760px); }
  .article-rail { display: none; }
}

@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; }
  .details-card { position: static; }
  .hero-grid { grid-template-columns: 1fr; }
  .lead { min-height: 400px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-search { display: none; }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }

  .nav-primary {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--sh);
    padding: 0.6rem 1.25rem 1rem;
    z-index: 95;
  }

  .nav-primary.is-open { display: block; }

  .nav-primary ul { flex-direction: column; align-items: stretch; gap: 0; }

  .nav-primary li { border-bottom: 1px solid var(--line); }
  .nav-primary li:last-child { border-bottom: 0; }

  .nav-primary a { padding: 0.85rem 0.5rem; border-radius: 0; font-size: 0.9375rem; }

  .masthead-inner { position: relative; }
}

@media (max-width: 780px) {
  .intro-copy { columns: 1; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-date, .topbar-link { display: none; }
  .cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .cards, .cards-3, .sections-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .lead { min-height: 340px; }
  .byline { gap: 0.65rem; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .is-next { text-align: left; align-items: flex-start; }
  .author-box { flex-direction: column; gap: 0.85rem; }
  .to-top { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .kk-js .reveal { opacity: 1; transform: none; }
}

@media print {
  .masthead, .topbar, .spectrum, .site-footer, .article-foot, .cta { display: none; }
}
