/* Shared styles for every page on the lab site. */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f5f6f3;
  --ink: #1f2a22;
  --ink-muted: #556257;
  --line: #e2e4de;
  --leaf: #2f5d3a;
  --leaf-dark: #22452b;
  --leaf-tint: #e3ede2;
  --amber: #b9741c;
  --amber-tint: #f7ead3;
  --focus: #b9741c;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(31, 42, 34, 0.06), 0 4px 16px rgba(31, 42, 34, 0.06);
  --max: 76rem;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-head: "Merriweather", Georgia, "Times New Roman", serif;
  color-scheme: light;
}


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

/* Text grows a little on larger screens (16px on phones up to 18px on big
   monitors); everything sized in rem grows with it. */
html {
  -webkit-text-size-adjust: 100%;
  font-size: clamp(100%, 0.85rem + 0.3vw, 112.5%);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: var(--leaf);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--leaf-dark);
}

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

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem);
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--leaf);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
}

/* ---------- Header and navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
  margin-right: auto;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.brand__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.1;
}

.brand__name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.nav-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 0 0.9rem;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav > ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-nav a,
.site-nav summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav summary:hover {
  background: var(--leaf-tint);
  color: var(--leaf-dark);
}

.site-nav a[aria-current="page"] {
  color: var(--leaf);
  background: var(--leaf-tint);
}

.site-nav summary {
  list-style: none;
}

.site-nav summary::-webkit-details-marker {
  display: none;
}

.site-nav summary::after {
  content: "";
  width: 0.45em;
  height: 0.45em;
  margin-left: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.site-nav details[open] > summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.nav-group {
  position: relative;
}

.nav-group ul {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.35rem;
}

@media (max-width: 1020px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    padding: 0.5rem 1rem 1rem;
  }

  .site-header[data-open="true"] .site-nav {
    display: block;
  }

  .site-nav > ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a,
  .site-nav summary {
    min-height: 48px;
    font-size: 1.05rem;
  }

  .nav-group ul {
    position: static;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    margin: 0 0 0.25rem 0.9rem;
    padding: 0 0 0 0.4rem;
    min-width: 0;
    background: transparent;
  }
}

/* The portal menu opens toward the left, since it sits at the right edge. */
.nav-portal .nav-group ul {
  left: auto;
  right: 0;
}

.nav-group li.nav-admin {
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 1px solid var(--line);
}

/* ---------- Layout ---------- */

main {
  display: block;
}

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

.section {
  padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0;
}

.section--alt {
  background: var(--surface-alt);
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mustard-text);
  margin-bottom: 0.4rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--ink-muted);
  max-width: 64ch;
}

.prose {
  max-width: 70ch;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  align-items: center;
}

.split--reverse > :first-child {
  order: 2;
}

@media (max-width: 760px) {
  .split {
    grid-template-columns: 1fr;
  }

  .split--reverse > :first-child {
    order: 0;
  }
}

.photo {
  border-radius: var(--radius);
  /* A thin edge so light photos stand out on light backgrounds. */
  border: 1px solid rgba(31, 42, 34, 0.18);
  box-shadow: 0 2px 4px rgba(31, 42, 34, 0.08), 0 8px 24px rgba(31, 42, 34, 0.12);
  width: 100%;
  object-fit: cover;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
}

.photo-grid img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  width: 100%;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: clamp(360px, 60vh, 560px);
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 20, 12, 0.1) 20%, rgba(10, 20, 12, 0.75) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(2rem, 1.5rem + 3vw, 4rem);
}

.hero h1 {
  color: #fff;
  margin-bottom: 0.25rem;
}

.hero p {
  font-size: clamp(1.05rem, 1rem + 0.6vw, 1.35rem);
  max-width: 40ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
}

.page-head {
  padding-top: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  padding-bottom: 1rem;
}

.banner-img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
}

/* ---------- Cards, lists, buttons ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 1.2rem;
  border-radius: 999px;
  border: 2px solid var(--leaf);
  background: var(--leaf);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--leaf-dark);
  border-color: var(--leaf-dark);
  color: #fff;
}

/* Secondary buttons look the same as primary ones, so every button on the
   site is the same green. */
.btn--ghost {
  background: var(--leaf);
  color: #fff;
}

.btn--ghost:hover {
  background: var(--leaf-dark);
  color: #fff;
}


.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}

.check-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.45rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--amber);
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--amber-tint);
  color: var(--amber);
}

