:root {
  --ink: #172027;
  --oxford: #0f2f3f;
  --laboratory: #1f6f66;
  --brass: #b89252;
  --paper: #f7f4ed;
  --porcelain: #fbfaf7;
  --rule: rgba(23, 32, 39, 0.16);
  --shadow: 0 24px 80px rgba(15, 47, 63, 0.16);
  --site-max: 1520px;
  --content-max: 1180px;
  --reading-max: 880px;
  --page-gutter: clamp(20px, 4.2vw, 72px);
  --wide-gutter: max(var(--page-gutter), calc((100vw - var(--site-max)) / 2));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(15, 47, 63, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 47, 63, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  flex: 1;
}

.article-page main {
  flex: 0 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid rgba(184, 146, 82, 0.75);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 18px var(--wide-gutter);
  border-bottom: 1px solid var(--rule);
  background: rgba(247, 244, 237, 0.9);
  backdrop-filter: blur(18px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.wordmark-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--oxford);
  background: var(--oxford);
  color: var(--porcelain);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.wordmark-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  color: rgba(23, 32, 39, 0.76);
  font-size: 16px;
}

.nav-menu-links,
.nav-icon-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}

.nav-links a:hover,
.nav-menu-toggle:hover {
  color: var(--oxford);
}

.nav-menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--oxford);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.nav-menu-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav-portal,
.nav-mail {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
}

.nav-portal {
  color: rgba(23, 32, 39, 0.76);
}

.nav-portal + .nav-mail {
  margin-left: calc(clamp(14px, 2vw, 28px) * -0.45);
}

.nav-portal svg,
.nav-mail svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.72fr);
  gap: clamp(32px, 6vw, 82px);
  align-items: center;
  width: 100%;
  max-width: var(--site-max);
  min-height: auto;
  margin: 0 auto;
  padding: clamp(30px, 4vw, 56px) var(--page-gutter) clamp(42px, 7vw, 82px);
}

.hero-copy {
  max-width: 820px;
}

.eyebrow,
.card-kicker,
.note-label {
  margin: 0;
  color: var(--laboratory);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 18px;
  color: var(--oxford);
  font-size: clamp(50px, 8.5vw, 116px);
  line-height: 0.9;
}

.hero-subtitle {
  max-width: 740px;
  margin-bottom: 24px;
  color: var(--oxford);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3.3vw, 40px);
  line-height: 1.06;
}

.hero-summary,
.page-hero p,
.text-section p,
.article-subtitle {
  max-width: 760px;
  color: rgba(23, 32, 39, 0.76);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.75;
}

.hero-summary {
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--oxford);
  font-size: 14px;
  font-weight: 800;
}

.button.primary {
  background: var(--oxford);
  color: var(--porcelain);
}

.button.secondary {
  background: transparent;
}

.lab-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 47, 63, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(247, 244, 237, 0.72)),
    repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(15, 47, 63, 0.05) 24px);
  box-shadow: var(--shadow);
}

.lab-panel::before {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(184, 146, 82, 0.38);
  content: "";
  pointer-events: none;
}

