/* ==========================================================================
   KHONO site stylesheet
   Engineering editorial theme with blueprint details.
   One file for every page. Upload to /css/site.css
   ========================================================================== */

/* ---------- Fonts (self-hosted, Latin subset) ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-var.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/publicsans-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibmplexmono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #F4F1EA;
  --paper-2: #ECE7DC;
  --paper-3: #E3DDCF;
  --ink: #16181C;
  --ink-2: #464A50;
  --ink-3: #6B6E73;
  --rule: #CFC8B9;
  --rule-strong: #16181C;
  --accent: #B83D0C;        /* safety orange, 5.1:1 on paper */
  --accent-soft: #F0D9CC;
  --grid: rgba(22, 24, 28, 0.06);

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Type helpers ---------- */
.label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.label--muted { color: var(--ink-3); }
.lead { font-size: 19px; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-2); }

.h-section {
  font-family: var(--serif);
  font-size: clamp(28px, 3.1vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.h-card {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.25;
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  border: 1.5px solid var(--ink);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--paper:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }

.text-link {
  font-weight: 600; text-decoration: none;
  border-bottom: 1.5px solid currentColor; padding-bottom: 2px;
}
.text-link:hover { color: var(--accent); }
.arrow::after { content: "\2192"; margin-left: 8px; display: inline-block; transition: transform .2s ease; }
a:hover .arrow::after, a.arrow:hover::after { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 241, 234, 0.94);
  border-bottom: 1.5px solid var(--rule-strong);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { backdrop-filter: saturate(1.2) blur(8px); }
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px;
}
.brand {
  font-family: var(--serif); font-size: 26px; font-weight: 600;
  letter-spacing: -0.01em; text-decoration: none; color: var(--ink);
  display: inline-flex; align-items: baseline; gap: 10px;
}
.brand small {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
}
.nav-main { display: flex; align-items: center; gap: 28px; }
.nav-main a {
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink-2);
  padding: 6px 0; border-bottom: 1.5px solid transparent;
}
.nav-main a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.nav-main .btn { color: var(--paper); padding: 10px 18px; min-height: 42px; border-bottom-width: 1.5px; }
.nav-main .btn:hover { color: var(--paper); }

/* current page: <body data-page="consulting"> + <a data-nav="consulting"> */
[data-page="home"]       [data-nav="home"],
[data-page="consulting"] [data-nav="consulting"],
[data-page="products"]   [data-nav="products"],
[data-page="training"]   [data-nav="training"],
[data-page="blog"]       [data-nav="blog"],
[data-page="company"]    [data-nav="company"] { color: var(--ink); border-bottom-color: var(--accent); }

