/*
Theme Name: Winthrop Pilot
Theme URI: https://winthroppilot.com
Author: 72 Keys LLC
Description: Broadsheet theme for Winthrop Pilot. Section-driven front page, curated slots with automatic fallback, reusable article graphics.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: winthrop-pilot
*/

  :root {
    --paper: #fdfdfb;
    --ink: #131313;
    --slate: #5a6069;
    --rule: #e3e1da;
    --rule-strong: #131313;
    --links: #326891;
    --signal: #a92e23;
    --harbor: #1e3d5c;
    --band-white: #f2f1ee;
    --tile: #f6f5f1;
    --btn-ink: #ffffff;
    --serif: Georgia, "Times New Roman", serif;
    --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --paper: #17181b; --ink: #e8e6e1; --slate: #9aa1a8; --rule: #33353a;
      --rule-strong: #e8e6e1; --links: #7fa8c9; --signal: #d4685d; --harbor: #93b4d2;
      --band-white: #d7dde1; --tile: #202226; --btn-ink: #17181b;
    }
  }
  :root[data-theme="dark"] {
    --paper: #17181b; --ink: #e8e6e1; --slate: #9aa1a8; --rule: #33353a;
    --rule-strong: #e8e6e1; --links: #7fa8c9; --signal: #d4685d; --harbor: #93b4d2;
    --band-white: #d7dde1; --tile: #202226; --btn-ink: #17181b;
  }
  :root[data-theme="light"] {
    --paper: #fdfdfb; --ink: #131313; --slate: #5a6069; --rule: #e3e1da;
    --rule-strong: #131313; --links: #326891; --signal: #a92e23; --harbor: #1e3d5c;
    --band-white: #f2f1ee; --tile: #f6f5f1; --btn-ink: #ffffff;
  }

  * { box-sizing: border-box; }
  body {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: var(--serif); font-size: 16px; line-height: 1.45;
    -webkit-font-smoothing: antialiased;
  }
  a { color: inherit; text-decoration: none; }
  a:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
  img, svg { max-width: 100%; }
  .shell { max-width: 1220px; margin: 0 auto; padding: 0 20px; }

  /* ---------- utility ---------- */
  .utility {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 9px 0; font-family: var(--sans); font-size: 11.5px;
    letter-spacing: .04em; color: var(--slate);
    border-bottom: 1px solid var(--rule);
  }
  .utility .vol { text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; }
  .conditions { display: flex; align-items: center; gap: 9px; color: var(--ink); white-space: nowrap; }
  .conditions .glyph { color: var(--harbor); display: inline-flex; }
  .conditions .temp { font-weight: 700; font-variant-numeric: tabular-nums; }
  .conditions time { color: var(--slate); font-variant-numeric: tabular-nums; }
  .theme-btn { display: inline-flex; background: none; border: 0; padding: 3px; color: var(--slate); cursor: pointer; }
  .theme-btn:hover { color: var(--ink); }
  .theme-btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
  .theme-btn .icon-sun { display: none; }
  .theme-dark .theme-btn .icon-sun { display: inline; }
  .theme-dark .theme-btn .icon-moon { display: none; }

  /* ---------- masthead ---------- */
  .masthead { text-align: center; padding: 30px 0 22px; }
  .masthead .brandrow { display: inline-flex; align-items: center; gap: 18px; }
  .watertower { height: 68px; width: auto; }
  .masthead h1 {
    margin: 0; font-family: var(--serif); font-weight: 700;
    font-size: clamp(34px, 5vw, 54px); line-height: 1; letter-spacing: .005em;
  }
  .masthead .tagline {
    margin: 8px 0 0; font-family: var(--sans); font-size: 10.5px;
    text-transform: uppercase; letter-spacing: .2em; color: var(--slate);
  }

  /* ---------- nav ---------- */
  .nav-wrap { position: sticky; top: 0; background: var(--paper); z-index: 10; }
  .nav-wrap .shell { border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); }
  nav.sections {
    display: flex; align-items: center; gap: 26px;
    font-family: var(--sans); font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  nav.sections::-webkit-scrollbar { display: none; }
  /* Centred while everything fits; once it overflows, the first item stays
     reachable at the left edge instead of being clipped by justify-content. */
  nav.sections > :first-child { margin-left: auto; }
  nav.sections > :last-child { margin-right: auto; }
  nav.sections a { padding: 11px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  nav.sections a:hover { border-bottom-color: var(--signal); }
  .subscribe {
    background: var(--signal); color: var(--btn-ink); padding: 6px 14px;
    font-family: var(--sans); font-size: 10.5px; font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase;
    border: 0; cursor: pointer; margin-left: 6px;
  }
  .subscribe:hover { filter: brightness(1.1); }
  .subscribe:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

  /* ---------- subscribe dialog ---------- */
  .sub-dialog {
    border: 1px solid var(--rule-strong);
    border-top: 6px double var(--rule-strong);
    background: var(--paper); color: var(--ink);
    /* Wide enough for the beehiiv form, which clips its input below ~500px. */
    padding: 30px 22px 24px; max-width: 560px; width: calc(100% - 40px);
  }
  .pilot-subscribe-frame { display: block; width: 100%; border: 0; }
  .sub-dialog [hidden] { display: none !important; }
  .sub-thanks { padding: 46px 16px 30px; text-align: center; outline: 0; }
  .sub-thanks .sub-copy { margin-bottom: 0; }
  .sub-dialog::backdrop { background: rgba(19, 19, 19, .5); }
  .sub-close {
    position: absolute; top: 8px; right: 10px; background: none; border: 0; cursor: pointer;
    font-family: var(--sans); font-size: 19px; line-height: 1; color: var(--slate); padding: 6px;
  }
  .sub-close:hover { color: var(--signal); }
  .sub-close:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
  .sub-kicker {
    font-family: var(--sans); font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .15em; color: var(--signal); margin: 0 0 9px;
  }
  .sub-dialog h2 { font-family: var(--serif); font-size: 26px; font-weight: 700; margin: 0 0 9px; line-height: 1.12; }
  .sub-copy { color: var(--slate); font-size: 14.5px; line-height: 1.55; margin: 0 0 16px; }
  .sub-form { display: flex; }
  .sub-form input[type="email"] {
    flex: 1; min-width: 0; font-family: var(--sans); font-size: 13.5px; padding: 10px 13px;
    border: 1px solid var(--rule-strong); border-right: 0; background: var(--paper); color: var(--ink);
  }
  .sub-form input:focus-visible { outline: 2px solid var(--signal); outline-offset: -1px; }
  .sub-form button {
    font-family: var(--sans); font-size: 10.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; background: var(--ink); color: var(--paper);
    border: 1px solid var(--ink); padding: 10px 17px; cursor: pointer;
  }
  .sub-form button:hover { background: var(--signal); border-color: var(--signal); color: var(--btn-ink); }
  .sub-donate { margin-top: 20px; padding: 14px 16px 15px; background: var(--tile); border: 1px solid var(--rule); }
  .sub-donate p { font-size: 13px; color: var(--slate); line-height: 1.5; margin: 0 0 8px; }
  .sub-donate a { font-family: var(--sans); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--links); }
  .sub-donate a:hover { color: var(--signal); }

  /* ---------- shared ---------- */
  .kicker {
    font-family: var(--sans); font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .13em; color: var(--signal); margin: 0 0 7px;
  }
  .story h2, .story h3, .story h4 { font-family: var(--serif); font-weight: 700; line-height: 1.12; margin: 0 0 7px; text-wrap: balance; }
  .story h2 a:hover, .story h3 a:hover, .story h4 a:hover { color: var(--links); }
  .dek { color: var(--slate); font-size: 15px; line-height: 1.5; margin: 0 0 8px; }
  .meta { font-family: var(--sans); font-size: 11px; color: var(--slate); }
  .meta .byline { color: var(--ink); font-weight: 600; }
  .photo { display: block; width: 100%; height: auto; }
  :root.theme-dark .photo { filter: brightness(.86); }
  .caption { font-family: var(--sans); font-size: 11px; color: var(--slate); padding: 6px 0 0; line-height: 1.45; }
  .col-a .caption, .pics .caption { font-size: 10px; padding: 4px 0 0; }
  .col-a .caption { margin-bottom: 6px; }

  /* ---------- front grid ---------- */
  .front { display: grid; grid-template-columns: 250px minmax(0, 1fr) 280px; gap: 0 28px; padding: 24px 0 30px; }
  .col-a { border-right: 1px solid var(--rule); padding-right: 28px; }
  .col-a .story { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--rule); }
  .col-a .story:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
  .col-a h3 { font-size: 19px; }
  .col-a .photo { margin-bottom: 10px; }
  .lead-pack { text-align: left; }
  .lead-pack .kicker { text-align: center; margin-top: 12px; }
  .lead-pack h2 { font-size: clamp(30px, 3.6vw, 44px); text-align: center; letter-spacing: -.005em; margin: 4px auto 10px; max-width: 22ch; }
  .lead-pack .dek { font-size: 17px; text-align: center; max-width: 58ch; margin: 0 auto 10px; }
  .lead-pack .meta { text-align: center; margin-bottom: 16px; }
  .col-c { border-left: 1px solid var(--rule); padding-left: 28px; }
  .latest-head {
    font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; margin: 0 0 4px; padding-bottom: 8px; border-bottom: 2px solid var(--rule-strong);
  }
  .latest { list-style: none; margin: 0; padding: 0; }
  .latest li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .latest li:last-child { border-bottom: 0; }
  .latest h4 { font-size: 15.5px; margin-bottom: 4px; }
  .latest .when { font-family: var(--sans); font-size: 10.5px; color: var(--slate); letter-spacing: .04em; }

  /* ---------- picture row (LAT flavor) ---------- */
  .band { border-top: 1px solid var(--rule-strong); padding: 20px 0 30px; }
  .band-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
  .band-head h2 { font-family: var(--sans); font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin: 0; }
  .band-head .more { margin-left: auto; font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--links); }
  .pics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .pics h3 { font-size: 19px; color: var(--links); margin-top: 10px; }
  .pics h3 a:hover { color: var(--signal); }

  /* ---------- infographic band ---------- */
  .graphic-box { border: 1px solid var(--rule); background: var(--tile); padding: 26px 28px 20px; }
  .graphic-box .g-kicker { font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--signal); margin: 0 0 6px; }
  .graphic-box h2 { font-family: var(--serif); font-size: 24px; margin: 0 0 4px; }
  .graphic-box .g-note { font-family: var(--sans); font-size: 12px; color: var(--slate); margin: 0 0 14px; }
  .timeline-wrap { overflow-x: auto; }
  .timeline-wrap svg { min-width: 700px; display: block; }
  .tl-line { stroke: var(--rule); stroke-width: 2; }
  .tl-dot { fill: var(--links); }
  .tl-dot-hot { fill: var(--signal); stroke: var(--paper); stroke-width: 2.5; }
  .tl-date { font-family: var(--sans); font-size: 11px; font-weight: 700; fill: var(--ink); letter-spacing: .06em; }
  .tl-label { font-family: var(--sans); font-size: 12px; fill: var(--slate); }
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--rule); }
  .stat .num { font-family: var(--serif); font-weight: 700; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
  .stat .lbl { font-family: var(--sans); font-size: 11.5px; color: var(--slate); margin-top: 6px; line-height: 1.45; }

  /* ---------- briefs columns ---------- */
  .briefs { column-count: 3; column-gap: 34px; column-rule: 1px solid var(--rule); }
  .brief { break-inside: avoid; padding-bottom: 16px; }
  .brief h3 { font-size: 16.5px; display: inline; }
  .brief .lede { display: inline; color: var(--slate); font-size: 14px; }
  .brief .kicker { margin-bottom: 4px; }
  .brief .meta { display: block; margin-top: 5px; }

  /* ---------- newsletter + footer ---------- */
  .newsletter { border-top: 1px solid var(--rule-strong); padding: 30px 0; text-align: center; }
  .newsletter h2 { font-family: var(--serif); font-size: 23px; margin: 0 0 6px; }
  .newsletter p { color: var(--slate); margin: 0 auto 16px; max-width: 48ch; font-size: 14.5px; }
  .newsletter form { display: flex; justify-content: center; max-width: 400px; margin: 0 auto; }
  .newsletter input[type="email"] { flex: 1; font-family: var(--sans); font-size: 13.5px; padding: 10px 13px; border: 1px solid var(--rule-strong); border-right: 0; background: var(--paper); color: var(--ink); }
  .newsletter input:focus-visible { outline: 2px solid var(--signal); outline-offset: -1px; }
  .newsletter button { font-family: var(--sans); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); padding: 10px 18px; cursor: pointer; }
  .newsletter button:hover { background: var(--signal); border-color: var(--signal); color: var(--btn-ink); }
  footer.site { border-top: 2px solid var(--rule-strong); padding: 26px 0 40px; font-family: var(--sans); font-size: 12px; color: var(--slate); }
  footer.site .cols { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
  footer.site .wordmark-small { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--ink); margin-bottom: 8px; }
  footer.site .about { max-width: 44ch; line-height: 1.55; }
  footer.site ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
  footer.site a:hover { color: var(--signal); }
  footer.site .legal { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 11px; letter-spacing: .03em; }

  /* ---------- responsive ---------- */
  @media (max-width: 1000px) {
    .front { grid-template-columns: minmax(0, 1fr) 260px; }
    .col-a { display: none; }
    .briefs { column-count: 2; }
  }
  @media (max-width: 760px) {
    nav.sections { gap: 18px; padding: 0 4px; }
    .front { grid-template-columns: 1fr; }
    .col-c { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 18px; margin-top: 20px; }
    .pics { grid-template-columns: 1fr; }
    .briefs { column-count: 1; }
    .stats { grid-template-columns: 1fr; }
    .utility .vol { display: none; }
  }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

  /* expanded broadsheet additions */
  .three-up { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 32px; }
  .three-up .story { padding-right: 32px; border-right: 1px solid var(--rule); }
  .three-up .story:last-child { border-right: 0; padding-right: 0; }
  .three-up h3 { font-size: 18px; }
  .three-up .story .photo { margin-bottom: 10px; }
  @media (max-width: 760px) {
    .three-up { grid-template-columns: 1fr; gap: 22px; }
    .three-up .story { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--rule); padding-bottom: 20px; }
    .three-up .story:last-child { border-bottom: 0; padding-bottom: 0; }
  }
  .fight-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 0 36px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--rule); }
  .fight-lead { border-right: 1px solid var(--rule); padding-right: 36px; }
  .fight-lead .photo { margin-bottom: 12px; }
  .fight-more .latest-head { margin-bottom: 4px; }
  @media (max-width: 760px) { .fight-grid { grid-template-columns: 1fr; } .fight-lead { border-right: 0; padding-right: 0; } }

  /* tip CTA module */
  .tipbox { margin-top: 24px; border: 1px solid var(--rule-strong); background: var(--tile); padding: 18px 18px 20px; }
  .tipbox .tb-label { font-family: var(--sans); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--signal); margin: 0 0 8px; }
  .tipbox h3 { font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.15; margin: 0 0 7px; }
  .tipbox p { font-family: var(--sans); font-size: 12.5px; color: var(--slate); line-height: 1.5; margin: 0 0 13px; }
  .tipbox .tb-link { display: inline-block; font-family: var(--sans); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: var(--ink); color: var(--paper); padding: 9px 14px; }
  .tipbox .tb-link:hover { background: var(--signal); color: var(--btn-ink); }
  .tipbox .tb-link:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
  .col-a .tipbox { margin-top: 20px; }

  /* on small screens the left column is dropped, but keep the tip box:
     stack the front, order the lead first, and re-show col-a (tip only) last */
  @media (max-width: 1000px) {
    .front { display: flex; flex-direction: column; }
    .front .lead-pack { order: 1; }
    .front .col-c { order: 2; }
    .front .col-a { display: block; order: 3; border-right: 0; padding-right: 0;
      border-top: 1px solid var(--rule); padding-top: 20px; margin-top: 22px; }
    .front .col-a .story { display: none; }
    .front .col-a .tipbox { margin-top: 0; }
  }