.panel-topline {
  display: flex;
  justify-content: space-between;
  padding: 28px 30px 0;
  color: rgba(23, 32, 39, 0.58);
  font-family: "Courier New", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.molecule-map {
  padding: 20px 22px 4px;
}

.molecule-map svg {
  display: block;
  width: 100%;
  height: auto;
}

.bonds line {
  stroke-linecap: round;
  stroke-width: 5;
}

.atoms circle {
  fill: var(--porcelain);
  stroke: var(--oxford);
  stroke-width: 4;
}

.spectrum {
  fill: none;
  stroke: var(--brass);
  stroke-linejoin: round;
  stroke-width: 4;
}

.panel-notes {
  display: grid;
  gap: 1px;
  border-top: 1px solid var(--rule);
  background: var(--rule);
}

.panel-notes div {
  padding: 18px 30px;
  background: rgba(251, 250, 247, 0.82);
}

.panel-notes strong {
  display: block;
  margin-top: 6px;
  color: var(--oxford);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  border-block: 1px solid var(--rule);
  border-inline: 1px solid var(--rule);
  background: rgba(251, 250, 247, 0.68);
}

.proof-strip article {
  min-height: 190px;
  padding: clamp(24px, 4vw, 44px);
  border-right: 1px solid var(--rule);
}

.proof-strip article:last-child {
  border-right: 0;
}

.proof-strip span {
  color: var(--brass);
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
}

.proof-strip h2 {
  margin: 22px 0 12px;
  color: var(--oxford);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.proof-strip p,
.work-card p,
.research-band li,
.empty-note,
.article-meta {
  color: rgba(23, 32, 39, 0.72);
  font-size: 16px;
  line-height: 1.65;
}

.work-card p {
  font-size: 17px;
  line-height: 1.7;
}

.section-intro,
.page-hero {
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: clamp(34px, 4.5vw, 59px) var(--page-gutter) 28px;
}

.page-hero {
  padding-bottom: clamp(44px, 6vw, 72px);
}

.page-hero.compact {
  max-width: var(--site-max);
}

.page-hero h1 {
  max-width: none;
  margin-bottom: 0;
  color: var(--oxford);
  font-size: clamp(32px, 5vw, 60px);
  line-height: 0.98;
}

.section-intro h2,
.research-band h2 {
  margin-bottom: 0;
  color: var(--oxford);
  font-size: clamp(28px, 4.2vw, 50px);
  line-height: 1;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter) clamp(35px, 4.5vw, 60px);
}

.work-grid.listing {
  padding-top: 0;
}

.work-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid var(--rule);
  background: rgba(251, 250, 247, 0.72);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(31, 111, 102, 0.48);
  background: rgba(251, 250, 247, 0.94);
}

.work-card h3 {
  margin: 32px 0 18px;
  font-size: clamp(21px, 2.25vw, 29px);
  line-height: 1.02;
}

.card-title-link {
  color: var(--oxford);
}

.card-excerpt-link {
  color: rgba(23, 32, 39, 0.72);
  font-size: 17px;
  line-height: 1.7;
}

.card-title-link,
.card-excerpt-link {
  display: block;
}

.card-title-link:hover,
.card-excerpt-link:hover {
  color: var(--laboratory);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: auto;
  padding-top: 28px;
  color: var(--laboratory);
  font-size: 14px;
}

.text-link {
  display: inline-flex;
  margin-top: 20px;
  border-bottom: 1px solid var(--brass);
  color: var(--oxford);
  font-weight: 800;
}

.research-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.6fr);
  gap: 44px;
  align-items: start;
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: clamp(58px, 8vw, 94px) var(--page-gutter);
  background: var(--oxford);
  color: var(--porcelain);
}

.research-band .eyebrow {
  color: var(--brass);
}

.research-band h2 {
  color: var(--porcelain);
}

.interest-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(251, 250, 247, 0.2);
}

.research-band li {
  padding: 18px 0;
  border-bottom: 1px solid rgba(251, 250, 247, 0.2);
  color: rgba(251, 250, 247, 0.78);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter) 28px;
}

.filter-row a {
  padding: 10px 14px;
  border: 1px solid var(--rule);
  background: rgba(251, 250, 247, 0.66);
  color: rgba(23, 32, 39, 0.74);
  font-size: 14px;
  font-weight: 800;
}

.filter-row a.active {
  border-color: var(--oxford);
  background: var(--oxford);
  color: var(--porcelain);
}

.text-section {
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter) clamp(20px, 2.8vw, 32px);
}

.article-detail {
  max-width: var(--reading-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter) clamp(20px, 2.8vw, 32px);
}

.text-section h2,
.article-body h2 {
  margin: 44px 0 14px;
  color: var(--oxford);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
}

.article-detail {
  margin: 0 auto;
  padding-top: clamp(35px, 4.5vw, 59px);
}

.article-detail.compact-adjacent-nav {
  padding-bottom: clamp(9px, 1.3vw, 15px);
}

.article-detail h1 {
  font-size: clamp(30px, 4.2vw, 50px);
}

.article-body {
  margin-top: 48px;
  border-top: 1px solid var(--rule);
  padding-top: 36px;
}

.article-body p,
.article-body li {
  color: rgba(23, 32, 39, 0.78);
  font-size: 20px;
  line-height: 1.85;
}

