/* Resident Participation Services, PLLC */
:root {
  --navy: #1F3864;
  --navy-deep: #16294a;
  --ink: #1B2230;
  --grey: #595959;
  --panel: #EEF2F8;
  --rule: #BFC9DA;
  --gold: #E8B11C;
  --paper: #FFFFFF;
  --serif: "Source Serif 4", "Times New Roman", Georgia, serif;
  --sans: "Public Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-head { background: var(--navy); color: #fff; }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; padding-top: 1.1rem; padding-bottom: 0; }
.wordmark { color: #fff; text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.35rem; line-height: 1.2; padding-bottom: 1rem; }
.wordmark small { display: block; font-family: var(--sans); font-weight: 400; font-size: 0.8rem; color: #c9d3e6; letter-spacing: 0.01em; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.site-nav a { display: block; color: #fff; text-decoration: none; font-size: 0.98rem; padding: 0.35rem 0 0.9rem; border-bottom: 4px solid transparent; }
.site-nav a:hover { border-bottom-color: #8fa3c7; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }

/* Main */
main { padding: 2.5rem 0 4rem; }
.crumbs { font-size: 0.9rem; color: var(--grey); margin: 0 0 0.75rem; }
.crumbs a { color: var(--grey); }

h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); margin: 0 0 1rem; max-width: 22ch; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 1.95rem); margin: 3rem 0 0.75rem; }
h3 { font-size: 1.25rem; margin: 1.75rem 0 0.4rem; }
p, li { max-width: var(--measure); }
.lede { font-size: 1.25rem; color: #2b3445; max-width: 60ch; }
.note { color: var(--grey); font-size: 0.98rem; }

.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.35rem; }
.prose ol ol { list-style: lower-alpha; margin-top: 0.4rem; }

/* Two column layout for long pages */
.with-toc { display: grid; gap: 2.5rem; }
@media (min-width: 64rem) {
  .with-toc { grid-template-columns: 15rem minmax(0, 1fr); }
  .toc { position: sticky; top: 1.25rem; align-self: start; max-height: calc(100vh - 2.5rem); overflow: auto; }
}
.toc { font-size: 0.95rem; border-left: 3px solid var(--rule); padding-left: 1rem; }
.toc h2 { font-family: var(--sans); font-size: 0.95rem; color: var(--grey); font-weight: 600; margin: 0 0 0.5rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0 0 0.35rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Home */
.hero { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 60rem) { .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.now { background: var(--panel); border-top: 6px solid var(--navy); padding: 1.5rem 1.5rem 1.25rem; }
.now h2 { margin: 0 0 0.25rem; font-size: 1.4rem; }
.now p { margin: 0 0 1rem; }
.now .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }

.services { display: grid; gap: 0 2.5rem; padding: 0; list-style: none; }
@media (min-width: 48rem) { .services { grid-template-columns: 1fr 1fr; } }
.services li { border-top: 1px solid var(--rule); padding: 1rem 0 1.1rem; max-width: none; }
.services strong { display: block; font-family: var(--serif); color: var(--navy); font-size: 1.2rem; font-weight: 600; margin-bottom: 0.2rem; }

.split { display: grid; gap: 1rem 2.5rem; }
@media (min-width: 48rem) { .split { grid-template-columns: 1fr 1fr; } }
.split section h2 { margin-top: 2rem; }

/* Buttons */
.btn { display: inline-block; background: var(--navy); color: #fff; text-decoration: none; padding: 0.7rem 1.15rem; font-weight: 600; font-size: 1rem; border: 2px solid var(--navy); border-radius: 3px; }
.btn:hover { background: var(--navy-deep); }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.ghost:hover { background: #fff; }

/* Timeline: the signature element */
.timeline { list-style: none; margin: 1.25rem 0 0; padding: 0; position: relative; max-width: 46rem; }
.timeline::before { content: ""; position: absolute; left: 0.5rem; top: 0.6rem; bottom: 0.6rem; width: 2px; background: var(--rule); }
.timeline li { position: relative; padding: 0 0 1.15rem 2.25rem; max-width: none; }
.timeline li::before { content: ""; position: absolute; left: 0.1rem; top: 0.42rem; width: 0.9rem; height: 0.9rem; border-radius: 50%; background: #fff; border: 2px solid var(--navy); }
.timeline .when { display: block; font-weight: 700; color: var(--navy); }
.timeline .what { display: block; }
.timeline .where { display: block; color: var(--grey); font-size: 0.98rem; }
.timeline li.past { color: #7a8394; }
.timeline li.past .when { color: #7a8394; font-weight: 600; }
.timeline li.past::before { background: var(--rule); border-color: var(--rule); }
.timeline li.next { background: #FFF7DE; margin-left: -0.75rem; padding-left: 3rem; padding-top: 0.75rem; padding-bottom: 0.9rem; margin-bottom: 1rem; border-left: 6px solid var(--gold); }
.timeline li.next::before { left: 0.85rem; top: 1.15rem; background: var(--gold); border-color: var(--navy); }
.timeline .flag { display: inline-block; margin-left: 0.5rem; font-size: 0.85rem; font-weight: 700; color: var(--navy-deep); background: var(--gold); padding: 0.05rem 0.5rem; border-radius: 2px; vertical-align: 0.1em; }
.timeline.compact li { padding-bottom: 0.8rem; }
.timeline.compact li.next { margin-bottom: 0.6rem; }
.timeline.compact li.hide { display: none; }

/* Participation steps */
.paths { display: grid; gap: 1.25rem 2rem; margin-top: 1rem; }
@media (min-width: 52rem) { .paths { grid-template-columns: repeat(3, 1fr); } }
.paths > div { border-left: 4px solid var(--navy); padding: 0.2rem 0 0.2rem 1rem; }
.paths h3 { margin-top: 0; }
.paths p { margin: 0 0 0.6rem; }

/* Tables */
.table-scroll { overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--rule); }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--rule); }
thead th { background: var(--panel); color: var(--navy); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.nowrap, th.nowrap { white-space: nowrap; }
caption { text-align: left; padding: 0.6rem 0.8rem; font-weight: 600; color: var(--navy); background: #fff; }

/* Property finder */
.finder { background: var(--panel); padding: 1rem 1.1rem; margin: 1rem 0 0; }
.finder label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 0.35rem; }
.finder input { width: 100%; max-width: 28rem; font: inherit; padding: 0.55rem 0.7rem; border: 2px solid var(--rule); border-radius: 3px; background: #fff; }
.finder input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px var(--gold); }
.finder output { display: block; font-size: 0.95rem; color: var(--grey); margin-top: 0.4rem; min-height: 1.4em; }
.day-29 { font-weight: 600; }
.day-30 { font-weight: 600; }

/* Collapsible */
details { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 1rem 0; }
details + details { border-top: 0; margin-top: -1rem; }
summary { cursor: pointer; padding: 0.85rem 0; font-weight: 700; color: var(--navy); }
details[open] summary { margin-bottom: 0.5rem; }

/* Downloads */
.docs { list-style: none; padding: 0; margin: 1rem 0; }
.docs li { border-top: 1px solid var(--rule); padding: 1.1rem 0; display: grid; gap: 0.35rem 2rem; max-width: none; }
@media (min-width: 48rem) { .docs li { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.docs li:last-child { border-bottom: 1px solid var(--rule); }
.docs h3 { margin: 0; font-size: 1.2rem; }
.docs p { margin: 0.2rem 0 0; color: #3a4354; }
.docs .links { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Regulations */
.regs { list-style: none; padding: 0; margin: 1.5rem 0; }
.regs li { display: grid; gap: 0.2rem 2rem; border-top: 1px solid var(--rule); padding: 1.1rem 0; max-width: none; }
@media (min-width: 48rem) { .regs li { grid-template-columns: 12rem minmax(0, 1fr); } }
.regs .cite { font-weight: 700; color: var(--navy); }
.regs h3 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.regs p { margin: 0; }

/* Contact */
.contact { display: grid; gap: 0; margin: 1.5rem 0; max-width: 40rem; }
.contact div { display: grid; gap: 0.1rem 1.5rem; border-top: 1px solid var(--rule); padding: 0.9rem 0; }
@media (min-width: 36rem) { .contact div { grid-template-columns: 11rem 1fr; } }
.contact dt { font-weight: 700; color: var(--navy); }
.contact dd { margin: 0; }

/* Footer */
.site-foot { background: var(--panel); border-top: 1px solid var(--rule); font-size: 0.95rem; color: #3a4354; }
.site-foot .wrap { display: grid; gap: 1rem 2rem; padding-top: 2rem; padding-bottom: 2rem; }
@media (min-width: 48rem) { .site-foot .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-foot p { margin: 0 0 0.3rem; }
.site-foot strong { color: var(--navy); }

@media print {
  .site-head, .site-nav, .toc, .finder, .site-foot .wrap > div:not(:first-child) { display: none; }
  .timeline li.next { background: none; }
  details { border: 0; }
  a { color: inherit; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
html { scroll-behavior: smooth; }
.prose > h2:first-child { margin-top: 0; }
.toc { margin-top: 0.4rem; }
.toc details { border: 0; margin: 0; }
.toc summary { padding: 0.2rem 0 0.5rem; color: var(--grey); font-size: 0.95rem; }

/* Logo lockup in the site header */
.wordmark { display: flex; align-items: center; gap: 0.75rem; }
.wordmark-mark { flex: none; width: auto; height: 3.2rem; display: block; }
.wordmark-text { display: block; }
@media (max-width: 40em) {
  .wordmark-mark { height: 2.6rem; }
}

/* Manual title block on the DCHA page */
.doc-head { background: var(--panel); border-top: 6px solid var(--navy); padding: 1.4rem 1.5rem 1.3rem; margin: 3rem 0 0; }
.doc-head h2 { margin: 0.2rem 0 0.6rem; }
.doc-kicker { margin: 0; font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--grey); }
.doc-meta { margin: 0; font-size: 0.95rem; color: #3a4354; max-width: none; }

/* Resident routing links on the home page */
.authority-links { line-height: 2; font-weight: 600; }

/* Election notice banner */
.notice { background: #FFF7DE; border-left: 6px solid var(--gold); padding: 1rem 1.25rem 1.1rem; margin: 1.25rem 0 1.75rem; }
.notice p { margin: 0; max-width: none; }
.notice-label { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--navy-deep); margin-bottom: 0.35rem; }
.notice-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--navy); margin-top: 0.4rem; }

/* Team bios on the About page */
.team { list-style: none; padding: 0; margin: 1rem 0 0; }
.team li { border-top: 1px solid var(--rule); padding: 1.3rem 0; display: grid; gap: 0.4rem 2.5rem; max-width: none; }
@media (min-width: 52rem) { .team li { grid-template-columns: 16rem minmax(0, 1fr); } }
.team li:last-child { border-bottom: 1px solid var(--rule); }
.team h3 { margin: 0; font-size: 1.25rem; }
.team .role { margin: 0.1rem 0 0; font-size: 0.95rem; color: var(--grey); }
.team p { margin: 0 0 0.7rem; }
.team div > p:last-child { margin-bottom: 0; }

/* Named staff list on the contact page */
.staff { list-style: none; padding: 0; margin: 0; }
.staff li { margin-bottom: 0.8rem; }
.staff li:last-child { margin-bottom: 0.4rem; }
.staff .name { display: block; font-weight: 600; }
.staff .role { display: block; font-size: 0.92rem; color: var(--grey); }
