/* Month8 — site styles */

:root {
  --navy: #14233C;
  --navy-2: #1E3254;
  --gold: #B8862B;
  --gold-soft: #F4ECDD;
  --gold-light: #CFA54A;
  --on-navy: #D7DCE4;
  --card-ops: #F5F6F9;
  --slate: #4A5566;
  --ink: #1B2433;
  --bg: #FFFFFF;
  --bg-alt: #F7F6F2;
  --rule: #E3E1DA;
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 72rem;
  --measure: 40rem;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--navy);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.85rem); margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.8em; }
h2:first-child, h3:first-child { margin-top: 0; }

p, ul, ol, table, dl { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }
strong { color: var(--navy); font-weight: 600; }

a { color: var(--navy); text-decoration-color: var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--navy-2); text-decoration-thickness: 2.5px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--navy); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.measure { max-width: var(--measure); }
.lede { font-size: 1.2rem; color: var(--slate); max-width: var(--measure); }
.muted { color: var(--slate); }
.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--slate); margin: 0 0 0.8rem;
}

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem;
}
.wordmark {
  font-family: var(--serif); font-weight: 700; font-size: 1.65rem; line-height: 1;
  color: var(--navy); text-decoration: none; letter-spacing: -0.01em;
}
.wordmark span { color: var(--gold); }
.wordmark:hover { color: var(--navy); }

.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav a {
  text-decoration: none; color: var(--slate); font-weight: 500; font-size: 0.98rem;
  padding: 0.3rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--navy); border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--gold); }

@media (min-width: 60rem) {
  .header-inner { flex-wrap: nowrap; }
  .site-nav { margin-left: auto; }
}
@media (max-width: 59.99rem) {
  .site-nav { order: 3; width: 100%; }
}
@media (max-width: 30rem) {
  .site-nav ul { gap: 0.25rem 0.5rem; justify-content: space-between; }
  .site-nav a { font-size: 0.92rem; }
  .wordmark { font-size: 1.45rem; }
}

/* Buttons */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1rem;
  line-height: 1.2; text-decoration: none; text-align: center;
  padding: 0.85rem 1.4rem; border-radius: var(--radius); border: 1.5px solid var(--navy);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.btn-secondary { background: transparent; color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: #fff; }
.btn-small { font-size: 0.88rem; padding: 0.5rem 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

/* Sections */
main { display: block; }
.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-alt); }
.hero { padding: 4.5rem 0 3.5rem; }
.hero h1 { max-width: 22ch; }
.page-head { padding: 3.5rem 0 1rem; }
.rule { width: 4rem; height: 2px; background: var(--gold); border: 0; margin: 0 0 1.5rem; }

/* Cards */
.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); list-style: none; padding: 0; margin: 1.5rem 0 0; }
.cards > li { margin: 0; }
.card {
  display: block; height: 100%; background: var(--bg); border: 1px solid var(--rule);
  border-top: 3px solid var(--gold); border-radius: var(--radius); padding: 1.4rem 1.4rem 1.2rem;
  text-decoration: none; color: var(--ink);
}
a.card:hover { border-color: var(--slate); border-top-color: var(--gold); color: var(--ink); }
.card h3 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.card h2 { font-size: 1.3rem; margin: 0 0 0.6rem; }
.card p { margin: 0; color: var(--slate); font-size: 0.98rem; }
.card .num { font-family: var(--serif); color: var(--gold); font-weight: 700; display: block; margin-bottom: 0.4rem; }

.strip {
  list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem 2rem;
  font-family: var(--serif); font-size: 1.15rem; color: var(--navy);
}
.strip li { margin: 0; padding-left: 1rem; border-left: 2px solid var(--gold); }

.note {
  background: var(--navy); color: #fff; border-radius: var(--radius);
  padding: 2rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
}
.note p { margin: 0; font-size: 1.15rem; font-family: var(--serif); max-width: 36rem; }
.note .btn { background: #fff; color: var(--navy); border-color: #fff; }
.note .btn:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--navy); }

.callout { border-left: 3px solid var(--gold); background: var(--bg-alt); padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: 0 var(--radius) var(--radius) 0; }
.callout p:last-child { margin-bottom: 0; }

