/* ============================================================
   Marlowe Site — Vibrant Design
   Stanford-branded, modern, energetic
   ============================================================ */

:root {
  --cardinal: #8C1515;
  --cardinal-dark: #820000;
  --cardinal-light: #B83A3A;
  --palo-alto: #175E54;
  --palo-alto-light: #2D8B7B;
  --digital-red: #B1040E;
  --stone: #544948;
  --fog: #F4F4F4;
  --white: #FFFFFF;
  --black: #2E2D29;
  --cool-grey: #4D4F53;
  --warm-grey: #2D2D2D;
  --border: #E0E0DE;

  /* Vibrant accents */
  --accent-blue: #006CB8;
  --accent-green: #008566;
  --accent-orange: #E98300;
  --accent-purple: #7F35B2;

  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --fog: #1a1a1a;
  --white: #121212;
  --black: #e0e0e0;
  --cool-grey: #b0b0b0;
  --warm-grey: #1a1a1a;
  --stone: #999;
  --border: #333;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}
[data-theme="dark"] body {
  background: #121212;
}
[data-theme="dark"] .header-top {
  background: #4a0808;
}
[data-theme="dark"] .header-sds-bar {
  background: #1a1a1a;
  border-bottom-color: #333;
}
[data-theme="dark"] .main-nav {
  background: #6b0f0f;
}
[data-theme="dark"] .nav-brand,
[data-theme="dark"] .nav-brand:hover {
  color: #fff !important;
}
[data-theme="dark"] .nav-links li a {
  color: rgba(255,255,255,0.85) !important;
}
[data-theme="dark"] .nav-links li a:hover,
[data-theme="dark"] .nav-links li a.active {
  color: #fff !important;
  background: rgba(255,255,255,0.1);
}
[data-theme="dark"] .nav-links li a.nav-cta,
[data-theme="dark"] .nav-links li a.nav-cta:hover {
  background: #fff !important;
  color: #8C1515 !important;
}
[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #6b0f0f 0%, #4a0808 40%, #1a0404 100%);
}
[data-theme="dark"] .hero h1,
[data-theme="dark"] .hero .hero-subtitle {
  color: #fff;
  opacity: 1;
}
[data-theme="dark"] .btn-white {
  background: #fff;
  color: var(--cardinal) !important;
}
[data-theme="dark"] .btn-white-outline {
  border-color: rgba(255,255,255,0.6);
  color: #fff !important;
}
[data-theme="dark"] .btn-white-outline:hover {
  background: rgba(255,255,255,0.15);
}
[data-theme="dark"] .section-alt {
  background: #1a1a1a;
}
[data-theme="dark"] .updates-feed {
  background: #1e1e1e;
  border-color: #333;
}
[data-theme="dark"] .feed-header {
  background: #1a1a1a;
  border-color: #333;
}
[data-theme="dark"] .feed-item:hover {
  background: #252525;
}
[data-theme="dark"] .type-research-milestone { background: #1e1b4b; color: #a5b4fc; }
[data-theme="dark"] .type-system-status { background: #052e16; color: #6ee7b7; }
[data-theme="dark"] .type-talks-seminars { background: #2e1065; color: #c4b5fd; }
[data-theme="dark"] .type-maintenance { background: #431407; color: #fdba74; }
[data-theme="dark"] .type-press { background: #4c0519; color: #fda4af; }
[data-theme="dark"] .quick-link-card {
  background: #1e1e1e;
  border-color: #333;
}
[data-theme="dark"] .quick-link-card:hover {
  background: #252525;
}
[data-theme="dark"] .quick-link-card h4 {
  color: #e87a74;
}
[data-theme="dark"] .quick-link-card p {
  color: #aaa;
}
[data-theme="dark"] .researcher-card {
  background: #1e1e1e;
  border-color: #333;
}
[data-theme="dark"] .researcher-card:hover {
  border-color: #555;
}
[data-theme="dark"] .card-name a {
  color: #e87a74;
}
[data-theme="dark"] .card-link {
  color: #e87a74 !important;
}
[data-theme="dark"] .card-affiliations .affil-lab,
[data-theme="dark"] .card-affiliations .affil-lab a {
  color: #ccc;
}
[data-theme="dark"] .card-affiliations .affil-lab::before {
  background: #666;
}
[data-theme="dark"] .cta-banner {
  background: linear-gradient(135deg, #6b0f0f 0%, #4a0808 100%);
}
[data-theme="dark"] .cta-banner h3,
[data-theme="dark"] .cta-banner p {
  color: #fff;
  opacity: 1;
}
[data-theme="dark"] .cta-banner .btn-white {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.6);
  color: #fff !important;
}
[data-theme="dark"] .cta-banner .btn-white:hover {
  background: rgba(255,255,255,0.15);
}
[data-theme="dark"] .callout {
  background: #1e1e1e;
  border-color: #333;
}
[data-theme="dark"] .specs-table td {
  border-color: #333;
}
[data-theme="dark"] .specs-table .spec-value {
  color: #b0b0b0;
}
[data-theme="dark"] a {
  color: #d4605a;
}
[data-theme="dark"] a:hover {
  color: #e87a74;
}
[data-theme="dark"] .site-footer {
  background: #0a0a0a;
}
[data-theme="dark"] .site-footer a {
  color: rgba(255,255,255,0.7) !important;
}
[data-theme="dark"] .footer-logo-img {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 6px;
}
[data-theme="dark"] .footer-partners {
  border-color: #333;
}
[data-theme="dark"] .footer-partners img {
  filter: invert(1) hue-rotate(180deg);
  opacity: 0.8;
}
[data-theme="dark"] .footer-links h4 {
  color: #ccc;
}
[data-theme="dark"] .footer-bottom {
  border-color: #333;
}
[data-theme="dark"] .docs-sidebar {
  background: #1a1a1a;
  border-color: #333;
}
[data-theme="dark"] .docs-content {
  color: #e0e0e0;
}
[data-theme="dark"] code {
  background: #2a2a2a;
  color: #e0e0e0;
}
[data-theme="dark"] .btn-primary {
  background: #8C1515;
  color: #fff;
}
[data-theme="dark"] .brand-logo {
  background: var(--white);
}
[data-theme="dark"] .page-header {
  border-color: #333;
}
[data-theme="dark"] .access-card {
  background: #1e1e1e;
  border-color: #333;
}
[data-theme="dark"] .access-card-body {
  color: #e0e0e0;
}
[data-theme="dark"] .access-features li {
  color: #ccc;
}
[data-theme="dark"] .step-card {
  background: #1e1e1e;
  border-color: #333;
}
[data-theme="dark"] .faq-item {
  border-color: #333;
}
[data-theme="dark"] .stat-card {
  background: #1e1e1e;
}
[data-theme="dark"] .stat-number {
  color: #d4605a;
}
[data-theme="dark"] .stats-bar {
  background: #1a1a1a;
  border-color: #333;
}
[data-theme="dark"] .video-embed {
  background: #1a1a1a;
}
/* Dark mode toggle button */
.theme-toggle {
  background: none;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  font-size: 1.1rem;
  line-height: 1;
  margin-left: 0.5rem;
  transition: all var(--transition);
}
.theme-toggle:hover {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}

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

body {
  margin: 0;
  font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 18px;
  color: var(--black);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cardinal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--cardinal-dark); }

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */

.header-top {
  background: var(--cardinal);
  padding: 0.4rem 0;
  font-size: 0.95rem;
}
.stanford-link {
  color: #fff !important;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.stanford-link:hover { color: var(--white) !important; }
.header-sds-bar {
  background: #fff;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}
.header-sds-logo {
  height: 34px;
  width: auto;
  display: block;
}

.main-nav {
  background: var(--cardinal);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0;
  color: var(--white) !important;
  text-decoration: none !important;
}
.brand-logo {
  height: 70px;
  width: auto;
  background: var(--white);
  border-radius: 8px;
  padding: 4px;
}
.brand-text {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  font-size: 3.2rem;
  letter-spacing: 0.01em;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links li a {
  display: block;
  color: rgba(255,255,255,0.85);
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-links li a:hover {
  color: var(--white);
  text-decoration: none;
  background: rgba(255,255,255,0.08);
  border-radius: 4px 4px 0 0;
}
.nav-links li a.active {
  color: var(--white);
  text-decoration: none;
  border-bottom-color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.08);
  border-radius: 4px 4px 0 0;
}
.nav-cta {
  background: #fff !important;
  color: var(--cardinal) !important;
  border-radius: 6px !important;
  margin-left: 0.5rem !important;
  border-bottom: none !important;
}
.nav-cta:hover {
  background: rgba(255,255,255,0.85) !important;
  color: var(--cardinal) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  background: linear-gradient(135deg, var(--cardinal) 0%, var(--cardinal-dark) 40%, #4a0a0a 100%);
  color: var(--white);
  padding: 1.5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 3rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}
.hero .hero-subtitle {
  font-size: 1.3rem;
  font-weight: 300;
  opacity: 0.9;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}
.hero .hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================================
   STATS BAR
   ============================================================ */

.stats-bar {
  background: var(--white);
  margin-top: -2rem;
  position: relative;
  z-index: 2;
}
.stats-grid {
  display: flex;
  justify-content: space-between;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem 2rem;
  border: 1px solid var(--border);
}
.stat-item {
  text-align: center;
  flex: 1;
  padding: 0 0.5rem;
}
.stat-item + .stat-item {
  border-left: 1px solid var(--border);
}
.stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--cardinal);
  line-height: 1.2;
  font-family: 'Source Serif 4', Georgia, serif;
}
.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--cool-grey);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-top: 0.3rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--cardinal);
  color: var(--white) !important;
}
.btn-primary:hover {
  background: var(--cardinal-dark);
  color: var(--white) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: transparent;
  color: var(--cardinal) !important;
  border-color: var(--cardinal);
}
.btn-secondary:hover {
  background: var(--cardinal);
  color: var(--white) !important;
  transform: translateY(-1px);
}
.btn-white {
  background: var(--white);
  color: var(--cardinal) !important;
}
.btn-white:hover {
  background: var(--fog);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-white-outline {
  background: transparent;
  color: var(--white) !important;
  border-color: rgba(255,255,255,0.5);
}
.btn-white-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

/* ============================================================
   SECTIONS
   ============================================================ */

.section {
  padding: 2.5rem 0;
}
.section-alt {
  background: var(--fog);
}
.section-dark {
  background: var(--black);
  color: var(--white);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2rem;
}
.section-header h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  color: var(--black);
  position: relative;
  padding-bottom: 0.5rem;
}
.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--cardinal);
  border-radius: 2px;
}
.section-dark .section-header h2 {
  color: var(--white);
}
.section-dark .section-header h2::after {
  background: var(--cardinal-light);
}

.see-all {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cardinal) !important;
}
.see-all:hover {
  text-decoration: underline !important;
}
[data-theme="dark"] .see-all {
  color: #e87a74 !important;
}

/* ============================================================
   OVERVIEW — GPU INSTRUMENT SECTION (SDS-style)
   ============================================================ */

.instrument-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.instrument-text h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.4rem;
  margin: 0 0 1rem;
}
.instrument-text p {
  color: var(--cool-grey);
  line-height: 1.7;
  margin: 0 0 1rem;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.specs-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--cardinal);
  color: var(--white);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.specs-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}
