:root {
  --ink: #111b18;
  --ink-2: #1c2b27;
  --muted: #64706b;
  --line: #d8d2c6;
  --line-dark: #b9b1a3;
  --paper: #f8f5ee;
  --paper-2: #eee7da;
  --panel: #fffcf6;
  --teal: #1f4d44;
  --sage: #6f817a;
  --gold: #c69a46;
  --gold-soft: #e4d4ae;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(17, 27, 24, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.94), rgba(248, 245, 238, 0.98)),
    repeating-linear-gradient(90deg, rgba(17, 27, 24, 0.035) 0 1px, transparent 1px 80px);
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  text-rendering: geometricPrecision;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0;
  border-bottom: 1px solid rgba(17, 27, 24, 0.12);
  background: rgba(248, 245, 238, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  max-width: 280px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1.15;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.nav a {
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
}

main {
  overflow: hidden;
}

.research-hero {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 28px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 58px;
}

.hero-brief {
  min-width: 0;
  align-self: start;
  padding-top: 10px;
}

.eyebrow,
.panel-kicker {
  margin: 0;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
dd,
dt,
li,
td,
th {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  color: var(--ink);
}

h1 {
  margin: 12px 0 0;
  max-width: 16ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.45rem;
  font-weight: 500;
  line-height: 1.08;
}

h2 {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.72rem;
  font-weight: 500;
  line-height: 1.12;
}

h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
}

.lead {
  margin: 20px 0 0;
  color: var(--ink-2);
  font-size: 1.08rem;
}

.signal-list {
  display: grid;
  gap: 0;
  margin: 30px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.signal-list div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(17, 27, 24, 0.08);
}

.signal-list div:first-child {
  border-top: 0;
}

.signal-list dt {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.signal-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button,
.email-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.74rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.button.primary,
.email-link {
  background: var(--ink);
  color: var(--paper);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.button:hover,
.button:focus-visible,
.email-link:hover,
.email-link:focus-visible {
  transform: translateY(-1px);
}

.terminal {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(17, 27, 24, 0.16);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.78);
  box-shadow: var(--shadow);
}

.terminal-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 4px 16px;
  border-bottom: 1px solid var(--line);
}

.terminal-top h2 {
  font-size: 1.38rem;
}

.as-of {
  display: grid;
  gap: 2px;
  min-width: 220px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.as-of strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.console-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
  margin-top: 12px;
}

.analysis-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(17, 27, 24, 0.12);
  border-radius: 6px;
  background: var(--panel);
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.panel-header h3 {
  margin-top: 3px;
}

.tag {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.macro-chart,
.frontier-chart {
  width: 100%;
  height: auto;
}

.axis-lines line {
  stroke: #d8d2c6;
  stroke-width: 1;
}

.axis-labels text,
.chart-legend text {
  fill: #64706b;
  font-family: "Aptos", "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.risk-stack {
  display: grid;
  gap: 13px;
  padding-top: 4px;
}

.risk-row {
  display: grid;
  grid-template-columns: 104px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.risk-row b {
  position: relative;
  display: block;
  height: 24px;
  padding-right: 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(31, 77, 68, 0.92) 0 var(--w), #f0eadf var(--w) 100%);
  color: var(--ink);
  font-size: 0.76rem;
  line-height: 22px;
  text-align: right;
}

.heatmap {
  display: grid;
  grid-template-columns: 34px repeat(5, 1fr);
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.heatmap span,
.heatmap b {
  display: grid;
  place-items: center;
  min-height: 28px;
  border-radius: 3px;
}

.heatmap span {
  color: var(--muted);
}

.heatmap b {
  color: var(--ink);
  font-weight: 800;
}

.h0 {
  background: #ece5d8;
}

.h1 {
  background: #dfe5dd;
}

.h2 {
  background: #cddbd2;
}

.h3 {
  background: #aec9be;
}

.h4 {
  background: #d9ca9c;
}

.h5 {
  background: #c69a46;
}

.frontier-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  gap: 14px;
  align-items: stretch;
}

.allocation-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 0.78rem;
}

.allocation-table caption {
  padding: 0 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.allocation-table th,
.allocation-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.allocation-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0;
  border-top: 1px solid rgba(17, 27, 24, 0.14);
}

.two-column,
.contact {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 64px;
}

.section-heading h2 {
  max-width: 12ch;
}

.section-heading.compact h2 {
  max-width: none;
}

.copy-stack {
  display: grid;
  gap: 18px;
  max-width: 720px;
  color: var(--ink-2);
  font-size: 1.02rem;
}

.copy-stack p,
.area p,
.contact-details p,
.site-footer p {
  margin: 0;
}

.research-areas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.area {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(17, 27, 24, 0.14);
  border-radius: 6px;
  background: rgba(255, 252, 246, 0.66);
}

.area-code {
  width: 36px;
  height: 30px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--gold);
  color: var(--sage);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.area p {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 0.94rem;
}

.area ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.area li {
  margin-left: 18px;
}

.contact {
  align-items: start;
}

.contact-copy h2 {
  max-width: 15ch;
}

.contact-details {
  display: grid;
  gap: 22px;
  max-width: 620px;
  color: var(--ink-2);
  font-size: 1.02rem;
}

.email-link {
  width: fit-content;
}

.site-footer {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 34px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 52px;
  border-top: 1px solid rgba(17, 27, 24, 0.14);
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-brand span {
  display: block;
  max-width: 160px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1.2;
}

.footer-copy {
  display: grid;
  gap: 14px;
}

@media (max-width: 1080px) {
  .research-hero {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 21ch;
    font-size: 2.35rem;
  }

  .hero-brief {
    max-width: 760px;
  }
}

@media (max-width: 820px) {
  .console-grid,
  .frontier-layout,
  .two-column,
  .contact,
  .research-areas,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .terminal-top {
    align-items: start;
    flex-direction: column;
  }

  .as-of {
    min-width: 0;
    text-align: left;
  }

  .section-heading h2,
  .contact-copy h2 {
    max-width: none;
  }

  .two-column,
  .contact {
    gap: 28px;
  }
}

@media (max-width: 620px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    width: min(1180px, calc(100% - 28px));
    padding: 14px 0 10px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .research-hero,
  .section,
  .site-footer {
    width: min(1180px, calc(100% - 28px));
  }

  .research-hero {
    padding-top: 24px;
  }

  h1 {
    max-width: 13ch;
    font-size: 1.72rem;
    line-height: 1.12;
  }

  h2,
  .terminal-top h2 {
    font-size: 1.42rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button,
  .email-link {
    width: 100%;
  }

  .terminal {
    padding: 10px;
    overflow: hidden;
  }

  .analysis-panel {
    overflow: hidden;
    padding: 11px;
  }

  .signal-list div {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .risk-row {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .heatmap {
    grid-template-columns: 28px repeat(5, 1fr);
    gap: 3px;
    font-size: 0.65rem;
  }

  .heatmap span,
  .heatmap b {
    min-height: 24px;
  }
}
