@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&display=swap");
@import url("tokens/colors.css");
@import url("tokens/typography.css");
@import url("tokens/spacing.css");
@import url("tokens/radius.css");
@import url("tokens/elevation.css");
@import url("tokens/motion.css");
@import url("tokens/base.css");

body { background: var(--surface); color: var(--ink); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* Map county fill: the accent tint one step stronger so it reads at county size. */
:root { --served-tint: #EBDACE; --served-tint-border: #DCC5B4; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--rule); }
.site-header .wrap { padding-top: 16px; padding-bottom: 16px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.brand b { font-weight: 700; font-size: 19px; letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.brand span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-small); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { font-size: 14px; font-weight: 500; color: var(--ink-secondary); }

/* buttons (design system Button, manager surface) */
.btn { display: block; box-sizing: border-box; text-align: center; border: 0; cursor: pointer;
  border-radius: var(--radius-input); padding: 11px 16px; font: var(--font-m-button); transition: var(--transition-color); }
.btn-primary { background: var(--ink); color: var(--surface); }
.btn-primary:hover { background: #000; color: var(--surface); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-hover); color: var(--on-accent); }

/* cards (design system Card, manager surface) */
.card { box-sizing: border-box; border-radius: var(--radius-card); border: 1px solid var(--rule);
  background: var(--card); box-shadow: var(--elevation-rest); transition: var(--transition-color); overflow: hidden; }
.card > .card-body { padding: var(--pad-card-manager); }
.card-interactive { cursor: pointer; }
.card-interactive:hover { background: var(--hover-wash); }
.card-selected { border: 2px solid var(--accent); background: var(--accent-tint); }
.card-selected:hover { background: var(--accent-tint); }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { border: 1px solid var(--rule); border-radius: var(--radius-card); padding: 18px; background: var(--card);
  display: flex; flex-direction: column; gap: 8px; box-sizing: border-box; }
.stat .label { font: var(--font-m-eyebrow); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-small); }
.stat .value { font: var(--font-m-stat); letter-spacing: var(--track-tighter); color: var(--ink); }

/* hero */
.hero .wrap { padding-top: 64px; padding-bottom: 40px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero h1 { font-weight: 600; font-size: 56px; line-height: 1.05; letter-spacing: -.03em; margin: 0; max-width: 20ch; text-wrap: pretty; }

/* what is a ROSC */
.band { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--tint-band); margin-bottom: 8px; }
.band .wrap { padding-top: 44px; padding-bottom: 44px; }
.band h2 { font-weight: 600; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 20px; }
.band-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.band p { font-size: 16px; line-height: 1.6; color: var(--ink-secondary); margin: 0; }
.band .cite { font-size: 14px; color: var(--muted-small); margin-top: 12px; }

/* directory */
#directory { padding-top: 32px; padding-bottom: 80px; }
.lede { font-size: 24px; line-height: 1.45; color: var(--ink-secondary); margin: 0 0 52px; text-align: center; }
.directory-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: start; }
.map-col { position: sticky; top: 96px; }
.legend { display: flex; align-items: center; gap: 20px; padding-top: 14px; margin-top: 6px;
  border-top: 1px solid var(--rule-inner); font-size: 12px; color: var(--muted-small); }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.map-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted-small); }

.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; }
.list-head h2 { font-weight: 600; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.list-head span { font-size: 13px; color: var(--muted-small); white-space: nowrap; }
.rule-strong { height: 2px; background: var(--ink); margin-bottom: 4px; }
#list { max-height: 700px; overflow-y: auto; padding: 4px 12px 4px 2px; display: flex; flex-direction: column; gap: 8px; }
.region-head { padding: 16px 0 6px; display: flex; align-items: baseline; gap: 12px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.region-head b { font-weight: 600; font-size: 14px; white-space: nowrap; flex: none; }
.region-head em { font-style: normal; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-small); white-space: nowrap; flex: none; }
.region-head i { flex: 1; height: 1px; background: var(--rule); }

.row { display: flex; flex-direction: column; gap: 8px; }
.row-top { display: flex; align-items: center; gap: 14px; }
.row-top h3 { font-weight: 600; font-size: 16px; line-height: 1.3; letter-spacing: -.01em; margin: 0; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-counties { flex: none; font-size: 13px; color: var(--muted-small); white-space: nowrap; }
.row-toggle { flex: none; font-size: 13px; color: var(--accent); font-weight: 600; white-space: nowrap; }

.detail { border-left: 3px solid var(--accent); padding-left: 16px; margin: 2px 0 10px; }
.detail-name { font-weight: 600; font-size: 17px; line-height: 1.25; letter-spacing: -.01em; margin-bottom: 12px; }
.detail-fields { display: grid; gap: 12px; font-size: 14px; }
.field-label { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-small); margin-bottom: 4px; }
.field-value { color: var(--ink-secondary); font-weight: 500; }
.field-note { color: var(--muted); line-height: 1.5; }
.osar { background: var(--tint-band); border: 1px solid var(--rule); border-radius: var(--radius-card); padding: 12px 14px; }
.osar .fine { font-size: 13px; color: var(--muted-small); margin-top: 4px; }
.detail .btn { max-width: 260px; width: 100%; }
.detail .unpublished { font-size: 14px; color: var(--ink-secondary); }
.covey-note { margin: 14px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted-small); }

/* get involved */
#start { border-top: 1px solid var(--rule); }
#start .wrap { padding-top: 72px; padding-bottom: 72px; }
.involved { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.involved .eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-small); }
.involved h3 { font-weight: 600; font-size: 22px; letter-spacing: -.015em; margin: 10px 0; }
.involved p { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0 0 18px; }
.involved a { font-size: 14px; font-weight: 600; }

/* footer */
.site-footer { background: var(--ground); color: var(--ink); }
.site-footer .wrap { padding-top: 56px; padding-bottom: 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .6fr .6fr .8fr; gap: 48px; padding-bottom: 36px; border-bottom: 1px solid var(--rule); }
.footer-grid b { font-weight: 700; font-size: 20px; letter-spacing: .06em; text-transform: uppercase; }
.footer-grid p { font-size: 15px; line-height: 1.6; color: var(--ink-secondary); margin: 18px 0 0; max-width: 42ch; }
.footer-col-head { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-links a { color: var(--ink); }
.footer-help p { font-size: 15px; line-height: 1.6; color: var(--ink-secondary); margin: 0; }
.footer-help a { color: var(--accent); }
.footer-legal { padding-top: 22px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-size: 12px; letter-spacing: .06em; color: var(--ink-secondary); }

@media (max-width: 1000px) {
  .hero .wrap, .band-cols, .directory-grid, .involved, .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: 40px; max-width: none; }
  .lede { font-size: 19px; margin-bottom: 32px; text-align: left; }
  .map-col { position: static; }
  #list { max-height: none; overflow: visible; padding-right: 0; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .site-nav { gap: 16px; }
  .site-nav a:not(.btn) { display: none; }
}