.specs-table tr:last-child td {
  border-bottom: none;
}
.specs-table .spec-label {
  font-weight: 600;
  color: var(--black);
  width: 40%;
}
.specs-table .spec-value {
  color: var(--cool-grey);
}

/* ============================================================
   RESEARCHER CARDS
   ============================================================ */

.researcher-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.researcher-grid.grid-full {
  grid-template-columns: repeat(2, 1fr);
}

.researcher-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  position: relative;
}
.researcher-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--cardinal);
}

.card-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--cardinal) 0%, var(--cardinal-light) 100%);
}

.card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.card-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.card-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cardinal) 0%, var(--cardinal-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
}
.card-identity { min-width: 0; }
.card-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
  line-height: 1.3;
}
.card-name a { color: var(--cardinal); }
.card-name a:hover { text-decoration: underline; }
.card-title {
  font-size: 0.82rem;
  color: var(--cool-grey);
  margin: 0;
  line-height: 1.3;
}
.card-school {
  font-size: 0.78rem;
  color: var(--stone);
  margin: 0;
}

.card-affiliations {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: var(--stone);
  line-height: 1.5;
}
.card-affiliations li {
  padding-left: 0.85rem;
  position: relative;
}
.card-affiliations li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
}
.card-affiliations a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--border);
}
.card-affiliations a:hover {
  color: var(--cardinal);
  border-bottom-color: var(--cardinal);
}
.card-affiliations .affil-lab {
  font-weight: 400;
  color: inherit;
}
.card-affiliations .affil-lab a {
  color: inherit;
  border-bottom-color: var(--border);
}
.card-affiliations .affil-lab a:hover {
  border-bottom-style: solid;
}
.card-affiliations .affil-lab::before {
  background: var(--border);
}
.card-affiliations a::after {
  content: ' \2197';
  font-size: 0.75em;
}

