@import url("https://fonts.googleapis.com/css2?family=Inter+Display:wght@500;600;700&family=Inter:ital,opsz,wght@0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;1,14..32,400&display=swap");

:root {
  --navy: #011223;
  --navy-deep: #001933;
  --green: #26f240;
  --signal: #04cd66;
  --cyan: #01f3d7;
  --gray: #f4f7f9;
  --muted: #8fa0b0;
  --danger: #ff8f8f;
  --warn: #f0c985;
  --gradient: linear-gradient(90deg, #01f3d7, #04cd66, #26f240);
  --bg0: var(--navy);
  --bg1: var(--navy-deep);
  --card: var(--navy-deep);
  --border: rgba(1, 243, 215, 0.22);
  --text: var(--gray);
  --accent: var(--green);
  --accent2: var(--cyan);
  --font: "Inter", sans-serif;
  --font-display: "Inter Display", "Inter", sans-serif;
  --nav-height: 72px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--navy);
  min-height: 100vh;
}

h1, h2,
.landing-title,
.landing-point__title,
.api-docs-hero h1,
.upgrade-hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.portal-nav {
  position: sticky;
  top: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  height: var(--nav-height);
  background: var(--navy-deep);
  border-bottom: 1px solid var(--border);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
}

.portal-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.portal-nav__logo {
  display: block;
  height: 56px;
  width: auto;
}

.portal-nav__sep {
  width: 1px;
  height: 24px;
  background: rgba(1, 243, 215, 0.22);
  flex-shrink: 0;
}

.portal-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
}

.portal-nav__link {
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.portal-nav__link:hover {
  background: rgba(1, 243, 215, 0.12);
  color: var(--text);
}

.portal-nav__link--active {
  background: rgba(4, 205, 102, 0.18);
  color: var(--text);
}

.portal-nav__spacer { flex: 1; }

.portal-nav__utility {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.portal-nav__user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
  position: relative;
}

.portal-nav__user-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.portal-nav__tier {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(1, 243, 215, 0.1);
  color: var(--muted);
  flex-shrink: 0;
}

.portal-nav__tier--paid {
  background: rgba(4, 205, 102, 0.16);
  color: var(--signal);
}

.portal-nav__gear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  line-height: 1;
}

.portal-nav__gear:hover,
.portal-nav__gear[aria-expanded="true"] {
  background: rgba(1, 243, 215, 0.12);
  color: var(--text);
}

.portal-nav__menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--navy-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(1, 18, 35, 0.55);
  padding: 6px 0;
  z-index: 100000;
}

.portal-nav__menu--open { display: block; }

.portal-nav__menu-item {
  display: block;
  width: 100%;
  padding: 9px 16px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  font-family: inherit;
  line-height: 1.4;
}

.portal-nav__menu-item:hover {
  background: rgba(1, 243, 215, 0.12);
  color: var(--text);
}

.portal-nav__menu-sep {
  height: 1px;
  background: rgba(1, 243, 215, 0.14);
  margin: 4px 0;
}

.portal-nav__action {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.portal-nav__action:hover {
  background: rgba(1, 243, 215, 0.12);
  color: var(--text);
}

@media (max-width: 720px) {
  :root {
    --nav-height: 96px;
  }

  .portal-nav {
    flex-wrap: wrap;
    height: auto;
    min-height: 56px;
    padding: 8px 12px;
    gap: 8px 10px;
  }

  .portal-nav__logo {
    height: 40px;
  }

  .portal-nav__sep {
    display: none;
  }

  .portal-nav__links {
    order: 10;
    flex: 1 1 100%;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
  }

  .portal-nav__links::-webkit-scrollbar {
    display: none;
  }

  .portal-nav__link {
    padding: 6px 10px;
    font-size: 12px;
  }

  .portal-nav__user-label {
    display: none;
  }

  .portal-nav__user {
    gap: 6px;
  }
}
