/* Page content: mastheads, archives, articles, prose pages, Awards page, 404. */

/* ---------- Masthead shared by archives, articles and prose pages ---------- */
.page-head,
.article-head {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 112px) 0 clamp(52px, 6vw, 84px);
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border-subtle);
}
.page-head::before,
.article-head::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -9%;
  width: min(62vw, 660px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: url("../img/rosette.svg") center / contain no-repeat;
  opacity: 0.1;
  pointer-events: none;
}
.page-head::after,
.article-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: url("../img/rule-gold.svg") repeat-x center;
  opacity: 0.45;
}
.page-head .shell,
.article-head .shell { position: relative; }
.page-head h1 {
  margin: 28px 0 22px;
  max-width: 16em;
  font-size: clamp(2.2rem, 1.3rem + 3.2vw, 4rem);
  line-height: 1.28;
}
.page-head p { max-width: 42em; color: var(--fg-muted); font-size: 1.05rem; }
.page-head .author-intro { margin-top: 18px; }

.archive-body,
.prose-body,
.article-wrap { padding-block: 72px 128px; }

/* ---------- Article ---------- */
.article-head { padding-bottom: clamp(88px, 10vw, 136px); }
.article-head h1 {
  margin: 28px 0 0;
  max-width: 22em;
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.1rem);
  line-height: 1.4;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 30px;
  color: var(--fg-muted);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}
.article-meta time { font-family: var(--font-mono); }
.article-meta a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule); }

.article-wrap { padding-top: 0; }
.article-hero {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: calc(-1 * clamp(48px, 6vw, 84px)) auto 64px;
}
.article-hero .image {
  padding: 10px;
  background: var(--color-background);
  border: 1px solid var(--color-primary);
}
.article-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-hero figcaption { margin-top: 12px; color: var(--fg-muted); font-size: 0.85rem; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 280px;
  justify-content: center;
  gap: clamp(40px, 6vw, 96px);
}
.article-body { font-size: 1.0625rem; line-height: 1.95; }
.article-body > * + * { margin-top: 1.4em; }
.article-body h2 { margin-top: 2.6em; font-size: 1.65rem; line-height: 1.5; }
.article-body h2::before {
  content: "";
  display: block;
  width: 38px;
  height: 2px;
  margin-bottom: 18px;
  background: var(--accent);
}
[class*="faq"] h2::before { display: none; }
.article-body h3 { margin-top: 2.1em; font-size: 1.3rem; line-height: 1.55; }
.article-body h4 { margin-top: 1.8em; font-size: 1.1rem; }
.article-body strong { font-weight: 700; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.article-body a:hover { color: var(--accent-hover); }
.article-body ul { padding-left: 1.4em; list-style: disc; }
.article-body ol { padding-left: 1.6em; list-style: decimal; }
.article-body li::marker { color: var(--accent); }
.article-body li + li { margin-top: 0.5em; }
.article-body figure { margin-block: 2em; }
.article-body img { width: 100%; height: auto; }
.article-body iframe { max-width: 100%; }
.article-body figcaption,
.article-body .wp-element-caption { margin-top: 10px; color: var(--fg-muted); font-size: 0.85rem; }
.article-body hr,
.article-body .wp-block-separator {
  height: 14px;
  margin: 3em 0;
  background: url("../img/rule-red.svg") repeat-x center;
  border: 0;
  opacity: 0.8;
}
.article-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 0.95rem; }
.article-body th,
.article-body td { min-width: 110px; padding: 12px 14px; border: 1px solid var(--rule); text-align: left; }
.article-body thead th,
.article-body tr:first-child th { background: var(--color-background); color: var(--color-foreground); font-weight: 500; }
.article-body blockquote {
  margin-inline: 0;
  padding: 6px 0 6px 28px;
  border-left: 3px double var(--accent);
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.article-aside { position: relative; }
.toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  padding-top: 20px;
  border-top: 2px solid var(--accent);
}
.toc summary { margin-bottom: 18px; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.26em; cursor: pointer; }
.toc ol { max-height: 65vh; overflow: auto; counter-reset: toc; font-size: 0.92rem; line-height: 1.6; }
.toc li { margin: 14px 0; counter-increment: toc; }
.toc a { color: var(--fg-muted); }
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  margin-right: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}
.toc a:hover,
.toc a[aria-current] { color: var(--accent); }

