/* MCERI website stylesheet */
:root {
  --maroon: #500000;
  --maroon-dark: #3a0000;
  --maroon-light: #7a1f1f;
  --accent: #c8a45c;
  --ink: #1f1f1f;
  --ink-soft: #555;
  --line: #e4e1dc;
  --bg: #ffffff;
  --bg-alt: #f6f4f0;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0,0,0,.08);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--maroon); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; color: var(--maroon-dark); font-weight: 600; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1140px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(820px, 100% - 2rem); margin-inline: auto; }

/* Top bar */
.topbar { background: var(--maroon-dark); color: #fff; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.topbar .wrap { display: flex; gap: 1.5rem; padding: .35rem 0; flex-wrap: wrap; }
.topbar a { color: #e9d9d9; }

/* Header / nav */
.site-header { background: var(--maroon); color: #fff; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.1rem 0 .9rem; }
.brand img { height: 64px; width: auto; }
.brand:hover, .brand-tamu:hover { text-decoration: none; opacity: .92; }
.brand-tamu { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; color: #fff; }
.brand-tamu img { height: 46px; width: auto; }
.brand-tamu span { font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.nav-row { position: sticky; top: 0; z-index: 50; background: var(--maroon-dark); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.nav-row .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 1rem; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; padding: .4rem .6rem; border-radius: 6px; font-size: 1rem; cursor: pointer; margin: .4rem 0; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; flex-wrap: wrap; }
.site-nav a { color: #fff; padding: .7rem .75rem; font-size: .92rem; display: block; border-bottom: 3px solid transparent; }
.site-nav a:hover, .site-nav a.active { border-bottom-color: var(--accent); text-decoration: none; }
.site-nav a.members { color: var(--accent); margin-left: .4rem; font-weight: 600; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; padding-bottom: .75rem; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { border-bottom: 0; border-left: 3px solid transparent; }
  .site-nav a:hover, .site-nav a.active { border-left-color: var(--accent); }
  .nav-row .wrap { flex-wrap: wrap; }
  .brand img { height: 48px; }
  .brand-tamu img { height: 36px; }
  .brand-tamu span { display: none; }
}
@media (max-width: 520px) {
  .brand-row { gap: 1rem; }
  .brand img { height: 40px; }
  .brand-tamu img { height: 30px; }
}

/* Hero */
.hero { background: radial-gradient(1200px 500px at 20% 0%, #6a1414 0%, var(--maroon) 45%, var(--maroon-dark) 100%); color: #fff; padding: 2.5rem 0 2.25rem; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.5rem; align-items: center; }
.hero h1 { color: #fff; margin-bottom: .6rem; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; color: var(--accent); margin-bottom: .8rem; }
.hero p.lead { font-size: 1.1rem; color: #f0e6e6; max-width: 56ch; }
.hero .actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero .visual img { border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0,0,0,.45); width: 100%; }
.hero.hero-wide .wrap { grid-template-columns: 1fr 1.35fr; }
.hero.hero-wide .visual { display: flex; justify-content: center; }
.hero.hero-wide .visual img { width: auto; max-width: 100%; max-height: 340px; object-fit: contain; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding: 3rem 0; } }

.btn { display: inline-block; padding: .65rem 1.2rem; border-radius: 999px; font-weight: 600; font-size: .95rem; border: 2px solid transparent; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--maroon-dark); }
.btn-primary:hover { background: #d9b96f; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-outline { border-color: var(--maroon); color: var(--maroon); }
.btn-outline:hover { background: var(--maroon); color: #fff; }

/* Sections */
section { padding: 3.5rem 0; }
section.alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.section-head h2 { margin: 0; }
.section-head .more { font-weight: 600; font-size: .95rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: var(--maroon-light); font-weight: 700; margin-bottom: .4rem; }

.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-5 .card.media .body { padding: 1rem 1.1rem 1.2rem; }
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: 0 1px 2px rgba(0,0,0,.03); display: flex; flex-direction: column; gap: .5rem; }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.card .tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--maroon-light); font-weight: 700; }
.card img { border-radius: 6px; margin-bottom: .4rem; }
.card.media { padding: 0; overflow: hidden; }
.card.media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; margin: 0; }
.card.media img.contain { object-fit: contain; background: #fff; padding: .6rem; border-bottom: 1px solid var(--line); }
.card.media .body { padding: 1.2rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; }
.card.media .body p { margin: 0; }
.subpanel { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.subpanel .section-head { margin-bottom: 1rem; }
.card.link:hover { border-color: var(--maroon-light); box-shadow: var(--shadow); }
a.card { color: inherit; }
a.card:hover { text-decoration: none; }

/* Meeting highlight */
.meeting-card { background: #fff; border-left: 6px solid var(--accent); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }
.meeting-card dl { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: 0; font-size: .95rem; }
.meeting-card dt { font-weight: 700; color: var(--maroon); }
.meeting-card dd { margin: 0; }
@media (max-width: 700px) { .meeting-card { grid-template-columns: 1fr; } }

/* Logo grid */
.logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.2rem; align-items: center; }
.logos div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1rem; display: grid; place-items: center; min-height: 90px; }
.logos img { max-height: 60px; width: auto; object-fit: contain; }

/* Page header */
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 2.5rem 0 2rem; }
.page-head h1 { margin: 0 0 .3rem; }
.page-head p { margin: 0; color: var(--ink-soft); max-width: 70ch; }

/* Prose */
.prose { font-size: 1.02rem; }
.prose h2 { margin-top: 2.2rem; padding-top: .4rem; }
.prose h3 { margin-top: 1.6rem; }
.prose figure { margin: 1.5rem 0; }
.prose figure img { width: 100%; }
.prose figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: .5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose img { border-radius: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* Feature blocks: text beside a large figure */
.feature { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2.5rem; align-items: center; padding: 2.5rem 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; }
.feature.flip .feature-media { order: -1; }
.feature h2 { margin-top: 0; }
.feature p { font-size: 1rem; }
.feature-media img { width: 100%; border-radius: 10px; box-shadow: var(--shadow); }
.feature-media figure { margin: 0; }
.feature-media figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: .5rem; }
.feature-media .stack { display: grid; gap: 1rem; }
.feature-media .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 1.5rem; } .feature.flip .feature-media { order: 0; } }
.figure-wide { margin: 0; }
.figure-wide img { width: 100%; border-radius: 10px; box-shadow: var(--shadow); }
.figure-wide figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: .6rem; text-align: center; }
.figure-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.figure-grid figure { margin: 0; }
.figure-grid img { width: 100%; border-radius: 10px; box-shadow: var(--shadow); }
.figure-grid figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: .5rem; }
@media (max-width: 700px) { .figure-grid { grid-template-columns: 1fr; } }
.side-toc { position: sticky; top: 84px; font-size: .9rem; border-left: 3px solid var(--line); padding-left: 1rem; }
.side-toc a { display: block; padding: .2rem 0; color: var(--ink-soft); }
.side-toc a:hover { color: var(--maroon); }
.layout-toc { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; }
@media (max-width: 860px) { .layout-toc { grid-template-columns: 1fr; } .side-toc { position: static; border-left: 0; padding-left: 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; } }

/* People: portrait grid */
.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; }
@media (max-width: 1000px) { .people-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .people-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; } }
.person { display: flex; flex-direction: column; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.person img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center top; background: var(--bg-alt); margin: 0; border-bottom: 1px solid var(--line); }
.person > div { padding: 1rem .9rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; align-items: center; }
.person h3 { margin: 0; font-size: 1.1rem; }
.person p { margin: 0; font-size: .88rem; color: var(--ink-soft); }
.person a { font-size: .85rem; word-break: break-all; }