/* Article, archive, search, pagination, accessibility. */

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto;
  clip-path: none; background: var(--ink); color: var(--paper);
  padding: 10px 16px; font-family: var(--sans); font-size: 13px;
}

/* ---------- article ---------- */
.article { max-width: 720px; margin: 0 auto; padding: 34px 0 10px; }
.article-head { border-bottom: 1px solid var(--rule); padding-bottom: 18px; margin-bottom: 22px; }
.article-head .kicker { margin: 0 0 10px; }
.article-head .kicker a { color: var(--signal); }
.article-head h1 {
  font-family: var(--serif); font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.12; margin: 0 0 14px; font-weight: 700; letter-spacing: -0.01em;
}
.article-head .dek {
  font-size: 19px; line-height: 1.5; color: var(--slate); margin: 0 0 16px;
}
.article-head .meta {
  font-family: var(--sans); font-size: 12px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--slate); display: flex; gap: 14px; margin: 0;
}
.article-head .byline { color: var(--ink); font-weight: 700; }

.article-photo { margin: 0 0 26px; }
.article-photo img { width: 100%; height: auto; display: block; }
.article-photo .caption { margin-top: 8px; }

.article-body { font-size: 18px; line-height: 1.62; }
.article-body p { margin: 0 0 1.15em; }
.article-body h2 { font-size: 26px; line-height: 1.2; margin: 1.7em 0 .5em; }
.article-body h3 { font-size: 21px; line-height: 1.25; margin: 1.5em 0 .45em; }
.article-body a { color: var(--links); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--signal); }
.article-body img { height: auto; }
.article-body figure { margin: 1.8em 0; }
.article-body figcaption {
  font-family: var(--sans); font-size: 12.5px; color: var(--slate);
  line-height: 1.4; margin-top: 7px;
}
.article-body blockquote {
  margin: 1.6em 0; padding-left: 20px; border-left: 3px solid var(--signal);
  font-size: 20px; line-height: 1.45;
}
.article-body ul, .article-body ol { margin: 0 0 1.15em 1.3em; }
.article-body li { margin-bottom: .4em; }
.article-body .wp-block-embed, .article-body iframe { max-width: 100%; }

