/* Geedge Networks leak project site — clean academic, light only. */

:root {
  color-scheme: light; /* pin UI chrome (scrollbars, form controls) to light */

  --bg: #ffffff;
  --bg-alt: #f7f6f3;
  --bg-inset: #f1efea;
  --text: #16161a;
  --text-muted: #5c5c66;
  --rule: #dedbd4;
  --rule-strong: #c4c0b6;
  --link: #8c1515;
  --link-hover: #b02a2a;
  --accent: #8c1515;
  --code-bg: #f4f2ee;
  --mark: #fdf3d0;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 43rem;
  --wide: 45.5rem; /* keeps header, content, and footer on one aligned column */
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;

  /* Keep the footer at the bottom of the viewport on short pages (e.g. Contact)
     without pinning it over content on long ones. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
@supports (min-height: 100dvh) {
  body { min-height: 100dvh; } /* accounts for mobile browser chrome */
}

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.prose { max-width: calc(var(--measure) + 2.5rem); }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 0.5rem;
  position: fixed; z-index: 50;
  background: var(--bg); color: var(--text);
  padding: 0.5rem 0.75rem; border: 1px solid var(--rule-strong);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(140%) blur(6px);
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1.35rem;
  padding-bottom: 1.35rem;
}

/* Masthead. Sans wordmark with the final word in the accent color, set against
   an italic serif descriptor. */
.brand { text-decoration: none; color: inherit; display: block; }
.brand-mark {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.32rem;
  line-height: 1.18;
  letter-spacing: -0.017em;
}
.brand-accent { color: var(--accent); }
.brand-sub {
  display: block;
  margin-top: 0.24rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.86rem;
  line-height: 1.3;
  color: var(--text-muted);
  letter-spacing: 0;
  text-transform: none;
}
.brand:hover .brand-mark { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 1.15rem;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 0.87rem;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- Typography ---------- */

main {
  padding: 2.75rem 0 4rem;
  flex: 1 0 auto; /* absorbs leftover height so the footer lands at the bottom */
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.22;
  font-weight: 600;
  margin: 2.4em 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: 2.05rem; margin-top: 0; letter-spacing: -0.012em; }
h2 { font-size: 1.42rem; padding-top: 0.6em; border-top: 1px solid var(--rule); }
h3 { font-size: 1.13rem; }
h4 { font-size: 1rem; font-family: var(--sans); letter-spacing: 0.01em; }

p, ul, ol, blockquote, table, pre, figure { margin: 0 0 1.15em; }
ul, ol { padding-left: 1.35em; }
li { margin-bottom: 0.35em; }
li > ul, li > ol { margin-top: 0.35em; margin-bottom: 0.5em; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

.page-head { margin-bottom: 2rem; }
.page-head h1 { margin-bottom: 0.35rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--accent); }

.lede {
  font-size: 1.12rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.sans { font-family: var(--sans); }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

blockquote {
  margin-left: 0; margin-right: 0;
  padding: 0.15rem 0 0.15rem 1.1rem;
  border-left: 3px solid var(--rule-strong);
  color: var(--text-muted);
}

mark { background: var(--mark); color: inherit; padding: 0 0.15em; }

/* ---------- Code ---------- */

code, kbd, samp {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--code-bg);
  padding: 0.12em 0.34em;
  border-radius: 3px;
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.55;
}
pre code { background: none; padding: 0; font-size: inherit; }

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; margin: 0 0 1.3em; -webkit-overflow-scrolling: touch; }

table {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--sans);
  font-size: 0.86rem;
  line-height: 1.45;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
thead th {
  border-bottom: 1.5px solid var(--rule-strong);
  border-top: 1.5px solid var(--rule-strong);
  font-weight: 620;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 1.5px solid var(--rule-strong); }
td code { font-size: 0.82em; }

.caption {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: -0.7em;
  margin-bottom: 1.6em;
}

/* ---------- Hero (home) ---------- */

.hero { max-width: calc(var(--measure) + 2.5rem); margin: 0 auto; }

.hero .venue {
  font-family: var(--sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.4vw, 2.5rem);
  letter-spacing: -0.015em;
  margin-bottom: 0.9rem;
}

.authors {
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 0.5rem;
}
.authors sup { font-size: 0.68em; color: var(--text-muted); }

.affiliations {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.4rem;
}
.affiliations sup { color: var(--accent); }

.badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.4rem; }
.badge {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  color: var(--text-muted);
}

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2.5rem; }
.btn {
  font-family: var(--sans);
  font-size: 0.87rem;
  text-decoration: none;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  color: var(--text);
  background: var(--bg-alt);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.btn:hover { border-color: var(--accent); color: var(--text); background: var(--bg-inset); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 550;
}
.btn-primary:hover { background: var(--link-hover); border-color: var(--link-hover); color: #fff; }

.abstract {
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 1.2rem 1.4rem 0.4rem;
  margin-bottom: 2.5rem;
}
.abstract h2 {
  border: 0; margin: 0 0 0.6rem; padding: 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}
.abstract p { font-size: 0.98rem; }

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}
.card {
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 1.05rem 1.15rem;
  background: var(--bg-alt);
  margin: 0;
  transition: border-color 0.12s ease;
}
.card:hover { border-color: var(--rule-strong); }
.card h3 { margin: 0 0 0.35rem; font-size: 1.02rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.card .card-meta {
  font-family: var(--sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

/* Key findings list */
.keys { list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.keys li {
  border-top: 1px solid var(--rule);
  padding: 0.9rem 0;
  margin: 0;
}
.keys li:last-child { border-bottom: 1px solid var(--rule); }
/* Larger opening statement on the landing page */
.lede-hero {
  font-size: 1.24rem;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* Call to action pointing at the paper */
.cta {
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--bg-alt);
  padding: 1.4rem 1.5rem;
  margin: 2.5rem 0;
}
.cta-kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.cta h3 { margin: 0 0 0.5rem; font-size: 1.35rem; }
.cta p { font-size: 0.96rem; margin-bottom: 0.9rem; }
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0;
}

.keys > li > strong { display: block; margin-bottom: 0.15rem; }
.keys span { display: block; color: var(--text-muted); font-size: 0.94rem; }
.keys span + span { margin-top: 0.7rem; }

/* Supporting evidence nested under a key finding */
.keys .evidence {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0 0 0 0.9rem;
  border-left: 2px solid var(--rule);
}
.keys .evidence li {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 0.55rem;
}
.keys .evidence li:last-child { margin-bottom: 0; }
.keys .evidence strong { color: var(--text); font-weight: 600; }

/* Plain-language variant used on the landing page: roomier, full-contrast body text */
.keys-plain li { padding: 1.05rem 0; }
.keys-plain > li > strong { font-size: 1.04rem; margin-bottom: 0.3rem; }
.keys-plain span { color: var(--text); font-size: 0.98rem; }

/* ---------- Post / finding lists ---------- */

.entry-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.entry {
  border-top: 1px solid var(--rule);
  padding: 1.15rem 0;
  margin: 0;
}
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry h2 {
  border: 0; padding: 0;
  margin: 0 0 0.3rem;
  font-size: 1.14rem;
}
.entry h2 a { text-decoration: none; }
.entry h2 a:hover { text-decoration: underline; }
.entry-meta {
  font-family: var(--sans);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}
.entry p.excerpt { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Table of contents (kramdown {:toc}) ---------- */

#markdown-toc {
  font-family: var(--sans);
  font-size: 0.86rem;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 1rem 1.2rem 1rem 2.2rem;
  margin-bottom: 2.2rem;
  color: var(--text-muted);
}
#markdown-toc::before {
  content: "On this page";
  display: block;
  margin-left: -1rem;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
#markdown-toc li { margin-bottom: 0.25em; }
#markdown-toc a { text-decoration: none; }
#markdown-toc a:hover { text-decoration: underline; }

/* ---------- Callouts ---------- */

.note, .takeaway {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--rule-strong);
  background: var(--bg-alt);
  border-radius: 4px;
  padding: 0.9rem 1.1rem;
  margin: 1.6rem 0;
  font-size: 0.94rem;
}
.takeaway { border-left-color: var(--accent); }
.note p:last-child, .takeaway p:last-child { margin-bottom: 0; }
.takeaway .label, .note .label {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

/* ---------- Pager ---------- */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 0.87rem;
}
.pager a { text-decoration: none; }
.pager a:hover { text-decoration: underline; }
.pager-next { margin-left: auto; text-align: right; }

/* ---------- Footer ---------- */

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--rule);
  background: var(--bg-alt);
  padding: 2rem 0 2.5rem;
  font-family: var(--sans);
  font-size: 0.85rem;
}
.footer-title { font-family: var(--serif); font-size: 0.98rem; margin: 0 0 0.2rem; }
.footer-inner p { margin: 0 0 0.5rem; }
.footer-links {
  display: flex; flex-wrap: wrap; gap: 1.1rem;
  margin: 1rem 0 1.2rem;
}
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-inner .small { max-width: 46rem; line-height: 1.55; }

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.9rem 1.4rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  font-family: var(--sans);
}
.team-grid li { margin: 0; }
.team-grid .name { font-size: 0.95rem; }
.team-grid .aff { display: block; font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  body { font-size: 17px; }
  main { padding: 2rem 0 3rem; }
  .header-inner { gap: 0.6rem; }
  .site-nav { font-size: 0.82rem; gap: 0.85rem; }
  h1 { font-size: 1.7rem; }
}

@media print {
  .site-header, .site-footer, .pager, .skip { display: none; }
  body { font-size: 11pt; color: #000; background: #fff; }
  a { color: #000; }
}