.article-body ul {
  padding-left: 1.2rem;
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 28px 0;
}

.article-body figure {
  margin: 34px 0;
}

.article-body figcaption {
  margin-top: 10px;
  color: rgba(23, 32, 39, 0.58);
  font-size: 14px;
  line-height: 1.5;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.article-tag {
  color: var(--laboratory);
  font-weight: 400;
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: clamp(19px, 3vw, 34px);
  border-top: 1px solid var(--rule);
}

.compact-adjacent-nav .article-nav {
  margin-top: clamp(9px, 1.3vw, 15px);
}

.article-nav-link {
  padding: clamp(9px, 1.3vw, 12px) 0;
}

.article-nav-link span {
  display: block;
  margin-bottom: 12px;
  color: var(--laboratory);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-nav-link strong {
  display: block;
  color: var(--oxford);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 500;
  line-height: 1.18;
}

.article-nav-link:hover {
  color: var(--laboratory);
}

.portal-shell {
  width: min(var(--content-max), calc(100vw - clamp(28px, 6vw, 96px)));
  max-width: none;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 68px) 0 clamp(40px, 6vw, 76px);
}

.calendar-shell,
.booking-records-shell {
  width: min(var(--content-max), calc(100vw - clamp(28px, 6vw, 96px)));
  max-width: none;
  margin: 0 auto;
  padding: clamp(28px, 3.2vw, 48px) 0 clamp(40px, 5vw, 72px);
}

.calendar-shell .portal-heading,
.booking-records-shell .portal-heading {
  max-width: none;
}

.admin-dashboard-shell {
  width: min(var(--content-max), calc(100vw - clamp(28px, 6vw, 96px)));
  max-width: none;
  margin: 0 auto;
  padding: clamp(28px, 3.2vw, 48px) 0 clamp(40px, 5vw, 72px);
}

.admin-dashboard-shell .portal-heading {
  max-width: none;
}

.portal-heading {
  max-width: 760px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.portal-heading h1,
.portal-panel h1 {
  max-width: 760px;
  margin: 10px 0 16px;
  color: var(--oxford);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.98;
}

.portal-intro {
  max-width: 660px;
  color: rgba(23, 32, 39, 0.72);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.75;
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}

.portal-actions form {
  margin: 0;
}

.portal-panel {
  border: 1px solid var(--rule);
  background: rgba(251, 250, 247, 0.76);
  padding: clamp(24px, 4vw, 38px);
}

.portal-panel.narrow {
  max-width: 560px;
}

.booking-record-panel {
  border: 0;
  background: transparent;
  padding: 0;
}

.portal-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 16px;
}

.portal-panel-header h2 {
  margin: 0;
  color: var(--oxford);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(22px, 2.8vw, 32px);
}

.portal-panel-header span,
.slot-date {
  color: var(--laboratory);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-form {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.portal-form label {
  color: var(--oxford);
  font-size: 13px;
  font-weight: 700;
}

.portal-form input,
.portal-form textarea {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--porcelain);
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
}

.portal-form textarea {
  resize: vertical;
}

.portal-checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}

.portal-checkbox-list ul {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-checkbox-list li {
  margin: 0;
}

.portal-checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--rule);
  background: rgba(251, 250, 247, 0.82);
  padding: 10px 12px;
}

.portal-checkbox-list input {
  width: auto;
  accent-color: var(--laboratory);
}

.portal-auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 20px;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}

.portal-auth-links a {
  color: var(--oxford);
  font-size: 14px;
  font-weight: 700;
}

.portal-auth-links a:hover {
  color: var(--laboratory);
}

.modal-open {
  overflow: hidden;
}

.student-login-modal[hidden] {
  display: none;
}

.student-login-modal {
  position: fixed;
  z-index: 40;
  display: grid;
  place-items: center;
  inset: 0;
  padding: clamp(18px, 4vw, 42px);
}

.student-login-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 32, 39, 0.28);
  backdrop-filter: blur(4px);
}

.student-login-dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: min(86vh, 760px);
  overflow-y: auto;
  border: 1px solid rgba(23, 32, 39, 0.22);
  background:
    linear-gradient(90deg, rgba(15, 47, 63, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 47, 63, 0.03) 1px, transparent 1px),
    var(--porcelain);
  background-size: 44px 44px;
  padding: clamp(30px, 4.5vw, 44px);
  box-shadow: 0 28px 90px rgba(15, 47, 63, 0.24);
}