.article-tags {
  margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 8px;
}
.article-tags a {
  font-family: var(--sans); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .09em; color: var(--slate);
  border: 1px solid var(--rule); padding: 4px 10px;
}
.article-tags a:hover { color: var(--signal); border-color: var(--signal); }

/* ---------- archives, search, 404 ---------- */
.archive-grid { margin-bottom: 30px; }
.archive-desc {
  font-size: 16px; color: var(--slate); max-width: 62ch; margin: 0 0 22px;
}
.pagination {
  display: flex; gap: 10px; justify-content: center; align-items: center;
  padding: 26px 0 40px; font-family: var(--sans); font-size: 13px;
  border-top: 1px solid var(--rule);
}
.pagination .page-numbers {
  padding: 7px 12px; border: 1px solid var(--rule); color: var(--slate);
}
.pagination .page-numbers:hover { color: var(--ink); border-color: var(--ink); }
.pagination .page-numbers.current {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.empty {
  max-width: 62ch; margin: 30px auto 40px; font-size: 18px; color: var(--slate);
}
.empty a { color: var(--links); text-decoration: underline; }

.search-form { display: flex; gap: 8px; max-width: 420px; margin: 0 auto 40px; }
.search-form input[type="search"] {
  flex: 1; padding: 10px 12px; border: 1px solid var(--rule);
  background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px;
}
.search-form button {
  padding: 10px 16px; border: 0; background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-size: 13px; cursor: pointer;
}

/* nav current item */
.sections a.is-current { color: var(--signal); }


/* A blocked embed: visible and actionable, not an empty gap. */
.embed-blocked {
  border: 1px solid var(--rule); background: var(--tile);
  padding: 20px; margin: 1.8em 0; text-align: center;
}
.embed-blocked p {
  font-family: var(--sans); font-size: 13.5px; color: var(--slate);
  margin: 0 0 10px; line-height: 1.5;
}
.embed-blocked a {
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  color: var(--paper); background: var(--ink);
  display: inline-block; padding: 8px 16px; text-decoration: none;
}
.embed-blocked a:hover { background: var(--signal); }

/* Tips page. Copy is editable in the page itself; this is only the panel. */
.tip-panel {
  border: 1px solid var(--rule-strong); background: var(--tile);
  padding: 26px 28px; margin: 1.8em 0; text-align: center;
}
.tip-panel .tip-label {
  font-family: var(--sans); font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--signal);
  margin: 0 0 10px;
}
.tip-panel .tip-address { margin: 0 0 8px; }
.tip-panel .tip-address a {
  font-family: var(--serif); font-size: clamp(20px, 3.4vw, 28px); font-weight: 700;
  color: var(--ink); text-decoration: none; word-break: break-word;
}
.tip-panel .tip-address a:hover { color: var(--signal); text-decoration: underline; }
.tip-panel .tip-note {
  font-family: var(--sans); font-size: 12px; color: var(--slate); margin: 0;
}
.page-tips .article-body h2 { font-size: 22px; margin-top: 1.8em; }