.card-project {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 0.5rem;
  line-height: 1.4;
}
.card-summary {
  font-size: 0.88rem;
  color: var(--cool-grey);
  margin: 0 0 0.75rem;
  line-height: 1.55;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.tag-domain { background: #EEF2FF; color: #4338CA; }
.tag-gpu { background: #ECFDF5; color: #047857; }
.tag-hero { background: #FFF7ED; color: #C2410C; }
[data-theme="dark"] .tag-domain { background: #1e1b4b; color: #a5b4fc; }
[data-theme="dark"] .tag-gpu { background: #052e16; color: #6ee7b7; }
[data-theme="dark"] .tag-hero { background: #431407; color: #fdba74; }

.card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cardinal) !important;
  display: inline-block;
  margin-top: 0.25rem;
}
.card-link:hover {
  text-decoration: underline !important;
}

/* ============================================================
   UPDATES FEED (vertical scroll, right column)
   ============================================================ */

.updates-feed {
  background: var(--fog);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.feed-header h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}
.feed-header .see-all {
  font-size: 0.88rem;
}
.feed-viewport {
  height: 420px;
  overflow: hidden;
  position: relative;
}
.feed-viewport:hover {
  overflow-y: auto;
}
.feed-track {
  will-change: transform;
  display: flex;
  flex-direction: column;
}
.feed-item {
  display: block;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--black) !important;
  text-decoration: none !important;
  transition: background var(--transition);
}
.feed-item:hover {
  background: var(--white);
}
.feed-item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}
.feed-type {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.feed-date {
  font-size: 0.82rem;
  color: var(--stone);
  font-weight: 600;
}
.feed-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.type-research-milestone { background: #EEF2FF; color: #4338CA; }
.type-system-status { background: #ECFDF5; color: #047857; }
.type-talks-seminars { background: #F5F3FF; color: #7C3AED; }
.type-maintenance { background: #FFF7ED; color: #C2410C; }
.type-press { background: #FFF1F2; color: #BE123C; }

/* ============================================================
   UPDATES LIST (full page)
   ============================================================ */

.updates-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.update-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.update-item:last-child { border-bottom: none; }
.update-date-col {
  font-size: 0.85rem;
  color: var(--stone);
  font-weight: 600;
  padding-top: 0.1rem;
}
.update-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.update-content h3 a { color: var(--black); }
.update-content h3 a:hover { color: var(--cardinal); }
.update-content .update-excerpt {
  font-size: 0.92rem;
  color: var(--cool-grey);
  margin: 0;
  line-height: 1.6;
}
.update-type-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

/* ============================================================
   CALLOUT / CTA BOXES
   ============================================================ */

.callout {
  background: var(--fog);
  border-left: 4px solid var(--cardinal);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.callout p { margin: 0; }

.cta-banner {
  background: linear-gradient(135deg, var(--palo-alto) 0%, var(--palo-alto-light) 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  box-shadow: var(--shadow-md);
}
.cta-banner h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}
.cta-banner p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.95rem;
}
.cta-compact {
  background: linear-gradient(135deg, var(--cardinal) 0%, var(--cardinal-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 0.6rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.cta-compact h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.3rem;
  margin: 0 0 0.1rem;
  color: #fff;
}
.cta-compact p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
}
.cta-compact .btn-white {
  background: #fff;
  color: var(--cardinal) !important;
  font-size: 1.1rem;
  white-space: nowrap;
}
[data-theme="dark"] .cta-compact {
  background: linear-gradient(135deg, #6b0f0f 0%, #4a0808 100%);
}
[data-theme="dark"] .cta-compact .btn-white {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.6);
  color: #fff !important;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-header {
  padding: 1.5rem 0 1rem;
}
.page-header h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.page-header .lead {
  font-size: 1.3rem;
  color: var(--cool-grey);
  margin: 0;
  max-width: 680px;
  line-height: 1.6;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */

.breadcrumb {
  font-size: 0.88rem;
  color: var(--stone);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.breadcrumb a { color: var(--cardinal); font-weight: 600; }
.breadcrumb .sep {
  margin: 0 0.5rem;
  color: var(--border);
}
.breadcrumb .current { font-weight: 600; color: var(--black); }

/* ============================================================
   RESEARCH ARTICLE
   ============================================================ */

.research-article {
  max-width: 780px;
  padding-bottom: 3rem;
}
.research-article h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
.research-article h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--black);
}
.research-article p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
  color: var(--cool-grey);
}

.article-meta {
  font-size: 0.92rem;
  color: var(--cool-grey);
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: var(--fog);
  border-radius: var(--radius);
  border-left: 4px solid var(--cardinal);
}

.update-article {
  max-width: 780px;
  padding: 2rem 0 3rem;
}
.update-article h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 1rem;
}
.update-article p {
  line-height: 1.7;
  color: var(--cool-grey);
  margin-bottom: 1.25rem;
}
.update-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  color: var(--stone);
  font-size: 0.92rem;
}

/* ============================================================
   DOCUMENTATION & DASHBOARD STUB PAGES
   ============================================================ */

.stub-hero {
  text-align: center;
  padding: 4rem 0 3rem;
}
.stub-hero h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2rem;
  margin: 0 0 0.75rem;
}
.stub-hero p {
  color: var(--cool-grey);
  max-width: 560px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.stub-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}
.stub-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all var(--transition);
}
.stub-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--cardinal);
}
.stub-card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: var(--black);
}
.stub-card p {
  font-size: 0.88rem;
  color: var(--cool-grey);
  margin: 0;
  line-height: 1.5;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--warm-grey);
  color: rgba(255,255,255,0.65);
  padding: 3rem 0 1.5rem;
  font-size: 0.88rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}
.footer-tagline {
  color: rgba(255,255,255,0.6);
  font-size: 1.05rem;
  font-style: italic;
  margin: 0.2rem 0 0;
  line-height: 1.4;
}
.footer-logo-img {
  height: 70px;
  width: auto;
  margin-bottom: 0;
}
.footer-partners {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 1rem 0;
  margin-bottom: 0;
  text-align: center;
}
.footer-partners img {
  max-width: 900px;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.site-footer a {
  color: rgba(255,255,255,0.8) !important;
}
.site-footer a:hover {
  color: var(--white) !important;
  text-decoration: underline;
}
.footer-links h4 {
  color: var(--white);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
}
.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 0.4rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
}
.footer-bottom p {
  margin: 0;
  font-size: 0.82rem;
}

/* ============================================================
   DASHBOARD SUB-NAV
   ============================================================ */

.dashboard-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 1rem 0 0.5rem;
}
.dashboard-nav a {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cardinal) !important;
  background: var(--white);
  text-decoration: none !important;
  transition: all var(--transition);
}
.dashboard-nav a:hover {
  border-color: var(--cardinal);
  background: rgba(140, 21, 21, 0.06);
  box-shadow: var(--shadow-sm);
}

