:root {
  color-scheme: dark;
  --bg: #0d1420;
  --surface: #151f30;
  --raised: #1b2940;
  --line: #2b3b52;
  --text: #edf3ff;
  --muted: #a7b6cc;
  --accent: #91b8ff;
  --on-accent: #101d36;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, -apple-system, sans-serif; }
button, input { font: inherit; }
a, button, input, summary { outline-offset: 4px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); }
a { color: inherit; }
button, summary { cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
.shell-nav { position: relative; max-width: 1160px; min-height: 72px; margin: auto; padding: 16px 36px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 32px; }
.shell-brand { font-size: 13px; font-weight: 800; letter-spacing: 2px; text-decoration: none; white-space: nowrap; }
.shell-brand span { color: var(--accent); }
.shell-home { font-size: 12px; text-decoration: none; }
.shell-nav-note { margin-left: auto; color: var(--muted); font-size: 11px; }
.shell-footer { max-width: 1160px; margin: auto; padding: 24px 36px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 11px; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: 2px; }
.shell-button { display: inline-flex; justify-content: center; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 7px; padding: 11px 17px; background: transparent; color: var(--accent); font-size: 12px; font-weight: 650; text-decoration: none; }
.shell-button:hover { background: var(--raised); }
.shell-button.primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.shell-button.primary:hover { background: #aac9ff; }
.login-screen { min-height: calc(100svh - 139px); padding: 42px 20px 35px; display: flex; flex-direction: column; align-items: center; gap: 27px; }
.login-heading { text-align: center; }
.login-heading h1 { margin-top: 15px; font-size: 44px; font-weight: 780; letter-spacing: -1.8px; line-height: 1.1; }
.login-heading h1 span { color: var(--muted); }
.signin-card { width: min(360px, 100%); padding: 25px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.signin-card h2 { font-size: 21px; letter-spacing: -.5px; }
.signin-card > p { margin-top: 7px; color: var(--muted); font-size: 13px; }
.signin-form { display: grid; gap: 15px; margin-top: 23px; }
.signin-form label { display: grid; gap: 7px; font-size: 12px; font-weight: 600; }
.signin-form input { min-width: 0; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #101929; color: var(--text); }
.signin-form input::placeholder { color: var(--muted); }
.signin-form .shell-button { justify-content: space-between; font-size: 13px; }
.signin-card .invite { margin-top: 22px; font-size: 11px; line-height: 1.7; }
.hobby-line { text-align: center; color: var(--muted); font-size: 11px; }
.alert { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 13px; }
.alert-error { background: #321d2a; border-color: #724052; color: #ffd1da; }
.alert-success { background: #152e29; border-color: #365c50; color: #c5edda; }
.alert-warning { background: #30291d; border-color: #6f5d37; color: #eddbb2; }
.alert-info { background: var(--raised); color: var(--text); }
.directory { max-width: 1160px; padding: 38px 36px 65px; margin: auto; min-height: calc(100svh - 139px); }
.directory-heading { padding-bottom: 27px; border-bottom: 1px solid var(--line); }
.directory-heading h1 { margin: 12px 0 14px; font-size: 39px; letter-spacing: -1.8px; line-height: 1.12; }
.directory-heading > p:last-child { color: var(--muted); font-size: 13px; line-height: 1.7; }
.directory-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 34px 0 17px; }
.directory-section-heading h2 { font-size: 20px; letter-spacing: -.5px; }
.directory-section-heading p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.directory-section-heading > span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.portal-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); padding: 19px 0; }
.portal-art { width: 76px; height: 65px; display: grid; place-items: center; }
.portal-art img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.portal-art span { font-size: 32px; }
.portal-copy { min-width: 0; }
.portal-copy h2 { font-size: 17px; letter-spacing: -.3px; overflow-wrap: anywhere; }
.portal-copy h2 a { text-decoration: none; }
.portal-copy h2 a:hover { color: var(--accent); }
.portal-copy > p { margin-top: 5px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.portal-meta { display: flex; flex-wrap: wrap; gap: 6px 15px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.portal-status.online { color: #b4dfc8; }
.portal-status.offline { color: #c2b7ab; }
.portal-status.starting { color: #eddbb2; }
.portal-status.unknown { color: var(--muted); }
.empty-state { padding: 55px 0; color: var(--muted); }
.empty-state .shell-button { margin-top: 20px; }
.nexus-menu { margin-left: auto; }
.nexus-menu summary { list-style: none; display: flex; align-items: center; gap: 15px; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 650; }
.nexus-menu summary::-webkit-details-marker { display: none; }
.nexus-menu[open] summary { border-color: var(--accent); }
.nexus-chevron { color: var(--accent); }
.nexus-menu[open] .nexus-chevron { transform: rotate(180deg); }
.nexus-panel { position: absolute; z-index: 10; top: calc(100% - 3px); right: 36px; width: min(420px, calc(100vw - 36px)); max-height: min(650px, 75svh); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--surface); box-shadow: 0 20px 65px #0008; }
.nexus-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.nexus-panel-heading strong { font-size: 13px; }
.nexus-panel-heading > span { color: var(--muted); font-size: 11px; }
.nexus-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.nexus-link { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px 8px; border-radius: 7px; color: var(--text); text-decoration: none; }
.nexus-link:hover, .nexus-account-actions a:hover { background: var(--raised); }
.module-mark { flex-shrink: 0; display: grid; place-items: center; width: 30px; height: 34px; border-radius: 8px; background: var(--raised); color: var(--accent); font-size: 10px; font-weight: 700; }
.nexus-link strong { display: block; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.nexus-link small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.nexus-link .arrow { margin-left: auto; color: var(--accent); font-size: 12px; }
.nexus-account-section { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.nexus-account-section .eyebrow { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.nexus-account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.nexus-account-actions a { padding: 9px 8px; border-radius: 7px; color: var(--muted); font-size: 12px; text-decoration: none; }
.module-search { display: grid; gap: 7px; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.module-search input { width: 100%; min-width: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); }
.menu-empty { padding: 16px 8px; color: var(--muted); font-size: 12px; }
@media (max-width: 620px) {
  .shell-nav { min-height: 66px; gap: 12px; padding: 13px 18px; }
  .shell-brand { font-size: 11px; letter-spacing: 1.5px; }
  .shell-home { display: none; }
  .shell-footer { padding: 22px 18px; flex-wrap: wrap; }
  .login-screen { padding: 32px 18px; }
  .login-heading h1 { font-size: 39px; }
  .signin-form input, .module-search input { font-size: 16px; }
  .directory { padding: 25px 18px 40px; }
  .directory-heading h1 { font-size: 32px; }
  .directory-section-heading { gap: 12px; align-items: start; }
  .directory-section-heading h2 { font-size: 18px; }
  .portal-row { grid-template-columns: 55px minmax(0, 1fr); gap: 12px; padding: 18px 0; }
  .portal-art { width: 55px; height: 60px; }
  .portal-row > .shell-button { grid-column: 2; justify-self: start; min-height: 44px; }
  .portal-copy > p { font-size: 11px; }
  .nexus-menu summary { gap: 10px; padding: 9px 11px; }
  .nexus-panel { right: 18px; max-height: 70svh; }
  .nexus-links { grid-template-columns: 1fr; }
  .nexus-link { min-height: 52px; padding: 11px 8px; }
  .nexus-link strong { font-size: 13px; }
  .nexus-link small { font-size: 11px; }
  .nexus-account-actions a { min-height: 44px; }
}