/* ---------- precinct finder ---------- */
.precinct-finder { margin: 1.8em 0; }
.pf-form label {
  display: block; font-family: var(--sans); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--slate); margin-bottom: 6px;
}
.pf-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-row input {
  flex: 1 1 16em; padding: 11px 12px; border: 1px solid var(--rule-strong);
  background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px;
}
.pf-row button {
  padding: 11px 20px; border: 0; background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-size: 13px; font-weight: 700; cursor: pointer;
  text-transform: uppercase; letter-spacing: .08em;
}
.pf-row button:hover { background: var(--signal); }
.pf-hint { font-family: var(--sans); font-size: 12.5px; color: var(--slate); margin: 8px 0 0; }

.pf-result {
  font-family: var(--sans); font-size: 15px; margin: 14px 0 0; min-height: 1.2em;
}
.pf-result.is-found { font-weight: 700; color: var(--ink); }
.pf-result.is-error { color: var(--signal); }

.precinct-map {
  display: block; width: 100%; height: auto; margin: 16px 0 10px;
  background: var(--tile); border: 1px solid var(--rule);
}
.precinct-map .precinct {
  fill: var(--tile); stroke: var(--paper); stroke-width: 2.5;
  cursor: pointer; transition: fill .12s ease;
}
.precinct-map .precinct:hover { fill: var(--harbor); }
.precinct-map .precinct:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.precinct-map .precinct.is-selected { fill: var(--signal); }