.student-auth-panel[hidden] {
  display: none;
}

.student-login-dialog h2 {
  margin: 10px 0 14px;
  color: var(--oxford);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(42px, 6vw, 66px);
  line-height: 0.98;
}

.student-login-dialog .portal-intro {
  margin-bottom: 26px;
}

.student-login-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--rule);
  background: rgba(251, 250, 247, 0.88);
  color: var(--oxford);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.student-login-close:hover {
  background: var(--oxford);
  color: var(--porcelain);
}

.form-error,
.portal-form .errorlist {
  margin: 0;
  color: #8a2f20;
  font-size: 14px;
}

.message-list {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.message {
  margin: 0;
  border: 1px solid rgba(31, 111, 102, 0.24);
  background: rgba(251, 250, 247, 0.82);
  color: rgba(23, 32, 39, 0.76);
  padding: 12px 14px;
}

.booking-list {
  display: grid;
  gap: 1px;
  background: var(--rule);
}

.booking-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(251, 250, 247, 0.92);
  padding: 16px 0;
}

.booking-row div {
  display: grid;
  gap: 4px;
  padding-left: 16px;
}

.booking-row strong,
.slot-summary strong {
  color: var(--oxford);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
}

.booking-row span,
.slot-summary span {
  color: rgba(23, 32, 39, 0.62);
}

.booking-row .booking-student {
  color: var(--laboratory);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.booking-table-wrap {
  overflow-x: auto;
  border: 0.5px solid rgba(23, 32, 39, 0.14);
  background: rgba(251, 250, 247, 0.9);
}

.booking-record-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 15px;
}

.booking-record-table th,
.booking-record-table td {
  border-right: 0.5px solid rgba(23, 32, 39, 0.14);
  border-bottom: 0.5px solid rgba(23, 32, 39, 0.14);
  padding: 14px 12px;
  text-align: left;
  vertical-align: middle;
}

.booking-record-table th:last-child,
.booking-record-table td:last-child {
  border-right: 0;
}

.booking-record-table th {
  background: rgba(23, 32, 39, 0.045);
  color: rgba(23, 32, 39, 0.82);
  font-weight: 700;
}

.booking-record-table td {
  color: rgba(23, 32, 39, 0.76);
}

.booking-record-table .table-link {
  color: var(--oxford);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(184, 146, 82, 0.75);
  text-underline-offset: 3px;
}

.booking-record-table .table-link:hover {
  color: var(--laboratory);
}

.student-authorisation-list {
  display: grid;
  gap: 7px;
}

.student-authorisation-list label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(23, 32, 39, 0.76);
  font-size: 14px;
}

.student-authorisation-list input {
  width: 15px;
  height: 15px;
  accent-color: var(--laboratory);
}

.resource-actions {
  margin-top: 18px;
}

.booking-record-table .status-pill {
  margin: 0;
}

.booking-record-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 22px;
  color: rgba(23, 32, 39, 0.78);
  font-size: 15px;
}

.booking-record-filters label {
  font-weight: 700;
}

.booking-record-filters select {
  min-width: 96px;
  border: 1px solid rgba(23, 32, 39, 0.18);
  background: rgba(251, 250, 247, 0.92);
  color: rgba(23, 32, 39, 0.78);
  font-size: 13px;
  padding: 5px 9px;
}

.booking-status-select {
  min-width: 132px;
  border: 1px solid rgba(31, 111, 102, 0.28);
  border-radius: 0;
  background: rgba(251, 250, 247, 0.88);
  color: var(--laboratory);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 8px 10px;
  text-transform: uppercase;
}

.booking-status-select.confirmed {
  border-color: rgba(15, 47, 63, 0.24);
  color: var(--oxford);
}

.booking-status-select.declined,
.booking-status-select.cancelled {
  border-color: rgba(138, 47, 32, 0.28);
  color: #8a2f20;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 16px 0 0;
  border: 1px solid rgba(31, 111, 102, 0.28);
  color: var(--laboratory);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 7px 10px;
  text-transform: uppercase;
}