.dashboard-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

/* --- Cycle overview table: compact, right-justified values --- */
.dashboard-content .cycle-overview-table {
  width: auto;
  font-variant-numeric: tabular-nums;
}
.dashboard-content .cycle-overview-table th {
  text-align: center;
  white-space: nowrap;
}
.dashboard-content .cycle-overview-table th:first-child {
  text-align: left;
}
.dashboard-content .cycle-overview-table td {
  text-align: right;
}
.dashboard-content .cycle-overview-table td:first-child,
.dashboard-content .cycle-overview-table td:nth-child(2) {
  text-align: left;
}

/* --- Top 5 PI sub-tables (expand rows): compact --- */
.dashboard-content .cycle-pi-table {
  width: auto;
  font-variant-numeric: tabular-nums;
}
.dashboard-content .cycle-pi-table th {
  text-align: center;
}
.dashboard-content .cycle-pi-table th:first-child {
  text-align: left;
}
.dashboard-content .cycle-pi-table td {
  text-align: right;
}
.dashboard-content .cycle-pi-table td:first-child {
  text-align: left;
}

/* ============================================================
   VIDEO EMBED (responsive 16:9)
   ============================================================ */

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: 0 auto;
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}

/* ============================================================
   QUICK LINKS CARDS (homepage)
   ============================================================ */

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.quick-link-card {
  display: block;
  background: var(--fog);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none !important;
  color: var(--black) !important;
  transition: all 0.25s ease;
}
.quick-link-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--cardinal);
  transform: translateY(-2px);
}
.ql-icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}
.quick-link-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  color: var(--cardinal);
}
.quick-link-card p {
  font-size: 0.82rem;
  color: var(--cool-grey);
  margin: 0;
  line-height: 1.45;
}

