#masthead,
#ast-fixed-header,
.ast-mobile-header-wrap,
.ast-desktop-header,
.ast-above-header-wrap,
.ast-below-header-wrap,
.ast-mobile-popup-drawer {
  display: none !important;
}

.ith-header,
.ith-tape,
.ith-footer {
  --ink: #101612;
  --green-deep: #124806;
  --leaf: #e7f6df;
  --line: #e1e6dc;
  --shadow: 0 18px 50px rgba(16, 22, 18, 0.08);
  font-family: Sora, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ith-header *,
.ith-tape *,
.ith-footer * {
  box-sizing: border-box;
}

.ith-header {
  position: sticky;
  top: 0;
  z-index: 180;
  background: #0c120e !important;
  color: #f4f7f2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ith-tape {
  background: #0c120e;
  color: #f4f7f2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ith-tape .quote-row {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-height: 78px;
}

.ith-tape .q {
  padding: 18px 22px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.ith-tape .q:first-child { padding-left: 0; }
.ith-tape .q:last-child { border-right: 0; padding-right: 0; }

.ith-tape .q .name {
  font-family: Sora, sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aab9c;
}

.ith-tape .q .px {
  font-family: Sora, sans-serif;
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-top: 6px;
}

.ith-tape .q .chg {
  font-family: Sora, sans-serif;
  font-size: 12px;
  margin-top: 4px;
}

.ith-tape .q .chg.up { color: #8dce6a; }
.ith-tape .q .chg.down { color: #f0a8a2; }
.ith-tape .q .chg.flat { color: #9aab9c; }

.ith-tape .q.skel-q .px,
.ith-tape .q.skel-q .chg {
  height: 12px;
  margin-top: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.ith-tape .quote-note {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 2px 0 18px;
  color: #8b978d;
  font-size: 12px;
  line-height: 1.4;
}

.ith-header .header-inner,
.ith-footer .wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.ith-header .header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.ith-header .logo img,
.ith-header .logo .custom-logo {
  height: 38px;
  width: auto;
  max-width: none;
  display: block;
}

.ith-header .nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.ith-header .nav a,
.ith-header .drop > button {
  color: #e7eee4;
  background: none;
  border: 0;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.4;
  text-decoration: none;
  text-transform: none;
  box-shadow: none;
}

.ith-header .nav a:hover,
.ith-header .drop > button:hover,
.ith-header .nav a:focus-visible,
.ith-header .drop > button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
}

.ith-header .drop { position: relative; }
.ith-header .drop > button { display: inline-flex; align-items: center; gap: 6px; }
.ith-header .caret,
#site-nav .caret {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.ith-header .drop-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  padding-top: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: 0.16s ease;
  z-index: 2;
}

.ith-header .drop-panel ul {
  list-style: none;
  margin: 0;
  padding: 8px;
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.ith-header .drop-panel a {
  display: block;
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
}

.ith-header .drop-panel a:hover,
.ith-header .drop-panel a:focus-visible {
  background: var(--leaf);
  color: var(--green-deep);
}

.ith-header .drop:hover .drop-panel,
.ith-header .drop:focus-within .drop-panel,
.ith-header .drop.open .drop-panel {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.ith-header .mast-search input {
  width: 112px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: none;
  min-height: 0;
  line-height: 1.4;
  font-family: inherit;
}

.ith-header .mast-search input::placeholder { color: #b7c4b8; }
.ith-header .mast-search input:focus-visible {
  outline: 2px solid #b6e89a;
  outline-offset: 2px;
}

.ith-header .visually-hidden,
#site-nav .visually-hidden {
  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;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ith-header .nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: none;
}

.ith-header .nav-toggle:focus-visible {
  outline: 2px solid #b6e89a;
  outline-offset: 2px;
}

.ith-header .nav-toggle-box {
  width: 18px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ith-header .nav-toggle-box span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.ith-header .nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(1) {
  transform: translateY(6.25px) rotate(45deg);
}

.ith-header .nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(2) {
  opacity: 0;
}

.ith-header .nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(3) {
  transform: translateY(-6.25px) rotate(-45deg);
}

.ith-footer {
  background: #0c120e;
  color: #d5ddd6;
  padding: 56px 0 28px;
}

.ith-footer .foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.ith-footer .foot-title {
  font-family: Sora, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 14px;
}

.ith-footer ul { list-style: none; margin: 0; padding: 0; }
.ith-footer li { margin: 8px 0; }
.ith-footer p { margin: 0; max-width: 36ch; color: #d5ddd6; }
.ith-footer a { color: #d5ddd6; text-decoration: none; }
.ith-footer a:hover,
.ith-footer a:focus-visible { color: #fff; }

.ith-footer .foot-logo,
.ith-footer .custom-logo {
  height: 42px;
  width: auto;
  max-width: none;
  display: block;
  margin-bottom: 12px;
}

.ith-footer .legal {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #8b978d;
  font-size: 0.85rem;
}

body.admin-bar .ith-header { top: 32px; }

@media (max-width: 782px) {
  body.admin-bar .ith-header { top: 46px; }
}

.ith-nav-scrim {
  position: fixed;
  top: var(--ith-nav-top, 74px);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 160;
  background: rgba(8, 12, 10, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

html.ith-nav-open .ith-nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1080px), ((hover: none) and (pointer: coarse)) {
  .ith-header .nav-toggle { display: inline-flex; }
  .ith-tape {
    display: block !important;
    width: 100% !important;
    background: #0c120e !important;
    color: #f4f7f2 !important;
    overflow: hidden;
  }
  .ith-tape .quote-row {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: stretch;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    overflow-x: auto;
    padding: 0 20px;
    gap: 8px;
  }
  .ith-tape .q {
    display: block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 132px;
    background: transparent !important;
    color: #f4f7f2 !important;
    border-right: 0;
    padding: 16px 20px 10px 0;
  }
  .ith-tape .q:first-child { padding-left: 20px; }
  .ith-tape .quote-note {
    width: auto;
    padding: 2px 20px 16px;
  }
  body:not(.ith-home) .site-content,
  body:not(.ith-home) .ast-container,
  body:not(.ith-home) #primary,
  body:not(.ith-home) #secondary,
  body:not(.ith-home) .entry-content {
    max-width: 100%;
    min-width: 0;
  }
  body:not(.ith-home) .site-content {
    overflow-x: clip;
  }
  body:not(.ith-home) .entry-content img,
  body:not(.ith-home) .entry-content video,
  body:not(.ith-home) .entry-content iframe,
  body:not(.ith-home) .entry-content embed,
  body:not(.ith-home) .entry-content figure {
    max-width: 100%;
  }
  body:not(.ith-home) .entry-content img,
  body:not(.ith-home) .entry-content video {
    height: auto;
  }
  body:not(.ith-home) .entry-content pre,
  body:not(.ith-home) #secondary {
    max-width: 100%;
    overflow-x: auto;
  }
  .ith-table-scroll {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #site-nav {
    display: flex;
    position: fixed;
    top: var(--ith-nav-top, 74px);
    right: 0;
    left: auto;
    z-index: 170;
    width: min(420px, 100vw);
    max-width: 100vw;
    height: calc(100dvh - var(--ith-nav-top, 74px));
    max-height: calc(100dvh - var(--ith-nav-top, 74px));
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #101612 !important;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 12px calc(28px + env(safe-area-inset-bottom, 0px));
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.28);
    transform: translate3d(100%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, visibility 0s linear 0.28s;
  }
  #site-nav.open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.28s ease, visibility 0s linear 0s;
  }
  #site-nav .mast-search { order: -1; }
  #site-nav > a,
  #site-nav .drop > button {
    display: flex;
    align-items: center;
    color: #e7eee4 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    min-height: 48px;
    width: 100%;
    justify-content: space-between;
    text-align: left;
    border-radius: 12px;
    padding: 12px 14px;
    font-family: Sora, sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1.4;
    text-transform: none !important;
    text-decoration: none !important;
  }
  #site-nav > a:hover,
  #site-nav .drop > button:hover,
  #site-nav > a:focus-visible,
  #site-nav .drop > button:focus-visible {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
  }
  #site-nav .drop { display: block; }
  #site-nav .drop-panel {
    position: static;
    opacity: 1;
    display: none;
    pointer-events: none;
    transform: none;
    min-width: 0;
    padding: 0 0 6px 8px;
  }
  #site-nav .drop.open .drop-panel { display: block; pointer-events: auto; }
  #site-nav .drop.open > button .caret { transform: rotate(225deg) translate(-1px, -1px); }
  #site-nav .drop-panel ul {
    margin: 0;
    padding: 0;
    background: transparent;
    color: #e7eee4;
    border: 0;
    box-shadow: none;
    border-radius: 0;
  }
  #site-nav .drop-panel a {
    color: #d5ddd6;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 14px;
  }
  #site-nav .drop-panel a:hover,
  #site-nav .drop-panel a:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }
  #site-nav .mast-search { padding: 4px 4px 10px; }
  #site-nav .mast-search input {
    width: 100%;
    min-height: 48px;
    margin: 0 !important;
    padding: 8px 16px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    font-family: Sora, sans-serif !important;
    font-size: 1rem !important;
    -webkit-appearance: none;
    appearance: none;
  }
  #site-nav .mast-search input::placeholder {
    color: #b7c4b8 !important;
    opacity: 1;
  }
  .ith-footer .foot-grid { grid-template-columns: 1fr; }
}

html.ith-nav-open,
html.ith-nav-open body { overflow: hidden; }

html.ith-nav-open .ith-header {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  background: #0c120e !important;
}

.ith-header-space {
  height: 0;
  margin: 0;
  padding: 0;
}

html.ith-nav-open .ith-tape,
html.ith-nav-open .ith-header-space {
  margin-top: var(--ith-header-h, 75px);
}

@media (prefers-reduced-motion: reduce) {
  .ith-header .drop-panel,
  .ith-header .nav-toggle-box span,
  #site-nav,
  .ith-nav-scrim { transition: none; }
}

/* Article title only. Related-post cards also use .entry-title, so this stays on h1. */
body:not(.ith-home) h1.entry-title {
  font-size: clamp(1.6rem, 1.15rem + 1.05vw, 2rem) !important;
  line-height: 1.3 !important;
  font-weight: 600;
  letter-spacing: -0.02em;
}

body:not(.ith-home) .entry-content h2 {
  font-size: clamp(1.3rem, 0.95rem + 0.85vw, 1.7rem) !important;
  line-height: 1.32 !important;
  font-weight: 600;
  margin-top: 1.55em;
  margin-bottom: 0.45em;
}

body:not(.ith-home) .entry-content h3 {
  font-size: clamp(1.08rem, 0.9rem + 0.4vw, 1.28rem) !important;
  line-height: 1.4 !important;
  font-weight: 600;
  margin-top: 1.35em;
  margin-bottom: 0.4em;
}

body:not(.ith-home) .entry-content h4 {
  font-size: 1.05rem !important;
  line-height: 1.4 !important;
  font-weight: 600;
  margin-top: 1.2em;
  margin-bottom: 0.35em;
}

body:not(.ith-home) .entry-content h5,
body:not(.ith-home) .entry-content h6 {
  font-size: 1rem !important;
  line-height: 1.45 !important;
  font-weight: 600;
  margin-top: 1.15em;
  margin-bottom: 0.3em;
}

body:not(.ith-home) .ast-related-posts-title {
  font-size: clamp(1.3rem, 0.95rem + 0.8vw, 1.6rem) !important;
  line-height: 1.3 !important;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 1rem !important;
}

body:not(.ith-home) .ast-related-posts-wrapper .ast-related-post-title,
body:not(.ith-home) .ast-related-posts-wrapper .ast-related-post-title a {
  font-size: clamp(1.02rem, 0.92rem + 0.28vw, 1.15rem) !important;
  line-height: 1.45 !important;
  font-weight: 600;
}

body:not(.ith-home) .ast-related-posts-wrapper .ast-related-post-title {
  margin: 0.7rem 0 0.4rem !important;
}

body:not(.ith-home) #secondary .wp-block-heading,
body:not(.ith-home) #secondary .widget-title,
body:not(.ith-home) .widget-title {
  font-size: 1.125rem !important;
  line-height: 1.35 !important;
  font-weight: 600;
  letter-spacing: 0.03em;
}

body:not(.ith-home).blog h2.entry-title,
body:not(.ith-home).blog h2.entry-title a,
body:not(.ith-home).archive h2.entry-title,
body:not(.ith-home).archive h2.entry-title a,
body:not(.ith-home).search h2.entry-title,
body:not(.ith-home).search h2.entry-title a {
  font-size: clamp(1.15rem, 0.95rem + 0.45vw, 1.45rem) !important;
  line-height: 1.4 !important;
  font-weight: 600;
}

body:not(.ith-home).blog h1.page-title,
body:not(.ith-home).archive h1.page-title,
body:not(.ith-home).search h1.page-title {
  font-size: clamp(1.6rem, 1.15rem + 1.05vw, 2rem) !important;
  line-height: 1.3 !important;
  font-weight: 600;
}

@media (max-width: 767px) {
  body:not(.ith-home) h1.entry-title,
  body:not(.ith-home).archive h1.page-title,
  body:not(.ith-home).blog h1.page-title,
  body:not(.ith-home).search h1.page-title {
    font-size: clamp(1.65rem, 6.4vw, 2rem) !important;
    line-height: 1.28 !important;
  }

  body:not(.ith-home).archive h2.entry-title,
  body:not(.ith-home).archive h2.entry-title a,
  body:not(.ith-home).blog h2.entry-title,
  body:not(.ith-home).blog h2.entry-title a,
  body:not(.ith-home).search h2.entry-title,
  body:not(.ith-home).search h2.entry-title a {
    font-size: 1.15rem !important;
    line-height: 1.4 !important;
  }

  body:not(.ith-home) .entry-content h2,
  body:not(.ith-home) .ast-related-posts-title {
    font-size: 1.28rem !important;
    line-height: 1.35 !important;
  }

  body:not(.ith-home) .entry-content h3 {
    font-size: 1.1rem !important;
    line-height: 1.4 !important;
  }

  body:not(.ith-home) .ast-related-posts-wrapper .ast-related-post-title,
  body:not(.ith-home) .ast-related-posts-wrapper .ast-related-post-title a {
    font-size: 1.05rem !important;
    line-height: 1.45 !important;
  }
}