.people-list { display: flex; flex-direction: column; gap: 1.2rem; }
.people-list .person { flex-direction: row; text-align: left; align-items: stretch; }
.people-list .person img { width: 300px; flex: 0 0 300px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-bottom: 0; border-right: 1px solid var(--line); }
.people-list .person > div { padding: 1.6rem 2rem; }
@media (max-width: 900px) { .people-list .person img { width: 220px; flex: 0 0 220px; } }
.people-list .person > div { align-items: flex-start; justify-content: center; padding: 1.1rem 1.3rem; gap: .45rem; }
.people-list .person h3 { font-size: 1.25rem; }
.people-list .person p { font-size: .95rem; }
.people-list .person a { font-size: .95rem; word-break: normal; }
@media (max-width: 600px) { .people-list .person { flex-direction: column; text-align: center; } .people-list .person img { width: 100%; flex: none; aspect-ratio: 4 / 5; object-fit: contain; border-right: 0; border-bottom: 1px solid var(--line); } .people-list .person > div { align-items: center; } }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data th, table.data td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { background: var(--bg-alt); color: var(--maroon-dark); font-weight: 700; }
table.data tr:hover td { background: #fbf9f6; }
.pill { display: inline-block; padding: .15rem .55rem; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); font-size: .8rem; margin: 0 .25rem .25rem 0; white-space: nowrap; }
.pill:hover { background: var(--maroon); color: #fff; text-decoration: none; border-color: var(--maroon); }

/* Timeline (news) */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.8rem 1.6rem; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: .45rem; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.timeline time { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--maroon-light); font-weight: 700; }
.timeline .photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; margin-top: .8rem; }
.timeline .photos { align-items: start; }
.timeline .photos img { width: 100%; height: auto; border-radius: 8px; box-shadow: var(--shadow); }
.timeline .photos.single { grid-template-columns: minmax(0, 640px); }
.timeline .photos.single img { aspect-ratio: auto; height: auto; }