/* ============================================================
   ACCESS PAGE — TIER CARDS
   ============================================================ */

.access-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.access-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s ease;
}
.access-card:hover {
  box-shadow: var(--shadow-lg);
}
.access-card-featured {
  border-color: var(--cardinal);
  box-shadow: var(--shadow-md);
}
.access-card-featured .access-card-header {
  background: linear-gradient(135deg, var(--cardinal) 0%, var(--cardinal-dark) 100%);
  color: #fff;
}
.access-card-featured .access-tier-label {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.access-card-featured .access-price {
  color: #fff;
}
.access-card-featured .access-subtitle {
  color: rgba(255,255,255,0.85);
}
.access-card-header {
  padding: 1.5rem;
  text-align: center;
  background: #333;
  color: #fff;
}
.access-card-header h3 { color: #fff; }
.access-tier-label { background: rgba(255,255,255,0.15); color: #fff; }
.access-tier-label {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--fog);
  color: var(--cool-grey);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.access-card-header h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0.5rem 0 0.25rem;
}
.access-price {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  font-family: 'Source Serif 4', Georgia, serif;
}
.access-subtitle {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  margin: 0.25rem 0 0;
}
.access-card-body {
  padding: 1.5rem;
}
.access-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.access-features li {
  padding: 0.4rem 0 0.4rem 1.25rem;
  position: relative;
  font-size: 0.88rem;
  color: var(--cool-grey);
  line-height: 1.45;
}
.access-features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 700;
}
.access-note {
  font-size: 0.78rem;
  color: var(--stone);
  text-align: center;
  margin: 0.75rem 0 0;
}
.access-note a { color: var(--cardinal); }

/* Steps grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.step-card {
  text-align: center;
  padding: 1.5rem 1rem;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cardinal);
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 900;
  font-family: 'Source Serif 4', Georgia, serif;
  margin-bottom: 1rem;
}
.step-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.step-card p {
  font-size: 0.88rem;
  color: var(--cool-grey);
  margin: 0;
  line-height: 1.5;
}

/* FAQ */
.faq-list {
  max-width: 780px;
}
.faq-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-item h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--black);
}
.faq-item p {
  font-size: 0.92rem;
  color: var(--cool-grey);
  margin: 0;
  line-height: 1.6;
}