.menu-toggle {
  display: none; background: none; border: 1.5px solid var(--ink);
  width: 46px; height: 46px; padding: 0; cursor: pointer; color: var(--ink);
}
.menu-toggle svg { width: 22px; height: 22px; margin: auto; display: block; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav-main {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1.5px solid var(--ink);
    padding: 8px var(--gutter) 24px;
  }
  .nav-main.is-open { display: flex; }
  .nav-main a { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
  .nav-main .btn { margin-top: 16px; justify-content: center; }
  .brand small { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-bottom: 1.5px solid var(--rule-strong);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(48px, 6vw, 80px);
}
.hero h1 { display: block; }
.hero h1 .label { display: block; margin-bottom: 20px; }
.hero h1 .display {
  display: block;
  font-family: var(--serif);
  font-size: clamp(34px, 4.3vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  font-weight: 500;
}
.hero h1 .display em { font-style: italic; color: var(--accent); }
.hero .lead { margin: 28px 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-facts {
  align-self: end;
  border-left: 1.5px solid var(--ink);
  padding-left: clamp(20px, 3vw, 36px);
  background: var(--paper);
}
.fact { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.fact:last-child { border-bottom: 0; }
.fact dt { font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.fact dd { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
.fact dd .label { display: block; margin-bottom: 2px; }

/* Signature: schedule bar strip (plan / slip / forecast) */
.schedule-strip {
  border-top: 1px solid var(--rule);
  background: var(--paper);
}
.schedule-strip .wrap {
  display: flex; align-items: center; gap: 20px;
  padding-top: 16px; padding-bottom: 16px;
}
.bars { display: flex; flex: 1; height: 10px; max-width: 560px; }
.bars span { display: block; height: 100%; }
.bars .plan { flex: 5; background: var(--ink); }
.bars .slip { flex: 2; background: var(--accent); }
.bars .forecast { flex: 4; border: 1.5px dashed var(--ink); }
.schedule-strip .label { white-space: nowrap; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
    border-left: 0; border-top: 1.5px solid var(--ink); padding: 8px 0 0; }
  .fact { border-bottom: 0; }
  .fact dt { font-size: 34px; }
  .schedule-strip .label--muted { display: none; }
}
@media (max-width: 520px) {
  .hero-facts { grid-template-columns: 1fr; }
  .fact { border-bottom: 1px solid var(--rule); }
}

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; border-bottom: 1.5px solid var(--rule-strong); }
.section--alt { background: var(--paper-2); }

.section-head { max-width: 880px; margin-bottom: clamp(36px, 4.5vw, 56px); }
.section-head .label {
  display: inline-block; padding-top: 12px; margin-bottom: 18px;
  border-top: 1.5px solid var(--ink); min-width: 200px;
}
.section-head .lead { margin-top: 18px; margin-bottom: 0; max-width: 72ch; }
.section-head p + p { margin-top: 14px; }
.section-head .muted { max-width: 72ch; }

/* Ruled grid of items (services, tools) */
.ruled-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1.5px solid var(--ink);
  border-left: 1px solid var(--rule);
}
.ruled-grid > * {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 28px 28px 32px;
}
.ruled-grid .num { display: block; margin-bottom: 14px; }
.ruled-grid h3 { margin-bottom: 10px; }
.ruled-grid p { margin: 0; color: var(--ink-2); font-size: 16px; }
.ruled-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .ruled-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ruled-grid, .ruled-grid--2 { grid-template-columns: 1fr; } }

.section-foot { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Tool cards (whole card is a link) */
.tool-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  transition: background .2s ease;
}
.tool-card:hover { background: var(--paper); }
.section--alt .tool-card:hover { background: var(--paper); }
.tool-card .more { margin-top: auto; padding-top: 22px; font-weight: 600; font-size: 15px; }
.tool-card:hover .more { color: var(--accent); }

/* Two-column split (embedded expertise) */
.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px); align-items: start;
}
.split .body p { color: var(--ink-2); }
.role-list { border-top: 1.5px solid var(--ink); }
.role-list li {
  display: flex; gap: 18px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--serif); font-size: 19px; line-height: 1.3;
}
.role-list .label { min-width: 34px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* Resource blocks (templates / training) */
.resource-pair { margin-top: 0; }

.resource-pair h3 { margin-bottom: 10px; }
.resource-pair p { margin-bottom: 18px; }

/* ---------- Insights ---------- */
.insights {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
}
.post { position: relative; }
.post a.stretched { text-decoration: none; color: inherit; }
.post a.stretched::after { content: ""; position: absolute; inset: 0; }
.post:hover h3 { color: var(--accent); }
.post h3 { transition: color .2s ease; }
.post-meta { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.post--featured figure {
  margin: 0 0 24px; border: 1.5px solid var(--ink);
  aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-3);
}
.post--featured img { width: 100%; height: 100%; object-fit: cover; }
.post--featured h3 { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 30px); line-height: 1.12; margin-bottom: 12px; }
.post--featured p { color: var(--ink-2); margin: 0; }
.post-list { border-top: 1.5px solid var(--ink); }
.post-list .post { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.post-list h3 { font-family: var(--serif); font-size: 21px; line-height: 1.2; margin-bottom: 8px; }
.post-list .by { font-size: 14px; color: var(--ink-3); margin: 0; }
@media (max-width: 900px) { .insights { grid-template-columns: 1fr; } }

/* ---------- Industries ---------- */
.industries {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1.5px solid var(--ink);
}
.industries li {
  padding: 26px 24px 30px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--serif); font-size: 22px; line-height: 1.2;
}
.industries li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.industries .label { display: block; margin-bottom: 12px; }
@media (max-width: 900px) {
  .industries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .industries li:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* ---------- Closing call to action (dark band) ---------- */
.cta-band { background: var(--ink); color: var(--paper); padding: clamp(64px, 8vw, 104px) 0; }
.cta-band .wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.cta-band p.statement {
  font-family: var(--serif); font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.12; letter-spacing: -0.01em; margin: 16px 0 0;
}
.cta-band .label { color: #F08A5D; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }
.cta-band .btn--line { color: var(--paper); border-color: var(--paper); }
.cta-band .btn--line:hover { background: var(--paper); color: var(--ink); }
@media (max-width: 900px) {
  .cta-band .wrap { grid-template-columns: 1fr; }
  .cta-band .actions { justify-content: flex-start; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--paper-2); border-top: 1.5px solid var(--ink); padding: 72px 0 28px; font-size: 15px; }
.footer-grid {
  display: grid;
  /* brand column flexes; link columns take the width of their longest item */
  grid-template-columns: minmax(220px, 1fr) repeat(4, auto);
  justify-content: space-between;
  gap: 40px 48px;
}
@media (min-width: 1281px) { .site-footer nav li a { white-space: nowrap; } }
.footer-brand p { color: var(--ink-2); max-width: 30ch; }
.footer-brand .brand { margin-bottom: 18px; color: var(--ink); }
.footer-brand .brand:hover { color: var(--ink); text-decoration: none; }
.site-footer nav .label, .footer-connect .label { display: block; margin-bottom: 18px; color: var(--ink); }
.site-footer li { margin-bottom: 12px; }
.site-footer li a, .footer-brand a { text-decoration: none; color: var(--ink-2); }
.site-footer li a:hover, .footer-brand a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.social { display: flex; gap: 10px; margin-top: 4px; }
.social a {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: 15px;
}
.social a:hover { background: var(--ink); color: var(--paper); }
.social svg { width: 18px; height: 18px; }
.footer-bottom {
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between;
  font-size: 13px; color: var(--ink-3);
}
.footer-bottom a { color: var(--ink-3); }
@media (max-width: 1280px) { .footer-grid { grid-template-columns: repeat(4, auto); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Inner pages (consulting, training, about, product pages)
   ========================================================================== */

/* Breadcrumb */
.breadcrumb { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 28px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--rule); }
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* Page hero (shorter than the homepage hero, same grid paper) */
.page-hero .wrap { display: block; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 5vw, 64px); }
.page-hero h1 .display { font-size: clamp(32px, 4vw, 52px); max-width: 22ch; }
.page-hero .lead { max-width: 70ch; margin: 24px 0 0; }
.page-hero .lead + .lead { margin-top: 12px; }
.page-hero .hero-actions { margin-top: 32px; }

/* Jump links under the hero */
.jump-links .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-top: 16px; padding-bottom: 16px; }
.jump-links a { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; }
.jump-links a:hover { color: var(--accent); }
.jump-links a span { color: var(--accent); margin-right: 6px; }

/* Phase / service block: text left, scope panel right */
.phase { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: stretch; }
/* left column is a flex column so the outcome cards sit on the same bottom line as the scope box */
.phase .body { display: flex; flex-direction: column; }
.phase .body > p:last-of-type { margin-bottom: 32px; }
.phase .body > p { color: var(--ink-2); max-width: 66ch; }
.phase .body > p.lead { color: var(--ink-2); }
.phase .outcomes { margin-top: auto; }
.related { margin: 24px 0 0; font-size: 15px; color: var(--ink-2); }
.related a { margin-left: 4px; }
.scope { border: 1.5px solid var(--ink); background: var(--paper); padding: 28px 28px 8px; }
.section--alt .scope { background: var(--paper); }
.scope h3 { font-family: var(--serif); font-size: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.scope li { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.scope li:last-child { border-bottom: 0; }
.scope strong { display: block; font-weight: 600; margin-bottom: 4px; }
.scope span { color: var(--ink-2); font-size: 15px; }
@media (max-width: 900px) { .phase { grid-template-columns: 1fr; } }

/* Section heading used as a real H2 in the dark band */
.cta-band h2 { color: var(--paper); font-family: var(--serif); font-size: clamp(26px, 3.2vw, 38px); line-height: 1.12; margin: 16px 0 0; font-weight: 500; }
.cta-band .sub { color: #C9C4B8; margin: 16px 0 0; max-width: 60ch; }

/* ---------- Product list (Products page) ---------- */
.product-list { border-top: 1.5px solid var(--ink); }
.product {
  display: grid; grid-template-columns: 170px minmax(0, 1fr) 220px;
  gap: 24px clamp(24px, 4vw, 56px);
  padding: 40px 0; border-bottom: 1px solid var(--rule);
  scroll-margin-top: 90px;
}
.product .meta { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.product .meta .code { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--ink-3); }
.product h2 { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 30px); line-height: 1.15; margin-bottom: 14px; }
.product .desc p { color: var(--ink-2); max-width: 66ch; }
.product .desc p:last-child { margin-bottom: 0; }
.product .buy { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.product .price { font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.product .price small { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }
.product--flagship { background: var(--paper-2); margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); box-shadow: inset 4px 0 0 var(--accent); }

.tag {
  display: inline-block; font-family: var(--mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px; border: 1px solid var(--ink); color: var(--ink); line-height: 1.3;
}
.tag--accent { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.tag--free { border-color: #2F6B4F; color: #2F6B4F; }

@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; gap: 16px; }
  .product .meta { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .product .buy { gap: 14px; }
}

/* ---------- Course cards (Training page) ---------- */
.course { display: flex; flex-direction: column; }
.course .course-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.course .course-meta .code { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--ink-3); }
.course h2 { font-family: var(--serif); font-size: clamp(23px, 2.2vw, 28px); line-height: 1.18; margin-bottom: 14px; }
.course p { color: var(--ink-2); }
.course .more { margin-top: auto; padding-top: 10px; }
.ruled-grid.courses > * { padding: 36px 36px 40px; }
@media (max-width: 600px) { .ruled-grid.courses > * { padding: 28px 24px 32px; } }

/* ---------- About page ---------- */
.directors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); }
.director figure { margin: 0 0 22px; border: 1.5px solid var(--ink); aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-3); }
.director img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; filter: grayscale(0.15); }
.director h3 { font-family: var(--serif); font-size: 28px; line-height: 1.15; }
.director .role { margin: 6px 0 16px; }
.director p { color: var(--ink-2); }
@media (max-width: 800px) { .directors { grid-template-columns: 1fr; } }

.approach { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: stretch; }
.approach .pillars { border-top: 1.5px solid var(--ink); }
.approach .pillars > div { padding: 24px 0; border-bottom: 1px solid var(--rule); }
.approach .pillars h3 { margin-bottom: 8px; }
.approach .pillars p { font-family: var(--serif); font-size: 21px; line-height: 1.35; margin: 0; }
.map-panel { position: relative; border: 1.5px solid var(--ink); background: var(--paper); min-height: 420px; overflow: hidden; }
.map-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; filter: grayscale(1) contrast(1.1); mix-blend-mode: multiply; }
.map-panel .regions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 20px; background: linear-gradient(transparent, var(--paper) 40%); }
.map-panel .regions .label { display: block; width: 100%; margin-bottom: 4px; }
@media (max-width: 900px) { .approach { grid-template-columns: 1fr; } }

