:root {
  color-scheme: light;
  --portal-background: #f7f9fa;
  --portal-surface: #fff;
  --portal-text: #1c2833;
  --portal-muted: #647483;
  --portal-border: #dce2e6;
  --portal-accent: #0875dc;
  --portal-accent-soft: #edf6ff;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --portal-background: oklch(0.18 0.012 250);
  --portal-surface: oklch(0.225 0.014 250);
  --portal-text: oklch(0.94 0.008 250);
  --portal-muted: oklch(0.735 0.025 250);
  --portal-border: oklch(0.35 0.018 250);
  --portal-accent: oklch(0.74 0.12 250);
  --portal-accent-soft: oklch(0.285 0.04 250);
}
* { box-sizing: border-box; }
.platform-portal {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--portal-background);
  color: var(--portal-text);
  font: 400 16px/1.5 "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--portal-accent); outline-offset: 4px; border-radius: 6px; }
[hidden] { display: none !important; }
.portal-header { background: var(--portal-surface); border-bottom: 1px solid var(--portal-border); }
.portal-header-inner, .portal-navigation, .portal-main, .portal-footer { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.portal-header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.portal-brand { display: flex; align-items: center; gap: 24px; min-height: 44px; font-weight: 600; }
.portal-brand img { object-fit: contain; width: 44px; height: 44px; border-radius: 8px; }
.portal-theme-sun { display: none; }
:root[data-theme="dark"] .portal-theme-moon { display: none; }
:root[data-theme="dark"] .portal-theme-sun { display: block; }
.portal-header-actions { display: flex; align-items: center; gap: 12px; }
.portal-theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--portal-border); border-radius: 6px; background: var(--portal-surface); color: var(--portal-muted); cursor: pointer; font-size: 20px; }
.portal-theme-toggle:hover { background: var(--portal-background); color: var(--portal-text); }
.portal-brand > span { border-left: 1px solid var(--portal-border); padding-left: 24px; }
.portal-signout { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 6px; color: var(--portal-muted); font-size: 14px; }
.portal-signout:hover { color: var(--portal-text); background: var(--portal-background); }
.portal-signout i { font-size: 20px; }
.portal-navigation { display: flex; align-items: stretch; gap: 28px; overflow-x: auto; }
.portal-navigation > span { display: contents; }
.portal-nav-link { display: inline-flex; align-items: center; min-height: 52px; border-bottom: 3px solid transparent; padding: 10px 0; white-space: nowrap; color: var(--portal-muted); font-size: 14px; font-weight: 600; }
.portal-nav-link[aria-current="page"] { color: var(--portal-accent); border-bottom-color: var(--portal-accent); }
.portal-nav-link:hover { color: var(--portal-accent); }
.portal-main { flex: 1; padding-block: 64px 80px; }
.portal-welcome { max-width: 720px; margin-bottom: 52px; }
.portal-eyebrow { margin: 0 0 12px; color: var(--portal-muted); font-size: 11px; font-weight: 600; letter-spacing: .09em; }
h1 { margin: 0; max-width: 640px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
.portal-welcome > p:last-child { margin: 20px 0 0; color: var(--portal-muted); max-width: 540px; line-height: 1.6; }
.portal-section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
h2 { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 600; }
.portal-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding-inline: 7px; border: 1px solid var(--portal-border); border-radius: 5px; background: var(--portal-surface); color: var(--portal-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.portal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.portal-app-link { display: flex; align-items: center; gap: 16px; min-height: 108px; height: 100%; padding: 24px 20px; border: 1px solid var(--portal-border); border-radius: 8px; background: var(--portal-surface); transition: border-color 150ms ease-out, background-color 150ms ease-out; }
.portal-app-link:hover { border-color: var(--portal-accent); background: var(--portal-accent-soft); }
.portal-app-link:active { border-color: var(--portal-accent); }
.portal-app-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 8px; background: var(--portal-accent-soft); color: var(--portal-accent); font-size: 26px; }
.portal-app-copy { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.portal-app-title { font-weight: 600; overflow-wrap: anywhere; }
.portal-app-address { font-size: 12px; color: var(--portal-muted); overflow-wrap: anywhere; }
.portal-app-arrow { margin-left: auto; flex-shrink: 0; color: var(--portal-muted); font-size: 20px; }
.portal-empty { padding: 52px 24px; background: var(--portal-surface); border: 1px dashed var(--portal-border); border-radius: 8px; text-align: center; }
.portal-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; color: var(--portal-muted); background: var(--portal-background); border-radius: 8px; font-size: 28px; }
.portal-empty h3 { margin: 20px 0 8px; font-size: 16px; font-weight: 600; }
.portal-empty p { margin: 0; font-size: 14px; color: var(--portal-muted); }
.portal-footer { display: flex; justify-content: space-between; gap: 16px; padding-block: 24px; border-top: 1px solid var(--portal-border); font-size: 12px; color: var(--portal-muted); }
.portal-footer > span:first-child { font-weight: 600; }
.portal-sr-only, .portal-skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.portal-skip:focus { position: absolute; z-index: 1; top: 8px; left: 16px; padding: 12px 16px; background: var(--portal-surface); }
@media (max-width: 940px) { .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .portal-header-inner, .portal-navigation, .portal-main, .portal-footer { width: calc(100% - 40px); }
  .portal-header-inner { min-height: 76px; gap: 12px; }
  .portal-header-actions { gap: 4px; }
  .portal-brand { gap: 12px; }
  .portal-brand img { width: 40px; height: 40px; }
  .portal-brand > span { border: 0; padding: 0; font-size: 13px; }
  .portal-signout { padding-inline: 4px; font-size: 13px; }
  .portal-navigation { gap: 24px; }
  .portal-main { padding-block: 40px 56px; }
  .portal-welcome { margin-bottom: 36px; }
  .portal-welcome > p:last-child { font-size: 15px; }
  .portal-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .portal-app-link { min-height: 96px; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .portal-app-link { transition: none; } }
