/*
Theme Name: Kompozisyon
Theme URI: https://kompozisyonornekleri.com
Author: Kompozisyon Örnekleri
Description: Reading-first theme for composition examples. Literata for prose, Public Sans for UI.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: kompozisyon
*/

:root {
  --color-canvas: #e6e3dc;
  --color-page: #f7f5f0;
  --color-surface: #ffffff;
  --color-ink: #1c1b19;
  --color-muted: #5f5b53;
  --color-body: #4a4740;
  --color-prose: #23221f;
  --color-soft: #3a3833;
  --color-line: #e4e0d6;
  --color-chip: #d6d1c4;
  --color-faint: #efece5;
  --color-accent: oklch(0.46 0.12 255);
  --color-accent-deep: oklch(0.36 0.12 255);
  --color-accent-soft: oklch(0.95 0.03 255);
  --color-green: oklch(0.48 0.12 150);
  --color-green-soft: oklch(0.95 0.03 150);
  --color-footer: #1c1b19;
  --color-footer-text: #d9d5cc;
  --color-footer-muted: #a8a398;
  --color-footer-line: #34322e;
  --font-reading: "Literata", Georgia, "Times New Roman", serif;
  --font-ui: "Public Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --layout: 80rem;
  --header-h: 4.5rem;
  --radius: 0.75rem;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-deep); text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-reading); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--color-ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { top: 1rem; color: #fff; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: min(var(--layout), calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-bar {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand { display: flex; align-items: center; text-decoration: none; flex: 0 1 auto; min-width: 0; }
.brand img { height: 3rem; width: auto; }
.brand-text {
  font-family: var(--font-reading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-ink);
  text-decoration: none;
}
.brand-text span { color: var(--color-accent); }

.primary-nav { display: flex; align-items: center; gap: 1.5rem; }
.primary-nav a {
  color: var(--color-ink);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}
.primary-nav a:hover { color: var(--color-accent); text-decoration: none; }

.nav-drop { position: relative; }
.nav-drop summary {
  list-style: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-drop summary::-webkit-details-marker { display: none; }
.nav-drop-panel {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  min-width: 11rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.nav-drop-panel a { padding: 0.55rem 0.7rem; border-radius: 0.4rem; }
.nav-drop-panel a:hover { background: var(--color-page); }

.header-search { margin-left: auto; position: relative; width: 13.75rem; }
.header-search input {
  width: 100%;
  border: 1px solid var(--color-line);
  border-radius: 0.5rem;
  padding: 0.55rem 0.8rem 0.55rem 2.1rem;
  font: 400 0.9rem var(--font-ui);
  background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235F5B53' stroke-width='1.8'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l4 4'/%3E%3C/svg%3E") 0.65rem 50% no-repeat;
  color: var(--color-ink);
}
.header-search input::placeholder { color: var(--color-muted); }

.search-suggest,
.search-overlay-results {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}
.search-suggest {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  z-index: 40;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.search-suggest a,
.search-overlay-results a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  color: var(--color-ink);
  text-decoration: none;
  border-top: 1px solid var(--color-faint);
}
.search-suggest a:first-child,
.search-overlay-results a:first-child { border-top: 0; }
.search-suggest a:hover,
.search-overlay-results a:hover { background: var(--color-page); text-decoration: none; }
.search-suggest strong,
.search-overlay-results strong { font-family: var(--font-reading); font-weight: 600; font-size: 0.95rem; }
.search-meta { font-size: 0.78rem; color: var(--color-muted); }

.header-tools { display: none; margin-left: auto; align-items: center; gap: 0.5rem; flex: 0 0 auto; }

.icon-btn {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.icon-btn span,
.icon-btn span::before,
.icon-btn span::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--color-ink);
  position: relative;
}
.icon-btn span::before,
.icon-btn span::after {
  content: "";
  position: absolute;
  left: 0;
}
.icon-btn span::before { top: -6px; }
.icon-btn span::after { top: 6px; }

.search-overlay,
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-page);
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem 2rem;
}
.search-overlay[hidden],
.nav-overlay[hidden] { display: none; }
.search-overlay-bar { display: flex; align-items: center; gap: 0.5rem; }
.search-overlay-bar input {
  flex: 1;
  border: 1.5px solid var(--color-ink);
  border-radius: 0.65rem;
  padding: 0.9rem 1rem;
  font: 400 1.05rem var(--font-ui);
  background: var(--color-surface);
}
.search-overlay-results { margin-top: 1rem; overflow: auto; }
.nav-overlay { gap: 0.4rem; font-size: 1.15rem; }
.nav-overlay a { color: var(--color-ink); padding: 0.7rem 0; border-bottom: 1px solid var(--color-line); text-decoration: none; font-weight: 500; }
.overlay-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 2.75rem;
  border: 1px solid var(--color-ink);
  background: var(--color-surface);
  border-radius: 0.5rem;
  font: 600 0.9rem var(--font-ui);
  padding: 0 1rem;
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: center;
  padding: 4rem 0 3.5rem;
}
.hero h1 { margin: 0; font-size: 3rem; font-weight: 700; line-height: 1.15; }
.lede {
  margin: 1.2rem 0 0;
  max-width: 35rem;
  font-family: var(--font-reading);
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--color-body);
}
.hero-search {
  display: flex;
  flex-direction: column;
  margin-top: 1.4rem;
  max-width: 35rem;
  position: relative;
}
.hero-search-row {
  display: flex;
  background: var(--color-surface);
  border: 1.5px solid var(--color-ink);
  border-radius: 0.65rem;
  overflow: hidden;
}
.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 1rem 1.1rem;
  font: 400 1.05rem var(--font-ui);
  background: transparent;
}
.hero-search button {
  border: 0;
  background: var(--color-ink);
  color: #fff;
  padding: 0 1.6rem;
  font: 600 1rem var(--font-ui);
  cursor: pointer;
}
.hero-search .search-suggest { z-index: 30; }
.search-status { margin: 0; padding: 0.55rem 0.85rem; font-size: 0.78rem; color: var(--color-muted); border-bottom: 1px solid var(--color-faint); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1rem; font-size: 0.9rem; color: var(--color-muted); }
.chip {
  border: 1px solid var(--color-chip);
  background: var(--color-surface);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  color: var(--color-ink);
  font-weight: 500;
  text-decoration: none;
}
.chip:hover { text-decoration: none; border-color: var(--color-ink); }

