/* Portal header — dark, aligned with the v4 landing. */
.opc-portal-header {
  --ph-ink: #eef4fb;
  --ph-text: #9aa9bd;
  --ph-muted: #8494a8;
  --ph-line: rgba(160, 200, 255, .12);
  --ph-line2: rgba(160, 200, 255, .2);
  --ph-acid: var(--accent);
  --ph-acid-ink: var(--accent-ink);
  --ph-acid-text: var(--accent-text);
  --ph-sans: var(--sans);
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  height: 68px;
  background: rgba(5, 7, 11, .8);
  border-bottom: 1px solid var(--ph-line);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}
.opc-portal-header-inner {
  width: min(1400px, calc(100% - 48px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 36px;
}
.opc-portal-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  color: var(--ph-ink);
  text-decoration: none;
}
.opc-portal-brand .opc-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}
.opc-portal-brand .mark {
  width: 32px;
  height: 32px;
  border: 1px solid var(--ph-line2);
  border-radius: 9px;
  display: grid;
  place-items: center;
  position: relative;
  font: 700 13px/1 var(--sans);
  letter-spacing: .08em;
  color: var(--ph-acid-text);
  background: linear-gradient(145deg, rgba(217, 181, 106, .12), rgba(139, 211, 255, .04));
}
.opc-portal-brand .mark::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ph-acid);
  box-shadow: 0 0 10px var(--ph-acid);
}
.opc-portal-brand b {
  display: block;
  font: 600 16px/1.2 var(--ph-sans);
  letter-spacing: .01em;
}
.opc-portal-brand small {
  display: block;
  margin-top: 3px;
  font: 13px/1.35 var(--ph-sans);
  letter-spacing: .04em;
  text-transform: none;
  color: var(--ph-muted);
}
.opc-portal-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.opc-portal-nav a {
  position: relative;
  font: 13px/1 var(--ph-sans);
  color: var(--ph-text);
  text-decoration: none;
  transition: color .25s;
}
.opc-portal-nav a:hover,
.opc-portal-nav a.on,
.opc-portal-nav a.router-link-active {
  color: var(--ph-ink);
}
.opc-portal-nav a.on::after,
.opc-portal-nav a.router-link-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 1px;
  background: var(--ph-acid);
  box-shadow: 0 0 10px rgba(217, 181, 106, .45);
}

.opc-portal-header .opc-portal-brand { color: var(--ph-ink); }
.opc-portal-header .opc-portal-brand b { color: var(--ph-ink); }
.opc-portal-header .opc-portal-brand small { color: var(--ph-muted); }
.opc-portal-header .opc-portal-nav a { color: var(--ph-text); }
.opc-portal-header .opc-portal-nav a:hover,
.opc-portal-header .opc-portal-nav a.on,
.opc-portal-header .opc-portal-nav a.router-link-active { color: var(--ph-ink); }
.opc-portal-header .opc-ph-outline { color: var(--ph-text); }
.opc-portal-header .opc-ph-outline:hover,
.opc-portal-header .opc-ph-outline.is-current { color: var(--ph-ink); }
.opc-portal-header .opc-ph-primary { color: var(--ph-acid-ink); }

.opc-portal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}
.opc-ph-outline,
.opc-ph-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 9px;
  font: 600 13px/1 var(--ph-sans);
  text-decoration: none;
  white-space: nowrap;
  transition: background .25s, border-color .25s, color .25s, transform .3s;
}
.opc-ph-outline {
  padding: 0 12px;
  border: 1px solid var(--ph-line2);
  color: var(--ph-text);
  background: rgba(255, 255, 255, .02);
}
.opc-ph-outline:hover,
.opc-ph-outline.is-current {
  color: var(--ph-ink);
  border-color: rgba(217, 181, 106, .4);
}
.opc-ph-primary {
  padding: 0 16px;
  display: inline-block;
  line-height: 40px;
  text-align: center;
  max-width: 440px;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--ph-acid);
  color: var(--ph-acid-ink);
}
.opc-ph-primary-short { display: none; }
.opc-ph-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(217, 181, 106, .18);
}
.opc-portal-menu {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ph-line2);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  place-items: center;
}
.opc-portal-menu i {
  display: block;
  width: 15px;
  height: 1px;
  background: var(--ph-ink);
  position: relative;
  transition: .3s;
}
.opc-portal-menu i::before,
.opc-portal-menu i::after {
  content: "";
  position: absolute;
  left: 0;
  width: 15px;
  height: 1px;
  background: var(--ph-ink);
  transition: .3s;
}
.opc-portal-menu i::before { top: -5px; }
.opc-portal-menu i::after { top: 5px; }
.menu-open .opc-portal-menu i { background: transparent; }
.menu-open .opc-portal-menu i::before { transform: translateY(5px) rotate(45deg); }
.menu-open .opc-portal-menu i::after { transform: translateY(-5px) rotate(-45deg); }
.opc-portal-mobile {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: #05070b;
  border-bottom: 1px solid var(--ph-line);
  padding: 12px 24px 20px;
  backdrop-filter: blur(20px);
}
.opc-portal-header .opc-portal-mobile a {
  display: flex;
  justify-content: space-between;
  padding: 13px 2px;
  border-bottom: 1px solid var(--ph-line);
  font: 13px/1.2 var(--ph-sans);
  color: var(--ph-text);
  text-decoration: none;
}
.opc-portal-header .opc-portal-mobile-actions a { color: var(--ph-text); }
.opc-portal-header .opc-portal-mobile-actions a:last-child { color: var(--ph-acid-ink); }
.opc-portal-mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}
.opc-portal-mobile-actions a {
  display: flex;
  justify-content: center;
  border: 1px solid var(--ph-line2);
  border-radius: 8px;
  padding: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.opc-portal-mobile-actions a:last-child {
  background: var(--ph-acid);
  border-color: var(--ph-acid);
  color: var(--ph-acid-ink);
  font-weight: 700;
}
.opc-theme {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--ph-line2);
  border-radius: 10px;
  background: none;
  color: var(--ph-text);
  cursor: pointer;
  transition: color .25s, border-color .25s, background .25s;
}
.opc-theme:hover { color: var(--ph-ink); border-color: var(--ph-line2); background: rgba(255, 255, 255, .04); }
.opc-theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; }
.opc-theme .moon { display: none; }
html[data-theme="light"] .opc-theme .sun { display: none; }
html[data-theme="light"] .opc-theme .moon { display: block; }

