:root {
  --bg: #f4f1eb;
  --surface: rgba(255, 252, 247, 0.92);
  --surface-strong: #fffdf9;
  --ink: #1b2730;
  --muted: #5d6972;
  --accent: #1f4f66;
  --accent-dark: #153847;
  --sand: #d7c1a2;
  --line: rgba(27, 39, 48, 0.12);
  --shadow: 0 18px 40px rgba(27, 39, 48, 0.08);
  --shadow-strong: 0 30px 70px rgba(27, 39, 48, 0.14);
  --content-width: min(1240px, calc(100vw - 2rem));
  --radius: 1.5rem;
  --radius-large: 2rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(215, 193, 162, 0.24), transparent 30rem),
    linear-gradient(180deg, #f1ede6 0%, var(--bg) 42%, #f8f5ef 100%);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.65;
}

img,
svg,
object {
  display: block;
  max-width: 100%;
}

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

a:hover {
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 1rem 0;
  background: linear-gradient(180deg, rgba(244, 241, 235, 0.94), rgba(244, 241, 235, 0.72));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(27, 39, 48, 0.08);
}

.nav-shell,
.hero__content,
.section,
.footer-shell {
  width: var(--content-width);
  margin: 0 auto;
}

.nav-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.site-mark,
.footer-brand {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.site-nav a,
.footer-links a {
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.site-nav a.is-active {
  color: var(--ink);
  font-weight: 700;
}

.site-nav__label {
  color: rgba(93, 105, 114, 0.8);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-divider {
  color: rgba(27, 39, 48, 0.28);
}

.page-shell {
  padding-bottom: 4rem;
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 34rem;
  padding: 6rem 0 3rem;
  color: #f8f5ef;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hero::before {
  background:
    radial-gradient(circle at 20% 20%, rgba(215, 193, 162, 0.28), transparent 30rem),
    linear-gradient(145deg, #163646 0%, #1f4f66 32%, #2f6578 62%, #153847 100%);
}

.hero::after {
  background:
    radial-gradient(circle at 75% 22%, rgba(255, 253, 249, 0.14), transparent 20rem),
    linear-gradient(180deg, rgba(13, 19, 24, 0.08) 0%, rgba(13, 19, 24, 0.38) 70%, rgba(13, 19, 24, 0.58) 100%);
  mix-blend-mode: screen;
}

.hero--photo {
  background-image: var(--hero-image);
}

.hero--photo::before {
  background:
    linear-gradient(180deg, rgba(10, 16, 22, 0.2) 0%, rgba(10, 16, 22, 0.52) 62%, rgba(10, 16, 22, 0.78) 100%),
    linear-gradient(90deg, rgba(10, 16, 22, 0.72) 0%, rgba(10, 16, 22, 0.28) 52%, rgba(10, 16, 22, 0.08) 100%);
}

.hero--photo::after {
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 253, 249, 0.18), transparent 16rem),
    radial-gradient(circle at 18% 24%, rgba(215, 193, 162, 0.12), transparent 20rem);
  mix-blend-mode: screen;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__eyebrow,
.section-kicker,
.metric-card__label,
.directory-card__eyebrow,
.detail-card__eyebrow {
  margin: 0 0 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero__eyebrow {
  color: rgba(248, 245, 239, 0.8);
}

.hero__title,
.section-heading h2,
.split-callout h2,
.graph-shell h2,
.section-block h3,
.directory-card h3,
.detail-card h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-weight: 700;
  line-height: 1.08;
}

.hero__title {
  max-width: 13ch;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
}

.hero__title--wide {
  max-width: 18ch;
}

.hero__lede,
.section-heading p,
.split-callout p,
.directory-card p,
.detail-card p,
.panel-note,
.rich-text,
.rule-note,
.footer-copy,
.graph-note {
  color: var(--muted);
}

.hero__lede {
  max-width: 48rem;
  margin: 1rem 0 0;
  color: rgba(248, 245, 239, 0.9);
  font-size: 1.05rem;
}

.hero__actions,
.footer-links,
.pill-row,
.link-row,
.command-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero__actions {
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #f8f5ef;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow);
}

.button:hover {
  color: #f8f5ef;
  background: var(--accent-dark);
}

.button--ghost {
  border-color: rgba(248, 245, 239, 0.42);
  background: rgba(248, 245, 239, 0.08);
  backdrop-filter: blur(12px);
}

.button--ghost:hover {
  background: rgba(248, 245, 239, 0.16);
}

.section {
  padding: 2rem 0 0;
}

.section--tight {
  padding-top: 1rem;
}

.metric-grid,
.directory-grid,
.detail-grid,
.section-stack {
  display: grid;
  gap: 1rem;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metric-card,
.directory-card,
.detail-card,
.section-block,
.split-callout,
.graph-shell,
.notice-card,
.command-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 1.2rem 1.3rem;
}

.metric-card__value {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
}

.metric-card__label {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.section-heading {
  max-width: 52rem;
  margin-bottom: 1.2rem;
}

.section-heading h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.split-callout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  padding: 1.5rem;
}

.process-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.process-list li + li {
  margin-top: 0.55rem;
}

.text-link {
  color: var(--accent);
  font-weight: 700;
}

.directory-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.directory-card,
.detail-card,
.section-block,
.notice-card,
.command-card {
  padding: 1.3rem 1.35rem;
}

.directory-card h3,
.detail-card h3,
.section-block h3 {
  font-size: 1.4rem;
}

.directory-card__eyebrow,
.detail-card__eyebrow {
  color: var(--accent);
}

.meta-line {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.pill-row {
  margin-top: 0.95rem;
}

.meta-pill,
.course-pill,
.subject-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(27, 39, 48, 0.08);
  background: rgba(255, 253, 249, 0.92);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.2;
}

.subject-pill {
  background: var(--pill-color, rgba(255, 253, 249, 0.92));
}

.course-pill--ghost {
  background: rgba(255, 250, 244, 0.7);
  color: var(--muted);
}

.detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.contact-path {
  display: grid;
  gap: 1rem;
}

.contact-path__head {
  display: grid;
  gap: 0.25rem;
}

.contact-brief {
  margin: 0 0 1rem;
  max-width: 72ch;
  color: var(--muted);
}

.contact-list {
  display: grid;
  gap: 0.85rem;
}

.contact-summary,
.contact-node {
  border: 1px solid rgba(27, 39, 48, 0.08);
  border-radius: 1rem;
  background: rgba(255, 253, 249, 0.8);
}

.contact-summary {
  padding: 0.8rem 0.95rem;
}

.contact-stack {
  display: grid;
  gap: 0.7rem;
}

.contact-row,
.contact-summary__summary,
.contact-node__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.contact-summary__summary,
.contact-node__summary {
  cursor: pointer;
  list-style: none;
}

.contact-summary__summary::-webkit-details-marker,
.contact-node__summary::-webkit-details-marker {
  display: none;
}

.contact-summary__title {
  margin-right: auto;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
}

.contact-summary__metric {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  font-size: 0.92rem;
  color: var(--muted);
}

.contact-summary__metric strong {
  color: var(--ink);
}

.contact-row__label,
.contact-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.contact-row__label {
  min-width: 0;
}

.contact-row__meta {
  justify-content: flex-end;
  text-align: right;
}

.contact-row--note {
  padding: 0.1rem 0;
}

.contact-course-name,
.contact-note,
.contact-help {
  color: var(--muted);
}

.contact-course-name {
  font-size: 0.94rem;
}

.contact-total {
  white-space: nowrap;
  font-weight: 700;
  color: var(--ink);
}

.contact-source,
.contact-flag {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.1;
}

.contact-source {
  border: 1px solid rgba(27, 39, 48, 0.08);
  background: rgba(255, 253, 249, 0.92);
  color: var(--muted);
}

.contact-source--calendar {
  background: rgba(215, 233, 239, 0.82);
  color: #1f4f66;
}

.contact-source--assumed {
  background: rgba(234, 217, 184, 0.7);
  color: #6d5432;
}

.contact-source--note {
  background: rgba(231, 226, 216, 0.7);
  color: #635747;
}

.contact-flag {
  border: 1px solid rgba(31, 79, 102, 0.18);
  background: rgba(31, 79, 102, 0.08);
  color: var(--accent);
}

.contact-node {
  padding: 0.75rem 0.85rem;
}

.contact-node__title {
  font-weight: 700;
}

.contact-node__body {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
  padding-left: 0.8rem;
  border-left: 1px solid rgba(27, 39, 48, 0.08);
}

.contact-help {
  margin: 0.6rem 0 0;
  font-size: 0.92rem;
}

.graph-shell {
  padding: 1.4rem;
}

.graph-toolbar {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.graph-toolbar__note {
  margin: 0;
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.62rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(27, 39, 48, 0.12);
  background: rgba(255, 253, 249, 0.92);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.toggle-button:hover {
  color: var(--accent);
  border-color: rgba(31, 79, 102, 0.22);
}

.toggle-button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #f8f5ef;
}

.filter-panel {
  display: grid;
  gap: 1rem;
  margin: 1.2rem 0 1.3rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid rgba(27, 39, 48, 0.08);
  border-radius: 1.25rem;
  background: rgba(255, 253, 249, 0.86);
}

.filter-panel__groups {
  display: grid;
  gap: 0.9rem;
}

.filter-group {
  display: grid;
  gap: 0.5rem;
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(27, 39, 48, 0.12);
  background: rgba(255, 253, 249, 0.92);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip:hover {
  color: var(--accent);
  border-color: rgba(31, 79, 102, 0.22);
}

.filter-chip.is-active {
  background: rgba(215, 233, 239, 0.86);
  border-color: rgba(31, 79, 102, 0.28);
  color: var(--ink);
}

.search-field {
  display: grid;
  gap: 0.4rem;
}

.search-field input {
  width: min(28rem, 100%);
  min-height: 2.8rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(27, 39, 48, 0.12);
  border-radius: 1rem;
  background: rgba(255, 253, 249, 0.96);
  color: var(--ink);
  font: inherit;
}

.search-field input:focus {
  outline: 2px solid rgba(31, 79, 102, 0.18);
  outline-offset: 1px;
  border-color: rgba(31, 79, 102, 0.28);
}

.graph-guide {
  margin-top: 1rem;
  border: 1px solid rgba(27, 39, 48, 0.08);
  border-radius: 1.2rem;
  background: rgba(255, 253, 249, 0.88);
  overflow: hidden;
}

.graph-guide__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  cursor: pointer;
  list-style: none;
}

.graph-guide__summary::-webkit-details-marker {
  display: none;
}

.graph-guide[open] .graph-guide__summary {
  border-bottom: 1px solid rgba(27, 39, 48, 0.08);
}

.graph-guide__summary-copy {
  display: grid;
  gap: 0.18rem;
}

.graph-guide__title,
.graph-guide__caption {
  display: block;
}

.graph-guide__title {
  font-weight: 700;
  color: var(--ink);
}

.graph-guide__caption {
  color: var(--muted);
  font-size: 0.94rem;
}

.graph-guide__preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.graph-guide__preview .legend-item {
  font-size: 0.85rem;
}

.graph-guide__body {
  display: grid;
  gap: 0.95rem;
  padding: 0.95rem 1rem 1rem;
}

.graph-guide__body .legend,
.graph-guide__body .graph-key {
  margin-top: 0;
}

.graph-guide--static .graph-guide__summary {
  cursor: default;
}

.graph-followup {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(27, 39, 48, 0.08);
}

.graph-followup__list {
  margin: 0.45rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.graph-followup__list li + li {
  margin-top: 0.35rem;
}

.graph-key {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.graph-key__item {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(27, 39, 48, 0.08);
  border-radius: 1.1rem;
  background: rgba(255, 253, 249, 0.88);
}

.graph-key__title,
.graph-key__copy {
  margin: 0;
}

.graph-key__title {
  font-weight: 700;
  color: var(--ink);
}

.graph-key__copy {
  color: var(--muted);
  font-size: 0.94rem;
}

.graph-key__sample {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(27, 39, 48, 0.12);
  background: rgba(255, 253, 249, 0.96);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.15;
  text-align: center;
}

.graph-key__sample--focus {
  border-width: 2px;
  border-color: var(--accent);
  background: rgba(215, 233, 239, 0.96);
}

.graph-key__sample--named {
  background: rgba(215, 233, 239, 0.88);
}

.graph-key__sample--support {
  border-color: rgba(126, 141, 150, 0.5);
  background: rgba(255, 250, 244, 0.92);
  color: #52616b;
}

.graph-key__sample--choice {
  border-color: #b7793f;
  background: rgba(255, 247, 238, 0.95);
}

.graph-key__sample--group {
  border-color: #667780;
  background: rgba(238, 242, 244, 0.95);
}

.graph-key__sample--junction {
  width: 0.95rem;
  min-width: 0.95rem;
  min-height: 0.95rem;
  padding: 0;
  border-radius: 999px;
  border-color: #667780;
  background: #7a8790;
  color: transparent;
}

.graph-key__sample--merged {
  border-color: rgba(31, 79, 102, 0.36);
  background: rgba(255, 253, 249, 0.96);
}

.graph-frame {
  margin-top: 1rem;
  border-radius: calc(var(--radius) - 0.25rem);
  border: 1px solid rgba(27, 39, 48, 0.08);
  background:
    radial-gradient(circle at top left, rgba(215, 193, 162, 0.14), transparent 20rem),
    #fffdf9;
  overflow: auto;
}

.graph-frame object {
  width: 100%;
  min-width: 900px;
  min-height: 520px;
}

.graph-actions {
  margin: 0.9rem 0 0;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.legend-swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--swatch-border, rgba(27, 39, 48, 0.18));
  background: var(--swatch-color, #fffdf9);
}

.section-stack {
  display: grid;
  gap: 1.35rem;
  grid-template-columns: 1fr;
}

.detail-grid--single {
  grid-template-columns: 1fr;
}

.section-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.rule-stack {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.rule-group {
  border: 1px solid rgba(27, 39, 48, 0.08);
  border-radius: 1.1rem;
  background: rgba(255, 253, 249, 0.9);
  overflow: hidden;
}

.rule-group summary {
  cursor: pointer;
  list-style: none;
  padding: 0.8rem 1rem;
  font-weight: 700;
}

.rule-group summary::-webkit-details-marker {
  display: none;
}

.rule-group[open] summary {
  border-bottom: 1px solid rgba(27, 39, 48, 0.08);
}

.rule-group__body {
  padding: 0.9rem 1rem 1rem;
}

.rule-note {
  padding: 0.75rem 0.9rem;
  border-left: 4px solid #b7793f;
  border-radius: 0 0.9rem 0.9rem 0;
  background: rgba(255, 247, 236, 0.8);
}

.rich-text p,
.rich-text ul {
  margin: 0.65rem 0 0;
}

.rich-text p:first-child,
.rich-text ul:first-child {
  margin-top: 0;
}

.rich-text ul {
  padding-left: 1.2rem;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.empty-state--filtered {
  margin-top: 0.5rem;
}

.is-hidden {
  display: none !important;
}

.code-block {
  margin: 0.9rem 0 0;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: #142a35;
  color: #f4f1eb;
  overflow: auto;
}

.footer-shell {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 2.5rem 0 3.5rem;
}

.footer-copy {
  max-width: 38rem;
}

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

  .contact-summary__summary,
  .contact-row,
  .contact-node__summary {
    flex-direction: column;
  }

  .contact-row__meta {
    justify-content: flex-start;
    text-align: left;
  }

  .graph-frame object {
    min-width: 720px;
  }

  .graph-guide__summary {
    align-items: flex-start;
  }

  .graph-guide__preview {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 28rem;
    padding-top: 5.2rem;
  }

  .hero__title {
    max-width: none;
  }

  .nav-shell,
  .hero__content,
  .section,
  .footer-shell {
    width: min(1240px, calc(100vw - 1.2rem));
  }

  .directory-card,
  .detail-card,
  .section-block,
  .notice-card,
  .command-card,
  .graph-shell,
  .split-callout {
    padding: 1.15rem;
  }

  .graph-frame object {
    min-width: 620px;
    min-height: 440px;
  }
}
