/* Public portal layout. Shape rule: panels use 18px, controls use 10px. */
:root {
  --portal-canvas: #fcf7fb;
  --portal-surface: #fffdfd;
  --portal-ink: #25122a;
  --portal-muted: #684d68;
  --portal-magenta: #9f0a8b;
  --portal-magenta-deep: #750465;
  --portal-magenta-soft: #fbe8f8;
  --portal-orange: #ef8b18;
  --portal-orange-soft: #fff0dc;
  --portal-violet: #5c2c91;
  --portal-violet-soft: #f4ebff;
  --portal-line: #ead8e8;
  --portal-radius: 18px;
  --portal-control-radius: 10px;
}

html {
  color-scheme: light;
}

body.portal-page {
  min-height: 100dvh;
  color: var(--portal-ink);
  background: var(--portal-canvas);
  font-family: Aptos, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.portal-skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 0.65rem 0.8rem;
  border-radius: var(--portal-control-radius);
  color: #fffdfd;
  background: var(--portal-magenta-deep);
  text-decoration: none;
  transform: translateY(-160%);
}

.portal-skip-link:focus {
  transform: translateY(0);
}

.portal-header,
.portal-home,
.portal-footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.portal-header {
  border-bottom: 1px solid var(--portal-line);
}

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
}

.portal-wordmark {
  display: grid;
  gap: 2px;
  color: var(--portal-ink);
  line-height: 1.2;
  text-decoration: none;
}

.portal-wordmark span {
  font-size: 0.92rem;
  font-weight: 720;
}

.portal-wordmark strong {
  color: var(--portal-magenta-deep);
  font-size: 0.78rem;
  font-weight: 780;
}

.portal-admin-link,
.portal-jump-link,
.portal-dashboard-note a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.66rem 0.92rem;
  border-radius: var(--portal-control-radius);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.1;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.portal-admin-link {
  border: 1px solid #d8bdd5;
  color: var(--portal-magenta-deep);
  background: var(--portal-surface);
}

.portal-admin-link:hover {
  border-color: var(--portal-magenta);
  background: var(--portal-magenta-soft);
}

.portal-home__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(330px, 0.82fr);
  align-items: stretch;
  min-height: 448px;
  margin-top: 42px;
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  background: var(--portal-surface);
  box-shadow: 0 18px 42px rgb(68 17 61 / 0.08);
}

.portal-home__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 620px;
  padding: clamp(38px, 5vw, 72px);
}

.portal-kicker {
  margin: 0 0 15px;
  color: var(--portal-magenta-deep);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.portal-home__copy h1 {
  max-width: 540px;
  margin: 0;
  color: var(--portal-ink);
  font-size: clamp(2.4rem, 4.3vw, 4.15rem);
  font-weight: 780;
  letter-spacing: -0.056em;
  line-height: 1.01;
}

.portal-home__copy > p:last-of-type {
  max-width: 460px;
  margin: 20px 0 0;
  color: var(--portal-muted);
  font-size: 1rem;
  line-height: 1.64;
}

.portal-jump-link {
  align-self: flex-start;
  margin-top: 28px;
  color: #fffdfd;
  background: var(--portal-magenta);
  box-shadow: 0 9px 18px rgb(159 10 139 / 0.19);
}

.portal-jump-link:hover,
.portal-dashboard-note a:hover {
  background: var(--portal-magenta-deep);
}

.portal-home__photo {
  min-height: 448px;
  margin: 0;
  padding: 18px 18px 18px 0;
  background: linear-gradient(145deg, var(--portal-orange-soft), var(--portal-magenta-soft));
}

.portal-home__photo img {
  width: 100%;
  height: 100%;
  min-height: 412px;
  border-radius: 14px;
  object-fit: cover;
  object-position: center;
}

.portal-directory {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.45fr);
  column-gap: clamp(38px, 7vw, 100px);
  row-gap: 24px;
  align-items: start;
  padding: 72px 0 20px;
}

.portal-directory__heading {
  grid-column: 1;
  grid-row: 1;
  max-width: 280px;
}

.portal-directory__heading h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  font-weight: 760;
  letter-spacing: -0.048em;
  line-height: 1.08;
}

.portal-directory__heading p {
  margin: 13px 0 0;
  color: var(--portal-muted);
  font-size: 0.94rem;
  line-height: 1.58;
}

.portal-directory__meta {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  gap: 2px;
  align-content: start;
  padding-top: 18px;
  border-top: 2px solid var(--portal-orange);
  color: var(--portal-muted);
  font-size: 0.86rem;
}

.portal-directory__meta span:first-child {
  color: var(--portal-magenta-deep);
  font-size: 2rem;
  font-weight: 790;
  letter-spacing: -0.06em;
  line-height: 1;
}