/* Global day mode: shared portal chrome */
html[data-theme="light"] .opc-portal-header {
  --ph-ink: #0b1220;
  --ph-text: #3c4a5c;
  --ph-muted: #758396;
  --ph-line: rgba(11, 18, 32, .12);
  --ph-line2: rgba(11, 18, 32, .18);
  background: rgba(244, 241, 234, .9);
  border-bottom-color: rgba(11, 18, 32, .12);
}
html[data-theme="light"] .opc-portal-header .opc-portal-brand b { color: #0b1220; }
html[data-theme="light"] .opc-portal-header .opc-portal-brand small { color: #758396; }
html[data-theme="light"] .opc-portal-header .opc-portal-nav a { color: #3c4a5c; }
html[data-theme="light"] .opc-portal-header .opc-portal-nav a:hover,
html[data-theme="light"] .opc-portal-header .opc-portal-nav a.on { color: #0b1220; }
html[data-theme="light"] .opc-portal-nav a.on::after,
html[data-theme="light"] .opc-portal-nav a.router-link-active::after { background: var(--ph-acid-text); box-shadow: none; }
html[data-theme="light"] .opc-portal-header .opc-ph-outline { color: #0b1220; border-color: rgba(11, 18, 32, .2); }
html[data-theme="light"] .opc-portal-header .opc-ph-outline:hover { border-color: rgba(11, 18, 32, .35); }
html[data-theme="light"] .opc-portal-header .opc-portal-menu { color: #0b1220; border-color: rgba(11, 18, 32, .2); }
html[data-theme="light"] .opc-portal-header .opc-theme { color: #3c4a5c; border-color: rgba(11, 18, 32, .18); }
html[data-theme="light"] .opc-portal-header .opc-theme:hover { color: #0b1220; background: rgba(11, 18, 32, .04); }
html[data-theme="light"] .opc-portal-header .opc-portal-mobile { background: #f4f1ea; border-color: rgba(11, 18, 32, .12); }
html[data-theme="light"] .opc-portal-header .opc-portal-mobile a { color: #3c4a5c; }
html[data-theme="light"] .opc-portal-header .opc-portal-mobile a:hover { color: #0b1220; }

@media (max-width: 1100px) {
  .opc-portal-nav { display: none; }
  .opc-portal-menu { display: grid; }
  .opc-portal-actions { margin-left: auto; }
  .menu-open .opc-portal-mobile { display: block; }
}
@media (max-width: 640px) {
  .opc-portal-header-inner { width: calc(100% - 24px); gap: 8px; }
  .opc-portal-brand { flex: 1 1 auto; min-width: 0; gap: 8px; }
  .opc-portal-brand > span { min-width: 0; }
  .opc-portal-brand .opc-brand-logo { width: 28px; height: 28px; border-radius: 8px; }
  .opc-portal-brand b {
    display: block;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .opc-portal-brand small { display: none; }
  .opc-portal-actions { flex-shrink: 0; margin-left: auto; gap: 6px; }
  .opc-ph-outline { display: none; }
  .opc-ph-primary { height: 38px; padding: 0 10px; font-size: 13px; line-height: 38px; text-align: center; max-width: 52vw; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .opc-theme { width: 34px; height: 34px; }
  .opc-portal-menu { width: 38px; height: 38px; flex-shrink: 0; }
}
@media (max-width: 480px) {
  .opc-ph-primary-full { display: none; }
  .opc-ph-primary-short { display: inline; }
}
@media (max-width: 420px) {
  .opc-theme { display: none; }
}
