/* ===========================================================================
   mreed.umtri.umich.edu
   Light ground, instrument structure: IBM Plex Sans with Plex Mono for labels
   and dates, hairline-divided
   grids, Michigan blue for links with a working teal for instrument details.
   Maize appears only as the marker under the current nav item.
   =========================================================================== */

:root {
  --paper: #f3f5f7;
  --panel: #ffffff;
  --ink: #121820;
  --body: #3d4650;
  --mid: #5f6a76;
  --rule: #dce1e6;
  --blue: #00274c;          /* Michigan blue: headings, the current nav item */
  --link: #0b5f9e;          /* links in running text; 6.7:1 on white */
  --link-hover: #08436f;
  --link-underline: #9cc4e0;
  --teal: #0f7285;
  --maize: #ffcb05;

  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1080px;
  --gutter: 40px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
}

img { max-width: 100%; height: auto; display: block; }

/* No link colour can reach 3:1 against body text this dark, so the underline
   carries the signal and the colour reinforces it. */
a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--panel); color: var(--blue); padding: 10px 16px;
  border: 1px solid var(--rule); font-family: var(--mono); font-size: 13px;
}
.skip-link:focus { left: 8px; top: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* --------------------------------------------------------------- header --- */

.site-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 26px; padding: 17px 0;
  border-bottom: 1px solid var(--rule);
}
.site-name {
  font-family: var(--mono); font-size: 16.5px; font-weight: 500;
  letter-spacing: -0.01em; color: var(--ink); text-decoration: none;
}
.site-name span { color: var(--mid); font-weight: 400; }
.site-nav ul {
  display: flex; flex-wrap: wrap; gap: 18px;
  list-style: none; margin: 0; padding: 0;
}
.site-nav a {
  text-decoration: none;
  font-family: var(--mono); font-size: 13.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--mid); text-decoration: none;
  padding-bottom: 3px; display: inline-block;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--blue); box-shadow: inset 0 -2px 0 var(--maize);
}

/* ------------------------------------------------------------------ hero --- */

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 292px;
  gap: 46px; align-items: stretch; padding: 46px 0 20px;
}
.hero h1 {
  font-size: 37px; font-weight: 600; line-height: 1.11;
  letter-spacing: -0.025em; margin: 0 0 13px; text-wrap: balance;
}
.hero-role {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em;
  color: var(--teal); margin: 0 0 19px;
}
.hero-bio { margin: 0 0 22px; color: var(--body); max-width: 58ch; }
/* Portrait and changing figure split the hero's height between them, so the
   pair stands exactly as tall as the text beside it. */
.hero-media {
  display: flex; flex-direction: column; gap: 14px;
  min-height: 0; min-width: 0;
}
.hero-portrait {
  flex: 1 1 0; min-height: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%;
  border: 1px solid var(--rule); background: #fff;
}
.hero-slides {
  flex: 1 1 0; min-height: 0; position: relative; overflow: hidden;
  border: 1px solid var(--rule); background: #fff;
}
.hero-slides img {
  position: absolute; inset: 8px; margin: auto;
  max-width: calc(100% - 16px); max-height: calc(100% - 16px);
  width: auto; height: auto;
  opacity: 0; transition: opacity 0.9s ease;
}
.hero-slides img.is-on { opacity: 1; }
/* Without the script the first frame simply stays put. */
.hero-slides img:first-child { opacity: 1; }
.js .hero-slides img:first-child { opacity: 0; }
.js .hero-slides img.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero-slides img { transition: none; } }

.hero-actions { margin: 0 0 18px; }
.button {
  display: inline-block; text-decoration: none;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--panel); background: var(--blue);
  border: 1px solid var(--blue); border-radius: 2px; padding: 9px 18px;
}
.button:hover { background: var(--link); border-color: var(--link); color: var(--panel); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips a {
  display: inline-block; text-decoration: none;
  font-family: var(--mono); font-size: 11.5px; color: var(--mid);
  text-decoration: none; background: var(--panel);
  border: 1px solid var(--rule); border-radius: 2px; padding: 5px 10px;
}
.chips a:hover { color: var(--link); border-color: var(--teal); }

/* ------------------------------------------------------------ quick links --- */

/* Tiles that behave as buttons: the whole card is the link. The icon sits in a
   fixed 150px box so tiles line up regardless of each image's proportions. */

.quicklinks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(186px, 1fr));
  gap: 16px;
}