/* Services */
.service { padding: 2rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.service:first-of-type { border-top: 0; }
.service h2, .service h3 { margin-top: 0; }
.service h3 { font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem); }
.service-how { border-top: 1px solid var(--rule); margin-top: 2rem; }
.practice-label {
  font-family: var(--sans); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); margin: 3rem 0 0; padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--gold); scroll-margin-top: 1rem;
}
.practice-label:first-child { margin-top: 1.5rem; }
.practice-label + .service { border-top: 0; }
.jump { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1.5rem; font-weight: 500; }
.service .summary { font-size: 1.1rem; color: var(--slate); }
.service .more { font-size: 0.95rem; }

/* Home: dark header and hero */
.site-header--dark { background: var(--navy); border-bottom: 0; }
.site-header--dark .wordmark, .site-header--dark .wordmark:hover { color: #fff; }
.site-header--dark .wordmark span { color: var(--gold-light); }
.site-header--dark .site-nav a { color: var(--on-navy); }
.site-header--dark .site-nav a:hover { color: #fff; border-bottom-color: rgba(255,255,255,0.3); }
.site-header--dark .btn-secondary { color: #fff; border-color: var(--gold-light); }
.site-header--dark .btn-secondary:hover { background: var(--gold-light); color: var(--navy); }

.hero-dark { background: var(--navy); color: var(--on-navy); padding: 3.5rem 0 4.5rem; }
.hero-dark h1 { color: #fff; font-weight: 400; font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.6rem); line-height: 1.15; max-width: 20ch; }
.hero-dark .eyebrow { color: var(--gold-light); letter-spacing: 0.22em; margin-bottom: 1.2rem; }
.tagline { font-family: "Libre Baskerville", Georgia, serif; font-style: italic; font-size: clamp(1.3rem, 1rem + 1.4vw, 1.7rem); line-height: 1.3; color: var(--gold); margin: -0.25rem 0 1.1rem; }
.hero-dark .tagline { color: var(--gold-light); }
.hero-dark .lede { color: var(--on-navy); font-size: 1.15rem; max-width: 36rem; }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 56rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 21rem; gap: 4rem; }
  .hero-dark { padding: 5rem 0 6rem; }
}

.btn-gold { background: var(--gold-light); border-color: var(--gold-light); color: var(--navy); }
.btn-gold:hover { background: #DDB862; border-color: #DDB862; color: var(--navy); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.85); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--navy); }

.portrait { margin: 0 auto; width: 100%; max-width: 16rem; text-align: center; }
@media (min-width: 56rem) { .portrait { max-width: none; } }
.portrait-frame { position: relative; margin: 0 1.25rem 1.6rem 0; }
.portrait-frame::after {
  content: ""; position: absolute; inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  border: 2px solid var(--gold-light); border-radius: 12px; z-index: 0;
}
.portrait-frame img {
  position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  object-position: 50% 15%; border-radius: 12px;
}
.portrait figcaption { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; line-height: 1.45; padding-right: 1.25rem; }
.portrait figcaption strong { color: #fff; font-size: 1.1rem; }
.portrait figcaption .small { font-size: 0.95rem; }
.portrait-rule { width: 2.5rem; height: 2px; background: var(--gold-light); margin: 0.7rem 0; }

/* Home: service cards */
.group-label {
  font-family: var(--sans); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--slate); margin: 2rem 0 1rem;
}
.svc-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 36rem) { .svc-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .svc-cards { grid-template-columns: repeat(4, 1fr); } }
.svc-cards > li { margin: 0; }
.svc-card {
  display: block; height: 100%; min-height: 11rem; padding: 1.5rem 1.4rem;
  background: var(--bg); border: 1px solid var(--rule); border-radius: 10px;
  text-decoration: none; color: var(--ink); transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
a.svc-card:hover { border-color: var(--gold); box-shadow: 0 4px 16px rgba(20,35,60,0.08); color: var(--ink); }
.svc-cards-ops .svc-card { background: var(--card-ops); }
.svc-cards-ops a.svc-card:hover { border-color: var(--navy); }
.svc-icon {
  width: 1.9rem; height: 1.9rem; display: block; margin-bottom: 1rem;
  fill: none; stroke: var(--gold); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.svc-cards-ops .svc-icon { stroke: var(--navy); }
.svc-card h4 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; color: var(--navy); line-height: 1.35; margin: 0 0 0.5rem; }
.svc-card p { margin: 0; font-size: 0.95rem; color: var(--slate); line-height: 1.55; }
.section-tight { padding-top: 1rem; }

/* Guides */
.breadcrumb { font-size: 0.9rem; color: var(--slate); margin: 0 0 1.5rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; color: var(--rule); }
.article { padding: 3rem 0 1rem; }
.article .measure > p:first-of-type { font-size: 1.15rem; }
.guide-cta { margin: 3rem 0 0; }
.pager { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin: 2.5rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid var(--rule); }
.pager a { text-decoration: none; display: block; }
.pager span { display: block; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); }
.pager strong { font-family: var(--serif); font-weight: 700; }
.pager .next { text-align: right; grid-column: 2; }

.guide-list { list-style: none; padding: 0; margin: 1.5rem 0 0; counter-reset: guide; }
.guide-list li { margin: 0; border-top: 1px solid var(--rule); }
.guide-list li:last-child { border-bottom: 1px solid var(--rule); }
.guide-list a { display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.2rem 1rem; padding: 1.25rem 0; text-decoration: none; color: var(--ink); }
.guide-list a:hover h2, .guide-list a:hover h3 { text-decoration: underline; text-decoration-color: var(--gold); }
.guide-list .n { font-family: var(--serif); color: var(--gold); font-weight: 700; font-size: 1.2rem; grid-row: span 2; }
.guide-list h2, .guide-list h3 { font-size: 1.2rem; margin: 0; }
.guide-list p { margin: 0; color: var(--slate); font-size: 0.98rem; }

.table-scroll { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--rule); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 40rem; font-size: 0.96rem; margin: 0; }
caption { text-align: left; padding: 0.9rem 1rem; font-weight: 600; color: var(--navy); }
th, td { text-align: left; vertical-align: top; padding: 0.75rem 1rem; border-top: 1px solid var(--rule); }
thead th { background: var(--bg-alt); font-weight: 600; color: var(--navy); }
tbody th { font-family: var(--serif); color: var(--navy); white-space: nowrap; }

.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 3rem; margin-bottom: 1.2rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 2rem; height: 2rem; border-radius: 50%; border: 1.5px solid var(--gold);
  font-family: var(--serif); color: var(--navy); font-weight: 700; display: grid; place-items: center; font-size: 0.95rem;
}

