:root {
  --bg: #fafaf2;
  --ink: #0a0a0a;
  --muted: #444444;
  --brand: #0f6e72;
  --accent: #ffe030;
  --card: #ffffff;
  --border-color: #0a0a0a;
  --border: 2px solid #0a0a0a;
  --shadow: 4px 4px 0 #0a0a0a;
  --shadow-lg: 6px 6px 0 #0a0a0a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

a {
  color: var(--brand);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.2rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.8rem 0 1.6rem;
  background: var(--accent);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem;
  position: relative;
  z-index: 60;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}

.brand-title {
  display: block;
  white-space: nowrap;
}

.brand-tagline {
  display: block;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.nav-search {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.nav-search-toggle {
  min-width: 2.45rem;
  min-height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
}

.nav-search-icon {
  position: relative;
  width: 0.78rem;
  height: 0.78rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  transform: translate(-1px, -1px);
}

.nav-search-icon::after {
  content: "";
  position: absolute;
  right: -0.36rem;
  bottom: -0.33rem;
  width: 0.45rem;
  height: 2px;
  background: currentColor;
  transform: rotate(40deg);
  transform-origin: center;
}

.nav-search-form {
  margin: 0;
}

.nav-search-input {
  width: min(300px, 58vw);
  padding: 0.5rem 0.65rem;
  font-size: 0.92rem;
  background: #fff;
}

.nav-search-form[hidden] {
  display: none;
}

.search-page-form {
  display: grid;
  gap: 0.75rem;
}

.search-page-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-page-input-row .search-box {
  flex: 1 1 280px;
}

.search-results {
  margin-top: 1rem;
}

.search-empty {
  margin-top: 0.8rem;
}

.nav-categories {
  position: relative;
  z-index: 61;
}

.nav-categories summary {
  list-style: none;
  cursor: pointer;
}

.nav-categories summary::-webkit-details-marker {
  display: none;
}

.nav-categories-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  min-width: min(760px, calc(100vw - 2.4rem));
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding: 1rem;
  background: var(--card);
  border: var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 120;
}

.nav-topics-panel {
  min-width: min(420px, calc(100vw - 2.4rem));
  grid-template-columns: 1fr;
}

.nav-topic-tier {
  border: var(--border);
  background: #fff;
  overflow: hidden;
}

.nav-topic-tier summary {
  list-style: none;
  cursor: pointer;
  padding: 0.6rem 0.75rem;
  font-weight: 600;
}

.nav-topic-tier summary::-webkit-details-marker {
  display: none;
}

.nav-topic-tier .nav-category-children {
  padding: 0.55rem 0.75rem 0.75rem 0.9rem;
  border-left: 0;
  border-top: var(--border);
}

.nav-category-group {
  display: grid;
  gap: 0.45rem;
}

.nav-category-parent {
  font-family: "Fraunces", serif;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.nav-category-children {
  display: grid;
  gap: 0.35rem;
  padding-left: 0.65rem;
  border-left: 3px solid var(--accent);
}

.nav-category-children a,
.nav-category-index {
  color: var(--muted);
  text-decoration: none;
}

.nav-category-children a:hover,
.nav-category-parent:hover,
.nav-category-index:hover {
  color: var(--brand);
  text-decoration: underline;
}

.nav-category-index {
  grid-column: 1 / -1;
  padding-top: 0.4rem;
  border-top: 2px solid var(--ink);
}

.pill {
  border-radius: 999px;
  border: var(--border);
  background: #fff;
  color: var(--ink);
  padding: 0.35rem 0.8rem;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 3px 3px 0 var(--border-color);
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.pill:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--border-color);
  background: var(--accent);
  color: var(--ink);
}

.hero {
  background: var(--brand);
  color: #f5fffe;
  border: var(--border);
  padding: 2rem 1.2rem;
  box-shadow: var(--shadow-lg);
  animation: rise 640ms ease both;
}

.hero h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.hero p {
  max-width: 70ch;
  color: rgba(255, 255, 255, 0.9);
}

.news-hero {
  position: relative;
  overflow: hidden;
}

.news-hero::after {
  display: none;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.hero-stats span {
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.15);
  padding: 0.3rem 0.72rem;
  font-size: 0.86rem;
  color: #f5fffe;
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.card {
  background: var(--card);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 1rem;
  animation: rise 520ms ease both;
}

.card h2,
.card h3 {
  font-family: "Fraunces", serif;
  font-weight: 700;
  margin-top: 0.2rem;
}

.news-layout {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.news-lead h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  margin-bottom: 0.6rem;
}

.news-lead-image {
  display: block;
  margin: 0.9rem 0 0.85rem;
  overflow: hidden;
  border: var(--border);
  background: #f7f5ef;
}

.news-lead-image img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

.news-kicker {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
  background: var(--accent);
  border: 1px solid var(--ink);
  padding: 0.1rem 0.45rem;
  margin-left: 0.45rem;
  margin-bottom: 0;
  vertical-align: middle;
}

.news-headlines {
  margin-top: 0.7rem;
}

.news-headline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.7rem;
  align-items: start;
}

.news-headline-image {
  display: block;
  overflow: hidden;
  border: var(--border);
  background: #f7f4ec;
  aspect-ratio: 4 / 3;
}

.news-headline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-headline-image-fallback,
.news-lead-image-fallback {
  display: grid;
  place-items: center;
  text-decoration: none;
  background: var(--accent);
}

.news-headline-image-fallback span,
.news-lead-image-fallback span {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
}

.news-rail {
  display: grid;
  align-content: start;
}

.news-lead-image-fallback {
  min-height: 210px;
}

.news-stream {
  margin-top: 1rem;
}

.news-stream-header {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.news-grid {
  display: grid;
  gap: 0.85rem;
}

.news-card {
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 0.86rem;
  background: var(--card);
  animation: rise 420ms ease both;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.news-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--border-color);
}

.news-card h3 {
  margin: 0.42rem 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.news-card p {
  margin: 0.55rem 0 0;
  line-height: 1.6;
}

.news-card-image {
  display: block;
  margin: -0.86rem -0.86rem 0.7rem;
  overflow: hidden;
  border-bottom: var(--border);
  background: #f8f7f2;
}

.news-card-image img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

.news-bottom {
  margin-top: 1rem;
}

.meta {
  color: var(--muted);
  font-size: 0.93rem;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.list li {
  border-top: 2px solid var(--ink);
  padding-top: 0.75rem;
}

.list li:first-child {
  border-top: none;
  padding-top: 0;
}

.content {
  line-height: 1.7;
}

.content img,
.content iframe,
.content video {
  max-width: 100%;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  margin: 0.8rem 0;
  background: #111;
  border: var(--border);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.search-box {
  width: 100%;
  border: var(--border);
  padding: 0.6rem;
  font-size: 0.98rem;
  font-family: inherit;
}

.article-feed {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.article-teaser {
  display: grid;
  gap: 0.55rem;
}

.article-teaser h2 {
  margin: 0.2rem 0 0.2rem;
}

.article-teaser > p {
  margin: 0;
}

.article-excerpt {
  line-height: 1.6;
}

.article-content-full {
  line-height: 1.7;
  margin-top: 0.6rem;
}

.article-content-full p {
  margin-top: 0;
  margin-bottom: 1em;
}

.article-content-full p:last-child {
  margin-bottom: 0;
}

.article-content-full img,
.article-content-full iframe,
.article-content-full video {
  max-width: 100%;
  border: var(--border);
  margin: 0.8rem 0;
}

.article-badges {
  margin-top: 0.4rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 2px solid var(--ink);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: var(--border);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 600;
  box-shadow: 3px 3px 0 var(--border-color);
  text-decoration: none;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.pagination-btn:hover:not(:disabled):not([aria-disabled="true"]) {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--border-color);
  background: var(--accent);
}

.pagination-btn:disabled,
.pagination-btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-info {
  font-size: 0.9rem;
  color: var(--muted);
  min-width: 100px;
  text-align: center;
}

.comments {
  margin-top: 1rem;
}

.comment-form {
  display: grid;
  gap: 0.6rem;
  margin: 0.7rem 0;
}

.comment-form textarea {
  resize: vertical;
  font-family: inherit;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.comments-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.comment-row {
  border-top: 2px solid var(--ink);
  padding-top: 0.6rem;
}

.comment-body {
  margin: 0.2rem 0 0;
  line-height: 1.6;
  white-space: pre-wrap;
}

footer {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 1.4rem 0 0.6rem;
  border-top: 2px solid var(--ink);
  padding-top: 0.9rem;
}

.widget-area {
  margin-top: 1rem;
}

.sidebar-inner {
  display: grid;
  gap: 0.85rem;
}

.widget-stack {
  display: grid;
  gap: 0.85rem;
  height: 100%;
}

.widget {
  background: var(--card);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 0.85rem;
}

.widget-title {
  margin: 0 0 0.65rem;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.06rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.4rem;
}

.widget-image-link {
  display: block;
}

.widget-image-link img {
  width: 100%;
  border: var(--border);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
}

.search-form label {
  display: block;
}

.search-form input,
.widget select {
  width: 100%;
  border: var(--border);
  padding: 0.55rem 0.7rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.search-submit {
  border: var(--border);
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--border-color);
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.search-submit:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--border-color);
}

.widget-search-compact {
  padding: 0.55rem 0.65rem;
}

.widget-search-compact .search-form {
  gap: 0.35rem;
}

.widget-search-compact .search-form input {
  padding: 0.4rem 0.55rem;
}

.widget-search-compact .search-submit {
  padding: 0.38rem 0.6rem;
  font-size: 0.9rem;
}

.widget iframe {
  border: var(--border);
  min-height: 205px;
  margin-top: 0.5rem;
}

.widget .wp-block-list,
.widget #recentcomments {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
}

.has-text-align-center {
  text-align: center;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (min-width: 860px) {
  .grid-2 {
    grid-template-columns: 1.45fr 1fr;
  }

  .news-layout {
    grid-template-columns: 1.65fr 1fr;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-stream-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .news-stream-header .search-box {
    max-width: 360px;
  }
}

@media (max-width: 859px) {
  .nav-categories {
    width: 100%;
  }

  .nav-search {
    width: 100%;
    margin-left: 0;
  }

  .nav-search-form {
    flex: 1;
  }

  .nav-search-input {
    width: 100%;
  }

  .nav-categories-panel {
    position: static;
    min-width: 0;
    margin-top: 0.55rem;
  }
}

@media (min-width: 1160px) {
  .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.editor-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.editor-split textarea {
  width: 100%;
  min-height: 360px;
  resize: vertical;
}

.editor-preview {
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  overflow-y: auto;
  max-height: 640px;
  background: #fff;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.editor-preview-title {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.4rem;
}

.editor-split-active {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 860px) {
  .editor-split-active {
    grid-template-columns: 1fr;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