.quicklink {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--rule);
  color: inherit; text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.quicklink:hover {
  border-color: var(--teal);
  box-shadow: 0 3px 12px rgba(18, 24, 32, 0.08);
  transform: translateY(-1px);
}
.quicklink:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.quicklink-icon {
  height: 150px; flex: none;
  display: flex; align-items: center; justify-content: center;
  padding: 12px; background: #fff;
  border-bottom: 1px solid var(--rule);
}
.quicklink-icon img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; }

.quicklink-body {
  padding: 13px 15px 14px; flex: 1;
  display: flex; flex-direction: column; gap: 9px;
}
.quicklink-blurb {
  flex: 1; font-size: 13.6px; line-height: 1.45; color: var(--body);
}
.quicklink-name {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.02em; color: var(--link);
}
.quicklink:hover .quicklink-name { color: var(--link-hover); }

/* The quick links sit close under the hero, so they need less space above. */
.section-tight { padding-top: 30px; }

@media (prefers-reduced-motion: reduce) {
  .quicklink { transition: none; }
  .quicklink:hover { transform: none; }
}

/* -------------------------------------------------------------- carousel --- */

/* A strip of figures that fills left to right. Every tile is the same height;
   width follows each picture's own proportions, so how many fit depends on the
   pictures and the width available. Arrows scroll by roughly one screenful. */


.carousel-track {
  display: flex; gap: 14px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-behavior: smooth; scroll-snap-type: x proximity;
  padding: 2px 0 10px;
  scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
}
.carousel-track::-webkit-scrollbar { height: 8px; }
.carousel-track::-webkit-scrollbar-track { background: transparent; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 4px; }
.carousel-track::-webkit-scrollbar-thumb:hover { background: var(--mid); }


.carousel-arrows { display: flex; gap: 6px; justify-content: flex-end; }
.carousel-arrow {
  width: 32px; height: 26px; padding: 0; cursor: pointer;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 2px;
  color: var(--link); font-family: var(--mono); font-size: 13px; line-height: 1;
}
.carousel-arrow:hover:not(:disabled) { border-color: var(--teal); color: var(--link-hover); }
.carousel-arrow:disabled { opacity: 0.35; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  .carousel-track { scroll-behavior: auto; }
}
@media (max-width: 700px) {
  }

/* --------------------------------------------------------------- section --- */

.section { padding: 40px 0 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 18px; margin-bottom: 20px;
}
.section-head h2 {
  font-family: var(--mono); font-size: 14.5px; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--mid); margin: 0;
}
.section-head h2 em { color: var(--teal); font-style: normal; }
.section-head a { font-family: var(--mono); font-size: 14px; color: var(--link); }

.when {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--teal); margin: 0 0 8px; font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------- tiles --- */

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tile {
  background: var(--panel); border: 1px solid var(--rule);
  display: flex; flex-direction: column;
}
.tile-figure-link { display: block; text-decoration: none; }
.tile-figure {
  display: block; width: 100%; aspect-ratio: 4 / 3;
  background: #fff center / cover no-repeat;
  border-bottom: 1px solid var(--rule);
}
.tile-body { padding: 16px 18px 20px; }
.tile h3 {
  font-size: 17px; font-weight: 600; line-height: 1.27;
  letter-spacing: -0.014em; margin: 0 0 8px; text-wrap: balance;
}
.tile h3 a { color: var(--ink); text-decoration: none; }
.tile h3 a:hover { color: var(--link); text-decoration: underline; }
.tile p { margin: 0; font-size: 14.2px; line-height: 1.56; color: var(--mid); }

/* -------------------------------------------------------------- research --- */