.status-pill.confirmed {
  border-color: rgba(15, 47, 63, 0.24);
  color: var(--oxford);
}

.status-pill.declined,
.status-pill.cancelled,
.status-pill.started {
  border-color: rgba(138, 47, 32, 0.28);
  color: #8a2f20;
}

.slot-summary {
  display: grid;
  gap: 6px;
  margin: 22px 0;
  border-block: 1px solid var(--rule);
  padding: 18px 0;
}

.booking-modal[hidden] {
  display: none;
}

.booking-modal {
  position: fixed;
  z-index: 30;
  display: grid;
  place-items: center;
  inset: 0;
  padding: clamp(18px, 4vw, 42px);
}

.booking-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 32, 39, 0.28);
  backdrop-filter: blur(4px);
}

.booking-dialog {
  position: relative;
  width: min(640px, 100%);
  border: 1px solid rgba(23, 32, 39, 0.22);
  background:
    linear-gradient(90deg, rgba(15, 47, 63, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 47, 63, 0.03) 1px, transparent 1px),
    var(--porcelain);
  background-size: 44px 44px;
  padding: clamp(26px, 4vw, 40px);
  box-shadow: 0 28px 90px rgba(15, 47, 63, 0.24);
}

.booking-dialog h2 {
  margin: 10px 0 0;
  color: var(--oxford);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(40px, 5.4vw, 58px);
  line-height: 1;
  white-space: nowrap;
}

.booking-dialog .slot-summary {
  margin: 16px 0 24px;
  padding: 18px 0;
}

.booking-modal-summary {
  color: var(--oxford);
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.25;
}

.booking-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--rule);
  background: rgba(251, 250, 247, 0.88);
  color: var(--oxford);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.booking-modal-close:hover {
  background: var(--oxford);
  color: var(--porcelain);
}

.calendar-panel {
  margin-bottom: 0;
  border-color: rgba(23, 32, 39, 0.22);
  background: rgba(251, 250, 247, 0.9);
  padding: clamp(12px, 1.8vw, 24px);
}