.portfolio { border-top: 1.5px solid var(--ink); list-style: none; margin: 0; padding: 0; }
.portfolio li {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 8px 24px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
.portfolio h3 { font-family: var(--serif); font-size: 22px; line-height: 1.25; }
.portfolio .work { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.portfolio .note { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.04em; }
@media (max-width: 800px) {
  .portfolio li { grid-template-columns: 40px minmax(0, 1fr); }
  .portfolio .work { grid-column: 2; justify-content: flex-start; }
}

.gallery-wrap { position: relative; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 32%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin; }
.gallery figure { margin: 0; scroll-snap-align: start; border: 1.5px solid var(--ink); aspect-ratio: 4 / 3; background: var(--paper-3); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery-controls { display: flex; gap: 10px; margin-top: 18px; }
.gallery-controls button { width: 46px; height: 46px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font-size: 18px; cursor: pointer; }
.gallery-controls button:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 700px) { .gallery { grid-auto-columns: 85%; } }

/* ---------- Contact page and forms ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact-intro .facts { margin-top: 32px; border-top: 1.5px solid var(--ink); }
.contact-intro .facts > div { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.contact-intro .facts h2 { margin-bottom: 6px; }
.contact-intro .facts p { margin: 0; color: var(--ink-2); font-size: 15px; }
.form-panel { background: var(--paper); border: 1.5px solid var(--ink); padding: clamp(24px, 3vw, 40px); scroll-margin-top: 100px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.field label .req { color: var(--accent); }
.field input, .field select, .field textarea {
  font: 400 16px/1.5 var(--sans); color: var(--ink); background: #FBFAF6;
  border: 1px solid #A9A293; border-radius: 0; padding: 12px 14px; width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 200px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 2px var(--accent-soft); }
.form-panel .btn { width: 100%; justify-content: center; cursor: pointer; }
.form-note { font-size: 13px; color: var(--ink-3); margin: 14px 0 0; }
.notice { border: 1.5px solid #2F6B4F; background: #E6EFE8; color: #1F4D37; padding: 16px 18px; margin-bottom: 24px; }
.notice strong { display: block; margin-bottom: 4px; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; gap: 0; } }
.contact-intro .muted { margin-top: 14px; }

/* ---------- Blog page ---------- */
.search-box { margin-top: 32px; max-width: 760px; position: relative; }
.search-box label { display: block; margin-bottom: 10px; }
.search-box input {
  width: 100%; font: 400 18px/1.4 var(--sans); color: var(--ink);
  background: #FBFAF6; border: 1.5px solid var(--ink); border-radius: 0; padding: 16px 18px 16px 50px;
}
.search-box input:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box svg { position: absolute; left: 18px; bottom: 19px; width: 20px; height: 20px; color: var(--ink-3); }
.search-results { max-width: 760px; background: var(--paper); border: 1.5px solid var(--ink); border-top: 0; max-height: 420px; overflow: auto; }
.search-results:empty { display: none; }
.search-results a { display: block; padding: 16px 18px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a:focus { background: var(--paper-2); }
.search-results strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 19px; }
.search-results span { display: block; color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.search-results p { margin: 0; padding: 16px 18px; color: var(--ink-2); }

.series { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.series .intro p { color: var(--ink-2); }
.series .intro .count { display: block; margin: 18px 0 22px; }
.article-list { columns: 2; column-gap: 40px; border-top: 1.5px solid var(--ink); padding-top: 6px; list-style: none; margin: 0; padding-left: 0; }
.article-list li { break-inside: avoid; border-bottom: 1px solid var(--rule); }
.article-list a { display: flex; gap: 14px; padding: 13px 0; text-decoration: none; color: var(--ink); line-height: 1.35; }
.article-list a:hover { color: var(--accent); }
.article-list .n { font-family: var(--mono); font-size: 12px; color: var(--ink-3); padding-top: 3px; min-width: 22px; }
@media (max-width: 1000px) { .series { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .article-list { columns: 1; } }

/* ---------- Curriculum pages ---------- */
.curriculum { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.modules { border-top: 1.5px solid var(--ink); }
.module { border-bottom: 1px solid var(--rule); }
.module summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto;
  gap: 16px; align-items: baseline; padding: 22px 0;
}
.module summary::-webkit-details-marker { display: none; }
.module summary h2 { font-family: var(--serif); font-size: clamp(21px, 2vw, 25px); line-height: 1.2; }
.module summary .count { font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.module summary .toggle { width: 28px; height: 28px; border: 1.5px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; align-self: center; }
.module summary .toggle::before { content: "+"; }
.module[open] summary .toggle::before { content: "\2212"; }
.module summary:hover h2 { color: var(--accent); }
.module ol { list-style: none; margin: 0; padding: 0 0 22px 108px; }
.module li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px dashed var(--rule); color: var(--ink-2); font-size: 16px; }
.module li.sub { padding-left: 22px; font-size: 15px; }
.module li .pg { font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.course-aside { position: sticky; top: 100px; border: 1.5px solid var(--ink); background: var(--paper); padding: 26px; }
.course-aside dl { margin: 0 0 22px; }
.course-aside dl div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.course-aside dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.course-aside dd { margin: 0; font-weight: 600; }
.course-aside .btn { width: 100%; justify-content: center; margin-bottom: 10px; }
.course-aside .others { margin-top: 22px; }
.course-aside .others li { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.course-aside .others a { text-decoration: none; }
.course-aside .others a:hover { color: var(--accent); }
@media (max-width: 960px) { .curriculum { grid-template-columns: 1fr; } .course-aside { position: static; } }
@media (max-width: 560px) { .module summary { grid-template-columns: 84px minmax(0, 1fr) auto; } .module summary .count { display: none; } .module ol { padding-left: 0; } }

/* ---------- Product detail pages ---------- */
.product-hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.product-hero .breadcrumb { grid-column: 1 / -1; margin-bottom: 0; }
.product-hero h1 .display { font-size: clamp(34px, 4.4vw, 56px); }
.product-hero .lead + .lead { margin-top: 14px; }
.product-hero .hero-actions { margin-top: 30px; }
.product-hero .buy-note { font-size: 14px; color: var(--ink-3); margin: 16px 0 0; max-width: 60ch; }
.product-hero .scope { margin-top: 8px; }
.price-tag { display: inline-flex; align-items: baseline; gap: 10px; margin-top: 26px; }
.price-tag strong { font-family: var(--serif); font-weight: 500; font-size: 40px; line-height: 1; }
.price-tag span { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 960px) { .product-hero .wrap { grid-template-columns: 1fr; } }

.ruled-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ruled-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ruled-grid--4 { grid-template-columns: 1fr; } }
.ruled-grid .wide { grid-column: 1 / -1; }
.ruled-grid code, .mono { font-family: var(--mono); font-size: 14px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; border-top: 1.5px solid var(--ink); max-width: 860px; }
.steps li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 14px; color: var(--accent); padding-top: 4px; }
.steps h3 { font-family: var(--serif); font-size: 21px; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-2); }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1.5px solid var(--ink); }
.plans > div { padding: 28px; border-right: 1px solid var(--rule); }
.plans > div:last-child { border-right: 0; }
.plans h3 { font-family: var(--serif); font-size: 24px; margin: 8px 0 14px; }
.plans li { padding: 7px 0; border-top: 1px dashed var(--rule); color: var(--ink-2); font-size: 15px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plans > div { border-right: 0; border-bottom: 1px solid var(--rule); } }
.callout { border: 1.5px solid var(--ink); border-left: 6px solid var(--accent); padding: 22px 26px; margin-top: 24px; background: var(--paper); }
.callout h3 { font-family: var(--serif); font-size: 21px; margin-bottom: 6px; }
.callout p { margin: 0; color: var(--ink-2); }

.video-frame { border: 1.5px solid var(--ink); background: #000; aspect-ratio: 16 / 9; max-width: 960px; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-note { color: var(--ink-2); max-width: 70ch; margin-top: 16px; }

.reqs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); }
.reqs > div { padding: 22px 24px 24px 0; }
.reqs > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.reqs h3 { margin-bottom: 10px; }
.reqs p { color: var(--ink-2); font-size: 15px; margin: 0; }
@media (max-width: 800px) { .reqs { grid-template-columns: 1fr; } .reqs > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); } }