/* About page grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-text p {
  color: var(--cool-grey);
  line-height: 1.7;
  margin: 0 0 1rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .instrument-section {
    grid-template-columns: 1fr;
  }
  .researcher-grid {
    grid-template-columns: 1fr;
  }
  .stub-cards {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }
  .access-tiers {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .quick-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--cardinal);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li a {
    padding: 0.75rem 2rem;
    border-bottom: none;
  }
  .nav-cta {
    margin: 0.5rem 1rem !important;
    text-align: center;
  }
  .nav-container {
    flex-wrap: wrap;
    position: relative;
  }

  .hero h1 { font-size: 2rem; }
  .hero .hero-subtitle { font-size: 1.05rem; }

  .stats-grid {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.25rem;
  }
  .stat-item {
    flex: 0 0 calc(50% - 0.5rem);
    padding: 0.5rem 0;
  }
  .stat-item + .stat-item {
    border-left: none;
  }
  .stat-number { font-size: 1.6rem; }

  .section { padding: 2.5rem 0; }
  .page-header h1 { font-size: 1.75rem; }

  .update-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* ============================================================
   DOCUMENTATION PAGES
   ============================================================ */

.docs-page {
  padding: 2rem 0 4rem;
}

.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
}

/* Sidebar */
.docs-sidebar {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  padding-bottom: 2rem;
}
.docs-sidebar-header {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--cardinal);
}
.docs-sidebar-header a {
  color: var(--cardinal) !important;
}
.docs-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.docs-nav-section {
  margin-bottom: 1rem;
}
.docs-nav-section-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stone);
  margin-bottom: 0.35rem;
  padding: 0.25rem 0;
}
.docs-nav-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.docs-nav-list a,
.docs-nav-section ul a {
  display: block;
  padding: 0.3rem 0 0.3rem 0.75rem;
  font-size: 0.88rem;
  color: var(--cool-grey);
  border-left: 2px solid transparent;
  transition: all var(--transition);
}
.docs-nav-list a:hover,
.docs-nav-section ul a:hover {
  color: var(--cardinal);
  border-left-color: var(--cardinal-light);
  background: rgba(140, 21, 21, 0.03);
}
.docs-nav-list a.active,
.docs-nav-section ul a.active {
  color: var(--cardinal);
  font-weight: 600;
  border-left-color: var(--cardinal);
  background: rgba(140, 21, 21, 0.05);
}

