.portal {
  --bg: #090f18;
  --panel: #101b29;
  --text: #edf4fb;
  --muted: #a5b8ca;
  --line: #233448;
  --accent: #a2d9fb;
  --footer-height: 54px;
  --footer-safe-area: env(safe-area-inset-bottom, 0px);
  padding-bottom: calc(var(--footer-height) + var(--footer-safe-area));
}
.portal .shell { width: min(100% - 88px, 1160px); }
.portal .site-header {
  position: sticky;
  top: 0;
  z-index: 6;
  background: linear-gradient(108deg, #0d1a28, #080e16 49%);
}
.portal .header-inner { min-height: 84px; }
.portal #main { scroll-margin-top: 84px; }
.portal .site-footer {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 5;
  padding-bottom: var(--footer-safe-area);
  border-top: 1px solid #385773;
  background: linear-gradient(105deg, #0b1521f5, #102137f5);
  backdrop-filter: blur(16px);
  box-shadow: 0 -8px 24px #0004;
}
.portal .site-footer .footer-inner {
  min-height: calc(var(--footer-height) - 1px);
  justify-content: flex-end;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.portal .footer-inner a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-weight: 600; }
.portal .footer-inner a span { color: var(--accent); font-size: 1rem; }
.portal .brand {
  --emblem-size: 50px;
  gap: 14px;
  flex-shrink: 0;
  padding-block: 5px;
  border-radius: 5px;
}
.portal .portal-brand-emblem {
  position: relative;
  width: var(--emblem-size);
  height: var(--emblem-size);
  flex: 0 0 var(--emblem-size);
  overflow: hidden;
}
.portal .portal-brand-emblem img {
  position: absolute;
  width: calc(var(--emblem-size) * 1.77);
  max-width: none;
  height: auto;
  top: -14%;
  left: 50%;
  transform: translateX(-50%);
}
.portal .portal-brand-name {
  display: grid;
  gap: 5px;
  color: var(--text);
  font: 700 clamp(.94rem, 1.55vw, 1.29rem)/1 Inter, sans-serif;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.portal .portal-brand-name span { font: inherit; letter-spacing: inherit; }
.portal .portal-brand-name span:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: .56em;
  letter-spacing: .39em;
}
.portal .portal-brand-name span:last-child::after {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #5684a2, #23384c);
  content: '';
}
.portal .main-nav { gap: 5px; margin-left: auto; }
.portal .main-nav > :is(a, span) {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  white-space: nowrap;
}
.portal .main-nav [aria-disabled] { color: #7f94a8; }
.portal .main-nav a:hover { color: var(--text); background: #111f2f; }
.portal .main-nav a[aria-current] { color: var(--accent); border-color: #2a4961; background: #132438; }
.portal .portal-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 8px;
  min-height: 42px;
  padding-inline: 12px;
  color: var(--accent);
  background: #132438;
  border: 1px solid #36516b;
  border-radius: 6px;
  font-size: .83rem;
  font-weight: 600;
  white-space: nowrap;
}
.portal .portal-account:hover, .portal .portal-account[aria-current] { background: #1b344d; border-color: #72a6c8; }
.portal .portal-account svg { width: 1rem; height: 1rem; }
.portal-section { padding-block: clamp(55px, 10vw, 110px); }
.portal-section h1 { font: 700 clamp(2rem, 4.6vw, 3.6rem)/1.12 Inter, sans-serif; letter-spacing: -.045em; }
.portal-section p { margin-top: 12px; color: var(--muted); }

.portal-hero-bg {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at center, #18304a 0, #101e30 34%, transparent 68%), #0a121d;
}
.portal-hero-bg::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
  background-image: linear-gradient(#75a6cc15 1px, transparent 1px), linear-gradient(90deg, #75a6cc15 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at center, #000 8%, transparent 65%);
  pointer-events: none;
}
.portal-hero {
  display: grid;
  place-items: center;
  min-height: clamp(388px, 36vw, 480px);
  padding-block: clamp(42px, 5vw, 70px);
}
.portal-emblem {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.portal-emblem::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  margin: auto;
  width: min(100%, 365px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #254762 0, #18314b 40%, #162c4200 71%);
  content: '';
}
.portal-emblem img { width: min(100%, 352px); height: auto; }

@media (max-width: 940px) {
  .portal .shell { width: calc(100% - 48px); }
  .portal .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 8px;
    min-height: 105px;
    padding-block: 6px;
  }
  .portal #main { scroll-margin-top: 105px; }
  .portal .brand { --emblem-size: 36px; justify-self: start; gap: 7px; }
  .portal .portal-brand-name { font-size: .76rem; gap: 4px; }
  .portal .main-nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: 2px; margin-left: 0; font-size: clamp(.65rem, 2.9vw, .76rem); }
  .portal .main-nav > :is(a, span) { min-height: 40px; padding-inline: clamp(3px, 1vw, 8px); }
  .portal .portal-account { grid-row: 1; grid-column: 2; gap: 5px; min-height: 40px; padding-inline: 7px; font-size: clamp(.64rem, 2.7vw, .76rem); }
}
@media (max-width: 560px) {
  .portal { --footer-height: 48px; }
  .portal .shell { width: calc(100% - 36px); }
  .portal-hero { min-height: 0; padding-block: 35px; }
  .portal-emblem img { width: min(100%, 230px); }
}
@media (max-width: 350px) {
  .portal .main-nav > :is(a, span) { padding-inline: 2px; }
}