.faq { max-width: 860px; border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 18px; color: var(--ink-2); max-width: 70ch; }
.gallery figcaption { padding: 10px 2px 0; font-size: 14px; color: var(--ink-2); }
.gallery figure.has-cap { aspect-ratio: auto; border: 0; background: none; }
.gallery figure.has-cap a { display: block; border: 1.5px solid var(--ink); aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-3); }
.gallery figure.has-cap img { object-fit: contain; background: #F9F8F4; }

/* Checkout modal loaded from /api/checkout-modal.php (styled without Tailwind) */
.hidden { display: none !important; }
#khono-checkout-modal { position: fixed; inset: 0; z-index: 500; background: rgba(22, 24, 28, 0.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
#khono-checkout-modal > * { background: var(--paper); border: 1.5px solid var(--ink); width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; padding: 28px; color: var(--ink); }
#khono-checkout-modal h2, #khono-checkout-modal h3 { font-family: var(--serif); font-size: 24px; margin-bottom: 12px; }
#khono-checkout-modal label { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 14px 0 6px; }
#khono-checkout-modal input:not([type=hidden]):not([type=checkbox]), #khono-checkout-modal select, #khono-checkout-modal textarea { width: 100%; font: 400 16px/1.5 var(--sans); padding: 11px 13px; border: 1px solid #A9A293; background: #FBFAF6; color: var(--ink); border-radius: 0; }
#khono-checkout-modal button { font: 600 15px/1 var(--sans); padding: 14px 18px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; margin-top: 16px; }
#khono-checkout-modal button[type=submit], #modal-submit-button { background: var(--ink); color: var(--paper); width: 100%; }
#khono-checkout-modal button[type=submit]:hover, #modal-submit-button:hover { background: var(--accent); border-color: var(--accent); }
/* Checkout modal: header row (title left, close button right) */
#khono-checkout-modal .flex { display: flex; gap: 16px; }
#khono-checkout-modal .justify-between { justify-content: space-between; }
#khono-checkout-modal .items-start { align-items: flex-start; }
#khono-checkout-modal .space-y-4 > * + *, #khono-checkout-modal .space-y-6 > * + * { margin-top: 4px; }
#khono-checkout-modal button[onclick*="closeCheckout"] { margin: 0; padding: 4px 10px; width: auto; font-size: 22px; line-height: 1; background: transparent; color: var(--ink); flex: none; }
#khono-checkout-modal button[onclick*="closeCheckout"]:hover { background: var(--ink); color: var(--paper); }

/* ---------- 404 page ---------- */
.notfound .wrap { padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(56px, 9vw, 120px); }
.notfound .code { font-family: var(--serif); font-size: clamp(96px, 16vw, 200px); line-height: .9; letter-spacing: -0.04em; color: var(--accent); margin: 0 0 12px; }
.notfound .signature { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--rule); font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ink-2); max-width: 560px; }