.portal-link-list,
.portal-empty-state {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.portal-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.portal-directory-link {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  gap: 13px 16px;
  min-height: 176px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  color: var(--portal-ink);
  background: var(--portal-surface);
  box-shadow: 0 10px 22px rgb(78 31 77 / 0.055);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.portal-directory-link::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  content: "";
  background: var(--portal-magenta);
}

.portal-directory-link:nth-child(3n + 2)::before {
  background: var(--portal-orange);
}

.portal-directory-link:nth-child(3n)::before {
  background: var(--portal-violet);
}

.portal-directory-link:nth-child(3n + 2) {
  background: #fffaf3;
}

.portal-directory-link:nth-child(3n) {
  background: #fcf9ff;
}

.portal-directory-link:last-child {
  grid-column: 1 / -1;
  min-height: 148px;
}

.portal-directory-link:hover {
  transform: translateY(-3px);
  border-color: rgb(159 10 139 / 0.4);
  box-shadow: 0 18px 32px rgb(78 31 77 / 0.12);
}

.portal-directory-link__number {
  display: none;
}

.portal-directory-link__copy {
  grid-column: 1 / -1;
  min-width: 0;
  align-self: center;
}

.portal-directory-link__copy strong,
.portal-directory-link__copy small {
  display: block;
}

.portal-directory-link__copy strong {
  font-size: 1rem;
  line-height: 1.38;
}

.portal-directory-link__copy small {
  margin-top: 7px;
  overflow: hidden;
  color: var(--portal-muted);
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-directory-link__action {
  grid-column: 1;
  grid-row: 3;
  color: var(--portal-magenta-deep);
  font-size: 0.84rem;
  font-weight: 780;
}

.portal-empty-state {
  padding: 42px 0;
}

.portal-empty-state h3,
.portal-empty-state p {
  margin: 0;
}

.portal-empty-state h3 {
  font-size: 1.1rem;
}

.portal-empty-state p {
  margin-top: 6px;
  color: var(--portal-muted);
}

.portal-dashboard-note {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  margin-top: 62px;
  padding: 26px 30px;
  border: 1px solid #efd5e9;
  border-radius: var(--portal-radius);
  background: var(--portal-magenta-soft);
}

.portal-dashboard-note strong,
.portal-dashboard-note p {
  display: block;
}

.portal-dashboard-note strong {
  font-size: 1.08rem;
}

.portal-dashboard-note p {
  margin: 4px 0 0;
  color: var(--portal-muted);
  font-size: 0.92rem;
}

.portal-dashboard-note a {
  flex: 0 0 auto;
  color: #fffdfd;
  background: var(--portal-magenta);
}

.portal-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 42px;
  color: var(--portal-muted);
  font-size: 0.82rem;
}

.portal-footer p {
  margin: 0;
}

.portal-page .portal-admin-link:focus-visible,
.portal-page .portal-jump-link:focus-visible,
.portal-page .portal-dashboard-note a:focus-visible,
.portal-page .portal-directory-link:focus-visible,
.portal-page .portal-wordmark:focus-visible {
  outline: 3px solid rgb(239 139 24 / 0.42);
  outline-offset: 4px;
}

.portal-page .portal-admin-link:active,
.portal-page .portal-jump-link:active,
.portal-page .portal-dashboard-note a:active,
.portal-page .portal-directory-link:active {
  transform: translateY(1px);
}

@media (max-width: 860px) {
  .portal-home__hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  }

  .portal-home__copy {
    padding: 38px;
  }

  .portal-directory {
    column-gap: 34px;
  }

  .portal-link-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .portal-header,
  .portal-home,
  .portal-footer {
    width: min(100% - 32px, 560px);
  }

  .portal-topbar {
    min-height: 66px;
  }

  .portal-home__hero {
    grid-template-columns: 1fr;
    min-height: auto;
    margin-top: 24px;
  }

  .portal-home__copy {
    padding: 36px 26px 30px;
  }

  .portal-home__copy h1 {
    font-size: clamp(2.28rem, 10.8vw, 3.2rem);
  }

  .portal-home__copy > p:last-of-type {
    margin-top: 17px;
    font-size: 0.97rem;
  }

  .portal-jump-link {
    margin-top: 24px;
  }

  .portal-home__photo {
    min-height: 286px;
    padding: 0 18px 18px;
  }

  .portal-home__photo img {
    min-height: 268px;
  }

  .portal-directory {
    display: block;
    padding-top: 52px;
  }

  .portal-directory__heading {
    max-width: 330px;
  }

  .portal-directory__meta {
    display: flex;
    gap: 7px;
    align-items: baseline;
    margin: 28px 0 14px;
    padding-top: 0;
    border-top: 0;
  }

  .portal-directory__meta span:first-child {
    font-size: 1.55rem;
  }

  .portal-link-list {
    grid-template-columns: 1fr;
  }

  .portal-directory-link {
    min-height: 151px;
  }

  .portal-directory-link:last-child {
    min-height: 151px;
  }

  .portal-dashboard-note {
    display: grid;
    gap: 18px;
    margin-top: 46px;
    padding: 24px;
  }

  .portal-dashboard-note a {
    justify-self: start;
  }

  .portal-footer {
    display: grid;
    gap: 5px;
    padding-bottom: 28px;
  }
}

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