/* Publications */
.pub-tools { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.5rem; position: sticky; top: 48px; background: #fff; padding: .8rem 0; z-index: 5; border-bottom: 1px solid var(--line); }
.pub-tools input, .pub-tools select { padding: .55rem .8rem; border: 1px solid #ccc; border-radius: 8px; font: inherit; font-size: .95rem; }
.pub-tools input { flex: 1 1 260px; }
.pub-tools .count { color: var(--ink-soft); font-size: .9rem; }
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-list li { padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.pub-list li .yr { display: inline-block; min-width: 3.2rem; font-weight: 700; color: var(--maroon); }
.pub-list li[hidden] { display: none; }
.pub-section[hidden] { display: none; }

/* Software */
.sw .card.media img { object-fit: contain; background: #fff; border-bottom: 1px solid var(--line); padding: .6rem; aspect-ratio: 16 / 9; }
.sw .card .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.badge { font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 4px; text-transform: uppercase; letter-spacing: .08em; }
.badge.public { background: #e6f2e6; color: #1f5f1f; }
.badge.members { background: #f7ecd7; color: #7a5200; }

/* Footer */
.site-footer { background: var(--maroon-dark); color: #d9cfcf; padding: 2.5rem 0 1.5rem; margin-top: 3rem; font-size: .9rem; }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-family: var(--font); font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .6rem; }
.site-footer a { color: #f1e6e6; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .3rem; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem; margin-top: 1rem; font-size: .8rem; color: #b9a8a8; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

.notice { background: #fff8e6; border: 1px solid #f0d99a; border-radius: 8px; padding: .8rem 1rem; font-size: .9rem; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }

/* Publication DOI links */
.pub-list a.doi { display: inline-block; margin-left: .4rem; padding: .05rem .5rem; border: 1px solid var(--maroon); border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.pub-list a.doi:hover { background: var(--maroon); color: #fff; text-decoration: none; }

/* Research topic contents */
.topic-nav { margin-bottom: 1rem; }
.topic-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; }
.topic-grid a { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem .9rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: .9rem; line-height: 1.3; font-weight: 600; }
.topic-grid a .n { font-family: var(--serif); color: var(--accent); font-size: 1.1rem; line-height: 1.1; }
.topic-grid a:hover { border-color: var(--maroon); color: var(--maroon); text-decoration: none; box-shadow: var(--shadow); }
@media (max-width: 1000px) { .topic-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .topic-grid { grid-template-columns: repeat(2, 1fr); } }

/* Footer logos */
.footer-logos { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.footer-logos img { height: 44px; width: auto; opacity: .95; }
.footer-logos a:hover img { opacity: 1; }

/* Project duration column */
table.data th.dur, table.data td.dur { width: 12.5rem; }
.nowrap { white-space: nowrap; }

/* Members area */
.dl .card { position: relative; }
.dl .card .meta { font-size: .8rem; color: var(--ink-soft); margin-top: auto; padding-top: .4rem; }
.dl .card .btn { align-self: flex-start; margin-top: .4rem; padding: .45rem 1rem; font-size: .88rem; }
.more-tools { margin-top: 1.2rem; }
.more-tools summary, .accordion summary { cursor: pointer; font-weight: 600; color: var(--maroon); }
.more-tools ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.accordion details { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1.1rem; margin-bottom: .6rem; }
.accordion summary { font-family: var(--serif); font-size: 1.1rem; list-style: none; display: flex; align-items: center; gap: .6rem; }
.accordion summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--bg-alt); color: var(--maroon); font-family: var(--font); font-size: 1rem; }
.accordion details[open] summary::before { content: "\2013"; }
.accordion details ul { margin: .7rem 0 .3rem; padding-left: 1.2rem; }
.accordion details li { margin-bottom: .35rem; font-size: .95rem; }
.accordion h4 { margin: .8rem 0 .2rem; font-family: var(--font); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.paper-list { padding-left: 1.2rem; }
.paper-list li { margin-bottom: .45rem; }
.members-toc { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 800px) { .members-toc { grid-template-columns: repeat(2, 1fr); } }

/* Members area, modern layout */
.mhero { background: radial-gradient(900px 400px at 15% 0%, #6a1414 0%, var(--maroon) 45%, var(--maroon-dark) 100%); color: #fff; padding: 3.5rem 0 0; }
.mhero h1 { color: #fff; margin-bottom: .6rem; }
.mhero .lead { color: #f0e6e6; font-size: 1.08rem; max-width: 56ch; }
.mhero .actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.2rem; }
.mhero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
.mstats { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.mstats div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 10px; padding: 1rem 1.1rem; }
.mstats strong { display: block; font-family: var(--serif); font-size: 1.8rem; color: var(--accent); line-height: 1.1; }
.mstats span { font-size: .82rem; color: #e6d8d8; }
.mnav { display: flex; gap: .2rem; margin-top: 2.5rem; border-top: 1px solid rgba(255,255,255,.15); overflow-x: auto; }
.mnav a { color: #f1e6e6; padding: .9rem 1rem; font-size: .92rem; font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.mnav a:hover { border-bottom-color: var(--accent); text-decoration: none; color: #fff; }
@media (max-width: 860px) { .mhero-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.btn-solid { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.btn-solid:hover { background: var(--maroon-dark); }
.badge.new { background: var(--accent); color: var(--maroon-dark); }
.rel-card { border-top: 4px solid var(--accent); }
.rel-top { display: flex; justify-content: space-between; align-items: center; }
.rel-ver { font-family: var(--serif); color: var(--maroon); font-weight: 600; }
.rel-card .meta { font-size: .8rem; color: var(--ink-soft); margin-top: auto; }
.rel-card .btn { margin-top: .6rem; text-align: center; }

.tool { flex-direction: row; align-items: flex-start; gap: 1rem; padding: 1.1rem 1.2rem; }
.tool .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--bg-alt); color: var(--maroon); display: grid; place-items: center; flex-shrink: 0; }
.tool .icon svg { width: 26px; height: 26px; }
.tool .body { flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.tool .body p { font-size: .9rem; }
.tool .meta { font-size: .78rem; color: var(--ink-soft); }
.tool .dl-link { align-self: center; font-weight: 700; font-size: .85rem; white-space: nowrap; padding: .4rem .7rem; border-radius: 8px; background: var(--bg-alt); }
.tool .dl-link:hover { background: var(--maroon); color: #fff; text-decoration: none; }
@media (max-width: 700px) { .dl.grid-2 { grid-template-columns: 1fr; } .tool { flex-wrap: wrap; } }

.yr-card { flex-direction: row; gap: 1.2rem; align-items: flex-start; }
.yr-num { font-family: var(--serif); font-size: 1.6rem; color: var(--maroon); font-weight: 600; line-height: 1; padding-top: .15rem; min-width: 3.6rem; }
.yr-links { display: flex; flex-direction: column; gap: .35rem; }
.yr-links a { font-size: .92rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.yr-links a:last-child { border-bottom: 0; }
.yr-links a::before { content: "\2193\00a0"; color: var(--accent); font-weight: 700; }
.archive { margin-top: 1.5rem; }
.archive summary { cursor: pointer; font-weight: 600; color: var(--maroon); padding: .6rem 0; }
.archive .table-wrap { margin-top: .8rem; }

/* Horizontal card carousel: four cards visible, swipe or use the arrows for more */
.carousel { position: relative; }
.carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 1.4rem) / 4); gap: 1.4rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 4px; scroll-behavior: smooth; padding: 4px 4px 12px; margin: -4px -4px 0; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.carousel-track > * { scroll-snap-align: start; }
.carousel-track .card.media .body { padding: 1rem 1.1rem 1.2rem; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--maroon); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; padding: 0 0 3px; }
.carousel-btn[hidden] { display: none; }
.carousel-btn:hover { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.carousel-btn.prev { left: -20px; }
.carousel-btn.next { right: -20px; }
@media (max-width: 1100px) { .carousel-track { grid-auto-columns: calc((100% - 2 * 1.4rem) / 3); } }
@media (max-width: 900px) { .carousel-track { grid-auto-columns: calc((100% - 1.4rem) / 2); } .carousel-btn { display: none; } }
@media (max-width: 600px) { .carousel-track { grid-auto-columns: 85%; } }