/* Six greys, so the map reads without colour and prints legibly. */
.precinct-map .precinct[data-precinct="1"] { fill: #d9d6cd; }
.precinct-map .precinct[data-precinct="2"] { fill: #c6c2b7; }
.precinct-map .precinct[data-precinct="3"] { fill: #b3aea1; }
.precinct-map .precinct[data-precinct="4"] { fill: #a09a8b; }
.precinct-map .precinct[data-precinct="5"] { fill: #8d8675; }
.precinct-map .precinct[data-precinct="6"] { fill: #7a725f; }
.precinct-map .precinct.is-selected { fill: var(--signal); }

.pf-key {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin: 0 0 18px; padding: 0; font-family: var(--sans); font-size: 12.5px; color: var(--slate);
}
.pf-key li { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.pf-key li.is-selected { color: var(--ink); font-weight: 700; }
.pf-swatch { width: 13px; height: 13px; display: inline-block; border: 1px solid var(--rule); }
.pf-p1 { background: #d9d6cd; } .pf-p2 { background: #c6c2b7; } .pf-p3 { background: #b3aea1; }
.pf-p4 { background: #a09a8b; } .pf-p5 { background: #8d8675; } .pf-p6 { background: #7a725f; }

.pf-place {
  border: 1px solid var(--rule-strong); background: var(--tile);
  padding: 22px 24px; margin-top: 4px;
}
.pf-place-label {
  font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--signal); margin: 0 0 8px;
}
.pf-place-name { font-family: var(--serif); font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.pf-place-address { font-family: var(--sans); font-size: 15px; color: var(--ink); margin: 0; }
.pf-place-note { font-family: var(--sans); font-size: 13px; color: var(--slate); margin: 8px 0 0; }

/* ---------- key dates ---------- */
.election-dates { list-style: none; margin: 1.5em 0; padding: 0; }
.election-dates li {
  display: grid; grid-template-columns: minmax(0, 13em) 1fr;
  gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--rule);
}
.election-dates li:first-child { border-top: 2px solid var(--rule-strong); }
.ed-date {
  font-family: var(--sans); font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--signal); align-self: baseline;
}
.ed-label { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.ed-note {
  grid-column: 2; font-family: var(--sans); font-size: 13px; color: var(--slate);
}
@media (max-width: 620px) {
  .election-dates li { grid-template-columns: 1fr; }
  .ed-note { grid-column: 1; }
}
.pf-source {
  font-family: var(--sans); font-size: 11.5px; color: var(--slate);
  margin: 0 0 14px; line-height: 1.5;
}
.pf-source a { color: var(--links); text-decoration: underline; text-underline-offset: 2px; }
.pf-source a:hover { color: var(--signal); }

/* ---------- site notices ---------- */
.site-notice { background: var(--harbor); color: var(--paper); }
.site-notice p {
  margin: 0; padding: 11px 0; font-family: var(--sans); font-size: 14px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
}
.site-notice .sn-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  background: var(--signal); color: #fff; padding: 3px 8px;
}
.site-notice .sn-when, .site-notice .sn-where { opacity: .85; font-size: 13px; }

/* ---------- town calendar ---------- */
.town-calendar { list-style: none; margin: 1.5em 0; padding: 0; }
.town-calendar li {
  display: grid; grid-template-columns: minmax(0, 15em) 1fr;
  gap: 2px 20px; padding: 13px 0; border-bottom: 1px solid var(--rule);
}
.town-calendar li:first-child { border-top: 2px solid var(--rule-strong); }
.tc-when {
  font-family: var(--sans); font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--signal); grid-row: span 3; align-self: baseline;
}
.tc-title { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.tc-where { font-family: var(--sans); font-size: 13px; color: var(--slate); }
.tc-link { font-family: var(--sans); font-size: 12px; }
.tc-link a { color: var(--links); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 620px) {
  .town-calendar li { grid-template-columns: 1fr; }
  .tc-when { grid-row: auto; }
}

/* Credit line on a republished story. */
.source-credit {
  font-family: var(--sans); font-size: 12.5px; color: var(--slate); margin: 10px 0 0;
}
.source-credit a { color: var(--links); text-decoration: underline; text-underline-offset: 2px; }
.source-credit a:hover { color: var(--signal); }

/* Photo credit: quieter than the caption, on its own line when both exist. */
.credit {
  display: block; font-family: var(--sans); font-size: 10.5px; color: var(--slate);
  letter-spacing: .04em; text-transform: uppercase; margin-top: 3px;
}
.caption:empty { display: none; }
.article-body figcaption.credit-only { margin-top: 7px; }