/* Docs Content Area */
.docs-content {
  min-width: 0;
  max-width: 820px;
}
.docs-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.25;
}
.docs-content h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
  color: var(--black);
}
.docs-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2rem 0 0.5rem;
  color: var(--black);
}
.docs-content p {
  margin: 0 0 1rem;
  line-height: 1.7;
  color: var(--cool-grey);
}
.docs-content ul,
.docs-content ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  color: var(--cool-grey);
  line-height: 1.7;
}
.docs-content li {
  margin-bottom: 0.35rem;
}
.docs-content a {
  color: var(--cardinal);
  text-decoration: underline;
  text-decoration-color: rgba(140, 21, 21, 0.3);
  text-underline-offset: 2px;
}
.docs-content a:hover {
  text-decoration-color: var(--cardinal);
}

/* Code blocks */
.docs-content code {
  background: var(--fog);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
  color: var(--cardinal-dark);
}
.docs-content pre {
  background: #1E1E2E;
  color: #CDD6F4;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}
.docs-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}

/* Callout boxes (replacing Jekyll includes) */
.docs-callout {
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.25rem 0;
  font-size: 0.92rem;
  line-height: 1.6;
}
.docs-callout p {
  margin: 0;
  color: inherit;
}
.docs-callout-important {
  background: #FFF7ED;
  border-left: 4px solid var(--accent-orange);
  color: #92400E;
}
.docs-callout-note {
  background: #EFF6FF;
  border-left: 4px solid var(--accent-blue);
  color: #1E40AF;
}
.docs-callout strong {
  display: block;
  margin-bottom: 0.25rem;
}

/* Images in docs */
.docs-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin: 1rem 0;
}

/* Tables in docs */
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
}
.docs-content th {
  text-align: left;
  padding: 0.65rem 1rem;
  background: var(--cardinal);
  color: var(--white);
  font-weight: 600;
  font-size: 0.85rem;
}
.docs-content td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--cool-grey);
}
.docs-content tr:last-child td {
  border-bottom: none;
}

/* Documentation index page */
.docs-index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}
.docs-index-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: all 0.25s ease;
  color: var(--black) !important;
  text-decoration: none !important;
}
.docs-index-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--cardinal);
  transform: translateY(-2px);
}
.docs-index-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cardinal);
  margin: 0 0 0.4rem;
}
.docs-index-card p {
  font-size: 0.88rem;
  color: var(--cool-grey);
  margin: 0;
  line-height: 1.5;
}

/* Responsive docs */
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .docs-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
  }
  .docs-index-grid {
    grid-template-columns: 1fr;
  }
}
