/* AgentHyperEvo — research proposal */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #000000;
  --muted: #555555;
  --faint: #888888;
  --rule: #e2e2e2;
  --rule-strong: #b0b0b0;
  --panel: #fafafa;
  --font: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

svg {
  display: block;
}

figure {
  margin: 0;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 28px 48px;
}

.header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}

.doc-label {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2.05rem, 4.4vw, 2.55rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.byline {
  margin: 0;
  font-size: 13.5px;
  color: var(--faint);
}

.nowrap {
  white-space: nowrap;
}

p {
  margin: 0 0 1em;
}

.lead {
  margin-top: 24px;
  font-size: 1.06rem;
  line-height: 1.6;
}

.question {
  margin: 1.3em 0;
  padding-left: 14px;
  border-left: 2px solid var(--ink);
}

h2 {
  margin: 2.5em 0 0.65em;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
}

h3 {
  margin: 1.9em 0 0.45em;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}

/* figures */

.paper-figure {
  margin: 24px 0 26px;
  padding: 16px;
  border: 1px solid var(--rule);
}

.paper-figure svg {
  width: 100%;
  height: auto;
}

.paper-figure figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--faint);
}

.diagram text {
  font-family: var(--font);
  fill: var(--ink);
}

.diagram .small {
  font-size: 11px;
  fill: var(--muted);
}

.diagram .label {
  font-size: 12px;
  font-weight: 600;
}

/* definition and equations */

.definition {
  margin: 22px 0;
  padding: 12px 16px;
  border-left: 2px solid var(--rule-strong);
  background: var(--panel);
}

.definition p {
  margin: 0;
}

.equation {
  margin: 0.45em 0 1em;
  font-size: 15.5px;
  line-height: 1.8;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

/* tables */

.table-wrap {
  margin: 0.6em 0 1.2em;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
}

.data-table caption {
  caption-side: top;
  padding-bottom: 6px;
  text-align: left;
  font-size: 13px;
  color: var(--faint);
}

.data-table th,
.data-table td {
  padding: 6px 7px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  font-weight: 600;
  border-bottom-color: var(--rule-strong);
}

.layers-table th:first-child,
.layers-table td:first-child {
  width: 30%;
}

.eval-table {
  min-width: 640px;
}

.eval-table th:nth-child(1),
.eval-table td:nth-child(1) {
  width: 24%;
}

.eval-table th:nth-child(2),
.eval-table td:nth-child(2) {
  width: 38%;
}

.eval-table th:nth-child(3),
.eval-table td:nth-child(3) {
  width: 38%;
}

/* lists */

.requirements,
.targets,
.contributions {
  margin: 0.5em 0 1.2em;
  padding-left: 1.25em;
}

.requirements li,
.targets li,
.contributions li {
  margin: 0.4em 0;
  padding-left: 2px;
}

/* references */

.references {
  margin: 0.5em 0 0;
  padding-left: 1.4em;
  font-size: 14.5px;
  line-height: 1.55;
}

.references li {
  margin: 0.55em 0;
}

.references a {
  overflow-wrap: anywhere;
}

/* footer */

.footer {
  margin-top: 3em;
  padding-top: 1.2em;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  line-height: 1.6;
  color: var(--faint);
}

.footer p {
  margin: 0 0 4px;
}

.footer a {
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
}

@media (max-width: 620px) {
  body {
    font-size: 17px;
  }

  .page {
    padding: 42px 20px 36px;
  }

  h1 {
    font-size: clamp(1.9rem, 8vw, 2.3rem);
  }

  h2 {
    margin-top: 2.1em;
  }

  .paper-figure {
    padding: 10px;
    margin: 20px 0 22px;
  }

  .data-table {
    font-size: 13px;
  }

  .data-table th,
  .data-table td {
    padding: 5px 4px;
  }
}

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