/* =====================================================================
   ARTICLES
   ===================================================================== */
.article-hero .wrap { max-width: calc(860px + 2 * var(--gutter)); }
.article-hero .display { max-width: 22ch; }
.article-hero .display em { font-style: italic; color: var(--accent); }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 24px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.article-meta span + span::before { content: "·"; margin-right: 24px; color: var(--rule); }

.article-body { max-width: 860px; margin: 0 auto; padding: 56px 0 24px; font-size: 18px; line-height: 1.7; color: var(--ink); }
.article-body > * + * { margin-top: 1.2em; }
.article-body p { margin: 0 0 1.1em; }
.article-body h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 3vw, 34px); line-height: 1.2; margin: 2.2em 0 0.6em; color: var(--ink); }
.article-body h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(21px, 2.2vw, 25px); line-height: 1.25; margin: 1.8em 0 0.5em; color: var(--ink); }
.article-body h4 { font-family: var(--sans); font-weight: 700; font-size: 18px; margin: 1.5em 0 0.4em; }
.article-body h2:first-child, .article-body h3:first-child { margin-top: 0; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--ink); }
.article-body ul, .article-body ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.article-body li { margin: 0.35em 0; }
.article-body img { max-width: 100%; height: auto; border: 1px solid var(--rule); background: #fff; }
.article-body iframe { max-width: 100%; border: 0; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 1.5em 0; }
.article-body th, .article-body td { border: 1px solid var(--rule); padding: 10px 12px; text-align: left; vertical-align: top; }
.article-body th { background: var(--paper-2); font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.article-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 21px; font-style: italic; }
.article-body strong, .article-body b { font-weight: 700; color: inherit; }
.article-body .cta-box { border: 1.5px solid var(--ink); background: var(--paper-2); padding: 32px; margin: 3em 0; }
.article-body .cta-box a.inline-block, .article-body a.rounded-full { display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none; padding: 12px 26px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.article-body .cta-box a.inline-block:hover, .article-body a.rounded-full:hover { background: var(--accent); color: var(--paper); }
@media (max-width: 720px) { .article-body { font-size: 17px; padding-top: 36px; } .article-body [style*="padding: 2rem 3rem"], .article-body [style*="padding: 3rem"] { padding: 1.25rem !important; } }

/* Utility classes left in the original article markup and in render_comments() */
.article-body .flex, .comments .flex { display: flex; }
.article-body .grid { display: grid; }
.article-body .block { display: block; }
.article-body .inline-block { display: inline-block; }
.article-body .items-center, .comments .items-center { align-items: center; }
.article-body .items-start { align-items: flex-start; }
.article-body .justify-center { justify-content: center; }
.comments .justify-between { justify-content: space-between; }
.article-body .flex-shrink-0 { flex-shrink: 0; }
.article-body .gap-6 { gap: 1.5rem; } .article-body .gap-8 { gap: 2rem; } .article-body .gap-10 { gap: 2.5rem; }
@media (min-width: 1024px) { .article-body .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.article-body .w-full { width: 100%; } .article-body .h-auto { height: auto; }
.article-body .w-2 { width: 0.5rem; } .article-body .h-14 { height: 3.5rem; }
.article-body .mx-auto { margin-left: auto; margin-right: auto; }
.article-body .max-w-lg { max-width: 32rem; } .article-body .max-w-xl { max-width: 36rem; } .article-body .max-w-3xl { max-width: 48rem; } .article-body .max-w-4xl { max-width: 56rem; }
.article-body .my-12 { margin-top: 3rem; margin-bottom: 3rem; }
.article-body .mt-4 { margin-top: 1rem; } .article-body .mt-6 { margin-top: 1.5rem; } .article-body .mt-12 { margin-top: 3rem; } .article-body .mt-16 { margin-top: 4rem; }
.article-body .mb-2 { margin-bottom: 0.5rem; } .article-body .mb-4, .comments .mb-4 { margin-bottom: 1rem; } .article-body .mb-8, .comments .mb-8 { margin-bottom: 2rem; }
.article-body .p-4 { padding: 1rem; } .article-body .p-6, .comments .p-6 { padding: 1.5rem; } .article-body .p-10 { padding: 2.5rem; }
.article-body .px-8 { padding-left: 2rem; padding-right: 2rem; } .article-body .py-2 { padding-top: .5rem; padding-bottom: .5rem; } .article-body .py-3 { padding-top: .75rem; padding-bottom: .75rem; } .article-body .py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.article-body .pl-4 { padding-left: 1rem; } .article-body .pl-6 { padding-left: 1.5rem; }
.article-body .space-y-2 > * + * { margin-top: .5rem; } .article-body .space-y-3 > * + * { margin-top: .75rem; } .article-body .space-y-4 > * + * { margin-top: 1rem; } .article-body .space-y-6 > * + * { margin-top: 1.5rem; } .article-body .space-y-8 > * + * { margin-top: 2rem; } .article-body .space-y-12 > * + * { margin-top: 3rem; }
.article-body .text-center { text-align: center; }
.article-body .italic { font-style: italic; }
.article-body .font-bold { font-weight: 700; } .article-body .font-semibold { font-weight: 600; }
.article-body .font-mono { font-family: var(--mono); }
.article-body .text-sm { font-size: 15px; } .article-body .text-md { font-size: 17px; } .article-body .text-lg { font-size: 19px; } .article-body .text-xl { font-size: 21px; } .article-body .text-2xl { font-size: 25px; font-family: var(--serif); }
.article-body .leading-relaxed { line-height: 1.7; } .article-body .leading-tight { line-height: 1.2; }
.article-body .list-disc { list-style: disc; } .article-body .list-decimal { list-style: decimal; } .article-body .list-none { list-style: none; padding-left: 0; } .article-body .list-inside { list-style-position: inside; padding-left: 0; }
.article-body .border { border: 1px solid var(--rule); }
.article-body .border-l-4 { border-left: 4px solid var(--accent); }
.article-body .border-blue-500, .article-body .border-blue-500\/30 { border-color: var(--accent); }
.article-body .ring-1 { outline: 1px solid var(--rule); }
.article-body .bg-white\/5, .article-body .bg-black\/20, .article-body .bg-\[\#0a1325\] { background: var(--paper-2); }
.article-body .bg-blue-600\/10 { background: var(--accent-soft); }
.article-body .bg-blue-500 { background: var(--ink); color: var(--paper); text-decoration: none; }
.article-body .hover\:bg-blue-600:hover { background: var(--accent); color: var(--paper); }
.article-body .bg-gradient-to-b { background: var(--accent); }
.article-body .text-white, .article-body .text-slate-200, .article-body .text-slate-300 { color: var(--ink); }
.article-body .text-slate-400, .article-body .text-slate-500 { color: var(--ink-2); }
.article-body .text-blue-400, .article-body .text-blue-500, .article-body .text-yellow-400 { color: var(--accent); }
.article-body .bg-blue-500.text-white, .article-body .bg-blue-500 .text-white { color: var(--paper); }

/* Previous / next within a series */
.series-nav { max-width: 860px; margin: 72px auto 0; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.series-nav a { display: flex; flex-direction: column; gap: 10px; padding: 28px 0; text-decoration: none; color: var(--ink); }
.series-nav .prev { padding-right: 32px; }
.series-nav .next { padding-left: 32px; text-align: right; align-items: flex-end; border-left: 1px solid var(--rule); }
.series-nav .sn-dir { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); transition: color .15s; }
.series-nav .sn-title { font-family: var(--serif); font-size: 21px; line-height: 1.3; }
.series-nav a:hover .sn-dir, .series-nav a:hover .sn-title { color: var(--accent); }
@media (max-width: 720px) {
  .series-nav { grid-template-columns: 1fr; }
  .series-nav .prev, .series-nav .next { padding: 22px 0; }
  .series-nav .next { text-align: left; align-items: flex-start; border-left: 0; border-top: 1px solid var(--rule); }
}

/* Comments */
.comments { max-width: 860px; margin: 72px auto 96px; border-top: 1.5px solid var(--ink); padding-top: 40px; }
.comments .h-section { margin-bottom: 28px; }
.comment-list { margin-bottom: 48px; }
.comments .no-comments { color: var(--ink-3); font-style: italic; }
.comments .bg-white\/5 { background: #fff; border: 1px solid var(--rule); }
.comments .ml-8 { margin-left: 1.25rem; border-left: 2px solid var(--accent-soft); padding-left: 1.25rem; }
@media (min-width: 768px) { .comments .md\:ml-16 { margin-left: 2.5rem; } }
.comments .space-x-3 > * + * { margin-left: .75rem; }
.comments .rounded-full { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; flex-shrink: 0; }
.comments .font-bold { font-weight: 700; }
.comments .text-white { color: var(--ink); }
.comments .text-slate-500, .comments .text-xs { color: var(--ink-3); font-family: var(--mono); font-size: 12px; }
.comments .text-slate-300 { color: var(--ink); line-height: 1.65; }
.comments button[onclick^="setReply"] { background: none; border: 0; padding: 0; margin-top: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); cursor: pointer; }
.comment-box { border: 1.5px solid var(--ink); background: var(--paper-2); padding: 32px; }
.comment-box .h-card { margin-bottom: 20px; }
.reply-indicator { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 20px; background: var(--accent-soft); font-size: 15px; }
.reply-indicator button { background: none; border: 0; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--accent); cursor: pointer; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .comment-box { padding: 22px; } }
