/*
Theme Name: Verdant Circuit Journal
Author: Rowan Field Works
Description: A responsive editorial WordPress theme for environmental technology writing, field notes, and policy analysis.
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: edb-theme
*/

:root {
  --edb-ink: #17342f;
  --edb-muted: #61756e;
  --edb-line: #dbe5df;
  --edb-paper: #fffdf8;
  --edb-panel: #f3f8f4;
  --edb-soft: #f7ece9;
  --edb-accent: #126b59;
  --edb-accent-dark: #0b4f45;
  --edb-solar: #e4aa35;
  --edb-clay: #bd6657;
  --edb-white: #ffffff;
  --edb-shadow: 0 18px 50px rgba(23, 52, 47, 0.14);
  --edb-radius: 8px;
  --edb-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--edb-ink);
  background:
    linear-gradient(180deg, rgba(18, 107, 89, 0.06), transparent 280px),
    #eef2ee;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--edb-accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--edb-clay);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

.edb-shell {
  width: min(100%, var(--edb-max));
  margin: 0 auto;
  background: var(--edb-paper);
  box-shadow: var(--edb-shadow);
}

.edb-container {
  width: min(100% - 32px, 1040px);
  margin-inline: auto;
}

.edb-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 253, 248, 0.96);
  border-bottom: 1px solid var(--edb-line);
  backdrop-filter: blur(14px);
}

.edb-has-admin-bar .edb-site-header {
  top: 32px;
}

.edb-header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding-block: 10px;
}

.edb-brand {
  display: inline-block;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  color: var(--edb-ink);
  text-decoration: none;
}

.edb-site-title {
  display: block;
  overflow: hidden;
  color: var(--edb-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.96rem, 2.6vw, 1.24rem);
  font-weight: 700;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edb-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--edb-ink);
  background: var(--edb-panel);
  border: 1px solid var(--edb-line);
  border-radius: var(--edb-radius);
  cursor: pointer;
}

.edb-nav-toggle:hover,
.edb-nav-toggle:focus {
  border-color: var(--edb-accent);
}

.edb-nav-icon,
.edb-nav-icon::before,
.edb-nav-icon::after {
  display: block;
  width: 19px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.edb-nav-icon {
  position: relative;
}

.edb-nav-icon::before,
.edb-nav-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.edb-nav-icon::before {
  top: -6px;
}

.edb-nav-icon::after {
  top: 6px;
}

.edb-menu-wrap {
  display: none;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  padding: 8px 0 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--edb-line);
  border-radius: 0;
}

.edb-menu-wrap.edb-is-open {
  display: block;
}

.edb-menu {
  display: grid;
  gap: 6px;
  justify-content: stretch;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  list-style: none;
}

.edb-primary-nav {
  min-width: 0;
  overflow: visible;
}

.edb-nav-item {
  min-width: 0;
}

.edb-nav-link {
  display: block;
  width: 100%;
  max-width: none;
  overflow: hidden;
  padding: 10px 8px;
  color: var(--edb-ink);
  background: var(--edb-panel);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: var(--edb-radius);
}

.edb-nav-link:hover,
.edb-nav-link:focus {
  background: var(--edb-panel);
  color: var(--edb-accent-dark);
}

.edb-current-link {
  background: var(--edb-panel);
  color: var(--edb-accent-dark);
}

.edb-button,
.edb-outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: var(--edb-radius);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
}

.edb-button {
  color: var(--edb-white);
  background: var(--edb-accent-dark);
  border: 1px solid var(--edb-accent-dark);
}

.edb-button:hover,
.edb-button:focus {
  color: var(--edb-white);
  background: #073c36;
}

.edb-outline-button {
  color: var(--edb-accent-dark);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(18, 107, 89, 0.28);
}

.edb-outline-button:hover,
.edb-outline-button:focus {
  color: var(--edb-ink);
  background: var(--edb-white);
}

.edb-hero {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  color: var(--edb-white);
  background:
    linear-gradient(90deg, rgba(7, 60, 54, 0.86), rgba(7, 60, 54, 0.58) 48%, rgba(7, 60, 54, 0.26)),
    var(--edb-hero-image) center / cover no-repeat;
}

.edb-hero-inner {
  display: grid;
  align-items: end;
  min-height: 460px;
  padding-block: 58px 38px;
}

.edb-hero-content {
  max-width: 720px;
}

.edb-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.edb-kicker::before {
  width: 34px;
  height: 2px;
  background: var(--edb-solar);
  content: "";
}

.edb-hero-title {
  max-width: 620px;
  margin: 0;
  color: var(--edb-white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 7vw, 3.45rem);
  line-height: 1.03;
  letter-spacing: 0;
}

.edb-hero-summary {
  max-width: 610px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 3vw, 1.18rem);
}