.calendar-instructions {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.calendar-instructions p {
  margin: 0;
  color: rgba(23, 32, 39, 0.74);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.75;
}

.lesson-calendar {
  --calendar-rule: rgba(23, 32, 39, 0.1);
  --fc-border-color: var(--calendar-rule);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: rgba(247, 244, 237, 0.72);
  --fc-list-event-hover-bg-color: rgba(31, 111, 102, 0.08);
  height: auto;
  font-size: 13px;
  min-height: 0;
}

.lesson-calendar.fc,
.lesson-calendar .fc {
  height: 100%;
}

.lesson-calendar .fc-scrollgrid {
  border: 1px solid var(--calendar-rule) !important;
}

.lesson-calendar .fc-scrollgrid,
.lesson-calendar.fc-theme-standard td,
.lesson-calendar.fc-theme-standard th,
.lesson-calendar .fc-scrollgrid-section > td,
.lesson-calendar .fc-daygrid-day,
.lesson-calendar .fc-col-header-cell,
.lesson-calendar .fc-timegrid-slot,
.lesson-calendar .fc-timegrid-col,
.lesson-calendar .fc-timegrid-axis {
  border-color: var(--calendar-rule) !important;
  border-width: 1px !important;
}

.lesson-calendar.fc-theme-standard td,
.lesson-calendar.fc-theme-standard th {
  border-color: var(--calendar-rule) !important;
  border-width: 1px !important;
}

.lesson-calendar .fc-scrollgrid-section-header > th,
.lesson-calendar .fc-scrollgrid-section-body > td,
.lesson-calendar .fc-timegrid-divider,
.lesson-calendar .fc-timegrid-body,
.lesson-calendar .fc-timegrid-cols,
.lesson-calendar .fc-daygrid-body,
.lesson-calendar .fc-daygrid-day-frame,
.lesson-calendar .fc-timegrid-now-indicator-container {
  border-color: var(--calendar-rule) !important;
}

.lesson-calendar .fc-toolbar {
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.lesson-calendar .fc-toolbar-title {
  color: var(--oxford);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 500;
}

.lesson-calendar .fc-button {
  min-height: 40px;
  border: 1px solid rgba(15, 47, 63, 0.2);
  border-radius: 4px;
  background: rgba(15, 47, 63, 0.72);
  color: var(--porcelain);
  box-shadow: none;
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
}

.lesson-calendar .fc-button:hover,
.lesson-calendar .fc-button-primary:not(:disabled).fc-button-active {
  border-color: var(--oxford);
  background: var(--oxford);
  color: var(--porcelain);
}

.lesson-calendar .fc-button:focus {
  box-shadow: 0 0 0 3px rgba(184, 146, 82, 0.24);
}

.lesson-calendar .fc-col-header-cell-cushion,
.lesson-calendar .fc-timegrid-slot-label-cushion,
.lesson-calendar .fc-list-day-text,
.lesson-calendar .fc-list-day-side-text {
  color: var(--oxford);
}

.lesson-calendar .fc-col-header-cell-cushion {
  padding: clamp(7px, 0.75vw, 11px) 4px;
  font-size: clamp(16px, 1.25vw, 20px);
  font-weight: 500;
}

.lesson-calendar .fc-daygrid-day-number {
  color: rgba(23, 32, 39, 0.82);
  font-size: clamp(17px, 1.25vw, 24px);
  padding: clamp(8px, 0.75vw, 12px);
}

.lesson-calendar .fc-daygrid-day-frame {
  min-height: 118px;
}

.lesson-calendar .fc-timegrid-slots tr,
.lesson-calendar .fc-timegrid-slot {
  height: 40px;
}

.lesson-calendar .fc-timegrid-axis,
.lesson-calendar .fc-timegrid-slot-label {
  border-color: var(--calendar-rule) !important;
}

.lesson-calendar .fc-timegrid-slot-label-cushion {
  font-size: clamp(16px, 1.05vw, 20px);
}

.lesson-calendar .fc-day-other {
  background: rgba(23, 32, 39, 0.04);
}

.lesson-calendar .fc-event {
  min-height: 100%;
  border: 0 !important;
  border-radius: 3px;
  background: #2f8f66 !important;
  color: var(--porcelain);
  cursor: pointer;
  font-weight: 600;
}

.lesson-calendar .fc-event-title,
.lesson-calendar .fc-event-time,
.lesson-calendar .fc-event-main,
.lesson-calendar .fc-event-main-frame,
.lesson-calendar .fc-event-title-container {
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.lesson-calendar .fc-event-main {
  min-height: 100%;
}

.lesson-calendar .calendar-event-time {
  display: block;
  overflow: hidden;
  padding: 6px 7px;
  color: var(--porcelain);
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-calendar .fc-daygrid-event {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  margin: 2px 5px;
}

.lesson-calendar .fc-daygrid-event .fc-event-main {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.lesson-calendar .fc-timegrid-event {
  inset: 2px 9px !important;
  min-height: auto;
}

.lesson-calendar .slot-requested {
  background: rgba(185, 74, 61, 0.28) !important;
  color: var(--ink);
  cursor: default;
}

.lesson-calendar .slot-started {
  background: rgba(23, 32, 39, 0.28) !important;
  color: var(--porcelain);
  cursor: default;
}

.lesson-calendar .slot-booked {
  background: #b94a3d !important;
  color: var(--porcelain);
}

.lesson-calendar .slot-confirmed {
  background: #315f86 !important;
  color: var(--porcelain);
}

.lesson-calendar .slot-unconfirmed {
  background: rgba(185, 74, 61, 0.28) !important;
  color: var(--ink);
}

.lesson-calendar .slot-unconfirmed .calendar-event-time,
.lesson-calendar .slot-requested .calendar-event-time {
  color: var(--ink);
}

.lesson-calendar .slot-unavailable {
  background: rgba(23, 32, 39, 0.28) !important;
  color: var(--porcelain);
}

.schedule-calendar .fc-highlight {
  background: rgba(31, 111, 102, 0.16);
}

.calendar-legend,
.schedule-help {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 16px;
  color: rgba(23, 32, 39, 0.64);
  font-size: 14px;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.schedule-help strong,
.calendar-legend strong {
  color: var(--oxford);
}

.legend-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(23, 32, 39, 0.16);
  border-radius: 3px;
}

.legend-swatch.available {
  background: #2f8f66;
}

.legend-swatch.booked {
  background: #b94a3d;
}

.legend-swatch.confirmed {
  background: #315f86;
}

.legend-swatch.unconfirmed {
  background: rgba(185, 74, 61, 0.28);
}

.calendar-fallback {
  margin: 16px 0 0;
  color: rgba(23, 32, 39, 0.56);
  font-size: 13px;
}

@media (min-width: 1500px) {
  .lesson-calendar .fc-daygrid-day-frame {
    min-height: 170px;
  }
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px var(--wide-gutter);
  border-top: 1px solid var(--rule);
  background: rgba(247, 244, 237, 0.9);
  color: rgba(23, 32, 39, 0.68);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--oxford);
  font-weight: 800;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .nav-menu-links,
  .nav-icon-links {
    flex-wrap: wrap;
  }

  .hero,
  .research-band {
    grid-template-columns: 1fr;
  }

  .lab-panel {
    max-width: 620px;
  }

  .proof-strip,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .proof-strip article {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

}

@media (max-width: 680px) {
  .site-header {
    position: static;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    padding: 14px 12px;
  }

  .portal-shell,
  .calendar-shell,
  .booking-records-shell,
  .admin-dashboard-shell {
    width: calc(100vw - 24px);
    padding-top: 24px;
    padding-bottom: 42px;
  }

  .wordmark-text {
    max-width: 150px;
  }

  .nav-links {
    display: flex;
    position: relative;
    width: auto;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
    font-size: 14px;
    line-height: 1.2;
  }

  .nav-menu-toggle {
    display: inline-grid;
    width: 30px;
    height: 30px;
    min-height: 0;
    align-items: center;
    place-items: center;
    border: 0;
    background: transparent;
    color: rgba(23, 32, 39, 0.76);
    padding: 0;
  }

  .nav-menu-toggle svg {
    width: 21px;
    height: 21px;
  }

  .nav-menu-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 20;
    width: min(240px, calc(100vw - 24px));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid rgba(23, 32, 39, 0.16);
    background: rgba(251, 250, 247, 0.98);
    box-shadow: 0 18px 44px rgba(15, 47, 63, 0.16);
    padding: 6px;
  }

  .nav-menu-links.is-open {
    display: flex;
  }

  .nav-menu-links a {
    padding: 10px 12px;
  }

  .nav-menu-links a + a {
    border-top: 1px solid rgba(23, 32, 39, 0.1);
  }

  .nav-icon-links {
    gap: 8px;
    margin-left: 0;
  }

  .nav-portal,
  .nav-mail {
    width: 30px;
    height: 30px;
  }

  .nav-portal svg,
  .nav-mail svg {
    width: 21px;
    height: 21px;
  }

  .nav-portal + .nav-mail {
    margin-left: 0;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  h1 {
    font-size: clamp(48px, 18vw, 76px);
  }

  .hero-subtitle {
    font-size: 26px;
  }

  .button {
    width: 100%;
  }

  .portal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-actions form,
  .portal-actions .button {
    width: 100%;
  }

  .portal-panel {
    padding: 22px;
  }

  .booking-table-wrap {
    margin-inline: -1px;
  }

  .booking-record-table {
    min-width: 720px;
  }

  .resource-table-wrap {
    overflow-x: visible;
    border: 0;
    background: transparent;
  }

  .resource-table {
    display: block;
    min-width: 0;
    border-collapse: separate;
  }

  .resource-table thead {
    display: none;
  }

  .resource-table tbody,
  .resource-table tr,
  .resource-table td {
    display: block;
    width: 100%;
  }

  .resource-table tr {
    margin-bottom: 14px;
    border: 1px solid rgba(23, 32, 39, 0.14);
    background: rgba(251, 250, 247, 0.9);
  }

  .resource-table td {
    border-right: 0;
    padding: 10px 12px 12px;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .resource-table td::before {
    display: block;
    margin-bottom: 5px;
    color: rgba(23, 32, 39, 0.64);
    content: attr(data-label);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .resource-table .resource-notes-cell {
    line-height: 1.65;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-topline,
  .panel-notes div {
    padding-inline: 22px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
