/*
Theme Name: PCWDinfo
Description: Public meeting records archive for PCWDinfo.com. Each post is one board meeting; categories are the topic filters.
Version: 1.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: pcwdinfo
*/
:root {
  --bg: #EDF2F1; --surface: #FFFFFF; --ink: #1C2530; --muted: #55626E;
  --canal: #1F4E5F; --canal-soft: #D6E4E6; --gate: #E2B23A; --gate-soft: #FBF1D6; --line: #CBD6D6;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121A20; --surface: #1A242C; --ink: #E6ECEE; --muted: #9AA8B2;
    --canal: #7FB6C6; --canal-soft: #23394A; --gate: #E8C15C; --gate-soft: #3A3220; --line: #2C3A44;
  }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.55; }
a { color: var(--canal); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gate); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

.notice { background: var(--gate-soft); border-bottom: 3px solid var(--gate); padding: .75rem 1.25rem; font-size: .9rem; }
.notice p { max-width: 68rem; margin: 0 auto; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

header.site { padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--line); }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--canal); margin: 0 0 1.25rem; }
.wordmark a { text-decoration: none; }
header.site h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 4.5vw, 2.9rem); line-height: 1.15; margin: 0; max-width: 22ch; }
header.site .lede { color: var(--muted); max-width: 60ch; margin: 1rem 0 0; font-size: 1.05rem; }
header.site .opinion-link { margin: 1.25rem 0 0; padding: .6rem .9rem; display: inline-block; border-left: 4px solid var(--gate); background: var(--surface); font-size: .95rem; }
.site-nav ul { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .95rem; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 3rem; padding: 2rem 0 4rem; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; gap: 2rem; } }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.filters a { font-size: .9rem; padding: .4rem .85rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; text-decoration: none; display: inline-block; }
.filters a[aria-current="true"] { background: var(--canal); border-color: var(--canal); color: var(--surface); }

.year { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; margin: 2rem 0 1rem; }
.year:first-of-type { margin-top: 0; }
.year[hidden] { display: none; }

.meeting { display: grid; grid-template-columns: 5.5rem minmax(0,1fr); gap: 1.25rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.meeting[hidden] { display: none; }
.date .m { display: block; font-weight: 600; color: var(--canal); }
.date .d { display: block; font-family: var(--serif); font-size: 2.2rem; line-height: 1; font-weight: 600; }
.meeting h3, .meeting h1.meeting-title { margin: 0; font-size: 1.15rem; }
.meeting h3 a { color: var(--ink); text-decoration: none; }
.meeting h3 a:hover { color: var(--canal); text-decoration: underline; }
.meeting .kind { color: var(--muted); font-size: .9rem; margin: .15rem 0 .75rem; }
.meeting .summary { margin: 0 0 1rem; max-width: 62ch; }
.docs { list-style: none; margin: 0 0 .9rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.docs a, .docs span.pending { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .45rem .75rem; font-size: .92rem; color: var(--ink); }
.docs a:hover { border-color: var(--canal); }
.docs .type { font-size: .75rem; font-weight: 700; color: var(--canal); }
.docs .pending { color: var(--muted); font-style: italic; border-style: dashed; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.tags li { font-size: .8rem; background: var(--canal-soft); color: var(--ink); padding: .15rem .55rem; border-radius: 4px; }
.tags a { color: inherit; text-decoration: none; }

.entry-content { max-width: 62ch; margin-top: 1.25rem; }
.page-content h1 { font-family: var(--serif); font-weight: 500; font-size: 2rem; margin: 0 0 1rem; }
.back { display: inline-block; margin-bottom: 1rem; font-size: .95rem; }

aside section { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem; margin-bottom: 1.25rem; }
aside h2 { font-family: var(--serif); font-size: 1.15rem; margin: 0 0 .5rem; }
aside p { margin: 0 0 .75rem; font-size: .93rem; }
aside p:last-child { margin-bottom: 0; }
aside .commentary { border-left: 4px solid var(--gate); }
aside .refs { list-style: none; margin: 0; padding: 0; }
aside .refs li { margin: 0 0 .75rem; font-size: .93rem; }
aside .refs li:last-child { margin-bottom: 0; }
aside .refs a { font-weight: 600; }
aside .refs span { color: var(--muted, #555); }

footer.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: .88rem; }
footer.site-footer p { max-width: 70ch; margin: 0 0 .5rem; }
.empty { color: var(--muted); padding: 1.5rem 0; border-top: 1px solid var(--line); }
.pagination { margin-top: 2rem; }
.screen-reader-text { position: absolute; left: -9999px; }

/* Records tables (Election history and similar pages) */
.page-content .entry-content { max-width: none; }
.page-content .entry-content > p, .page-content .entry-content > h2 { max-width: 68ch; }
.page-content h2 { font-family: var(--serif); font-size: 1.35rem; margin: 2rem 0 .75rem; }
table.records { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
table.records th { text-align: left; font-weight: 600; background: var(--canal-soft); padding: .55rem .75rem; }
table.records td { padding: .6rem .75rem; border-top: 1px solid var(--line); vertical-align: top; }
table.records td:first-child { font-weight: 600; white-space: nowrap; }
.page-content .note { color: var(--muted); font-size: .88rem; margin-top: 1.25rem; }
@media (max-width: 640px) {
  table.records thead { display: none; }
  table.records, table.records tbody, table.records tr, table.records td { display: block; width: 100%; }
  table.records tr { border-top: 1px solid var(--line); padding: .5rem 0; }
  table.records td { border: 0; padding: .2rem .75rem; }
}
@media (min-width: 760px) {
  .records.bills th:nth-child(1) { width: 9.5rem; }
  .records.bills th:nth-child(2) { width: 7.5rem; }
  .records.bills th:nth-child(3) { width: 36%; }
}