.edb-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.edb-signal-strip {
  position: relative;
  margin-top: -42px;
  padding-bottom: 36px;
}

.edb-signal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.edb-signal-link {
  display: grid;
  gap: 10px;
  justify-items: center;
  min-height: 176px;
  padding: 16px 10px;
  color: var(--edb-ink);
  text-align: center;
  text-decoration: none;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--edb-radius);
  box-shadow: 0 12px 32px rgba(23, 52, 47, 0.16);
}

.edb-signal-link:hover,
.edb-signal-link:focus {
  transform: translateY(-2px);
}

.edb-signal-image {
  width: 104px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 8px solid var(--edb-white);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(23, 52, 47, 0.18);
}

.edb-signal-title {
  max-width: 14rem;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.25;
}

.edb-main {
  display: grid;
  gap: 34px;
  padding-block: 18px 48px;
}

.edb-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--edb-line);
}

.edb-section-title {
  margin: 0;
  padding-bottom: 9px;
  color: var(--edb-ink);
  border-bottom: 3px solid var(--edb-accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 5vw, 2.1rem);
  line-height: 1.1;
}

.edb-section-note {
  display: none;
  margin: 0 0 10px;
  color: var(--edb-muted);
  font-size: 0.95rem;
}

.edb-post-grid {
  display: grid;
  gap: 18px;
}

.edb-card {
  display: grid;
  gap: 16px;
  padding: 12px;
  background: var(--edb-white);
  border: 1px solid var(--edb-line);
  border-radius: var(--edb-radius);
}

.edb-card:hover {
  border-color: rgba(18, 107, 89, 0.42);
}

.edb-card-image-link {
  display: block;
  overflow: hidden;
  background: var(--edb-panel);
  border-radius: calc(var(--edb-radius) - 2px);
}

.edb-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 220ms ease;
}

.edb-card:hover .edb-card-image {
  transform: scale(1.03);
}

.edb-card-body {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 0 2px 4px;
}

.edb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--edb-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.edb-meta a {
  color: inherit;
  text-decoration: none;
}

.edb-meta a:hover,
.edb-meta a:focus {
  color: var(--edb-accent-dark);
}

.edb-card-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.3rem, 5vw, 1.9rem);
  line-height: 1.1;
}

.edb-card-title a {
  color: var(--edb-ink);
  text-decoration: none;
}

.edb-card-title a:hover,
.edb-card-title a:focus {
  color: var(--edb-accent-dark);
}

.edb-excerpt {
  margin: 0;
  color: var(--edb-muted);
  font-size: 0.98rem;
}

.edb-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.edb-read-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: var(--edb-accent-dark);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.edb-read-link:hover,
.edb-read-link:focus {
  color: var(--edb-clay);
}