.guide-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 0.9rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.kicker {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-green);
}
.guide-card h2 { margin: 0; font-size: 1.5rem; }
.steps { display: flex; flex-direction: column; gap: 0.6rem; color: var(--color-soft); }
.steps div { display: flex; gap: 0.75rem; }
.steps span { font: 600 0.85rem var(--font-mono); color: var(--color-accent); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 1.25rem; }
.section-head h2 { margin: 0; font-size: 1.6rem; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 3.5rem;
}
.cat-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 0.9rem;
  overflow: hidden;
  color: var(--color-ink);
  text-decoration: none;
}
.cat-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #f8eed5;
}
.cat-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem 1.05rem;
  min-width: 0;
}
.cat-card strong { font-size: 1.05rem; }
.cat-copy > span { color: var(--color-muted); font-size: 0.9rem; }
.cat-card:hover { text-decoration: none; border-color: var(--color-ink); }
.grade-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}
.grade-list a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  padding: 1.25rem 1.1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 0.9rem;
  color: var(--color-ink);
  text-decoration: none;
  font-weight: 650;
}
.grade-list a span { color: var(--color-muted); font-size: 0.9rem; font-weight: 450; }
.grade-list a:hover { border-color: var(--color-ink); text-decoration: none; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 3.5rem;
  padding-bottom: 4rem;
}
.layout.is-paged { grid-template-columns: minmax(0, 1fr); }

