:root {
  --obsidian: #0B0B0E;
  --charcoal: #161B22;
  --divider: #2C2F3A;
  --frost: #F8F9FA;
  --body: #D7DBE2;
  --mist: #8B949E;
  --cobalt: #2D5BFF;
  --cobalt-hover: #5E84FF;
  --page-pad: clamp(1.25rem, 4vw, 4.5rem);
  --content: 75rem;
  --reading: 47.5rem;
  --header-height: 5.25rem;
  --mobile-bar-height: 3.25rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--obsidian); }
body {
  min-width: 20rem;
  margin: 0;
  background: var(--obsidian);
  color: var(--body);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--cobalt-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 4px;
  border-radius: 0.25rem;
}
button { font: inherit; }

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.65rem 0.9rem;
  background: var(--frost);
  color: var(--obsidian);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  border-bottom: 1px solid var(--divider);
  background: var(--obsidian);
}
.header-inner, .site-footer-inner, .shell {
  width: min(calc(100% - (var(--page-pad) * 2)), var(--content));
  margin: 0 auto;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}
.brand { display: inline-flex; align-items: center; min-width: 0; }
.brand-logo { width: auto; height: 2.25rem; max-width: 15.5rem; object-fit: contain; object-position: left center; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: clamp(0.75rem, 2vw, 1.5rem); }
.header-link { color: var(--body); font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.button-label-short { display: none; }

.button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 0.625rem;
  background: transparent;
  color: var(--frost);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--cobalt); color: var(--frost); }
.button-primary:hover { background: var(--cobalt-hover); color: var(--frost); }
.button-secondary { border-color: var(--frost); }
.button-secondary:hover { border-color: var(--cobalt-hover); color: var(--frost); }

.hero { padding: clamp(5rem, 12vw, 10.5rem) 0 clamp(4.5rem, 10vw, 8.5rem); }
.hero-copy { max-width: 54rem; }
.kicker {
  display: inline-block;
  margin: 0 0 1.15rem;
  border-left: 2px solid var(--cobalt);
  padding-left: 0.7rem;
  color: var(--frost);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--frost); }
h1, h2 { font-family: "Plus Jakarta Sans", system-ui, sans-serif; letter-spacing: -0.02em; }
h1 { max-width: 60rem; margin-bottom: 1.65rem; font-size: clamp(2.5rem, 5.5vw, 4rem); font-weight: 800; line-height: 1.07; }
h2 { max-width: 47rem; margin-bottom: 1.25rem; font-size: clamp(2.25rem, 4.25vw, 3rem); font-weight: 700; line-height: 1.1; }
h3 { margin-bottom: 0.85rem; font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.018em; line-height: 1.25; }
p { margin-bottom: 1.15rem; }
.lead { max-width: 48rem; color: var(--body); font-size: clamp(1.06rem, 1.5vw, 1.2rem); line-height: 1.62; }
.emphasis { color: var(--cobalt); }
.hero-cta { margin: 2.1rem 0 1rem; }
.cohort-strip { display: inline-block; margin: 0; color: var(--mist); font-family: "JetBrains Mono", monospace; font-size: 0.76rem; letter-spacing: 0.02em; }

.section { scroll-margin-top: calc(var(--header-height) + 1.25rem); border-top: 1px solid var(--divider); padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section-charcoal { background: var(--charcoal); }
.section-intro { max-width: 45rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-intro > :last-child { margin-bottom: 0; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--divider); }
.step { min-height: 19rem; padding: clamp(1.5rem, 3vw, 2.5rem); }
.step + .step { border-left: 1px solid var(--divider); }
.step-number { display: inline-flex; min-height: 1.85rem; align-items: center; margin-bottom: clamp(3rem, 6vw, 5.5rem); border: 1px solid var(--cobalt); padding: 0.2rem 0.55rem; color: var(--frost); font-family: "JetBrains Mono", monospace; font-size: 0.88rem; font-weight: 500; }
.step p, .fit-block p { margin-bottom: 0; }

.fit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 7vw, 7rem); }
.fit-block { padding-top: 1.25rem; border-top: 1px solid var(--divider); }

