/* ==========================================================================
   Proper Tools — Commons Knights Chess page
   Civic-liturgical typography, sibling to the Friend Protocol and the Oath.
   ========================================================================== */

.knights-chess-page.section-card {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.985), rgba(255,255,255,0.968)),
    radial-gradient(circle at top center, rgba(76,125,74,0.032), transparent 48%);
  border-left: 3px solid rgba(76,125,74,0.22);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.05),
    0 1px 0 rgba(255,255,255,0.92) inset;
  padding-top: var(--sp-5);
}

.essay.knights-chess-text {
  max-width: 66ch;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.14rem;
  line-height: 1.72;
  color: rgba(17,17,17,0.96);
}

/* ---------- Kicker ---------- */

.knights-chess-text .kc-kicker {
  font-size: var(--fs-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.50);
  margin-bottom: var(--sp-1);
}

/* ---------- Title ---------- */

.knights-chess-text h1 {
  font-family: "Doves Headline", Georgia, serif;
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0 0 var(--sp-1);
  max-width: none;
}

/* ---------- Subtitles ---------- */

.knights-chess-text .kc-subtitle {
  font-size: var(--fs-md);
  font-style: italic;
  color: rgba(0,0,0,0.74);
  margin-top: 0;
  margin-bottom: var(--sp-1);
  line-height: 1.4;
}

.knights-chess-text .kc-subtitle-secondary {
  font-size: 1.02rem;
  font-style: italic;
  color: rgba(0,0,0,0.68);
  margin-top: 0;
  margin-bottom: var(--sp-1);
  line-height: 1.55;
  max-width: 52ch;
}

/* Drop cap on first paragraph after subtitles. */

.knights-chess-text > p:first-of-type::first-letter {
  float: left;
  font-family: "Doves Headline", Georgia, serif;
  font-size: 3.8em;
  line-height: 0.84;
  padding-right: 0.08em;
  padding-top: 0.06em;
  color: rgba(76,125,74,0.92);
}

/* ---------- Meta block ---------- */

.knights-chess-text .kc-meta {
  margin-top: var(--sp-2);
  margin-bottom: var(--sp-5);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--fs-sm);
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.56);
}

/* ---------- Table of Contents ---------- */

.knights-chess-text .kc-toc {
  margin: var(--sp-5) 0 var(--sp-5);
  padding: var(--sp-2) var(--sp-3);
  border-left: 2px solid rgba(76,125,74,0.18);
  background: rgba(76,125,74,0.025);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.knights-chess-text .kc-toc-heading {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.48);
  font-size: var(--fs-xs);
  margin-bottom: var(--sp-1);
}

.knights-chess-text .kc-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.knights-chess-text .kc-toc-list li {
  margin: 0;
  padding: 2px 0;
}

.knights-chess-text .kc-toc-list a {
  color: rgba(0,0,0,0.72);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}

.knights-chess-text .kc-toc-list a:hover {
  color: var(--pt-green);
  border-bottom-color: rgba(76,125,74,0.4);
}

.knights-chess-text .kc-toc-num {
  display: inline-block;
  min-width: 1.6em;
  color: rgba(0,0,0,0.48);
}

.knights-chess-text .kc-toc-section-label {
  margin-top: var(--sp-2);
  margin-bottom: var(--sp-1);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.40);
}

/* ---------- Section dividers and headings ---------- */

.knights-chess-text h2 {
  font-family: "Doves Headline", Georgia, serif;
  font-size: var(--fs-lg);
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-2);
  color: var(--pt-ink);
  scroll-margin-top: var(--sp-5);
}

.knights-chess-text h3 {
  font-family: "Doves Headline", Georgia, serif;
  font-size: 1.32rem;
  line-height: 1.25;
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-1);
  color: var(--pt-ink);
  scroll-margin-top: var(--sp-5);
}

.knights-chess-text h3 .kc-num {
  color: rgba(76,125,74,0.7);
  font-weight: normal;
  margin-right: 0.4em;
}

.knights-chess-text h4 {
  font-family: "Doves Headline", Georgia, serif;
  font-size: 1.12rem;
  font-weight: normal;
  line-height: 1.3;
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-1);
  color: rgba(17,17,17,0.92);
  scroll-margin-top: var(--sp-5);
}

.knights-chess-text h4 .kc-num {
  color: rgba(76,125,74,0.6);
  font-weight: normal;
  margin-right: 0.35em;
  font-size: 0.95em;
}

/* Anchor link affordance — appears on hover */

.knights-chess-text .kc-anchor {
  margin-left: 0.4em;
  color: rgba(76,125,74,0);
  text-decoration: none;
  transition: color 150ms ease;
  font-weight: normal;
  font-size: 0.85em;
}

.knights-chess-text h2:hover .kc-anchor,
.knights-chess-text h3:hover .kc-anchor,
.knights-chess-text h4:hover .kc-anchor {
  color: rgba(76,125,74,0.55);
}

.knights-chess-text .kc-anchor:hover {
  color: var(--pt-green) !important;
}

/* ---------- Body paragraphs ---------- */

.knights-chess-text p {
  margin: var(--sp-2) 0 0;
  max-width: none;
  text-wrap: pretty;
}

.knights-chess-text p:first-child {
  margin-top: 0;
}

/* ---------- Ordered and unordered lists ---------- */
/* The rules sections use both ul (configuration changes, opening
   permissions) and ol (the three victory conditions). Style both to sit
   comfortably in the serif body, with golden-green markers that echo
   the heading numerals. */