.edb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.edb-tag {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 8px;
  color: var(--edb-accent-dark);
  background: var(--edb-panel);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

.edb-sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

.edb-panel {
  padding: 20px;
  background: var(--edb-panel);
  border: 1px solid var(--edb-line);
  border-radius: var(--edb-radius);
}

.edb-panel-soft {
  background: var(--edb-soft);
}

.edb-panel-dark {
  color: var(--edb-white);
  background: linear-gradient(180deg, var(--edb-accent-dark), #123a34);
  border-color: transparent;
}

.edb-panel-title {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.32rem;
  line-height: 1.15;
}

.edb-panel p {
  margin: 0 0 14px;
  color: var(--edb-muted);
}

.edb-panel-dark p,
.edb-panel-dark a {
  color: rgba(255, 255, 255, 0.84);
}

.edb-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.edb-stat {
  padding: 12px;
  background: var(--edb-white);
  border: 1px solid var(--edb-line);
  border-radius: var(--edb-radius);
}

.edb-stat-value {
  display: block;
  overflow-wrap: anywhere;
  color: var(--edb-accent-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 4vw, 1.55rem);
  font-weight: 800;
  line-height: 1.05;
}

.edb-stat-label {
  display: block;
  margin-top: 5px;
  color: var(--edb-muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.edb-author-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.edb-author-link {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--edb-ink);
  text-decoration: none;
}

.edb-author-avatar {
  width: 42px;
  height: 42px;
  border: 3px solid var(--edb-white);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(23, 52, 47, 0.12);
}

.edb-author-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.2;
}

.edb-author-count {
  display: block;
  color: var(--edb-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.edb-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.edb-topic-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 11px;
  color: var(--edb-ink);
  background: var(--edb-white);
  border: 1px solid var(--edb-line);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.edb-topic-pill:hover,
.edb-topic-pill:focus {
  border-color: var(--edb-accent);
}

.edb-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.edb-mini-link {
  display: grid;
  gap: 7px;
  color: var(--edb-ink);
  text-align: center;
  text-decoration: none;
}

.edb-mini-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 7px solid var(--edb-white);
  border-radius: 50%;
  box-shadow: 0 10px 22px rgba(23, 52, 47, 0.12);
}

.edb-mini-title {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.edb-empty {
  padding: 24px;
  background: var(--edb-panel);
  border: 1px solid var(--edb-line);
  border-radius: var(--edb-radius);
}

.edb-pagination {
  margin-top: 24px;
}

.edb-pagination-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.edb-pagination-nav a,
.edb-pagination-nav span,
.edb-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 6px 10px;
  color: var(--edb-ink);
  background: var(--edb-white);
  border: 1px solid var(--edb-line);
  border-radius: var(--edb-radius);
  font-weight: 800;
  text-decoration: none;
}

.edb-pagination-nav .edb-current-page {
  color: var(--edb-white);
  background: var(--edb-accent-dark);
}

.edb-single {
  padding-block: 28px 52px;
}

.edb-single-header {
  display: grid;
  gap: 18px;
  padding-bottom: 28px;
}

.edb-single-title {
  max-width: 880px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 9vw, 4.9rem);
  line-height: 1;
  letter-spacing: 0;
}

.edb-single-image {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: var(--edb-radius);
}

.edb-single-layout {
  display: grid;
  gap: 34px;
}

.edb-content {
  color: var(--edb-ink);
  font-size: 1.06rem;
}

.edb-content > *:first-child {
  margin-top: 0;
}

.edb-content h2,
.edb-content h3,
.edb-content h4 {
  margin-top: 1.65em;
  margin-bottom: 0.45em;
  color: var(--edb-ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
}

.edb-content h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
}

.edb-content h3 {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
}

.edb-content p,
.edb-content ul,
.edb-content ol {
  margin-top: 0;
  margin-bottom: 1.15em;
}

.edb-content blockquote {
  margin: 1.6em 0;
  padding: 18px 20px;
  color: var(--edb-ink);
  background: var(--edb-panel);
  border-left: 4px solid var(--edb-accent);
  border-radius: var(--edb-radius);
}

.edb-content img,
.edb-content figure {
  border-radius: var(--edb-radius);
}

.edb-content table {
  width: 100%;
  border-collapse: collapse;
}

.edb-content th,
.edb-content td {
  padding: 10px;
  border: 1px solid var(--edb-line);
}

.edb-post-nav {
  display: grid;
  gap: 12px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--edb-line);
}

.edb-post-nav a {
  color: var(--edb-accent-dark);
  font-weight: 900;
}

.edb-comment-area {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--edb-line);
}

.edb-footer {
  color: rgba(255, 255, 255, 0.84);
  background: #123a34;
}

.edb-footer-inner {
  display: grid;
  gap: 20px;
  padding-block: 34px;
}

.edb-footer-title {
  margin: 0 0 6px;
  color: var(--edb-white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.1;
}

.edb-footer p {
  margin: 0;
}

.edb-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.edb-footer-links a {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
  text-decoration: none;
}

.edb-footer-links a:hover,
.edb-footer-links a:focus {
  color: var(--edb-solar);
}

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

@media (min-width: 560px) {
  .edb-signal-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .edb-card {
    grid-template-columns: minmax(180px, 0.82fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .edb-card-image {
    height: 100%;
    min-height: 230px;
    aspect-ratio: auto;
  }

  .edb-section-note {
    display: block;
  }
}

@media (max-width: 782px) {
  .edb-has-admin-bar .edb-site-header {
    top: 46px;
  }
}

@media (min-width: 760px) {
  .edb-header-inner {
    grid-template-columns: minmax(220px, 1fr) minmax(0, auto);
  }

  .edb-nav-toggle {
    display: none;
  }

  .edb-menu-wrap {
    display: block;
    grid-column: auto;
    width: auto;
    padding: 0;
    border-top: 0;
  }

  .edb-menu {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: clamp(4px, 1.1vw, 10px);
    overflow: hidden;
  }

  .edb-primary-nav {
    overflow: hidden;
  }

  .edb-nav-link {
    width: auto;
    max-width: clamp(72px, 14vw, 150px);
    padding: 7px 6px;
    background: transparent;
    font-size: clamp(0.68rem, 1.4vw, 0.82rem);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 860px) {
  .edb-header-inner {
    grid-template-columns: minmax(230px, 1fr) minmax(0, auto);
  }

  .edb-menu {
    gap: 8px;
  }

  .edb-nav-link {
    font-size: 0.82rem;
    max-width: 150px;
  }

  .edb-main,
  .edb-single-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }

  .edb-post-grid {
    gap: 20px;
  }

  .edb-footer-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

@media (min-width: 1080px) {
  .edb-container {
    width: min(100% - 52px, 1040px);
  }

  .edb-main,
  .edb-single-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 38px;
  }
}
