:root {
  --ink: #161719;
  --muted: #53585c;
  --paper: #fff;
  --canvas: #f1f6f7;
  --line: #e1e7e8;
  --link: #174fd4;
  --accent: #ed642d;
  --shadow: 0 3px 13px rgb(20 28 31 / 8%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #0a318e; }
button, input, textarea { font: inherit; }

.sr-only,
.hp-field {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: -5rem;
  padding: .75rem 1rem;
  background: #111;
  color: #fff;
}
.skip-link:focus { top: 1rem; }

.site-header {
  min-height: 165px;
  background: #fff;
  border-bottom: 1px solid #e4e7e8;
}

.header-inner {
  width: min(1180px, calc(100% - 80px));
  min-height: 165px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 58px;
}

.brand {
  flex: 0 0 auto;
  display: block;
  width: 250px;
  line-height: 0;
}

.brand img { display: block; width: 250px; height: 140px; object-fit: contain; }

.site-nav ul { display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; list-style: none; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 16px; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--link); }
.site-nav .has-submenu { position: relative; }
.site-nav .has-submenu > a { display: flex; gap: 5px; align-items: center; }
.site-nav .has-submenu > ul {
  position: absolute;
  z-index: 20;
  display: none;
  left: -16px;
  top: calc(100% + 8px);
  min-width: 160px;
  padding: 10px 0;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.site-nav .has-submenu:hover > ul,
.site-nav .has-submenu:focus-within > ul { display: block; }
.site-nav .has-submenu li a { display: block; padding: 7px 16px; }

.menu-toggle { display: none; }

.page-shell {
  width: min(1180px, calc(100% - 80px));
  margin: 0 auto;
  padding: 50px 0 72px;
}

.page-shell.with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 840px) 296px;
  gap: 30px;
  align-items: start;
}

.site-main { min-width: 0; }
h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -.025em; }
h1 { margin: 0 0 35px; font-size: clamp(2rem, 3.3vw, 2.45rem); }
h2 { font-size: 1.45rem; }

.card-list { display: grid; gap: 34px; }

.post-card {
  position: relative;
  min-height: 168px;
  background: var(--paper);
  border: 1px solid #e6eaeb;
  box-shadow: var(--shadow);
}

.post-card.has-image {
  display: grid;
  grid-template-columns: minmax(250px, 44%) 1fr;
}