.article-note { margin-top: 56px; padding: 26px 0; border-top: 1px solid var(--rule); color: var(--fg-muted); font-size: 0.92rem; }
.article-note a { text-decoration: underline; text-underline-offset: 4px; }
.read-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 20px; }
.read-actions button {
  min-height: 44px;
  padding: 0 20px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--primitive-radius-sm);
  color: var(--fg);
  letter-spacing: 0.08em;
}
.read-actions button:hover { background: var(--fg); color: var(--bg); }

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--rule-strong);
}
.post-navigation span { display: block; margin-bottom: 10px; color: var(--fg-muted); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.16em; }
.post-navigation a { font: 500 1.05rem / 1.6 var(--font-serif); }
.post-navigation a:hover { color: var(--accent); }

.related { margin-top: 104px; padding-top: 60px; border-top: 1px solid var(--rule-strong); }
.related-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; margin-bottom: 40px; }
.related-head h2 { font-size: 1.7rem; }

/* ---------- Listing pages ---------- */
.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 56px 44px;
}
.editorial-grid .story.lead { grid-row: span 2; }
/* Stories beside the lead are compact (photo left, text right), so that column is no taller than
   the lead and its photo does not have to be stretched into a tall crop. */
.editorial-grid { row-gap: 40px; }
.editorial-grid .story.side > a { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
.editorial-grid .story.side .story-meta { margin-top: 2px; }
.editorial-grid .story.side h3 { margin-top: 6px; font-size: 1.2rem; }
.editorial-grid .story.side .story-summary { -webkit-line-clamp: 2; }
.more-people { margin-top: 104px; }
.featureline {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 64px;
  margin-bottom: 88px;
}
.featureline .image { display: block; overflow: hidden; background: var(--color-surface); }
.featureline .image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(0.85) sepia(0.22) contrast(1.05); }
.featureline h2 { margin-bottom: 20px; font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.3rem); line-height: 1.45; }
.featureline p { margin-bottom: 26px; color: var(--fg-muted); }
.archive-search { max-width: 640px; margin-bottom: 48px; }
.archive-search .search-form input { background: var(--color-surface-light-card); }

/* ---------- Prose pages (about, policies, contact) ---------- */
.prose-page { width: min(780px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.page-id-5265 .prose-page { width: min(1120px, 100% - 2 * var(--gutter)); }
.prose-page h2 { margin: 2.4em 0 0.7em; font-size: 1.65rem; line-height: 1.5; }
.prose-page h2::before { content: ""; display: block; width: 38px; height: 2px; margin-bottom: 18px; background: var(--accent); }
.prose-page > h2:first-child { margin-top: 0; }
.prose-page h3 { margin: 1.8em 0 0.6em; font-size: 1.25rem; }
.prose-page p,
.prose-page ul,
.prose-page ol { margin-bottom: 1.3em; line-height: 1.95; }
.prose-page ul { padding-left: 1.4em; list-style: disc; }
.prose-page ol { padding-left: 1.6em; list-style: decimal; }
.prose-page li::marker { color: var(--accent); }
.prose-page a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.prose-page img { width: 100%; }

.about-feature {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 56px;
  margin-bottom: 72px;
}
.about-feature h2 { margin-top: 0; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); }
.about-feature img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(0.85) sepia(0.22) contrast(1.05); border: 10px solid var(--color-background); outline: 1px solid var(--color-primary); }
.about-purpose {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding: 56px 0;
  border-block: 1px solid var(--rule-strong);
}
.about-purpose h2,
.about-values h2 { margin-top: 0; }
.about-values { padding-top: 64px; }
.about-values-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 36px; counter-reset: value; }
.about-values-grid > div { padding-top: 22px; border-top: 1px solid var(--rule-strong); counter-increment: value; }
.about-values-grid > div::before {
  content: counter(value, decimal-leading-zero);
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
}
.about-values-grid h3 { margin-top: 0; }
.about-contact { margin-top: 64px; padding: 36px; border: 1px solid var(--rule-strong); outline: 1px solid var(--rule); outline-offset: 6px; }

.contact-form { display: grid; gap: 24px; margin-top: 40px; }
.contact-form label { display: grid; gap: 8px; }
.contact-form textarea { min-height: 190px; padding: 14px; resize: vertical; }
.contact-form .consent { display: flex; align-items: flex-start; gap: 12px; }
.contact-form .consent input { width: 20px; min-height: 20px; margin-top: 6px; flex-shrink: 0; }
.contact-form .consent span { color: var(--fg); font-size: 0.95rem; letter-spacing: normal; }
.contact-form .btn { justify-self: start; }
.contact-form > p { color: var(--fg-muted); font-size: 0.88rem; }
.honeypot { display: none !important; }
.notice {
  margin-block: 28px;
  padding: 22px 26px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-left: 3px solid var(--accent);
}