.knights-chess-text ul,
.knights-chess-text ol {
  margin: var(--sp-2) 0 0;
  padding-left: var(--sp-3);
  line-height: 1.7;
}

.knights-chess-text ul li,
.knights-chess-text ol li {
  margin: var(--sp-1) 0;
  padding-left: 0.2em;
}

.knights-chess-text ol {
  list-style: decimal;
}

.knights-chess-text ol li::marker {
  color: rgba(76,125,74,0.7);
  font-weight: normal;
}

.knights-chess-text ul li::marker {
  color: rgba(76,125,74,0.55);
}

/* ---------- Quotes / deployable phrases (blockquotes, if used later) ---------- */

.knights-chess-text blockquote {
  margin: var(--sp-3) 0;
  padding: var(--sp-2) var(--sp-3);
  border-left: 2px solid rgba(76,125,74,0.32);
  background: rgba(76,125,74,0.04);
  font-style: italic;
  color: rgba(0,0,0,0.82);
  font-size: 1.05rem;
  line-height: 1.55;
}

.knights-chess-text blockquote p {
  margin: 0.25em 0;
}

.knights-chess-text blockquote p:first-child {
  margin-top: 0;
}

.knights-chess-text blockquote p:last-child {
  margin-bottom: 0;
}

/* ---------- Companion / context callouts ---------- */
/* The note that names the December 2025 ITU-T SG17 debut sits in this
   register: lighter than body text, dashed-green frame matching the
   newsletter-cta family of treatments. */

.knights-chess-text .kc-companions {
  margin: var(--sp-3) 0 var(--sp-5);
  padding: var(--sp-2) var(--sp-3);
  border-left: 2px solid rgba(76,125,74,0.16);
  background: rgba(76,125,74,0.025);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: rgba(0,0,0,0.72);
}

.knights-chess-text .kc-companions a {
  font-style: italic;
}

/* ---------- Footnote block ---------- */
/* The chicken-story footnote lives in this region. Smaller type, lighter
   color, generous top padding to separate from the rules proper. */

.knights-chess-text .kc-footnotes {
  margin-top: var(--sp-5);
  padding-top: var(--sp-3);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: rgba(0,0,0,0.72);
}

.knights-chess-text .kc-footnotes p {
  margin: var(--sp-2) 0;
}

.knights-chess-text .kc-footnotes sup {
  color: rgba(76,125,74,0.7);
  font-weight: normal;
  margin-right: 0.2em;
}

.knights-chess-text .kc-footnotes a[href^="#ref"] {
  color: rgba(76,125,74,0.65);
  text-decoration: none;
  margin-left: 0.3em;
  font-size: 0.9em;
}

.knights-chess-text .kc-footnotes a[href^="#ref"]:hover {
  color: var(--pt-green);
}

/* In-body footnote reference numerals */
.knights-chess-text sup a[href^="#fn"] {
  color: rgba(76,125,74,0.75);
  text-decoration: none;
  font-size: 0.85em;
  padding: 0 0.1em;
}

.knights-chess-text sup a[href^="#fn"]:hover {
  color: var(--pt-green);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ---------- Fleuron divider ---------- */
/* Used to separate the footnote block from the rules above and to mark
   structural transitions. The ♞ glyph would be thematically apt but
   doesn't sit well in the small-fleuron register; the cross-fleuron from
   the Friend Protocol carries over cleanly. */

.knights-chess-text hr {
  margin: var(--sp-5) 0;
  border: none;
  border-top: 1px solid rgba(76,125,74,0.16);
  position: relative;
}

.knights-chess-text hr::after {
  content: "♞";
  position: relative;
  top: -0.88em;
  display: block;
  width: 2ch;
  margin: 0 auto;
  text-align: center;
  background: var(--pt-paper);
  color: rgba(76,125,74,0.55);
  font-size: 0.9rem;
}

/* ---------- Coda (license + attribution) ---------- */

.knights-chess-text .kc-coda {
  text-align: center;
  margin-top: var(--sp-5);
  color: rgba(0,0,0,0.66);
  font-style: italic;
  font-size: 1rem;
}

.knights-chess-text .kc-coda > p {
  margin: 0 0 var(--sp-3);
}

.knights-chess-text .kc-license {
  margin-top: var(--sp-3);
  padding-top: var(--sp-2);
  border-top: 1px solid rgba(76,125,74,0.12);
  font-style: normal;
  font-size: var(--fs-sm);
  color: rgba(0,0,0,0.56);
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

.knights-chess-text .kc-license p {
  margin: 0.3em 0;
}

.knights-chess-text .kc-license .note {
  font-size: var(--fs-xs);
  color: rgba(0,0,0,0.48);
  font-style: italic;
}

.knights-chess-text .kc-version {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.40);
  font-style: normal;
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
  .essay.knights-chess-text {
    font-size: 1.06rem;
    line-height: 1.68;
  }

  .knights-chess-text h1 {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }

  .knights-chess-text h2 {
    font-size: 1.4rem;
    margin-top: var(--sp-5);
  }

  .knights-chess-text h3 {
    font-size: 1.18rem;
  }

  .knights-chess-text h4 {
    font-size: 1.04rem;
  }

  .knights-chess-text > p:first-of-type::first-letter {
    font-size: 3.2em;
  }

  .knights-chess-text .kc-subtitle-secondary {
    max-width: none;
  }

  .knights-chess-text blockquote {
    font-size: 1rem;
  }

  /* Anchor links always visible on mobile (no hover) */
  .knights-chess-text .kc-anchor {
    color: rgba(76,125,74,0.35);
  }
}