.card-image { display: block; min-height: 245px; overflow: hidden; background: #e7ecee; }
.card-image img { width: 100%; height: 100%; min-height: 245px; object-fit: cover; display: block; transition: transform .25s ease; }
.card-image:hover img { transform: scale(1.015); }

.card-copy { position: relative; min-width: 0; padding: 32px 28px 40px; }
.card-copy time {
  position: absolute;
  top: 0;
  right: 42%;
  transform: translate(50%, -1px);
  padding: 5px 11px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}

.post-card:not(.has-image) .card-copy time { right: 48%; }
.card-copy h2 { margin: 3px 0 16px; font-size: 1.37rem; }
.card-copy h2 a { color: var(--ink); text-decoration: none; }
.card-copy h2 a:hover { color: var(--link); }
.card-category {
  display: inline-block;
  color: var(--ink);
  font-size: .72rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}
.card-copy p { margin: 17px 0 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.55; }
.author-tab {
  position: absolute;
  right: -1px;
  bottom: -1px;
  padding: 6px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  font-size: .76rem;
  font-weight: 700;
  text-decoration: none;
}

.newsletter {
  padding: 32px 20px 35px;
  background: #fff;
  border: 1px solid #e3e8e9;
  box-shadow: 0 2px 8px rgb(20 28 31 / 3%);
}
.newsletter h2 { margin: 0 0 23px; font-size: 1.55rem; }
.newsletter p { margin: 0 0 25px; font-size: 1.05rem; line-height: 1.4; }
.newsletter label { display: block; margin-top: 3px; font-size: 1rem; }
.newsletter input[type="text"],
.newsletter input[type="email"] {
  width: 172px;
  max-width: 100%;
  height: 32px;
  margin-bottom: 4px;
  border: 1px solid #b6b9ba;
  background: #fff;
}
.newsletter button,
.contact-form button {
  margin-top: 17px;
  padding: 7px 16px;
  color: #232323;
  background: #e8e8e8;
  border: 1px solid #b9b9b9;
  border-radius: 2px;
  cursor: pointer;
}
.newsletter button:hover,
.contact-form button:hover { background: #ddd; }

.archive-header h1 { margin-bottom: 36px; }
.archive-header p { max-width: 65ch; margin: -20px 0 35px; color: var(--muted); }
.archive-navigation,
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 34px;
}
.archive-navigation > span,
.post-navigation > * {
  display: block;
  min-height: 47px;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.archive-navigation > span:last-child,
.post-navigation .next { text-align: right; }
.archive-navigation a { color: var(--ink); text-decoration: none; }

.single-entry,
.page-entry,
.not-found {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: clamp(30px, 5vw, 62px);
}

.single-entry > header,
.page-entry > header { margin-bottom: 30px; }
.single-entry h1,
.page-entry h1 { margin: 0; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 0 7px; margin-top: 18px; color: #222; }
.entry-content { font-family: Georgia, "Times New Roman", serif; font-size: 1.06rem; line-height: 1.72; }
.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content h2, .entry-content h3 { font-family: Arial, Helvetica, sans-serif; margin-top: 1.8em; }
.entry-content a { overflow-wrap: anywhere; }
.entry-content figure { margin: 1.8rem 0; }
.entry-content figure img,
.entry-content > p > img { display: block; width: auto; max-width: 100%; }
.entry-content .wp-block-image { margin: 1.8rem 0; }
.entry-content .wp-block-image img { display: block; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: .6rem; border: 1px solid var(--line); text-align: left; }
.entry-categories { margin-top: 26px; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.entry-tags a { padding: 3px 8px; background: var(--canvas); text-decoration: none; }

.vocabulary-entry { padding: 0; background: transparent; border: 0; box-shadow: none; }
.vocabulary-entry > header { margin-bottom: 0; }
.vocabulary-entry h1 { margin-bottom: 20px; }
.vocabulary-entry .entry-content img { border: 1px solid #333; }
.vocabulary-entry .entry-categories { margin-top: 0; }
.vocabulary-entry + .post-navigation { margin-top: 36px; }

.page-entry { max-width: 840px; margin: 0 auto; }
.page-entry > header { text-align: center; }
.page-about .page-entry,
.page-resources .page-entry { max-width: 930px; }

.contact-entry { max-width: 840px; padding: 0; background: transparent; border: 0; box-shadow: none; }
.contact-entry > header { margin-bottom: 52px; }
.contact-panel { padding: clamp(28px, 5vw, 48px); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.contact-form { display: grid; }
.contact-form label { margin: 12px 0 6px; font-weight: 600; }
.contact-form label span { color: #b8251c; font-size: .86rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #73777a;
  border-radius: 2px;
  background: #fff;
}
.contact-form textarea { resize: vertical; }
.contact-form .field-help { margin: -2px 0 7px; font-size: .92rem; }
.contact-form .character-count { margin: 4px 0 0; color: var(--muted); font-size: .83rem; }
.contact-form button { justify-self: start; padding-inline: 25px; }
.form-notice { margin-bottom: 18px; padding: 12px 15px; border-left: 4px solid #258141; background: #eef9f1; }
.form-notice.error { border-left-color: #b8251c; background: #fff0ef; }

.empty-state,
.not-found { text-align: center; }
.not-found { max-width: 760px; margin: 0 auto; }
.not-found h1 { margin-bottom: 15px; }

.site-footer {
  min-height: 80px;
  background: #fff;
  border-top: 1px solid var(--line);
  color: #4c5154;
}
.site-footer > div { width: min(1180px, calc(100% - 80px)); margin: 0 auto; padding: 27px 0; }

@media (max-width: 980px) {
  .header-inner,
  .page-shell,
  .site-footer > div { width: min(100% - 40px, 840px); }
  .page-shell.with-sidebar { grid-template-columns: 1fr; }
  .newsletter { max-width: 440px; }
}

@media (max-width: 680px) {
  .site-header, .header-inner { min-height: 112px; }
  .header-inner { width: calc(100% - 30px); justify-content: space-between; gap: 20px; }
  .brand { width: 170px; }
  .brand img { width: 170px; height: 96px; }
  .menu-toggle {
    display: grid;
    gap: 4px;
    width: 42px;
    height: 42px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--line);
  }
  .menu-toggle span:not(.sr-only) { display: block; height: 2px; background: #222; }
  .site-nav {
    display: none;
    position: absolute;
    z-index: 30;
    top: 102px;
    left: 0;
    right: 0;
    padding: 18px 20px;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 10px; }
  .site-nav .has-submenu > ul { position: static; display: block; padding: 0 0 0 15px; border: 0; box-shadow: none; }
  .page-shell,
  .site-footer > div { width: calc(100% - 30px); }
  .page-shell { padding-top: 30px; }
  .post-card.has-image { grid-template-columns: 1fr; }
  .card-image { min-height: 190px; max-height: 310px; }
  .card-copy { padding: 28px 20px 38px; }
  .card-copy time,
  .post-card:not(.has-image) .card-copy time { right: 20px; transform: none; }
  .archive-navigation,
  .post-navigation { grid-template-columns: 1fr; gap: 15px; }
  .post-navigation .next { text-align: left; }
  .single-entry,
  .page-entry,
  .not-found { padding: 28px 20px; }
  .vocabulary-entry,
  .contact-entry { padding: 0; }
  .contact-panel { padding: 24px 18px; }
  .entry-content { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
