/* tanyadonnelly.com shared styles */
:root {
  --paper: #f7f8fb;
  --surface: #ffffff;
  --ink: #0f1b33;
  --muted: #4c5873;
  --lake: #1b3f8b;
  --lake-deep: #0b2a5b;
  --pine: #b22234;
  --birch: #b22234;
  --line: #dde2ec;
  --radius: 6px;
  --measure: 68ch;
  --head: "Bitter", Georgia, serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--lake); text-underline-offset: 3px; }
a:hover { color: var(--lake-deep); }
:focus-visible { outline: 3px solid var(--birch); outline-offset: 2px; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* Skip link */
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); border-top: 6px solid var(--lake-deep); box-shadow: inset 0 3px 0 #fff, inset 0 6px 0 var(--pine); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 14px; }
.brand { font-family: var(--head); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand small { display: block; font-family: var(--body); font-weight: 600; font-size: 0.85rem; color: var(--pine); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--pine); }

/* Hero */
.hero { padding-block: 56px 0; }
.hero h1 {
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 16ch;
  margin: 0 0 20px;
}
.hero-contact { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 6px; font-size: 1.1rem; color: var(--ink); }
.hero-contact li { overflow-wrap: anywhere; }
.hero p { font-size: 1.2rem; max-width: 52ch; color: var(--muted); margin: 0 0 28px; }
.shoreline { display: block; width: 100%; height: 48px; color: var(--lake); margin-top: 24px; }

