/* About page (/about/): page components only. Tokens, type, links, section shells, status labels,
   buttons, and the footer come from /landing.css, which this file follows; both are in the homepage system
   (IBM Plex, near-black on off-white, hairline rules, one red accent, no pills or tinted cards). The legal pages
   and /sources/ also load this file for .page-head and .narrow. */

/* Page head */
.narrow > * {
  max-width: 820px;
}

.page-head {
  padding: clamp(32px, 5vw, 60px) 0 clamp(28px, 4vw, 44px);
  background: var(--bg);
  color: var(--ink);
}

.page-head .section-kicker {
  color: var(--muted);
}

.page-head h1 {
  max-width: 24ch;
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.page-head .lede {
  color: var(--body);
}

.page-head a:focus-visible {
  outline-color: var(--focus);
}

/* Tabs: Data sources, Conditions, AI models, Papers, and Team, kept in view under the site bar (sticky from 960px
   up, where it is 64px tall; below that the bar scrolls away and the tabs stick to the top). The section in view
   is underlined in red. On phones the five fit one row at 0.875rem; on a narrower screen they wrap, and
   evidence.js sets --tabs-h to the bar's real height so the scroll margins below still clear it. */
.data-ai {
  --bar-h: 0px;
  --tabs-h: 50px;
}

.jump-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.jump-nav .shell {
  display: flex;
  flex-wrap: wrap;
  column-gap: 32px;
}

.jump-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.jump-nav a:hover {
  color: var(--accent);
}

.jump-nav a[aria-current="true"] {
  border-bottom-color: var(--accent);
}

@media (max-width: 599px) {
  .jump-nav .shell {
    justify-content: space-between;
    column-gap: 12px;
  }

  .jump-nav a {
    font-size: 0.875rem;
  }
}

/* Every link target lands below the site bar (where it is sticky) and the tabs. A section's top rule lands right
   under the tabs, with its heading a short padding below; an anchor inside a section keeps a little air. The
   charts drawn after load would push a target down, so evidence.js scrolls back to it once they are in. */
.data-ai [id] {
  scroll-margin-top: calc(var(--bar-h) + var(--tabs-h) + 22px);
}

.data-ai .half {
  scroll-margin-top: calc(var(--bar-h) + var(--tabs-h));
}

@media (min-width: 960px) {
  .data-ai {
    --bar-h: 64px;
  }

  .jump-nav {
    top: 64px;
  }
}

/* The last section is at least a screen tall, so its tab can bring its heading to the top. */
.data-ai .half:last-of-type {
  min-height: calc(100vh - var(--bar-h) - var(--tabs-h));
}

/* The five sections: a heading and a short lede, then their content (inner sections, or one .half-body). */
.half-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px 48px;
  padding: clamp(28px, 4vw, 48px) 0 clamp(28px, 4vw, 44px);
}

.half-body {
  padding-bottom: clamp(48px, 7vw, 88px);
}

.half + .half {
  border-top: 1px solid var(--ink);
}

.half-head h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.half-head .lede {
  margin: 0;
}

.half-figure {
  display: block;
  width: 100%;
  max-width: 292px;
  height: auto;
  border: 1px solid var(--line);
}

@media (min-width: 760px) {
  .half-head:has(.half-figure) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 292px);
    grid-template-rows: auto 1fr;
    align-items: start;
  }

  .half-head:has(.half-figure) h2,
  .half-head:has(.half-figure) .lede {
    grid-column: 1;
  }

  .half-head:has(.half-figure) .half-figure {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* Section titles inside a section, and the chart titles at the same level */
.sub-title,
.chart-section .ev-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.2;
}

/* A chart section's hairline and spacing come from .section. */
.chart-section .ev-panel {
  margin: 0;
  padding: 0;
  border-top: 0;
}

/* Papers */
.paper-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 32px;
  margin: clamp(24px, 3vw, 36px) 0 0;
  padding: 0;
  list-style: none;
}

.paper {
  display: flex;
  flex-direction: column;
  padding: 16px 0 0;
  border-top: 1px solid var(--ink);
  background: none;
}

.paper h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.35;
  text-wrap: pretty;
}

.paper p {
  margin: 0.6rem 0 0;
  color: var(--body);
  font-size: 0.95rem;
  line-height: 1.55;
}

.paper .paper-authors {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.paper .chip {
  font-size: 0.875rem;
  white-space: normal;
}

.paper-files {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin: auto 0 0;
  padding: 0.9rem 0 0;
  list-style: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.paper-status {
  margin-bottom: 0.9rem;
}

.paper-draft {
  color: var(--muted);
  font-weight: 400;
}

/* Figures */
.figure-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(24px, 3vw, 36px);
}

.fig {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.fig img {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

.fig figcaption {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.fig h4 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.3;
}

.fig p {
  margin: 0.4rem 0 0;
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.55;
}

.fig a {
  font-weight: 400;
}

/* Methods */
#methods h4 {
  margin: 2rem 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.notice-note {
  margin: 1rem 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--line-strong);
  background: var(--soft);
  color: var(--body);
  font-size: 0.92rem;
}

.ack {
  margin: 0;
  color: var(--body);
  font-size: 0.88rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .paper-list,
  .figure-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .fig {
    padding: 10px;
  }
}

.fig-zoom {
  display: block;
}

.fig-zoom:focus-visible {
  outline-offset: 4px;
}

/* Conditions: the nine conditions in their five families, one row each (rows written by web/tools/site_numbers.py).
   The table scrolls sideways inside its own box on a phone; the page does not. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* position: relative keeps the hidden cell text (.sr-only, absolutely positioned) inside the scroller, so it
   does not widen the page. */
.conditions-scroll {
  position: relative;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.conditions-scroll:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.conditions-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.conditions-table caption {
  caption-side: bottom;
  padding-top: 10px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: left;
}

.conditions-table th,
.conditions-table td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: baseline;
}

.conditions-table thead th {
  border-bottom: 1px solid var(--ink);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.conditions-table tbody th {
  font-weight: 600;
}

/* The headings and the two numbers stay on one line when the table scrolls on a phone. */
.conditions-table thead th,
.conditions-table td:nth-of-type(1),
.conditions-table td:nth-of-type(2) {
  white-space: nowrap;
}

.conditions-table .family th {
  padding-top: 16px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.conditions-table td a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--ink);
}

.conditions-table td a:hover {
  color: var(--accent);
}

.conditions-table .none {
  color: var(--muted);
}

/* Team: one entry per person, a 3:4 portrait in a fixed first column, then the text. */
.team-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.person {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px 20px;
  align-items: start;
  padding: 16px 0 12px;
  border-top: 1px solid var(--ink);
}

.person:has(.person-photo) {
  grid-template-columns: 120px minmax(0, 1fr);
}

.person-photo {
  display: block;
  width: 120px;
  height: 160px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--line);
}

.person-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
}

.person p {
  margin: 0.3rem 0 0;
  color: var(--body);
  font-size: 0.95rem;
  line-height: 1.55;
}

.person .person-org {
  color: var(--muted);
}

.person .person-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
  margin-top: 0.2rem;
}

.person-links a,
.team-note a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  overflow-wrap: anywhere;
}

.team-note {
  max-width: 46rem;
  margin: 1.2rem 0 0;
  color: var(--body);
  font-size: 0.95rem;
}

.team-note + .team-note {
  margin-top: 0.2rem;
}

@media (max-width: 860px) {
  .team-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