.post-row {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-line);
}
.post-row > a:first-child {
  flex: 0 0 16rem;
  width: 16rem;
}
.post-row img,
.post-row .thumb,
.related-grid img,
.related-grid .thumb {
  width: 16rem;
  height: 10rem;
  max-width: none;
  object-fit: cover;
  border-radius: 0.65rem;
  background: repeating-linear-gradient(135deg, #ede9e0 0 8px, #e4dfd4 8px 16px);
  flex: none;
}
.related-grid img,
.related-grid .thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
}
.post-row > div { min-width: 0; }
.post-row h3 { margin: 0; font-size: 1.35rem; line-height: 1.3; overflow-wrap: anywhere; }
.post-row h3 a { color: var(--color-ink); text-decoration: none; }
.post-row h3 a:hover { color: var(--color-accent); }
.excerpt {
  margin: 0.4rem 0 0;
  color: var(--color-body);
  line-height: 1.6;
}
.post-meta { display: flex; gap: 0.85rem; margin-top: 0.45rem; font-size: 0.82rem; color: var(--color-muted); }
.cat-line { display: flex; gap: 0.5rem; align-items: center; font-size: 0.82rem; font-weight: 500; }

.pagination { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.pagination a,
.pagination span {
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid var(--color-chip);
  background: var(--color-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: none;
}
.pagination .current { background: var(--color-ink); color: #fff; border-color: var(--color-ink); }

.side-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 0.9rem;
  padding: 1.5rem;
}
.side-card h2 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.side-card ol { list-style: none; margin: 0; padding: 0; }
.side-card li {
  display: flex;
  gap: 0.8rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--color-faint);
}
.side-card li span { font: 600 0.95rem var(--font-mono); color: var(--color-accent); }
.side-card a { color: var(--color-ink); font-weight: 500; }
.sidebar { display: flex; flex-direction: column; gap: 2rem; }
.day-link { display: flex; gap: 0.85rem; align-items: center; color: var(--color-ink); text-decoration: none; margin-top: 0.7rem; }
.day-link:hover { text-decoration: none; }
.day-date {
  width: 3.8rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.2;
  color: var(--color-green);
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  flex: none;
}

.about-band { background: var(--color-surface); border-top: 1px solid var(--color-line); }
.about-band .container { max-width: 47.5rem; padding: 3.5rem 0; display: flex; flex-direction: column; gap: 1rem; }
.about-band h2 { margin: 0; font-size: 1.75rem; }
.about-band p { margin: 0; font-family: var(--font-reading); font-size: 1.12rem; line-height: 1.75; color: var(--color-soft); }

.site-footer { background: var(--color-footer); color: var(--color-footer-text); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3rem 0 1.5rem;
  line-height: 1.8;
}
.site-footer a { color: var(--color-footer-text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h2 { color: #fff; font-family: var(--font-ui); font-size: 1rem; margin: 0; }
.footer-brand { font-family: var(--font-reading); font-weight: 700; font-size: 1.2rem; color: #fff; }
.footer-note { color: var(--color-footer-muted); max-width: 20rem; display: block; }
.footer-col { display: flex; flex-direction: column; }
.footer-base {
  border-top: 1px solid var(--color-footer-line);
  padding: 1.1rem 0 1.6rem;
  color: var(--color-footer-muted);
  font-size: 0.82rem;
}

.single-wrap {
  display: grid;
  grid-template-columns: minmax(0, 52rem);
  gap: 3rem;
  padding: 2.5rem 0 4.5rem;
  justify-content: center;
}
.single-wrap.has-toc { grid-template-columns: 14rem minmax(0, 52rem); }
.toc { position: sticky; top: calc(var(--header-h) + 1rem); display: flex; flex-direction: column; gap: 0.2rem; }
.toc-label, .eyebrow {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.4rem;
}
.toc a {
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.4;
  padding: 0.45rem 0 0.45rem 0.8rem;
  border-left: 2px solid var(--color-line);
  color: var(--color-soft);
  text-decoration: none;
}
.toc a:hover { color: var(--color-accent); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.45rem; font-size: 0.9rem; color: var(--color-muted); margin-bottom: 1.4rem; }
.breadcrumb a { color: var(--color-muted); }
.badges { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }
.badge {
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  text-decoration: none;
}
.badge-topic { background: var(--color-accent-soft); color: oklch(0.4 0.12 255); }
.badge-grade { background: var(--color-green-soft); color: oklch(0.4 0.1 150); }
.entry-title { margin: 0 0 1rem; font-size: 2.75rem; font-weight: 700; line-height: 1.15; }
.deck { margin: 0 0 1.4rem; font-family: var(--font-reading); font-size: 1.25rem; line-height: 1.6; color: var(--color-body); }
.entry-tools {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  padding: 0.85rem 0;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  font-size: 0.9rem;
  color: var(--color-muted);
}
.print-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid var(--color-ink);
  border-radius: 0.5rem;
  background: transparent;
  font: 600 0.9rem var(--font-ui);
  color: var(--color-ink);
  cursor: pointer;
}
.entry-figure { margin: 2rem 0 0; }
.entry-figure img {
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 0.9rem;
  object-fit: cover;
}
.entry-content {
  margin-top: 2.2rem;
  font-family: var(--font-reading);
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--color-prose);
}
.entry-content h2, .entry-content h3 { color: var(--color-ink); line-height: 1.3; }
.entry-content h2 { font-size: 1.7rem; margin: 1.6rem 0 0.6rem; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content p { margin: 0 0 1rem; text-wrap: pretty; }
.entry-content a { text-decoration: underline; }
.pull {
  margin-top: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 0.9rem;
  padding: 1.4rem 1.6rem;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  line-height: 1.6;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 2rem; }
.pager {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.pager a {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--color-ink);
  text-decoration: none;
}
.pager a:hover { text-decoration: none; border-color: var(--color-ink); }
.pager .next { text-align: right; }
.pager small { color: var(--color-muted); font-weight: 500; }
.pager strong { font-family: var(--font-reading); font-size: 1.05rem; }
.article-aside { padding-top: 6rem; }
.article-aside .sticky-note { position: sticky; top: calc(var(--header-h) + 1rem); color: var(--color-soft); font-size: 0.9rem; line-height: 1.7; }
.toc-mobile { display: none; }

.related { background: var(--color-surface); border-top: 1px solid var(--color-line); }
.related .container { padding: 3.5rem 0 4rem; }
.related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.related-grid a { display: flex; flex-direction: column; gap: 0.6rem; color: var(--color-ink); text-decoration: none; min-width: 0; }
.related-grid strong { font-family: var(--font-reading); font-size: 1.1rem; line-height: 1.35; overflow-wrap: anywhere; }

.wpcf7 {
  max-width: 40rem;
  margin-top: 1.5rem;
}
.wpcf7 form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.wpcf7 label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--color-ink);
}
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="url"],
.wpcf7 textarea {
  width: 100%;
  border: 1px solid var(--color-chip);
  border-radius: 0.5rem;
  padding: 0.75rem 0.85rem;
  font: 400 1rem var(--font-ui);
  background: var(--color-surface);
  color: var(--color-ink);
}
.wpcf7 textarea { min-height: 9rem; resize: vertical; }
.wpcf7 input[type="submit"] {
  width: auto;
  align-self: flex-start;
  background: var(--color-ink);
  color: #fff;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.8rem 1.3rem;
  font: 600 1rem var(--font-ui);
  cursor: pointer;
}
.wpcf7 form .wpcf7-response-output {
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: 0.5rem;
  border-width: 1px;
}
.wpcf7-not-valid-tip { color: #8a3b32; font-size: 0.85rem; font-weight: 500; }
.cf-turnstile { margin: 0.4rem 0; }

.comments-wrap { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1rem; }
.comments-wrap h2 { margin: 0; font-size: 1.6rem; }
.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.comment-body, .comment-respond {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 0.9rem;
  padding: 1.2rem 1.3rem;
}
.comment-meta { font-size: 0.85rem; color: var(--color-muted); }
.comment-author { font-family: var(--font-reading); font-weight: 600; color: var(--color-ink); }
.comment-content { font-family: var(--font-reading); line-height: 1.7; }
.comment-respond label { display: block; font-weight: 600; margin: 0.7rem 0 0.3rem; }
.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 0.9rem;
}
.comment-form-cookies-consent label {
  display: inline;
  font-weight: 400;
  margin: 0;
}
.comment-respond input,
.comment-respond textarea {
  width: 100%;
  border: 1px solid var(--color-chip);
  border-radius: 0.5rem;
  padding: 0.7rem 0.8rem;
  font: 400 1rem var(--font-ui);
  background: var(--color-page);
}
.comment-respond input[type="checkbox"] { width: auto; margin-top: 0.2rem; }
.comment-respond .submit {
  margin-top: 0.8rem;
  width: auto;
  background: var(--color-ink);
  color: #fff;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.75rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
}
.children { list-style: none; margin: 0.8rem 0 0; padding: 0 0 0 1rem; }

.page-hero { padding: 2.5rem 0 1rem; }
.page-hero h1 { margin: 0 0 0.6rem; font-size: 2.6rem; font-weight: 700; }
.page-hero p { margin: 0; max-width: 40rem; color: var(--color-body); font-family: var(--font-reading); font-size: 1.15rem; line-height: 1.6; }
.page-content { max-width: 46rem; font-family: var(--font-reading); font-size: 1.15rem; line-height: 1.75; padding-bottom: 3rem; color: var(--color-prose); }
.page-content h2, .page-content h3 { color: var(--color-ink); line-height: 1.3; }
.page-content h2 { font-size: 1.7rem; margin: 1.6rem 0 0.6rem; }
.page-content h3 { font-size: 1.3rem; margin: 1.2rem 0 0.4rem; }
.page-content p, .page-content li { margin: 0 0 1rem; }
.page-content ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.page-content a { text-decoration: underline; }

.empty { padding: 2rem 0 4rem; color: var(--color-muted); }

.entry-title { overflow-wrap: anywhere; }
.pager strong { overflow-wrap: anywhere; }

.consent-bar {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 1.5rem;
  z-index: 70;
  width: min(52rem, calc(100% - 3rem));
  transform: translateX(-50%);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 0.9rem;
  box-shadow: 0 12px 40px rgba(28, 27, 25, 0.16);
  padding: 0.85rem 1rem;
}
.consent-bar[hidden] { display: none; }
.consent-bar-inner {
  width: auto;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.consent-copy { margin: 0; flex: 1 1 12rem; min-width: 0; color: var(--color-body); font-size: 0.9rem; }
.consent-all {
  min-height: 3rem;
  padding: 0 1.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--color-green);
  color: #fff;
  font: 700 1.05rem var(--font-ui);
  cursor: pointer;
}
.consent-side { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.consent-necessary {
  min-height: 2.25rem;
  padding: 0 0.8rem;
  border: 1px solid var(--color-chip);
  border-radius: 0.45rem;
  background: var(--color-surface);
  color: var(--color-ink);
  font: 600 0.85rem var(--font-ui);
  cursor: pointer;
}
.consent-settings {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-chip);
  border-radius: 0.45rem;
  background: var(--color-surface);
  color: var(--color-ink);
  cursor: pointer;
  padding: 0;
}
.consent-panel {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--color-line);
}
.consent-panel[hidden] { display: none; }
.consent-panel label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; font-weight: 500; }
.consent-panel input { width: auto; }
.consent-save {
  min-height: 2.25rem;
  padding: 0 0.9rem;
  border: 0;
  border-radius: 0.45rem;
  background: var(--color-ink);
  color: #fff;
  font: 600 0.85rem var(--font-ui);
  cursor: pointer;
}
.consent-manage {
  margin-top: 0.8rem;
  background: transparent;
  border: 0;
  color: var(--color-footer-muted);
  font: 500 0.82rem var(--font-ui);
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.captcha-note { margin: 0.6rem 0; color: var(--color-muted); font-size: 0.9rem; }
body.has-consent-bar { scroll-padding-bottom: 5.5rem; }
body.has-consent-bar .site-footer { padding-bottom: 5.5rem; }
body.has-consent-bar.consent-open { scroll-padding-bottom: 11rem; }
body.has-consent-bar.consent-open .site-footer { padding-bottom: 11rem; }

@media (max-width: 64rem) {
  .hero, .layout, .layout.is-paged, .single-wrap, .single-wrap.has-toc, .footer-grid, .related-grid { grid-template-columns: minmax(0, 1fr); }
  .toc, .article-aside { display: none; }
  .toc-mobile { display: block; margin: 1rem 0; }
  .toc-mobile details { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: 0.65rem; padding: 0 0.9rem; }
  .toc-mobile summary { min-height: 2.75rem; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
  .toc-mobile a { display: block; padding: 0.7rem 0; border-top: 1px solid var(--color-faint); color: var(--color-ink); text-decoration: none; }
  .cat-grid, .grade-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-nav, .header-search { display: none; }
  .header-tools, .icon-btn { display: inline-flex; }
  .header-tools { display: flex; }
  .brand img { height: 2.5rem; max-width: 11rem; object-fit: contain; }
}

@media (max-width: 42rem) {
  .container { width: min(var(--layout), calc(100% - 2rem)); }
  .consent-bar {
    left: 0;
    bottom: 0;
    width: 100%;
    transform: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 0.65rem 0;
  }
  .consent-bar-inner { width: min(var(--layout), calc(100% - 2rem)); margin-inline: auto; }
  .hero { padding: 1.8rem 0 1.2rem; gap: 1.2rem; }
  .hero h1, .entry-title, .page-hero h1 { font-size: 1.85rem; }
  .cat-grid, .grade-list, .pager { grid-template-columns: 1fr; }
  .chip { min-height: 2.75rem; display: inline-flex; align-items: center; }
  .hero-search button, .comment-respond .submit, .wpcf7 input[type="submit"] { min-height: 2.75rem; }
  .post-row { flex-direction: column; gap: 0.85rem; padding: 1.25rem 0; }
  .post-row > a:first-child,
  .post-row img,
  .post-row .thumb {
    width: 100%;
    height: auto;
    flex-basis: auto;
    aspect-ratio: 16 / 9;
  }
  .post-row h3 { font-size: 1.15rem; }
  .print-btn { margin-left: 0; min-height: 2.75rem; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 1rem;
  }
  .footer-grid > .footer-col:first-child { grid-column: 1 / -1; }
  .nav-overlay a { min-height: 2.75rem; display: flex; align-items: center; }
  .consent-side { width: 100%; margin-left: 0; justify-content: flex-end; }
  .consent-all { flex: 1; }
  body.has-consent-bar { scroll-padding-bottom: 8.5rem; }
  body.has-consent-bar .site-footer { padding-bottom: 8.5rem; }
  body.has-consent-bar.consent-open { scroll-padding-bottom: 16rem; }
  body.has-consent-bar.consent-open .site-footer { padding-bottom: 16rem; }
}

@media print {
  .site-header, .site-footer, .related, .comments-wrap, .toc, .article-aside, .print-btn, .pager, .search-overlay, .nav-overlay, .consent-bar { display: none !important; }
  .single-wrap { display: block; padding: 0; }
  body { background: #fff; }
}