.btn { display: inline-block; background: var(--lake); color: #fff; text-decoration: none; font-weight: 600; padding: 12px 20px; border-radius: var(--radius); }
.btn:hover { background: var(--lake-deep); color: #fff; }
.btn-quiet { background: transparent; color: var(--lake); border: 2px solid var(--lake); padding: 10px 18px; }
.btn-quiet:hover { background: var(--lake); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
section { padding-block: 56px; }
section + section { border-top: 1px solid var(--line); }
h2 { font-family: var(--head); font-size: clamp(1.6rem, 3.5vw, 2.2rem); line-height: 1.2; margin: 0 0 8px; }
h3 { font-family: var(--head); font-size: 1.25rem; line-height: 1.3; margin: 0 0 6px; }
.lede { color: var(--muted); max-width: var(--measure); margin: 0 0 28px; }

/* Article list */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters button {
  font: inherit; font-size: 0.95rem; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 140px 1fr; gap: 4px 24px; }
.post-list li:first-child { border-top: 1px solid var(--line); }
.post-meta { color: var(--muted); font-size: 0.9rem; }
.post-meta .topic { display: block; color: var(--pine); font-weight: 600; }
.post-list h3 a { color: var(--ink); text-decoration: none; }
.post-list h3 a:hover { color: var(--lake); text-decoration: underline; }
.post-list p { margin: 0; color: var(--muted); max-width: var(--measure); }
.empty { color: var(--muted); }

/* Resources */
.resource-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 32px; }
.resource-groups h3 { padding-bottom: 8px; border-bottom: 3px solid var(--birch); display: inline-block; margin-bottom: 12px; }
.resource-groups ul { list-style: none; margin: 0; padding: 0; }
.resource-groups li { margin-bottom: 12px; }
.resource-groups li span { display: block; color: var(--muted); font-size: 0.92rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.about-grid p { max-width: var(--measure); }
.roles { list-style: none; margin: 0; padding: 20px 24px; background: var(--surface); border-left: 4px solid var(--pine); }
.roles li { padding: 6px 0; }
.roles li + li { border-top: 1px solid var(--line); }

/* Contact */
.contact-box { background: var(--lake-deep); color: #fff; border-radius: var(--radius); padding: 36px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px 48px; align-items: start; }
.contact-text { min-width: 0; }
.contact-list { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; font-size: 1rem; }
.contact-list dt { color: #b8c4e0; font-size: 0.85rem; font-weight: 600; padding-top: 2px; }
.contact-list dd { margin: 0; color: #fff; min-width: 0; overflow-wrap: anywhere; }
.contact-list a { color: #fff; }
.contact-list a:hover { color: #ffb3bb; }
.contact-box h2 { color: #fff; }
.contact-box p { color: #d9e1f2; max-width: 56ch; }
.contact-box a.btn { background: var(--pine); color: #fff; }
.contact-box a.btn:hover { background: #8e1b29; color: #fff; }
.contact-box .contact-addr { margin: 14px 0 0; font-size: 0.95rem; }

/* Footer */
.site-footer { padding-block: 32px; color: var(--muted); font-size: 0.92rem; border-top: 1px solid var(--line); margin-top: 24px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer .footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 32px; line-height: 1.6; }
.footer-grid > div, .footer-grid address { min-width: 0; overflow-wrap: anywhere; }
.footer-name { display: block; color: var(--ink); font-family: var(--head); font-size: 1.05rem; }
.site-footer address { font-style: normal; }
.site-footer .footer-copy { display: block; margin-top: 20px; font-size: 0.85rem; }

/* Article pages */
.article { padding-block: 48px 64px; }
.article-inner { max-width: var(--measure); }
.article .back { display: inline-block; margin-bottom: 24px; }
.article h1 { font-family: var(--head); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 12px; }
.article .post-meta { margin-bottom: 32px; }
.article .post-meta .topic { display: inline; margin-right: 12px; }
.article h2 { font-size: 1.5rem; margin-top: 40px; }
.article li { margin-bottom: 8px; }
.callout { background: var(--surface); border-left: 4px solid var(--birch); padding: 16px 20px; margin: 28px 0; }
.callout p { margin: 0; }

/* Page headers for News and About */
.page-head { padding-block: 48px 8px; }
.page-head h1 { font-family: var(--head); font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 10px; }
.page-head p { color: var(--muted); font-size: 1.15rem; max-width: 56ch; margin: 0; }
.page-head + section { border-top: 0; padding-top: 32px; }
.see-all { margin: 20px 0 0; font-weight: 600; }

.event-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--birch); border-radius: var(--radius); padding: 22px 24px; margin-top: 18px; }
.event-card > div { flex: 1 1 320px; }
.event-card p { margin: 0; color: var(--muted); max-width: 60ch; }

/* Share row */
.share { margin: 40px 0 8px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.share h2 { font-size: 1.1rem; margin: 0 0 12px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share-buttons a, .share-buttons button {
  font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; text-decoration: none;
  color: var(--lake-deep); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
.share-buttons a:hover, .share-buttons button:hover { background: var(--lake-deep); color: #fff; border-color: var(--lake-deep); }
.share-buttons button.primary { background: var(--lake); border-color: var(--lake); color: #fff; }
.share-status { color: var(--pine); font-weight: 600; font-size: 0.95rem; min-height: 1.2em; }

/* Article data pieces */
.figure { margin: 28px 0; }
.figure-note { color: var(--muted); font-size: 0.88rem; margin-top: 8px; }

.equation { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; }
.equation .box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.equation .box span { display: block; color: var(--muted); font-size: 0.88rem; }
.equation .box strong { font-family: var(--head); font-size: 1.6rem; line-height: 1.2; }
.equation .box.result { background: var(--lake-deep); border-color: var(--lake-deep); color: #fff; }
.equation .box.result span { color: #d9e1f2; }
.equation .op { font-size: 1.5rem; color: var(--birch); font-weight: 600; }

.split-bar { display: flex; height: 44px; border-radius: var(--radius); overflow: hidden; }
.split-bar div { display: flex; align-items: center; padding-left: 10px; color: #fff; font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; }
.c-school { background: #0b2a5b; }
.c-town { background: #b22234; }
.c-state { background: #8fa3cc; color: var(--ink) !important; }
.c-county { background: #e8a0a8; }
.legend { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.95rem; }
.legend li { display: flex; align-items: center; gap: 8px; margin: 0; }
.legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }

.data-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 1rem; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { background: var(--ink); color: #fff; font-weight: 600; }
.data-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-table tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
.table-scroll { overflow-x: auto; }

.col-chart { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; align-items: end; padding-top: 12px; }
.col-chart .col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.col-chart .bar { background: var(--lake-deep); border-radius: 3px 3px 0 0; height: calc(var(--h) * 170px); }
.col-chart .bar.reval { background: var(--pine); }
.col-chart .val { font-size: 0.72rem; font-weight: 600; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.col-chart .yr { font-size: 0.75rem; color: var(--muted); margin-top: 6px; min-height: 2.5em; line-height: 1.25; }

.hbars { display: grid; grid-template-columns: max-content 1fr; gap: 10px 14px; align-items: center; }
.hbars .label { font-weight: 600; }
.hbars .track { display: flex; align-items: center; gap: 10px; }
.hbars .fill { height: 22px; border-radius: 3px; min-width: 4px; }
.hbars .amt { white-space: nowrap; font-variant-numeric: tabular-nums; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pair .box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.pair .box span { display: block; color: var(--muted); font-size: 0.9rem; }
.pair .box strong { display: block; font-family: var(--head); font-size: 1.7rem; line-height: 1.2; margin: 4px 0; }
.pair .box.dark { background: var(--lake-deep); border-color: var(--lake-deep); color: #fff; }
.pair .box.dark span { color: #d9e1f2; }

.takeaways { counter-reset: t; list-style: none; padding: 0; }
.takeaways li { counter-increment: t; position: relative; padding: 14px 16px 14px 56px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.takeaways li::before { content: counter(t); position: absolute; left: 16px; top: 10px; font-family: var(--head); font-size: 1.6rem; color: var(--birch); font-weight: 700; }

.sources { font-size: 0.92rem; color: var(--muted); }
.sources li { margin-bottom: 4px; }

@media (max-width: 720px) {
  .equation { grid-template-columns: 1fr; }
  .equation .op { text-align: center; }
  .pair { grid-template-columns: 1fr; }
  .col-chart { gap: 3px; }
  .col-chart .bar { height: calc(var(--h) * 140px); }
  .col-chart .val { font-size: 0.56rem; letter-spacing: -0.02em; }
  .col-chart .yr { font-size: 0.62rem; }
  .split-bar div { font-size: 0.8rem; padding-left: 6px; }
}

@media (max-width: 720px) {
  .hero { padding-top: 36px; }
  section { padding-block: 40px; }
  .post-list li { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-box { padding: 24px; grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr; gap: 2px; }
  .contact-list dd { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
html { scroll-behavior: smooth; }