.areas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.area { background: var(--panel); border: 1px solid var(--rule); }
.area-figure-link { display: block; text-decoration: none; }
.area-figure {
  display: block; width: 100%; aspect-ratio: 5 / 4;
  background: #fff center / cover no-repeat;
  border-bottom: 1px solid var(--rule);
}
.area-body { padding: 14px 16px 18px; }
.area h3 { font-size: 15px; font-weight: 600; line-height: 1.3; margin: 0 0 6px; }
.area h3 a { color: var(--ink); text-decoration: none; }
.area h3 a:hover { color: var(--link); text-decoration: underline; }
.area p { margin: 0; font-size: 13.4px; line-height: 1.52; color: var(--mid); }

/* ---------------------------------------------------------------- datasets - */

.datalist { border-top: 1px solid var(--rule); }
.datalist a {
  text-decoration: none;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px;
  align-items: baseline; padding: 13px 0;
  border-bottom: 1px solid var(--rule); text-decoration: none;
}
.datalist a:hover b { color: var(--link); }
.datalist b { font-size: 15px; font-weight: 600; color: var(--ink); }
.datalist b span { display: block; font-weight: 400; font-size: 13.6px; color: var(--mid); margin-top: 2px; }
.datalist em {
  font-family: var(--mono); font-style: normal; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); white-space: nowrap;
}

/* ------------------------------------------------------------ page bodies --- */

.page-header { padding: 40px 0 22px; border-bottom: 1px solid var(--rule); }
.page-header h1 {
  font-size: 32px; font-weight: 600; letter-spacing: -0.022em;
  margin: 0; text-wrap: balance;
}
.page-header .when { margin: 0 0 10px; }

.prose { padding: 26px 0 10px; max-width: 68ch; }
.prose > * { margin: 0 0 16px; }
.prose h2 {
  font-size: 20px; font-weight: 600; letter-spacing: -0.016em;
  margin: 34px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--rule);
}
.prose h3 { font-size: 16.5px; font-weight: 600; margin: 26px 0 8px; }
.prose h4 {
  font-size: 14.5px; font-weight: 600; margin: 20px 0 6px;
  font-family: var(--mono); letter-spacing: 0.02em; color: var(--mid);
}
.prose p { color: var(--body); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; color: var(--body); }
.prose img {
  border: 1px solid var(--rule); background: #fff;
  margin: 20px 0; max-width: 100%;
}
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border: 1px solid var(--rule); padding: 7px 10px; text-align: left; }

.prose-wide { max-width: none; }


.review-flag {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  color: var(--mid); background: var(--panel);
  border: 1px dashed var(--rule); border-left: 3px solid var(--maize);
  padding: 9px 13px; margin: 0 0 20px;
}

/* ---------------------------------------------------------------- archive --- */