.callout {
  border-left: 4px solid var(--amber);
  background: var(--amber-tint);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- People ---------- */

.people-group {
  margin-bottom: 2.5rem;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
}

.person {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.person img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--surface-alt);
}

.person__placeholder {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: var(--leaf-tint);
  color: var(--leaf);
  font-family: var(--font-head);
  font-size: 3rem;
}

.person__body {
  padding: 1rem 1.15rem 1.25rem;
}

.person h3 {
  margin-bottom: 0.1rem;
}

.person__meta {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.person__bio {
  font-size: 0.98rem;
  margin: 0;
}

/* ---------- Publications and CV ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.timeline li:last-child {
  border-bottom: 0;
}

.timeline strong {
  display: block;
}

.timeline span {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.pubs li {
  margin-bottom: 0.9rem;
}

.course-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem 2rem;
}

.course-cols ul {
  padding-left: 1.1rem;
  margin: 0 0 1rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a {
  color: inherit;
}

/* ---------- Leaflet tweaks (map on Where Are They Now) ---------- */

.alumni-map {
  height: clamp(320px, 55vh, 560px);
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  z-index: 0;
}

.leaflet-popup-content {
  font-family: var(--font-body);
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Portal, forms, and admin ---------- */

.site-root {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.site-root main {
  flex: 1;
}

.hint {
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.break {
  overflow-wrap: anywhere;
}

/* Page tabs (teaching portfolio): underlined text tabs, like the admin
   dashboard, so they don't look like buttons. */
.portal-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.portal-tabs a {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  padding: 0 clamp(0.5rem, 2.5vw, 0.9rem);
  border-bottom: 3px solid transparent;
  color: var(--ink-muted);
  font-weight: 700;
  text-decoration: none;
}

.portal-tabs a:hover {
  color: var(--ink);
}

.portal-tabs a[aria-current="page"] {
  border-bottom-color: var(--leaf);
  color: var(--ink);
}

.portal-tabs .link-button {
  margin-left: auto;
}

.link-button {
  background: none;
  border: 0;
  padding: 0 0.25rem;
  min-height: 44px;
  font: inherit;
  font-weight: 600;
  color: var(--leaf);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.link-button--danger {
  color: #b42318;
}


.btn--small {
  min-height: 44px;
  padding: 0 0.95rem;
  font-size: 0.95rem;
}

.btn[disabled],
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.form-card {
  margin-bottom: 1.5rem;
  padding: clamp(1.1rem, 0.9rem + 1vw, 1.75rem);
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.card-head h2 {
  margin: 0;
}

.signin-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
}

.profile-form fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.5rem;
  min-width: 0;
}

.profile-form legend {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  padding: 0;
}

.profile-form .radio-group legend {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
  min-width: 0;
}

.field__label {
  font-weight: 700;
  font-size: 0.97rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0 1rem;
}

.link-row {
  align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)) auto;
}

@media (max-width: 560px) {
  .link-row {
    grid-template-columns: 1fr;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1rem;
  }
}

.profile-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.profile-form select,
.profile-form textarea,
.form-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-card select,
.form-card textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.form-card textarea {
  min-height: 7rem;
  resize: vertical;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.55rem 0;
  cursor: pointer;
}

.check input {
  width: 1.3rem;
  height: 1.3rem;
  margin: 0.15rem 0 0;
  flex: none;
  accent-color: var(--leaf);
}

.inline-form {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  margin-bottom: 0.75rem;
}

.inline-form input {
  flex: 1;
}

@media (max-width: 420px) {
  .inline-form {
    flex-direction: column;
  }
}

.year-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.year-range input {
  max-width: 7rem;
}

.photo-field {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.photo-field img,
.photo-field__empty {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-alt);
}

.photo-field__empty {
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.photo-field > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.form-actions {
  margin-top: 0.5rem;
}

.notice {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: var(--leaf-tint);
  border: 1px solid var(--line);
  margin: 0 0 1rem;
}

.notice--success {
  border-color: var(--leaf);
}

.notice--error {
  background: #fdecea;
  border-color: #f3b4ac;
  color: #8a1c12;
}


.tag--accepted {
  background: var(--leaf-tint);
  color: var(--leaf);
}

.tag--declined,
.tag--withdrew {
  background: var(--surface-alt);
  color: var(--ink-muted);
}

.outcome-list,
.admin-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.outcome-list li,
.admin-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.outcome-list li > form {
  flex: 1 1 100%;
}

.admin-row__main {
  flex: 1 1 18rem;
  min-width: 0;
}

.admin-row__main .tag {
  margin-left: 0.5rem;
}

.admin-row__actions {
  align-items: center;
}

.invite-panel {
  margin-top: 0.5rem;
}

.invite-panel .hint {
  margin-bottom: 0.4rem;
}

.person__now {
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

/* ---------- Map pins and place picker ---------- */

.alumni-map--small {
  height: clamp(260px, 40vh, 380px);
}

.map-pin span {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  background: var(--amber);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transform: rotate(-45deg);
}

.pin-picker {
  margin-bottom: 1.25rem;
}

.pin-picker__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.pin-picker__footer .hint {
  margin: 0.4rem 0 0;
}

.search-results {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.search-results button {
  display: block;
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: 0.6rem 0.9rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.search-results li:last-child button {
  border-bottom: 0;
}

.search-results button:hover {
  background: var(--leaf-tint);
}

/* ---------- Access dashboard and resources ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-height: 44px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.stat strong {
  font-family: var(--font-head);
  font-size: 1.8rem;
  line-height: 1;
}

.stat span {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.stat[aria-pressed="true"] {
  border-color: var(--leaf);
  box-shadow: inset 0 0 0 2px var(--leaf);
}

.access-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.6rem;
}

.access-date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.access-date .hint {
  margin: 0;
  white-space: nowrap;
}

.form-card .access-date input {
  width: auto;
  min-height: 44px;
}

.tag--waitlisted {
  background: var(--amber-tint);
  color: var(--amber);
}

.btn--danger {
  border-color: #b42318;
  background: transparent;
  color: #b42318;
}

.btn--danger:hover {
  background: #fdecea;
  border-color: #b42318;
  color: #8a1c12;
}


.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

.resource-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}

.resource-card img,
.resource-card__blank {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--leaf-tint);
}

.resource-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 1rem 1.1rem;
}

.resource-card__body span {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.resource-card:hover,
.resource-card:focus-visible {
  border-color: var(--leaf);
  color: var(--ink);
}

.resource-card:hover strong {
  color: var(--leaf);
}

.link-editor-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.resource-image-field img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.stat-row--static .stat {
  cursor: default;
  background: var(--surface);
}

/* Hidden until the page-visibility check finishes (at most 1.5 seconds). */
.pages-pending main {
  visibility: hidden;
}

/* ---------- Page switches (admin) ---------- */

.page-switches {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-switches li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--line);
}

.page-switches li > a {
  font-weight: 600;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--ink-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.switch__track {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.15s;
  flex: none;
}

.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}

.switch--on {
  color: var(--leaf);
}

.switch--on .switch__track {
  background: var(--leaf);
}

.switch--on .switch__thumb {
  transform: translateX(20px);
}

.switch__text {
  min-width: 4.2rem;
  text-align: left;
}

/* ---------- Teaching portfolio ---------- */

.portfolio-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portfolio-item {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.portfolio-item:last-child {
  border-bottom: 0;
}

.portfolio-item h3 {
  margin-top: 1.25rem;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 0.4rem;
}

.material-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.material-list li {
  border-top: 1px solid var(--line);
}

.material-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.material-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0;
  font-weight: 600;
}

.material-list a::after {
  content: "↗";
  margin-left: 0.4rem;
  font-weight: 400;
  color: var(--ink-muted);
}

.photo-grid--captions {
  margin-top: 1rem;
  align-items: start;
}

.photo-grid--captions img {
  aspect-ratio: 1 / 1;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
}

.work-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.work-card a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.quote {
  margin: 0;
}

.quote p {
  margin-bottom: 0.75rem;
}

.quote footer {
  color: var(--ink-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.quote-grid {
  columns: 2 320px;
  column-gap: 1rem;
}

.quote-grid .quote {
  break-inside: avoid;
  margin-bottom: 1rem;
}

.letter {
  max-width: none;
}

.eval-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  align-items: start;
}

.eval-grid h4,
.card h4 {
  margin: 1.1rem 0 0.25rem;
  font-size: 1rem;
}

/* ---------- Recruiting notes ---------- */

.recruiting {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--leaf);
}

.recruiting[hidden] {
  display: none;
}

.recruiting__note {
  margin: 0;
}

.recruiting__note + .recruiting__note {
  margin-top: 0.75rem;
}

.recruiting__note strong {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.recruiting__note--open strong {
  color: var(--leaf);
}

.segmented-field {
  border: 0;
  padding: 0;
  margin: 0 0 1.1rem;
}

.segmented-field legend {
  font-weight: 700;
  margin-bottom: 0.4rem;
  padding: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 30rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.segmented button {
  min-height: 44px;
  padding: 0.3rem 0.5rem;
  line-height: 1.2;
  font-size: 0.95rem;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button[aria-pressed="true"] {
  background: var(--leaf);
  color: #fff;
}

/* Per-person portal access checkboxes on the admin form */
.permission-list {
  margin: 0.5rem 0 0;
  padding: 0;
  border: 0;
}

.permission-list legend {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.permission-list__hint {
  display: block;
  margin: 0.1rem 0 0;
}

/* Admin sections: People, Website, Links, Downloads */
.admin-nav {
  display: flex;
  gap: 0.25rem;
  margin: -0.5rem 0 1.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  padding: 0 clamp(0.5rem, 2.5vw, 0.9rem);
  border-bottom: 3px solid transparent;
  color: var(--ink-muted);
  font-weight: 700;
  text-decoration: none;
}

.admin-nav a[aria-current="page"] {
  border-bottom-color: var(--leaf);
  color: var(--ink);
}

.admin-signout {
  margin-top: 1.5rem;
  text-align: right;
}

/* Rotating photo slideshow */
.slideshow {
  max-width: 760px;
  margin: 1rem auto 0;
}

.slideshow__viewport {
  position: relative;
  aspect-ratio: 3 / 2;
  max-height: 55vh;
  border-radius: var(--radius);
  overflow: hidden;
  background: #e9ebe6;
  box-shadow: var(--shadow);
}

.slideshow__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  animation: slideshow-fade 0.6s ease;
}

.slideshow__slide[hidden] {
  display: none;
}

.slideshow__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.slideshow__slide figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1rem 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  color: #fff;
  font-size: 0.95rem;
}

.slideshow__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.slideshow__btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--leaf);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.slideshow__btn[data-slide-pause] {
  font-size: 0.8rem;
}

.slideshow__btn:hover {
  background: var(--leaf-dark);
}

.slideshow__dots {
  display: flex;
}

.slideshow__dot {
  width: 28px;
  height: 44px;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

.slideshow__dot::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: auto;
  border-radius: 50%;
  background: var(--line);
}

.slideshow__dot[aria-current="true"]::before {
  background: var(--leaf);
}

@keyframes slideshow-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slideshow__slide {
    animation: none;
  }
}

/* Per-person portal access, switched from the admin list */
.permission-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.6rem 0;
}

.permission-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.92rem;
  text-decoration: line-through;
  cursor: pointer;
}

.permission-toggle[aria-pressed="true"] {
  border-color: var(--leaf);
  background: var(--leaf-tint);
  color: var(--leaf-dark);
  text-decoration: none;
}

.permission-toggle[aria-pressed="true"]::before {
  content: "✓";
  font-weight: 700;
}

.portal-bar {
  display: flex;
  justify-content: flex-end;
  margin: -0.5rem 0 0.75rem;
}

/* Jessie's "Preview as student" banner */
.preview-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  background: var(--amber-tint);
}

.preview-banner p {
  margin: 0;
}

/* Colorado Plateau carbon cycle game */
.carbon-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

@media (min-width: 900px) {
  .carbon-layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: start;
  }
}

.carbon-aside h2 {
  margin-top: 0;
}

.carbon-panel {
  border-top: 6px solid var(--leaf);
}

.carbon-panel h2 {
  margin-top: 0.25rem;
}

.carbon-panel h2:focus,
.carbon-panel h3:focus {
  outline: none;
}

.carbon-panel--fossil {
  border-top-color: #5b4636;
}

.carbon-panel--limestone {
  border-top-color: #b07a45;
}

.carbon-panel--atmosphere {
  border-top-color: #2f5f8f;
}

.carbon-panel--soil {
  border-top-color: #7a6a3a;
}

.carbon-panel--plants {
  border-top-color: var(--leaf);
}

.carbon-panel--animals {
  border-top-color: #a85a2a;
}

.carbon-panel--hydrosphere {
  border-top-color: #1f7f8f;
}

.carbon-card {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.carbon-card h3 {
  margin-top: 0;
}

.carbon-card__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.5rem 1rem;
  margin: 0.75rem 0 0;
}

.carbon-card__facts dt {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.carbon-card__facts dd {
  margin: 0;
  font-weight: 700;
}

.carbon-log {
  margin-top: 1.5rem;
}

.table-scroll {
  overflow-x: auto;
}

.carbon-log table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.carbon-log th,
.carbon-log td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.carbon-actions {
  display: flex;
  gap: 1.25rem;
  margin-top: 1rem;
}

.carbon-bars {
  list-style: none;
  margin: 0.5rem 0 1rem;
  padding: 0;
}

.carbon-bars li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.15rem 0.75rem;
  align-items: center;
  margin-bottom: 0.6rem;
}

.carbon-bars__track {
  height: 0.8rem;
  border-radius: 999px;
  background: var(--surface-alt);
  overflow: hidden;
}

.carbon-bars__fill {
  display: block;
  height: 100%;
  background: var(--leaf);
}

.carbon-bars__fill--fossil { background: #5b4636; }
.carbon-bars__fill--limestone { background: #b07a45; }
.carbon-bars__fill--atmosphere { background: #2f5f8f; }
.carbon-bars__fill--soil { background: #7a6a3a; }
.carbon-bars__fill--animals { background: #a85a2a; }
.carbon-bars__fill--hydrosphere { background: #1f7f8f; }

.carbon-bars__value {
  grid-column: 2;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

@media print {
  .site-header,
  .site-footer,
  .carbon-aside,
  .carbon-panel .btn-row {
    display: none;
  }
}

/* Embedded NetLogo Web models in the teaching portfolio */
.model-embed {
  margin: 1.75rem 0 0;
}

/* Models need more room than the 70-character text column. */
.portfolio-item.prose:has(.model-embed) {
  max-width: none;
}

.portfolio-item.prose:has(.model-embed) > :not(.model-embed) {
  max-width: 70ch;
}

.model-embed__frame {
  overflow: hidden;
}

.model-embed figcaption h3 {
  margin-bottom: 0.25rem;
}

.model-embed__frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.model-embed__frame iframe {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
  transform-origin: top left;
}

/* Home banner: the lab's full name in the same mustard as the old eyebrow */
.hero__content .hero__tagline {
  color: #f5c27a;
  font-weight: 600;
}

/* Bio page heading: pronouns and one title per line */
.pronouns {
  margin: 0.25rem 0 0.75rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.title-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 1.15rem;
  line-height: 1.5;
}

.title-list li:last-child {
  color: var(--ink-muted);
  font-size: 1rem;
}

.credit-line {
  max-width: 70ch;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

/* Original card art in the carbon cycle game */
.carbon-art {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0.75rem auto;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.carbon-art--place {
  max-width: 260px;
}


/* Admin: team page sections and the order of people in them */
.section-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.section-list__item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.section-list__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.section-list__head input {
  flex: 1 1 14rem;
  font-weight: 700;
}

.section-people {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--line);
}

.section-people li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.15rem 0;
}

.move-buttons {
  display: inline-flex;
  gap: 0.25rem;
}

.move-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
}

.move-button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Portfolio sign-in page: a centered card under the normal site header */
.signin-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.signin-page .wrap {
  width: 100%;
}

.signin-card {
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
}

.signin-card h1 {
  margin-top: 0.25rem;
}

.signin-card form {
  text-align: left;
}

.signin-card__submit {
  width: 100%;
  margin-top: 0.5rem;
}

/* Carbon cycle map: the student's numbered path */
.carbon-map {
  margin: 0.75rem 0 1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.carbon-map svg {
  display: block;
  width: 100%;
  min-width: 560px;
  height: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Pages card: each page's editable name, an Open link, and its switch */
.page-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 12rem;
  min-width: 0;
}

.form-card .page-name input {
  min-height: 40px;
  font-weight: 600;
}

.page-switches li {
  flex-wrap: wrap;
}

.page-switches__open {
  flex: none;
}

/* Admin People list: one compact line per person that opens for details */
.admin-row {
  display: block;
  padding: 0;
}

.person-row > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  min-height: 52px;
  padding: 0.4rem 0;
  cursor: pointer;
  list-style: none;
}

.person-row > summary::-webkit-details-marker {
  display: none;
}

.person-row > summary::after {
  content: "";
  width: 0.5em;
  height: 0.5em;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  color: var(--ink-muted);
}

.person-row[open] > summary::after {
  transform: rotate(-135deg);
}

.person-row__name {
  font-weight: 700;
}

.person-row__meta {
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.person-row .tag {
  margin: 0;
}

.person-row__body {
  padding: 0.25rem 0 1rem 0.75rem;
  border-left: 2px solid var(--line);
  margin-bottom: 0.5rem;
}

/* Sections page: each person's Move to menu and arrows */
.section-people li {
  flex-wrap: wrap;
  padding: 0.35rem 0;
}

.section-people__name {
  flex: 1 1 10rem;
}

.section-people__controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.form-card .move-to select {
  width: auto;
  max-width: 15rem;
  min-height: 44px;
}

/* Genetics resources page: a welcoming header and three numbered steps */
.genetics-hero {
  padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0 clamp(2rem, 1.5rem + 2vw, 3rem);
  background: linear-gradient(135deg, var(--leaf-tint), var(--amber-tint));
}

.genetics-hero h1 {
  margin-top: 0.25rem;
}

.genetics-hero .lede {
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  color: var(--ink);
  max-width: 60ch;
}

.genetics-steps {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.genetics-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem 1.5rem;
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  border: 1px solid var(--line);
  border-left: 6px solid var(--leaf);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 1.1rem;
}

.genetics-step--plan {
  border-left-color: var(--amber);
}

.genetics-step--practice {
  border-left-color: #2f5f8f;
}

.genetics-step h3 {
  margin: 0.15rem 0 0.5rem;
  font-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.7rem);
}

.genetics-step p {
  max-width: 68ch;
}

.genetics-step__number {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--leaf);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 600;
}

.genetics-step--plan .genetics-step__number {
  background: var(--amber);
}

.genetics-step--practice .genetics-step__number {
  background: #2f5f8f;
}

@media (max-width: 560px) {
  .genetics-step {
    grid-template-columns: 1fr;
  }
}

.genetics-instructors {
  margin-top: 2rem;
}

/* =====================================================================
   Design D: logo colors on parchment, with taped-on field photos.
   ===================================================================== */
:root {
  --bg: #f1e6cf;
  --surface: #fffdf7;
  --surface-alt: rgba(255, 253, 247, 0.5);
  --ink: #2d2416;
  --ink-muted: #5f5240;
  --line: #dccba6;
  --leaf: #2f5d3a;
  --leaf-dark: #22452b;
  --leaf-tint: #e3ead6;
  --amber: #c4642a;
  --amber-tint: #f5e2c2;
  --mustard: #e0a335;
  --mustard-text: #855e05;
  --goldenrod: #f2c063;
  --rust: #9a4a1f;
  --focus: #c4642a;
  --shadow: 0 2px 6px rgba(60, 40, 10, 0.08), 0 8px 26px rgba(60, 40, 10, 0.1);
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(rgba(120, 80, 30, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
}

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

.site-header {
  background: #fffdf7;
  backdrop-filter: none;
  border-bottom: 6px solid var(--mustard);
}

.site-footer {
  background: var(--leaf);
  color: #fff;
  border-top: 6px solid var(--mustard);
}

.site-footer a {
  color: var(--goldenrod);
}

.section--alt {
  background: rgba(255, 253, 247, 0.45);
}

/* Cards are cream with a colored tab on top, alternating green and mustard. */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 6px solid var(--leaf);
}

.card-grid > .card:nth-child(even),
.card.card--gold {
  border-top-color: var(--mustard);
}

/* Taped-on photos: a white print with a strip of mustard tape and a slight tilt. */
.tape {
  position: relative;
  margin: 0;
  background: #fff;
  padding: 10px 10px 2.4rem;
  box-shadow: 0 12px 30px rgba(40, 30, 10, 0.28);
  transform: rotate(1.5deg);
}

.tape:nth-of-type(even),
.tape.tape--left {
  transform: rotate(-1.5deg);
}

.tape::before {
  content: "";
  position: absolute;
  top: -14px;
  left: calc(50% - 55px);
  width: 110px;
  height: 28px;
  background: rgba(224, 163, 53, 0.8);
  transform: rotate(-3deg);
  z-index: 1;
}

.tape img,
.tape .photo {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.tape figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.55rem;
  padding: 0 0.75rem;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 0.95rem;
  text-align: center;
  color: #5b4636;
}

@media (prefers-reduced-motion: reduce) {
  .tape,
  .tape:nth-of-type(even) {
    transform: none;
  }
}

/* Home page: a green title band with the lead photo taped on, then a striped edge. */
.title-band {
  background: var(--leaf);
  color: #fff;
  padding: clamp(3rem, 2rem + 5vw, 6rem) 0;
  overflow: hidden;
}

.title-band .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  align-items: center;
}

@media (max-width: 760px) {
  .title-band .wrap {
    grid-template-columns: 1fr;
  }
}

.title-band h1 {
  color: #fff;
  font-size: clamp(2.8rem, 1.6rem + 4.5vw, 5.2rem);
  margin-bottom: 0.4rem;
}

.title-band .tagline {
  margin: 0;
  color: var(--goldenrod);
  font-weight: 600;
  font-size: clamp(1.2rem, 1rem + 0.7vw, 1.6rem);
}

.stripe {
  height: 14px;
  background: repeating-linear-gradient(90deg, var(--mustard) 0 60px, var(--amber) 60px 120px, var(--leaf) 120px 180px);
}

.home-cards {
  display: grid;
  gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.home-cards .card {
  padding: clamp(1.5rem, 1rem + 2vw, 3rem);
}

/* Banner photos on inner pages get the striped edge under them. */
.banner-img {
  border-bottom: 14px solid transparent;
  border-image: repeating-linear-gradient(90deg, #e0a335 0 60px, #c4642a 60px 120px, #2f5d3a 120px 180px) 14;
}

/* The Research slideshow as a taped-on print. */
.slideshow__viewport {
  background: #fff;
  border: 10px solid #fff;
  border-bottom-width: 2.6rem;
  border-radius: 0;
  box-shadow: 0 12px 30px rgba(40, 30, 10, 0.28);
  overflow: visible;
  transform: rotate(-1deg);
}

.slideshow__viewport::before {
  content: "";
  position: absolute;
  top: -24px;
  left: calc(50% - 60px);
  width: 120px;
  height: 30px;
  background: rgba(224, 163, 53, 0.8);
  transform: rotate(2deg);
  z-index: 2;
}

.slideshow__slide {
  background: #fff;
}

.slideshow__slide figcaption {
  top: calc(100% + 0.35rem);
  bottom: auto;
  padding: 0 0.75rem;
  background: none;
  color: #5b4636;
  font-family: var(--font-head);
  font-style: italic;
  text-align: center;
}

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

/* Pages added from the dashboard. */
.custom-blocks {
  display: grid;
  gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.custom-blocks > .card {
  padding: clamp(1.5rem, 1rem + 2vw, 3rem);
}

.title-band__intro {
  margin: 1rem 0 0;
  max-width: 50ch;
  font-size: 1.15rem;
  color: #f4ecdb;
}

.title-band .tagline + h1 {
  margin-top: 0.3rem;
}

.custom-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 2.5rem 2rem;
  margin-top: 1.75rem;
}

.custom-button {
  text-align: center;
}

.custom-button .btn {
  margin-top: 0.5rem;
}

/* The Pages tab on the dashboard. */
.custom-page-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.page-editor__group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  margin: 0 0 1.25rem;
  min-width: 0;
}

.page-editor__group legend {
  font-weight: 700;
  padding: 0 0.4rem;
}

.block-list,
.sub-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.block-list__item {
  border: 1px solid var(--line);
  border-left: 6px solid var(--leaf);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--surface);
}

.block-list__item:nth-child(even) {
  border-left-color: var(--mustard);
}

.sub-list {
  padding-left: 1rem;
  border-left: 2px solid var(--line);
}

.sub-list__item {
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--line);
}

.sub-list__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.block-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.block-picker {
  margin: 1rem 0;
}

.block-picker__grid,
.template-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 0.75rem;
  margin: 0.5rem 0 0.75rem;
}

.template-picker {
  border: 0;
  padding: 0;
  min-width: 0;
}

.template-picker legend {
  margin-bottom: 0.5rem;
}

.block-picker__option,
.template-option {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.85rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.block-picker__option span,
.template-option__text span {
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.block-picker__option:hover,
.block-picker__option:focus-visible,
.template-option:hover,
.template-option:has(input:checked) {
  border-color: var(--leaf);
}

.template-option:has(input:checked) {
  box-shadow: 0 0 0 2px var(--leaf);
}

.template-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.template-option:has(input:focus-visible) {
  outline: 3px solid var(--mustard);
  outline-offset: 2px;
}

.template-option__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* Small sketches of each template. */
.template-thumb {
  display: grid;
  gap: 4px;
  height: 64px;
  padding: 6px;
  border-radius: 4px;
  background: var(--bg);
}

.template-thumb span {
  border-radius: 2px;
  background: #fff;
}

.template-thumb--story {
  grid-template-rows: 1.2fr 1fr 1fr;
}

.template-thumb--story span:first-child,
.template-thumb--gallery span:first-child {
  background: var(--leaf);
}

.template-thumb--story span:nth-child(2) {
  border-top: 3px solid var(--leaf);
}

.template-thumb--story span:nth-child(3) {
  border-top: 3px solid var(--mustard);
}

.template-thumb--text span:first-child {
  width: 55%;
  background: var(--rust);
  opacity: 0.7;
}

.template-thumb--cards {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 2fr;
}

.template-thumb--cards span:first-child {
  grid-column: 1 / -1;
  width: 50%;
  background: var(--rust);
  opacity: 0.7;
}

.template-thumb--gallery {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr 1.4fr;
}

.template-thumb--gallery span:first-child {
  grid-column: 1 / -1;
}

.template-thumb--gallery span:nth-child(2) {
  transform: rotate(-3deg);
}

.template-thumb--gallery span:nth-child(3) {
  transform: rotate(3deg);
}

.template-thumb--blank span:not(:first-child) {
  visibility: hidden;
}

.template-thumb--blank span:first-child {
  width: 45%;
  height: 10px;
  background: var(--rust);
  opacity: 0.7;
}

.page-editor__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.page-editor__actions .link-button--danger {
  margin-left: auto;
}

/* Sections tab: people taken off the site, hidden sections, and editing in place. */
.section-people li.is-off-site .section-people__name {
  color: var(--ink-muted);
  text-decoration: line-through;
  text-decoration-color: var(--line);
}

.section-people li.is-off-site .section-people__name .hint {
  text-decoration: none;
  display: inline-block;
}

.section-hidden-note {
  margin: 0.4rem 0 0;
}

.section-people__edit {
  flex: 1 1 100%;
  margin: 0.5rem 0 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.custom-block ul:not(.resource-list) {
  list-style: disc;
  padding-left: 1.4rem;
  margin: 0 0 1rem;
}

.custom-block ul:not(.resource-list) li + li {
  margin-top: 0.3rem;
}

/* A shorter title band with a smaller taped photo. */
.title-band {
  padding: clamp(1.75rem, 1rem + 2.5vw, 3.25rem) 0;
}

.title-band h1 {
  font-size: clamp(2.4rem, 1.5rem + 3.2vw, 4.2rem);
}

.title-band .tape {
  width: 100%;
  max-width: 21rem;
  justify-self: end;
}

@media (max-width: 760px) {
  .title-band .tape {
    max-width: 18rem;
    justify-self: center;
  }
}

.site-footer__copy {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Adding an email right in a person's row on the People tab. */
.invite-email {
  flex-wrap: wrap;
  align-items: flex-end;
}

.invite-email .field {
  flex: 1 1 16rem;
  margin-bottom: 0;
}

.invite-email .btn {
  min-height: 44px;
}

.invite-email .notice {
  flex-basis: 100%;
}

/* Choosing a person's sections (dashboard) and a student's own list. */
.section-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  margin: 0 0 1rem;
  min-width: 0;
}

.section-picker > legend {
  font-weight: 700;
  padding: 0 0.4rem;
}

.section-picker__group {
  border: 0;
  padding: 0;
  margin: 0.75rem 0 0;
  min-width: 0;
}

.section-picker__group legend {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.my-sections {
  list-style: none;
  margin: 0;
  padding: 0;
}

.my-sections li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

.my-sections .check {
  margin: 0;
}

/* Map pins, colored by degree (client/map.tsx), and the key under the map. */
.map-pin-svg {
  background: none;
  border: 0;
}

.map-pin-svg svg {
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.pin-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.pin-key li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pin-key svg {
  width: 18px;
  height: 22px;
}

.person__coadvisor {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-muted);
}

/* A larger logo: in the header, and beside the lab's name on the home page. */
.brand img {
  width: 58px;
  height: 58px;
}

@media (max-width: 600px) {
  .brand img {
    width: 48px;
    height: 48px;
  }
}

.title-band__brand {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.5rem + 2vw, 2rem);
}

.title-band__logo {
  flex: 0 0 auto;
  width: clamp(110px, 8rem + 4vw, 190px);
  height: auto;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Logo above the name until there's room for both side by side. */
@media (max-width: 1100px) {
  .title-band__brand {
    flex-direction: column;
    align-items: flex-start;
  }
}