.checklist { display: grid; gap: 0; max-width: 55rem; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--divider); }
.checklist li { display: grid; grid-template-columns: 1.35rem 1fr; gap: 0.85rem; padding: 1.1rem 0; border-bottom: 1px solid var(--divider); }
.checkmark { display: block; width: 1rem; height: 1rem; margin-top: 0.32rem; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 8.5 3 3 7-7' fill='none' stroke='%232D5BFF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E"); }

.table-wrap { overflow: visible; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 1rem 1.15rem; border-bottom: 1px solid var(--divider); }
th { color: var(--mist); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
td { color: var(--body); }
td:first-child, .mono { font-family: "JetBrains Mono", monospace; }
.table-note { margin: 1.15rem 0 0; color: var(--mist); font-size: 0.94rem; }
.cohort-cards { display: none; }

.questions { max-width: var(--reading); border-top: 1px solid var(--divider); }
details { border-bottom: 1px solid var(--divider); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.25rem 0; color: var(--frost); cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { flex: 0 0 auto; color: var(--cobalt); content: "+"; font-family: "JetBrains Mono", monospace; font-size: 1.35rem; font-weight: 400; }
details[open] summary::after { content: "-"; }
details p { max-width: 42rem; margin: 0; padding: 0 0 1.25rem; color: var(--body); }

.apply-section { scroll-margin-top: calc(var(--header-height) + 1.25rem); }
.apply-heading { max-width: 42rem; }
.airtable-card { max-width: 53.75rem; margin: clamp(2rem, 5vw, 3.75rem) auto 0; overflow: hidden; border-radius: 1rem; background: var(--frost); }
.airtable-embed { display: block; width: 100%; height: 1745px; border: 0; background: transparent; }
.holding-card { color: var(--obsidian); }
.holding-card p { margin: 0; }
.apply-smallprint { max-width: 53.75rem; margin: 1rem auto 0; color: var(--mist); font-size: 0.875rem; }
.apply-smallprint a { color: var(--mist); }
.apply-smallprint a:hover { color: var(--cobalt-hover); }

.application-page { min-height: calc(100vh - var(--header-height)); }
.application-page .section { border-top: 0; }
.application-card-heading { max-width: 43rem; margin-bottom: 2rem; }
.application-card-heading h1 { font-size: clamp(2.3rem, 4.7vw, 3.75rem); }

.terms-page { min-height: calc(100vh - var(--header-height)); }
.terms-content { max-width: var(--reading); }
.back-link { display: inline-block; margin-bottom: 2.25rem; font-size: 0.9rem; font-weight: 600; }
.terms-content time { display: block; margin: 0 0 2.6rem; color: var(--mist); font-size: 0.875rem; }
.terms-list { border-top: 1px solid var(--divider); }
.terms-clause { padding: 2rem 0; border-bottom: 1px solid var(--divider); }
.terms-clause h2 { margin-bottom: 0.95rem; font-size: clamp(1.45rem, 2vw, 1.85rem); }
.terms-clause p { margin: 0; }

.site-footer { border-top: 1px solid var(--divider); padding: 2.6rem 0 5rem; }
.site-footer-inner { display: grid; grid-template-columns: minmax(11rem, 1fr) minmax(15rem, 2fr); gap: 2rem; align-items: start; }
.footer-brand .brand-logo { height: 1.75rem; max-width: 13.5rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.8rem 1.2rem; }
.footer-links a, .footer-copy { color: var(--mist); font-size: 0.85rem; }
.footer-copy { grid-column: 2; justify-self: end; margin: 0; }

.mobile-apply { position: fixed; right: 1rem; bottom: 1rem; left: 1rem; z-index: 900; display: none; }
.mobile-apply.is-hidden { display: none; }

@media (max-width: 48rem) {
  :root { --header-height: 4.6rem; }
  body { padding-bottom: calc(var(--mobile-bar-height) + 1rem); }
  .brand-logo { height: 2rem; max-width: 12rem; }
  .header-link { display: none; }
  .header-actions { gap: 0; }
  .header-actions .button { min-height: 2.5rem; padding: 0.65rem 0.8rem; font-size: 0.79rem; }
  .hero { padding-top: 4.4rem; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .step + .step { border-top: 1px solid var(--divider); border-left: 0; }
  .step-number { margin-bottom: 2rem; }
  .fit-grid { grid-template-columns: 1fr; gap: 2rem; }
  .site-footer { padding-bottom: 2.6rem; }
  .site-footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .footer-copy { grid-column: auto; justify-self: start; }
  .mobile-apply { display: block; }
  .mobile-apply .button { width: 100%; min-height: var(--mobile-bar-height); }
}

@media (max-width: 40rem) {
  .table-wrap { display: none; }
  .cohort-cards { display: grid; gap: 0.85rem; }
  .airtable-embed { height: 2060px; }
  .cohort-card { padding: 1.25rem; border: 1px solid var(--divider); background: var(--charcoal); }
  .cohort-card h3 { margin-bottom: 1.25rem; font-size: 1.08rem; }
  .cohort-card dl { display: grid; gap: 0.85rem; margin: 0; }
  .cohort-card dl div { display: grid; gap: 0.2rem; }
  .cohort-card dt { color: var(--mist); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
  .cohort-card dd { margin: 0; color: var(--body); font-size: 0.85rem; }
}

@media (max-width: 30rem) {
  .button-label-long { display: none; }
  .button-label-short { display: inline; }
  .airtable-card { border-radius: 1rem; }
  .header-actions .button { min-width: 4.2rem; }
}

@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; }
}