.year-group { padding: 26px 0 0; }
.year-group > h2 {
  font-family: var(--mono); font-size: 14.5px; font-weight: 500;
  letter-spacing: 0.13em; color: var(--mid);
  margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li {
  display: grid; grid-template-columns: 90px minmax(0, 1fr);
  gap: 22px; padding: 11px 0; border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.archive-list .when { margin: 0; }
.archive-list a { font-size: 16px; font-weight: 500; text-decoration: none; color: var(--ink); }
.archive-list a:hover { color: var(--link); text-decoration: underline; }

/* ----------------------------------------------------------- publications --- */

.pub-tools {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper); padding: 14px 0 12px;
  border-bottom: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.pub-filter {
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: var(--panel); border: 1px solid var(--rule); border-radius: 2px;
  padding: 8px 12px; min-width: 260px; flex: 1 1 260px;
}
.pub-count { font-family: var(--mono); font-size: 11.5px; color: var(--mid); font-variant-numeric: tabular-nums; }
.year-jump { display: flex; flex-wrap: wrap; gap: 4px; }
.year-jump a {
  font-family: var(--mono); font-size: 11px; color: var(--mid);
  text-decoration: none; padding: 3px 6px; border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
.year-jump a:hover { color: var(--link); border-color: var(--rule); background: var(--panel); }

.pub-list { padding-top: 8px; }
.pub-list h2 {
  font-family: var(--mono); font-size: 15px; font-weight: 500;
  letter-spacing: 0.06em; color: var(--teal); font-variant-numeric: tabular-nums;
  margin: 30px 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--rule);
  scroll-margin-top: 80px;
}
.pub-list p {
  margin: 0 0 11px; padding-left: 20px; text-indent: -20px;
  font-size: 15px; line-height: 1.58; color: var(--body); max-width: 88ch;
}
.pub-list p[hidden] { display: none; }
.pub-empty { font-family: var(--mono); font-size: 13px; color: var(--mid); padding: 20px 0; }

/* ----------------------------------------------------------------- footer --- */

.site-footer {
  margin-top: 46px; padding: 24px 0 36px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px;
  font-family: var(--mono); font-size: 11.5px; color: var(--mid); line-height: 1.8;
}
.site-footer a { color: var(--link); }
.site-footer a:hover { color: var(--link-hover); }

/* ------------------------------------------------------------ narrow view --- */

@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; }
  .hero-media { flex-direction: row; align-items: flex-start; }
  .hero-portrait { flex: 0 0 150px; height: 190px; }
  .hero-slides { flex: 1 1 auto; height: 190px; }
  .hero h1 { font-size: 30px; }
  .tiles, .areas { grid-template-columns: minmax(0, 1fr); }
  .site-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .archive-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===========================================================================
   Update cards on /updates.html
   Text on the left, figure on the right, every card the same height. When the
   text does not fit, a More button opens that card to full height. The figure
   is always visible, collapsed or not.
   =========================================================================== */

.update-card {
  background: var(--panel); border: 1px solid var(--rule);
  display: grid; grid-template-columns: minmax(0, 1fr) 250px;
  margin-bottom: 16px;
}
.update-card.no-figure { grid-template-columns: minmax(0, 1fr); }

.update-card-body {
  padding: 18px 22px 16px;
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
}
.update-card-body .when { margin: 0 0 6px; }
.update-card-body h3 {
  font-size: 18px; font-weight: 600; line-height: 1.26;
  letter-spacing: -0.016em; margin: 0 0 10px; text-wrap: balance;
}
.update-card-body h3 a { color: var(--ink); text-decoration: none; }
.update-card-body h3 a:hover { color: var(--link); text-decoration: underline; }

.update-card-text {
  flex: 1 1 auto; min-height: 0; position: relative;
  font-size: 14.6px; line-height: 1.58; color: var(--body);
}
.update-card-text > :first-child { margin-top: 0; }
.update-card-text > :last-child { margin-bottom: 0; }
.update-card-text p { margin: 0 0 11px; }

.update-card-figure {
  border-left: 1px solid var(--rule); background: #fff;
  padding: 16px; overflow: hidden;
  display: flex; align-items: flex-start; justify-content: center;
}
.update-card-figure img { max-width: 100%; max-height: 218px; width: auto; object-fit: contain; }

.expand {
  align-self: flex-start; flex: none; margin-top: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--link);
  background: var(--panel); border: 1px solid var(--rule);
  border-radius: 2px; padding: 5px 11px; cursor: pointer;
}
.expand:hover { border-color: var(--teal); color: var(--link-hover); }

/* Clamping is the script's job, so the page still works without it. */
.js .update-card { height: 254px; }
.js .update-card.is-open { height: auto; }
.js .update-card-text { overflow: hidden; }
.js .update-card.is-open .update-card-text { overflow: visible; flex-grow: 0; }
.js .update-card:not(.is-open) .update-card-text.is-clipped::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 62px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--panel) 82%);
  pointer-events: none;
}

@media (max-width: 700px) {
  .update-card, .js .update-card { grid-template-columns: minmax(0, 1fr); height: auto; }
  .update-card-figure {
    border-left: 0; border-bottom: 1px solid var(--rule);
    order: -1; padding: 14px;
  }
  .update-card-figure img { max-height: 200px; }
  .js .update-card:not(.is-open) .update-card-text { max-height: 190px; overflow: hidden; }
}

