/* Polycrisis Resilience Series — H Heuristics */

:root {
  --navy: #16365c;
  --navy-2: #1f4f8b;
  --gold: #e3a23b;
  --teal: #2a8c82;

  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --bg-callout: #e6f3f1;
  --text: #1c2430;
  --text-soft: #4a5566;
  --muted: #6b7686;
  --line: #dde2ea;
  --heading: var(--navy-2);
  --link: #1f5fa8;
  --accent: #b9761a;
  --btn-bg: #ffffff;
  --btn-text: var(--navy);
  --hero-bg: var(--navy);
  --hero-text: #ffffff;
  --shadow: 0 1px 2px rgba(16, 32, 56, .06), 0 6px 24px rgba(16, 32, 56, .07);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Charter", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 10px;
  --max: 1140px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1722;
    --bg-soft: #16212f;
    --bg-callout: #12312f;
    --text: #e3e8ef;
    --text-soft: #b8c2cf;
    --muted: #8d99a8;
    --line: #253244;
    --heading: #9cc3f2;
    --link: #8fbdf2;
    --accent: #e9b25a;
    --btn-bg: #16212f;
    --btn-text: #e3e8ef;
    --hero-bg: #0c2440;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--serif);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--sans); color: var(--heading); line-height: 1.2; letter-spacing: -.01em; }
svg { width: 1em; height: 1em; flex: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 3px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.narrow { max-width: 680px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; z-index: 10; font-family: var(--sans); }
.skip:focus { left: 8px; }

/* Header */
.site-header { background: var(--hero-bg); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { color: #fff; text-decoration: none; display: flex; flex-direction: column; line-height: 1.15; padding: 10px 0; }
.brand-mark { font-family: var(--sans); font-weight: 700; letter-spacing: .28em; text-transform: uppercase; font-size: .82rem; }
.brand-series { font-family: var(--sans); font-style: italic; font-size: .82rem; opacity: .75; }
.site-nav { display: flex; gap: 4px; font-family: var(--sans); font-size: .92rem; }
.site-nav a { color: #fff; text-decoration: none; padding: 8px 10px; border-radius: 6px; opacity: .85; display: inline-flex; align-items: center; gap: 6px; }
.site-nav a:hover, .site-nav a[aria-current] { opacity: 1; background: rgba(255, 255, 255, .08); }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--hero-bg); color: var(--hero-text); }
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; color: #fff; }
.hero-gold { stroke: var(--gold); }
.hero-inner { position: relative; padding: 48px 16px 56px; }
@media (min-width: 720px) { .hero-inner { padding: 72px 28px 80px; } }
.hero h1 { color: #fff; font-size: clamp(2rem, 5.2vw, 3.6rem); margin: .1em 0 .25em; max-width: 18ch; font-weight: 750; }
.hero-report h1 { max-width: 22ch; }
.hero .subtitle { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 2.2vw, 1.45rem); line-height: 1.4; max-width: 44ch; margin: 0 0 1.2em; color: rgba(255, 255, 255, .88); }
.kicker { font-family: var(--sans); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; color: var(--gold); margin: 0; }
.breadcrumb { font-family: var(--sans); font-size: .85rem; display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; color: rgba(255, 255, 255, .7); }
.breadcrumb a { color: #fff; }
.byline { font-family: var(--sans); font-size: .98rem; margin: 0 0 14px; }
.byline .author { font-weight: 650; }
.byline .role { color: rgba(255, 255, 255, .72); }
.themes { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--sans); font-size: .8rem; }
.themes li { border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 3px 11px; color: rgba(255, 255, 255, .9); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--sans); font-size: .92rem; color: rgba(255, 255, 255, .8); margin: 0; }
.hero-stats strong { color: var(--gold); font-size: 1.1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 .95rem/1.2 var(--sans);
  padding: 11px 16px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--btn-bg); color: var(--btn-text);
  text-decoration: none; cursor: pointer;
  transition: border-color .15s, transform .15s, background .15s;
}
.btn:hover { border-color: var(--navy-2); }
.btn small { margin-left: auto; font-weight: 500; opacity: .75; font-size: .8rem; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn-small { padding: 6px 10px; font-size: .82rem; }

/* Report layout */
.report-layout { display: grid; gap: 32px; padding-top: 32px; padding-bottom: 64px; }
@media (min-width: 920px) {
  .report-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 56px; padding-top: 0; }
  .report-aside { margin-top: -64px; position: relative; }
}
.cover { display: block; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--bg); max-width: 220px; }
@media (min-width: 920px) { .cover { max-width: none; } }
.cover:hover img { transform: scale(1.015); }
.cover img { transition: transform .3s; }
.actions { display: grid; gap: 8px; margin: 20px 0 24px; }
.meta-list { margin: 0; font-family: var(--sans); font-size: .88rem; border-top: 1px solid var(--line); }
.meta-list > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; overflow-wrap: anywhere; }
.doi { font-family: var(--mono); font-size: .86em; }
.aside-block { margin-top: 22px; }
.aside-h { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--sans); font-size: .8rem; }
.tags li { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.subjects { margin: 0; padding-left: 18px; font-family: var(--sans); font-size: .85rem; }
.subjects li { margin-bottom: 4px; }
.subjects .muted { font-size: .78rem; }

.report-body { min-width: 0; padding-top: 0; }
@media (min-width: 920px) { .report-body { padding-top: 36px; } }
.toc { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--sans); font-size: .85rem; margin-bottom: 8px; }
.toc a { text-decoration: none; color: var(--text-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.toc a:hover { color: var(--heading); border-color: var(--heading); }
.report-body section { padding-top: 12px; }
.report-body h2 { font-size: 1.55rem; margin: 1.6em 0 .7em; padding-bottom: .35em; border-bottom: 2px solid var(--navy-2); }
.report-body p { margin: 0 0 1em; }
#abstract p { text-align: justify; hyphens: auto; }

.proposition { margin: 28px 0; background: var(--bg-soft); border-radius: var(--radius); padding: 22px 26px; }
.proposition blockquote { margin: 0; font-style: italic; font-size: 1.08rem; color: var(--text-soft); }
.proposition p { margin: 0; }
.proposition figcaption { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin-top: 10px; }
.proposition figcaption::before { content: "— "; }

.findings { padding-left: 1.4em; margin: 0; }
.findings li { margin-bottom: .7em; padding-left: .2em; }
.findings li::marker { font-family: var(--sans); font-weight: 700; color: var(--heading); }
.callout { background: var(--bg-callout); border-left: 5px solid var(--teal); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 22px; margin: 24px 0 8px; }
.callout-h { font-family: var(--sans); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; color: var(--teal); margin: 0 0 6px !important; }
.callout p:last-child { margin: 0; }

.contents { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.contents a { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; align-items: baseline; }
.contents a:hover { background: var(--bg-soft); }
.c-num { font-family: var(--sans); font-weight: 700; color: var(--accent); }
.c-title { display: block; font-family: var(--sans); font-weight: 600; font-size: 1rem; }
.c-desc { display: block; font-style: italic; font-size: .9rem; color: var(--muted); }
.c-page { font-family: var(--sans); font-weight: 600; font-size: .85rem; color: var(--heading); white-space: nowrap; }
.contents + p { margin-top: 10px; }

.glossary { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.glossary > div { display: grid; gap: 4px 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .glossary > div { grid-template-columns: 210px 1fr; } }
.glossary dt { font-family: var(--sans); font-weight: 650; font-size: .95rem; }
.glossary dd { margin: 0; color: var(--text-soft); }

.cite-box { position: relative; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; padding-right: 96px; }
.cite-box .btn { position: absolute; top: 10px; right: 10px; }
.cite-text { margin: 0 !important; overflow-wrap: anywhere; }
.bibtex { margin: 14px 0; }
.bibtex summary { cursor: pointer; font-family: var(--sans); font-weight: 600; font-size: .92rem; color: var(--heading); margin-bottom: 8px; }
.bibtex pre { margin: 0; font: .8rem/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.downloads { font-family: var(--sans); font-size: .9rem; overflow-wrap: anywhere; }

.references { padding-left: 2.2em; font-size: .93rem; color: var(--text-soft); }
.references li { margin-bottom: .55em; padding-left: .2em; overflow-wrap: anywhere; }
.references li::marker { font-family: var(--sans); font-size: .82rem; color: var(--muted); }
.references a { font-family: var(--sans); font-size: .82rem; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; font-family: var(--sans); }
.pager a { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--text); }
.pager a:hover { border-color: var(--heading); }
.pager small { display: block; color: var(--muted); font-size: .78rem; }
.pager-next { text-align: right; grid-column: 2; }

/* Home */
.section { padding: 48px 0 8px; }
.section-h { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.card-body { padding: 22px 24px; }
.card-featured { display: grid; }
@media (min-width: 760px) { .card-featured { grid-template-columns: 260px 1fr; } .card-featured .card-body { padding: 32px 36px; align-self: center; } }
.card-cover { display: block; background: var(--navy); border-right: 1px solid var(--line); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; max-height: 340px; }
@media (min-width: 760px) { .card-cover img { max-height: none; } }
.card-kicker { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin: 0 0 8px; display: flex; gap: 12px; align-items: center; }
.card-kicker .num { font-weight: 700; color: var(--accent); letter-spacing: .06em; }
.card h3 { margin: 0 0 8px; font-size: 1.35rem; }
.card-featured h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.card h3 a { color: var(--heading); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card-sub { font-style: italic; color: var(--text-soft); margin: 0 0 10px; }
.card-desc { margin: 0 0 14px; }
.card-meta { font-family: var(--sans); font-size: .85rem; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.card-list { display: grid; gap: 14px; }
.card-list .card { box-shadow: none; }
.card-list .card:hover { border-color: var(--heading); }

.about { padding-bottom: 72px; }
.about-grid { display: grid; gap: 32px; }
@media (min-width: 860px) { .about-grid { grid-template-columns: 1.6fr 1fr; gap: 56px; } }
.prose p { margin: 0 0 1em; }
.facts { margin: 0; font-family: var(--sans); font-size: .9rem; border-top: 1px solid var(--line); }
.facts > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.facts dd { margin: 2px 0 0; }

/* Footer */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 36px 0 44px; font-family: var(--sans); font-size: .88rem; }
.footer-inner { display: grid; gap: 18px; }
@media (min-width: 720px) { .footer-inner { grid-template-columns: 1fr auto; } .footer-note { grid-column: 1 / -1; } }
.site-footer .brand-mark { color: var(--heading); }
.site-footer p { margin: 4px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: flex-start; }

@media print {
  .site-header, .site-footer, .hero-lines, .actions, .toc, .pager, .cite-box .btn { display: none !important; }
  .hero { background: none; color: #000; }
  .hero h1, .hero .subtitle, .byline, .byline .role { color: #000; }
}

@media (max-width: 719px) {
  .hero-lines { opacity: .45; }
  .hero-gold { opacity: .5; }
}
