body:has(.portal) {
  --portal-accent: var(--page-accent, #fec23d);
}

.portal-page {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
}

.portal {
  width: min(calc(100% - 48px), 46rem);
  margin: 0 auto;
  padding: 56px 0 88px;
  line-height: 1.55;
  overflow-wrap: break-word;
  flex: 1;
}

body:has(.portal--pink) {
  --portal-accent: #fb93d7;
}

body:has(.portal--blue) {
  --portal-accent: #6dd7fd;
  --page-railway-1: #bef0ff;
  --page-railway-2: #6dd7fd;
  --page-railway-3: #0093cb;
  --page-railway-4: #005acd;
}

.page-heading {
  position: relative;
  isolation: isolate;
  margin-bottom: 48px;
}

.page-heading::before {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: 0;
  left: 0;
  height: 5px;
  transform: translateY(-50%);
  background: var(--portal-accent);
  box-shadow: 0 0 0 100vmax var(--portal-accent);
  clip-path: inset(0 -100vmax);
  content: "";
}

.portal h1 {
  position: relative;
  margin: 0;
  padding-left: 48px;
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.portal h1 span {
  padding-inline: 0.08em 0.22em;
  background: #121212;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.portal h1::before {
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  left: 0;
  width: 30px;
  height: 30px;
  border: 7px solid var(--portal-accent);
  border-radius: 50%;
  background: #121212;
  transform: translateY(-50%);
  content: "";
}

.portal h2 {
  margin: 2.25rem 0 0.7rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.portal h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.2rem;
  text-wrap: balance;
}

.portal a {
  color: var(--page-accent, #bef0ff);
  text-decoration-thickness: 1.5px;
}

.portal--pink a {
  color: var(--portal-accent);
}

.portal--pink a:is(:hover, :focus-visible) {
  color: #ee61bd;
}

.portal :focus-visible {
  outline-color: var(--page-accent, #fec23d);
}

.portal p,
.portal li {
  max-width: 70ch;
}

.portal ul,
.portal ol {
  padding-left: 1.35rem;
}

.help {
  margin: 0.45rem 0;
  color: #c9c9c9;
  font-size: 0.92rem;
}

button,
.button {
  display: inline-block;
  min-height: 3rem;
  padding: 0.75rem 1.15rem;
  border: 2px solid transparent;
  border-radius: 0;
  color: #121212 !important;
  background: var(--page-accent, #fec23d);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover {
  background: var(--page-accent-hover, #ffd576);
}

button:active,
.button:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.secondary {
  border-color: var(--page-accent, #9d72b3);
  color: #fff !important;
  background: transparent;
}

.secondary:hover {
  background: var(--page-accent-surface, #391053);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.75rem;
}

.notice {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border-left: 8px solid #92dcb2;
  color: #fff;
  background: #203e33;
}

.notice-error {
  border-color: #ee320c;
  background: #471c20;
}

.notice-warning {
  border-color: #ee320c;
  background: color-mix(in srgb, #ee320c 32%, #121212);
}

.portal-footer {
  position: relative;
  container-type: inline-size;
  padding: 24px 24px 12px;
  border-top: 1px solid #555;
  font-size: 0.95rem;
}

.portal-footer nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 28px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .portal-footer {
    padding-inline: 16px;
  }

  .portal-footer nav {
    gap: clamp(8px, 2cqi, 18px);
    font-size: clamp(12px, 4cqi, 0.95rem);
  }
}

.portal-footer__railway {
  bottom: auto;
  height: 12px;
}

.portal-footer a {
  min-height: 24px;
  color: #fff;
  text-decoration: none;
}

.portal-footer a:is(:hover, :focus-visible) {
  color: var(--portal-accent);
  outline-color: var(--portal-accent);
}

dl {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) 2fr;
  gap: 0.75rem 1rem;
}

dt {
  color: #c9c9c9;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.policy-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 2rem;
  padding-bottom: 0.8rem;
  border-bottom: 4px solid var(--portal-accent);
}

.policy-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border: 2px solid #555;
  color: #fff;
  font-weight: 700;
}

.policy-nav [aria-current="page"] {
  color: #fec23d;
  border-color: #fec23d;
}

.policy-nav {
  flex-wrap: nowrap;
  gap: clamp(0.25rem, 1vw, 0.6rem);
  overflow-x: auto;
}

.policy-nav a {
  flex: 0 0 auto;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 500px) {
  .policy-nav a {
    flex-grow: 1;
    padding-inline: clamp(0rem, calc(3vw - 0.6rem), 0.8rem);
  }
}

@media (max-width: 360px) {
  .policy-nav {
    margin-inline: -0.5rem;
  }
}

.policy > p:first-child {
  font-size: 1.15rem;
  font-weight: 700;
}

.policy li + li {
  margin-top: 0.4rem;
}

@media (max-width: 780px) {
  .portal {
    width: min(calc(100% - 32px), 46rem);
    min-height: 0;
    padding: 40px 0 64px;
  }
}

@media (max-width: 500px) {
  .portal h1 {
    padding-left: 38px;
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  .portal h1::before {
    width: 24px;
    height: 24px;
    border-width: 6px;
  }

  dl {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  dd {
    margin-bottom: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  button:active,
  .button:active {
    transform: none;
  }
}

.portal nav a,
.portal-footer a {
  text-decoration: none;
}

.itinerary-print-help {
  color: #bcbcbc;
}

.itinerary-actions {
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
}

.itinerary-actions .button {
  white-space: nowrap;
}

.itinerary-time-long,
.itinerary-return-short {
  display: none;
}

.itinerary-actions > :last-child {
  margin-left: auto;
}

.itinerary-events {
  display: block;
}

.itinerary-events > div {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) 2fr;
  gap: 12px;
  padding-block: 16px;
  border-bottom: 1px solid #454545;
}

.itinerary-events dt {
  color: #fb93d7;
  font-weight: 700;
}

.itinerary-events dd {
  margin: 0;
}

@media screen and (min-width: 1000px) {
  .portal:has(.itinerary) {
    width: min(calc(100% - 48px), 76rem);
  }

  .itinerary-days {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(32px, 4vw, 64px);
  }

  .itinerary-events > div {
    grid-template-columns: minmax(10.5rem, 1fr) 1.5fr;
  }

  .itinerary-time-short {
    display: none;
  }

  .itinerary-time-long {
    display: inline;
  }
}

@media (max-width: 650px) {
  .itinerary-return-full {
    display: none;
  }

  .itinerary-return-short {
    display: inline;
  }
}

@media screen and (max-width: 420px) {
  .itinerary-events > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media print {
  .itinerary-time-short {
    display: none;
  }

  .itinerary-time-long {
    display: inline;
  }

  body:has(.itinerary) {
    background: #fff;
    color: #121212;
  }

  body:has(.itinerary) .action-bar,
  body:has(.itinerary) .brand-banner,
  body:has(.itinerary) .portal-footer,
  body:has(.itinerary) .skip-link,
  .itinerary a,
  .itinerary-actions {
    display: none;
  }

  body:has(.itinerary) .portal {
    max-width: none;
    padding: 0;
  }

  body:has(.itinerary) h1 {
    font-size: 26pt;
  }

  body:has(.itinerary) h1::before,
  body:has(.itinerary) .page-heading::before {
    display: none;
  }

  .itinerary h2 {
    font-size: 18pt;
    break-after: avoid;
  }

  .itinerary-events > div {
    grid-template-columns: minmax(8rem, 1fr) 2fr;
    gap: 12px;
    break-inside: avoid;
    padding-block: 5pt;
  }

  .itinerary-events dt {
    color: #121212;
  }
}

.portal--itinerary {
  --page-accent: var(--portal-accent);
  --page-accent-hover: #fdb2e7;
  --page-accent-surface: #252525;
}

.portal--itinerary .page-heading {
  container-type: inline-size;
}

.portal--itinerary h1 {
  font-size: clamp(2rem, 6.6cqi, 3rem);
}

.portal--itinerary .secondary {
  border-color: #777;
  background: transparent;
  outline-color: #fff;
}

.portal--itinerary .secondary:is(:hover, :focus-visible) {
  border-color: #fff;
  background: transparent;
}

@media print {
  html:has(.itinerary) {
    background: #fff;
  }

  body:has(.itinerary) .portal-page {
    display: block;
    min-height: 0;
  }

  body:has(.itinerary) .portal {
    width: 100%;
    margin: 0;
  }

  body:has(.itinerary) .page-heading {
    margin-bottom: 16pt;
    container-type: normal;
  }

  body:has(.itinerary) h1 {
    padding: 0;
    color: #121212;
  }

  body:has(.itinerary) h1 span {
    padding: 0;
    background: transparent;
  }

  .itinerary-print-help {
    display: none;
  }
}