/* ===========================================================================
   Card grid — used by /research.html, flowing to fit the width available
   =========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 20px;
}


/* ===========================================================================
   Pills and topic browsing
   =========================================================================== */

.pills {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin: 11px 0 0; padding-top: 10px;
  border-top: 1px solid var(--rule);
}
.pill {
  display: inline-block; text-decoration: none;
  font-family: var(--mono); font-size: 10.5px; line-height: 1.5;
  letter-spacing: 0.03em; color: var(--mid);
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 2px; padding: 2px 7px; cursor: pointer;
}
.pill:hover { color: var(--link); border-color: var(--teal); background: var(--panel); }
.pill-more { font-family: var(--mono); font-size: 10.5px; color: var(--mid); padding: 2px 3px; }

.topic-children {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 4px 0 18px; border-bottom: 1px solid var(--rule); margin-bottom: 4px;
}
.topic-children .pill { font-size: 11.5px; padding: 4px 10px; background: var(--panel); }

/* --- the filter bar --- */

.browse { padding-top: 22px; }

.browse-bar {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 14px;
}
.chip-field {
  position: relative; flex: 1 1 auto; min-width: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--rule);
  border-radius: 2px; padding: 7px 9px;
}
.chip-field:focus-within { border-color: var(--teal); }
.chip-list { display: contents; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em;
  color: var(--panel); background: var(--blue);
  border-radius: 2px; padding: 3px 4px 3px 9px;
}
.chip-remove {
  border: 0; background: none; cursor: pointer; padding: 0 4px;
  color: var(--panel); font-size: 14px; line-height: 1; opacity: 0.75;
}
.chip-remove:hover { opacity: 1; }
.chip-input {
  flex: 1 1 140px; min-width: 120px;
  border: 0; outline: none; background: transparent;
  font-family: var(--sans); font-size: 14px; color: var(--ink); padding: 3px 2px;
}

.match-toggle {
  flex: none; cursor: pointer;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em;
  color: var(--mid); background: var(--panel);
  border: 1px solid var(--rule); border-radius: 2px; padding: 8px 12px;
  white-space: nowrap;
}
.match-toggle b { color: var(--link); font-weight: 500; }
.match-toggle:hover { border-color: var(--teal); }
.match-toggle[data-match="any"] b { color: var(--teal); }

.suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
  margin: 0; padding: 4px; list-style: none;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 2px;
  box-shadow: 0 6px 18px rgba(18, 24, 32, 0.1);
}
.suggestions button {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 0; background: none; padding: 6px 9px; border-radius: 2px;
  font-family: var(--sans); font-size: 13.5px; color: var(--ink);
}
.suggestions button:hover { background: var(--paper); color: var(--link); }

.browse-count {
  font-family: var(--mono); font-size: 11.5px; color: var(--mid);
  margin: 0 0 14px; font-variant-numeric: tabular-nums;
}
.browse-empty {
  font-family: var(--mono); font-size: 13px; color: var(--mid);
  padding: 26px 0; margin: 0;
}

.tile-blurb { margin: 0; font-size: 14.2px; line-height: 1.56; color: var(--mid); }

.topic-index { margin: 0 0 16px; }
.topic-index h2 {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--mid);
  margin: 0 0 7px;
}
.topic-index-list { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-index-list .pill { font-size: 11.5px; padding: 4px 10px; background: var(--panel); }

/* Topics on an individual post, shown in full rather than capped at three. */
.post-pills {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  clear: both; margin: 26px 0 20px;
  padding-top: 16px; border-top: 1px solid var(--rule);
}
.post-pills-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--mid); margin-right: 3px;
}
.post-pills .pill { font-size: 11.5px; padding: 4px 10px; background: var(--panel); }


/* A card is a link target, so it should look like one before it is hovered
   over. The border lifts and the title underlines together, from anywhere. */