/* ---------- Awards programme page ---------- */
.awards-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(88px, 12vw, 176px) 0 clamp(72px, 9vw, 120px);
  background: radial-gradient(ellipse at 78% 40%, rgb(122 16 25 / 0.5), transparent 60%), var(--color-background);
  border-bottom: 1px solid var(--color-border-subtle);
}
.awards-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: url("../img/rule-gold.svg") repeat-x center;
  opacity: 0.45;
}
.awards-hero-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.awards-rosette {
  position: absolute;
  top: -22%;
  right: -9%;
  width: min(80vw, 900px);
  aspect-ratio: 1;
  background: url("../img/rosette.svg") center / contain no-repeat;
  opacity: 0.14;
  animation: spin 280s linear infinite;
}
.awards-crystal {
  position: absolute;
  right: clamp(0px, 6vw, 110px);
  bottom: 0;
  height: 100%;
  width: auto;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 60%, transparent 100%);
}
.awards-hero h1 {
  max-width: 11em;
  font-size: clamp(2.4rem, 1.2rem + 4.6vw, 5.2rem);
  line-height: 1.25;
}

.programme-content {
  display: grid;
  grid-template-columns: 220px minmax(0, 780px);
  gap: clamp(40px, 7vw, 120px);
  padding-block: 88px 136px;
}
.programme-aside {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  display: grid;
  gap: 28px;
  justify-items: start;
  align-self: start;
}
.programme-seal { width: 148px; }
.programme-copy { counter-reset: section; }
.programme-copy > p:first-child {
  margin-bottom: 8px;
  font: 500 clamp(1.2rem, 1rem + 0.8vw, 1.5rem) / 1.9 var(--font-serif);
}
.programme-copy h2 { margin: 80px 0 22px; counter-increment: section; font-size: 1.75rem; line-height: 1.5; }
.programme-copy h2::before {
  content: counter(section, decimal-leading-zero);
  display: block;
  margin-bottom: 14px;
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
}
.programme-copy p { margin-bottom: 1.2em; color: var(--fg-muted); line-height: 2; }
.programme-copy ul { display: grid; margin-top: 28px; }
.programme-copy li { padding: 22px 0; border-top: 1px solid var(--rule); color: var(--fg-muted); line-height: 1.9; }
.programme-copy li:last-child { border-bottom: 1px solid var(--rule); }
.programme-copy li strong { display: block; margin-bottom: 6px; color: var(--color-primary); font-weight: 500; }
.programme-copy a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 404 ---------- */
.error-main { position: relative; isolation: isolate; overflow: hidden; }
.error-art {
  position: absolute;
  top: 50%;
  right: -12%;
  z-index: -1;
  width: min(80vw, 820px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: url("../img/rosette.svg") center / contain no-repeat;
  opacity: 0.12;
}
.error-page { padding-block: clamp(88px, 12vw, 168px); }
.error-page > * { max-width: 760px; }
.error-page h1 { margin: 28px 0 22px; font-size: clamp(2.2rem, 1.3rem + 3.2vw, 4rem); line-height: 1.3; }
.error-page > p { margin-bottom: 34px; color: var(--fg-muted); }
.error-page .category-links { margin: 40px 0 0; border-bottom: 0; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; margin-bottom: 40px; }
  .article-aside { order: -1; }
  .programme-content { grid-template-columns: minmax(0, 1fr); padding-block: 64px 96px; }
  .programme-aside { position: static; grid-template-columns: auto 1fr; align-items: center; }
  .editorial-grid,
  .featureline,
  .about-feature,
  .about-purpose { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .editorial-grid .story.lead { grid-row: auto; }
  .about-values-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .archive-body,
  .prose-body,
  .article-wrap { padding-block: 56px 96px; }
  .article-wrap { padding-top: 0; }
  .article-body { font-size: 1rem; line-height: 1.9; }
  .post-navigation { grid-template-columns: 1fr; }
  .about-contact { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .awards-rosette { animation: none; }
}

/* ---------- Verifier page (/verify/ and /verify/{id}/) ---------- */
.verify-wrap { padding-block: 64px 120px; }
.verify-inner { max-width: 820px; }
.verify-inner h2 { margin-bottom: 18px; font-size: 1.5rem; line-height: 1.5; }
.verify-inner section + section { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--rule); }
.verify-explain p { margin-bottom: 1.6em; color: var(--fg-muted); line-height: 1.95; }
.verify-explain a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.verify-results { margin-top: 22px; }
.verify-results:empty { display: none; }

/* ---------- Phone touch comfort: bigger tap areas without moving the layout ---------- */
@media (max-width: 767px) {
  .breadcrumb a,
  .article-meta a,
  .read-actions a,
  .post-navigation a { display: inline-block; padding-block: 9px; margin-block: -9px; }
  .toc summary { padding-block: 10px; margin-bottom: 8px; }
  .toc li { margin: 0; }
  .toc a { display: block; padding-block: 9px; }
}
