:root {
  --portal-warm: #fdf9f5;
  --portal-ivory: #f4efe6;
  --portal-paper: rgba(255, 253, 248, 0.86);
  --portal-olive: #5f6f4f;
  --portal-olive-dark: #243126;
  --portal-sage: #b8c5b1;
  --portal-water: #d9e8e8;
  --portal-gold: #c4a465;
  --portal-muted: #647166;
  --portal-line: rgba(95, 111, 79, 0.18);
  --portal-shadow: 0 22px 70px rgba(36, 49, 38, 0.07);
  --portal-title: "Cormorant Garamond", Georgia, serif;
  --portal-text: "Lato", "Inter", Arial, sans-serif;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 232, 232, 0.42), transparent 25rem),
    radial-gradient(circle at 92% 8%, rgba(196, 164, 101, 0.1), transparent 21rem),
    linear-gradient(180deg, var(--portal-warm) 0%, var(--portal-ivory) 100%);
  color: var(--portal-olive-dark);
}

.portal-page {
  font-family: var(--portal-text);
}

.portal-shell,
.portal-hero {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}

.portal-hero {
  padding: clamp(54px, 9vw, 110px) 0 clamp(36px, 7vw, 78px);
}

.portal-kicker {
  margin: 0 0 14px;
  color: var(--portal-gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.portal-hero h1,
.portal-section h2,
.portal-choice h2,
.portal-card h3 {
  margin: 0;
  font-family: var(--portal-title);
  font-weight: 400;
  line-height: 1.04;
}

.portal-hero h1 {
  max-width: 780px;
  font-size: clamp(58px, 10vw, 116px);
}

.portal-subtitle {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--portal-olive);
  font-family: var(--portal-title);
  font-size: clamp(25px, 4vw, 44px);
  line-height: 1.16;
}

.portal-intro,
.portal-privacy-note {
  max-width: 620px;
  color: rgba(36, 49, 38, 0.72);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.75;
}

.portal-intro {
  margin: 28px 0 0;
}

.portal-intro-secondary {
  margin-top: 10px;
  font-size: clamp(15px, 1.8vw, 17px);
}

.portal-privacy-note {
  margin: 16px 0 0;
  color: var(--portal-olive);
  font-size: 15px;
}

.portal-choice,
.portal-section {
  margin-bottom: clamp(44px, 7vw, 82px);
  padding: clamp(28px, 5vw, 50px);
  border: 1px solid var(--portal-line);
  border-radius: 10px;
  background:
    radial-gradient(circle at 88% 0%, rgba(217, 232, 232, 0.24), transparent 18rem),
    var(--portal-paper);
  box-shadow: var(--portal-shadow);
}

.portal-choice {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1.15fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
}

.portal-choice[hidden] {
  display: none;
}

.portal-choice h2,
.portal-section h2 {
  font-size: clamp(36px, 6vw, 66px);
}

.portal-choice p,
.portal-section p {
  color: rgba(36, 49, 38, 0.7);
}

.portal-choice-form {
  display: grid;
  gap: 12px;
}

.choice-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid rgba(95, 111, 79, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.choice-card:focus-within {
  outline: 2px solid var(--portal-gold);
  outline-offset: 4px;
}

.choice-card:hover {
  border-color: rgba(95, 111, 79, 0.35);
  background: rgba(255, 255, 255, 0.54);
}

.choice-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--portal-olive);
}

.choice-card strong {
  display: block;
  color: var(--portal-olive-dark);
  font-family: var(--portal-title);
  font-size: 25px;
  font-weight: 400;
  line-height: 1.1;
}

.choice-card small {
  display: block;
  margin-top: 8px;
  color: rgba(36, 49, 38, 0.64);
  line-height: 1.55;
}

.portal-status {
  width: min(1120px, calc(100% - 36px));
  min-height: 24px;
  margin: -22px auto 24px;
  color: var(--portal-olive);
  font-size: 13px;
  text-align: center;
}

.portal-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.portal-priority {
  margin-bottom: clamp(30px, 5vw, 54px);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.portal-programs-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-feature-grid,
.portal-single-grid {
  grid-template-columns: minmax(0, 1fr);
}

.portal-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid rgba(95, 111, 79, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.34);
}

.portal-card.is-muted {
  background: rgba(255, 255, 255, 0.22);
}

.portal-feature-card {
  min-height: 0;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.62), rgba(217, 232, 232, 0.22)),
    rgba(255, 255, 255, 0.38);
}

.portal-card-compact {
  min-height: 0;
}

.portal-card h3 {
  color: var(--portal-olive-dark);
  font-size: clamp(28px, 3vw, 38px);
}