.tile { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.tile:hover {
  border-color: var(--teal);
  box-shadow: 0 3px 12px rgba(18, 24, 32, 0.07);
}
.tile:hover h3 a { color: var(--link); text-decoration: underline; }
.tile-figure-link:hover .tile-figure,
.area-figure-link:hover .area-figure { opacity: 0.92; }

.area { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.area:hover {
  border-color: var(--teal);
  box-shadow: 0 3px 12px rgba(18, 24, 32, 0.07);
}
.area:hover h3 a { color: var(--link); text-decoration: underline; }

.update-card-figure { text-decoration: none; }
.update-card:hover { border-color: var(--teal); }
.update-card:hover .update-card-body h3 a { color: var(--link); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .tile, .area { transition: none; }
}


/* ===========================================================================
   Post layout: text and figure as columns
   The figure sits beside the text rather than inside it, so paragraphs keep a
   full measure and a tall picture cannot squeeze them into a gutter. Both
   columns flex with the page.
   =========================================================================== */

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 38%, 460px);
  gap: 34px;
  align-items: start;
  padding: 26px 0 10px;
}
.post-layout.no-figure { grid-template-columns: minmax(0, 1fr); }

/* Inside the layout the column already sets the measure. */
.post-layout .post-text { max-width: none; padding: 0; }

.post-figure { margin: 0; position: sticky; top: 18px; }
.post-figure img,
.post-figure video {
  /* Natural size up to the column, never beyond it. width:100% would upscale
     the 49 post images narrower than 400px into a blur. */
  display: block; width: auto; max-width: 100%; height: auto;
  border: 1px solid var(--rule); background: #fff;
}
.post-figure video { background: #000; }

@media (max-width: 760px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  /* Picture first on a narrow screen, the way the cards do it. */
  .post-figure { order: -1; position: static; max-width: 320px; }
}


/* ===========================================================================
   Research page: one horizontally scrolling row of cards per top-level topic
   =========================================================================== */

.axis-heading {
  font-family: var(--mono); font-size: 14.5px; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--mid);
  margin: 44px 0 4px; padding-bottom: 9px; border-bottom: 1px solid var(--rule);
}
.research-section { padding: 24px 0 6px; }
.research-section .section-head { margin-bottom: 6px; }
.research-section .section-head h2 {
  font-family: var(--sans); font-size: 22px; font-weight: 600;
  letter-spacing: -0.018em; text-transform: none; color: var(--ink);
}
.research-section .section-head h2 a { color: inherit; text-decoration: none; }
.research-section .section-head h2 a:hover { color: var(--link); text-decoration: underline; }
.section-blurb { margin: 0 0 12px; font-size: 14.6px; color: var(--mid); max-width: 74ch; }
.research-section .topic-children { border-bottom: 0; padding-bottom: 12px; margin-bottom: 0; }

/* The row reuses the figure strip's scrolling; only the item width differs. */
.tile-row .carousel-track { gap: 18px; }
.tile-row .tile { flex: 0 0 258px; scroll-snap-align: start; }
.tile-row .tile-figure { aspect-ratio: 16 / 10; }

.tile-more {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 180px; padding: 20px; text-decoration: none;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--link);
  background: var(--paper); border-style: dashed;
}
.tile-more:hover { border-color: var(--teal); background: var(--panel); }

/* A postal address: one line per line, set tighter than running prose. */
.prose .address {
  line-height: 1.5;
  margin-bottom: 18px;
}

/* The way into /browse.html, which is deliberately not in the navigation. */
.browse-cta {
  display: block; text-decoration: none;
  margin: 20px 0 4px; padding: 16px 20px;
  background: var(--panel); border: 1px solid var(--rule);
  border-left: 3px solid var(--maize); border-radius: 2px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.browse-cta:hover {
  border-color: var(--teal); border-left-color: var(--maize);
  box-shadow: 0 3px 12px rgba(18, 24, 32, 0.07);
}
.browse-cta-main {
  display: block; font-size: 17px; font-weight: 600;
  letter-spacing: -0.015em; color: var(--ink); margin-bottom: 3px;
}
.browse-cta:hover .browse-cta-main { color: var(--link); }
.browse-cta-sub {
  display: block; font-family: var(--mono); font-size: 12.5px; color: var(--mid);
}