.faq details { border-top: 1px solid var(--rule); padding: 0.2rem 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative;
  font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.85rem; font-family: var(--sans); font-size: 1.4rem; color: var(--gold); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 0 0.6rem; }

/* About */
.bio { display: grid; gap: 2rem 3rem; align-items: start; }
@media (min-width: 48rem) { .bio { grid-template-columns: 18rem 1fr; } }
.bio figure { margin: 0; }
.bio img { border-radius: var(--radius); width: 100%; max-width: 18rem; }
.timeline { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.timeline li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.2rem 1.25rem; padding: 0.9rem 0; border-top: 1px solid var(--rule); margin: 0; }
.timeline li:last-child { border-bottom: 1px solid var(--rule); }
.timeline .years { font-family: var(--serif); color: var(--slate); font-variant-numeric: tabular-nums; }
.timeline .role { font-weight: 600; color: var(--navy); }
.timeline .org { display: block; color: var(--slate); font-weight: 400; }
@media (max-width: 30rem) { .timeline li { grid-template-columns: 1fr; } }

.two-col { display: grid; gap: 2rem 3rem; }
@media (min-width: 52rem) { .two-col { grid-template-columns: 1fr 1fr; } }

/* Contact */
.contact-options { display: grid; gap: 1.25rem; margin-top: 2rem; }
@media (min-width: 48rem) { .contact-options { grid-template-columns: 1fr 1fr; } }
.contact-options .card p { margin-bottom: 1.1rem; }
.contact-options .card p:last-child { margin-bottom: 0; }
.email-link { font-size: 1.15rem; font-weight: 600; word-break: break-word; }

/* Footer */
.site-footer { margin-top: 4rem; background: var(--navy); color: #D7DCE4; font-size: 0.95rem; }
.site-footer .wrap { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.site-footer a { color: #fff; text-decoration-color: var(--gold); }
.site-footer .wordmark { color: #fff; font-size: 1.4rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 0 0 0.35rem; }
.footer-meta { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 2rem; padding-top: 1.25rem; font-size: 0.88rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header .btn, .site-nav, .note, .pager, .skip-link { display: none !important; }
  .site-footer { background: none; color: var(--ink); }
}

/* Shown only on the staging build (python3 build.py --staging) */
.staging-banner {
  margin: 0; padding: 0.4rem 1rem; text-align: center;
  background: var(--gold); color: var(--navy); font-size: 0.85rem; font-weight: 600;
}