.portal-card p {
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
}

.portal-card .portal-meta {
  margin: 0 0 12px;
  color: var(--portal-gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.portal-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
  padding-top: 22px;
}

.portal-inline-content {
  width: 100%;
  color: rgba(36, 49, 38, 0.72);
  font-size: 13.5px;
  line-height: 1.65;
}

.portal-inline-content summary {
  width: fit-content;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  border: 1px solid rgba(95, 111, 79, 0.25);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--portal-olive);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
}

.portal-inline-content summary:focus-visible {
  outline: 2px solid var(--portal-gold);
  outline-offset: 4px;
}

.portal-inline-content p {
  margin-top: 14px;
}

.portal-button,
.portal-link,
.portal-card a,
.portal-card button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid rgba(95, 111, 79, 0.25);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--portal-olive);
  font-family: var(--portal-text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.portal-button:hover,
.portal-link:hover,
.portal-card a:hover,
.portal-card button:hover {
  border-color: rgba(95, 111, 79, 0.42);
  background: rgba(255, 253, 248, 0.95);
  transform: translateY(-1px);
}

.portal-button-primary,
.portal-card a.is-primary {
  background: var(--portal-olive);
  color: var(--portal-warm);
}

.portal-button-primary:hover,
.portal-card a.is-primary:hover {
  background: #536246;
  color: var(--portal-warm);
}

.portal-button-danger {
  color: #8d4f45;
  border-color: rgba(141, 79, 69, 0.32);
}

.portal-button:focus-visible,
.portal-link:focus-visible,
.portal-card a:focus-visible,
.portal-card button:focus-visible,
.portal-filter-row select:focus-visible {
  outline: 2px solid var(--portal-gold);
  outline-offset: 4px;
}

.portal-list {
  display: grid;
  gap: 7px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.portal-list li {
  color: rgba(36, 49, 38, 0.66);
  font-size: 13.5px;
}

.portal-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  display: inline-block;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--portal-gold);
  vertical-align: middle;
}

.portal-continue {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(22px, 5vw, 56px);
}

.portal-last-card {
  padding: 24px;
  border-left: 1px solid var(--portal-line);
}

.portal-last-card p {
  margin: 0 0 16px;
}

.portal-last-card h3 {
  margin: 0 0 12px;
  color: var(--portal-olive-dark);
  font-family: var(--portal-title);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 400;
  line-height: 1.04;
}

.portal-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}

.portal-filter-row label {
  color: var(--portal-gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.portal-filter-row select {
  min-height: 40px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.76);
  color: var(--portal-olive);
  font: 700 12px var(--portal-text);
}

.portal-small-note {
  margin: 20px 0 0;
  color: rgba(36, 49, 38, 0.58);
  font-size: 13px;
}

.portal-manage {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(220px, 0.75fr) auto;
  gap: 28px;
  align-items: center;
}

.portal-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.portal-manage-list {
  display: grid;
  gap: 10px;
}

.portal-manage-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--portal-line);
  color: rgba(36, 49, 38, 0.74);
  font-size: 14px;
}

.portal-manage-row:last-child {
  border-bottom: 0;
}

.portal-text-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.portal-empty,
.portal-error {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border: 1px dashed rgba(95, 111, 79, 0.24);
  border-radius: 9px;
  color: rgba(36, 49, 38, 0.66);
  background: rgba(255, 255, 255, 0.25);
}

.portal-resource-tag {
  display: inline-flex;
  width: fit-content;
  margin-top: 16px;
  color: var(--portal-olive);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .portal-grid,
  .portal-programs-grid,
  .portal-text-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-choice,
  .portal-continue,
  .portal-manage {
    grid-template-columns: 1fr;
  }

  .portal-last-card {
    border-left: 0;
    border-top: 1px solid var(--portal-line);
  }

  .portal-manage-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .portal-shell,
  .portal-hero,
  .portal-status {
    width: min(100% - 28px, 1120px);
  }

  .portal-hero {
    padding-top: 42px;
  }

  .portal-grid,
  .portal-programs-grid,
  .portal-text-columns {
    grid-template-columns: 1fr;
  }

  .portal-choice,
  .portal-section {
    padding: 24px 18px;
  }

  .portal-section-heading {
    display: block;
  }

  .portal-card {
    min-height: auto;
    padding: 21px;
  }

  .portal-card-actions,
  .portal-manage-actions {
    display: grid;
  }

  .portal-manage-row {
    display: grid;
  }

  .portal-button,
  .portal-link,
  .portal-card a,
  .portal-card button {
    width: 100%;
    min-height: 44px;
  }
}
