[hidden] {
  display: none !important;
}

:root {
  --bg: #0a0a0a;
  --bg-light: #111111;
  --bg-muted: #161616;

  --text: #fbf2f2;
  --text-muted: #b8b8b8;
  --text-light: #fbf2f2;

  --primary: #ff7e29;
  --primary-light: #ff9652;
  --primary-dark: #e96510;
  --primary-glow: rgba(255, 126, 41, 0.22);

  --danger: #cc0000;
  --danger-dark: #990000;

  --outline: rgba(255, 255, 255, 0.12);
  --card: #121212;

  --radius: 12px;
  --radius-lg: 16px;

  --font-main: 'Inter', system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html.protected-bfcache-retired body {
  visibility: hidden;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-muted {
  background: var(--bg-light);
}

/* =========================
   HEADER
========================= */

.site-header {
  background: var(--bg-light);
  border-bottom: 1px solid var(--outline);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-img {
  height: 104px;
  padding-top: 10px;
}

.nav-desktop {
  display: flex;
  gap: 1.4rem;
}

.nav-desktop a {
  color: var(--text-muted);
  font-weight: 500;
}

.nav-desktop a:hover {
  color: var(--primary-light);
  text-shadow: 0 0 10px #ff660040;
}

/* =========================
   MOBILE NAV
========================= */

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}

/* supports 3 spans (top/mid/bottom) */
/* =========================
   MOBILE NAV (FIXED CONSTRAINTS)
   - supports BOTH 2-span and 3-span hamburger markup
   - even spacing for menu items
   - right-aligned menu items
   - smaller logout button (not full width)
========================= */

.nav-toggle span{
  position:absolute;
  width:34px;
  height:3px;
  background:var(--primary);
  left:5px;
}

/* ✅ If you have 2 spans (top/bottom) */
.nav-toggle span:nth-child(1){ top:11px; }
.nav-toggle span:nth-child(2){ bottom:11px; transform:none; }

/* ✅ If you have 3 spans (top/middle/bottom) */
.nav-toggle span:nth-child(3){ bottom:11px; }
.nav-toggle span:nth-child(2):last-child{ bottom:11px; transform:none; } /* safety */

/* Middle bar only when it exists (3 spans) */
.nav-toggle span:nth-child(2):not(:last-child){
  top:50%;
  transform:translateY(-50%);
}

/* Mobile dropdown */
.nav-mobile{
  display:none;
  flex-direction:column;
  background:var(--bg-light);
  padding:1.25rem;
  border-bottom:1px solid var(--outline);
  align-items:center;      /* center items */
  text-align:center;
}

.nav-mobile.open{
  display:flex;
}

/* Mobile nav links */
.nav-mobile a{
  width:100%;
  padding:0.85rem 0;
  text-align:center;
  color:var(--text);       /* white text */
  font-weight:500;
  border:none;
}




/* Mobile auth actions */
.mobile-login{
  width:100%;
  padding:.9rem 0;
  color:var(--primary-light);
  text-align:right;
}

/* Logout: smaller width, right side */
.mobile-logout{
  width:auto;
  align-self:flex-end;
  padding:.55rem .9rem;
  font-size:.9rem;
}

/* =========================
   FOOTER
========================= */

.site-footer {
  padding: 3rem 0;
  background: var(--bg-light);
  border-top: 1px solid var(--outline);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
}

.footer-left {
  justify-self: start;
}

.footer-links {
  display: flex;
  justify-self: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--primary-light);
}

.footer-meta {
  justify-self: end;
  text-align: right;
}

.footer-meta p {
  margin: 0.25rem 0;
}

.footer-partner a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.technology-partner-intro {
  max-width: 48rem;
  margin-bottom: 1.5rem;
}

.technology-partner-intro h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.technology-partner-intro p {
  color: var(--text-muted);
  line-height: 1.65;
}

.technology-partner-intro .partner-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--primary-light);
  font-weight: 600;
}

.technology-partner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.partner-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  background: var(--bg-light);
}

.partner-card > div { flex: 1 1 28rem; min-width: 0; }
.partner-card h2,
.partner-card h3 { margin: 0 0 1rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.partner-card p { line-height: 1.65; color: var(--text-muted); }
.partner-card .partner-eyebrow { margin: 0 0 0.75rem; color: var(--primary-light); font-weight: 600; }
.partner-card .partner-note { margin-bottom: 0; font-size: 0.85rem; }
.partner-card > a { max-width: 100%; min-height: 44px; white-space: normal; text-align: center; }

@media (max-width: 1400px) {
  .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-left {
    display: flex;
    width: 100%;
    justify-content: center;
  }

  .footer-left .logo-img {
    margin: 0 auto;
  }

  .footer-links {
    width: 100%;
    justify-content: center;
  }

  .footer-meta {
    width: 100%;
    text-align: center;
  }

  .footer-meta p {
    margin: 0;
  }
}

@media (max-width: 780px) {
  .technology-partner-grid { grid-template-columns: 1fr; }
}

/* =========================
   BUTTONS
========================= */

.btn {
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #000;
  border: 1px solid var(--primary);
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #000;
  box-shadow: 0 0 18px var(--primary-glow);
}

.btn-ghost {
  color: var(--primary-light);
  opacity: 0.85;
}

.btn-ghost:hover {
  opacity: 1;
  text-shadow: 0 0 10px #ff660030;
}

.btn-outline {
  border: 1px solid var(--outline);
  background: transparent;
  color: var(--primary-light);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(255, 126, 41, 0.08);
  color: var(--primary-light);
  box-shadow: 0 0 18px #ff660030;
}

/* =========================
   LINKS
========================= */

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: 0.25s ease;
}

a:hover {
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(255, 126, 41, 0.65);
  outline-offset: 3px;
}

/* Account actions are deliberately unmistakable in both desktop and mobile
   navigation. This selector is intentionally narrower than .btn-ghost. */
#logoutBtn,
.mobile-logout {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #0a0a0a;
  opacity: 1;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

#logoutBtn:hover,
.mobile-logout:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  color: #0a0a0a;
  text-shadow: none;
  box-shadow: 0 0 18px var(--primary-glow);
}

/* =========================
   CODE BLOCKS
========================= */

.code-block {
  background: #111;
  border: 1px solid var(--outline);
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-lg);
  font-family: monospace;
  font-size: 0.95rem;
  box-shadow: 0 0 12px #ff660015;
}

/* =========================
   TOAST NOTIFICATIONS
========================= */

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: calc(100vw - 2rem);
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-20px);
  transition: 0.35s ease;
  z-index: 99999;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  pointer-events: none;
  overflow-wrap: anywhere;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-info {
  background: var(--bg-muted);
  color: var(--text);
}

.toast-success {
  background: var(--primary);
  color: #000;
}

.toast-error {
  background: var(--danger);
  color: #fff;
}

/* =========================
   CONFIRM MODAL
========================= */

.confirm-overlay {
  position: fixed !important;
  inset: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100000;
}

.confirm-modal {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  color: var(--text);
  margin: auto;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}

.confirm-modal::backdrop { background: rgba(0, 0, 0, 0.55); }
.confirm-modal h2 { margin: 0 0 0.85rem; font-size: 1.4rem; }
.confirm-modal p { margin: 0; color: var(--text-muted); line-height: 1.6; }
.confirm-actions { display: flex; gap: 0.75rem; margin-top: 1.6rem; }
.confirm-actions .confirm-button {
  flex: 1;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.confirm-cancel { background: var(--bg-muted); color: var(--text); }
.confirm-cancel:hover { border-color: var(--primary); background: var(--card); }
.confirm-actions .confirm-delete {
  background: linear-gradient(180deg, #c92727, #991b1b);
  color: #fff;
  border-color: #e45454;
}
.confirm-actions .confirm-delete:hover { background: #b91c1c; border-color: #ff8888; }
.confirm-button:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 3px; }
@media (max-width: 380px) {
  .confirm-actions { flex-direction: column; }
}

/* =========================
   GLOBAL TABS (Docs + Home)
========================= */

.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tab {
  padding: 0.5rem 1rem;
  background: var(--bg-light);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-muted);
  transition: 0.2s ease;
}

.tab:hover {
  border-color: var(--primary);
}

.tab.active {
  background: var(--primary);
  color: #000;
}

/* =========================
   ACCOUNT SETTINGS
========================= */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.settings-card {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: 0 0 18px #ff660015;
}

.settings-card h2 {
  margin-bottom: 0.4rem;
}

.settings-card p {
  margin-bottom: 1.4rem;
  color: var(--text-muted);
}

.settings-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
}

.settings-form label {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.settings-form input {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius);
  background: var(--bg-muted);
  border: 1px solid var(--outline);
  color: var(--text);
  font-size: 0.95rem;
}

.settings-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px #ff660055;
  outline: none;
}

/* Buttons — compact override */
.settings-form button.btn-primary,
.settings-form .btn-primary,
.danger-zone button.btn-danger,
.danger-zone .btn-danger {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0.65rem 0.9rem !important;
  font-size: 0.88rem !important;
  line-height: 1.1 !important;
  border-radius: var(--radius) !important;
  display: inline-flex !important;
  justify-content: center;
  align-items: center;
}

.settings-form .full-width,
#deleteAccountBtn.full-width {
  width: auto !important;
  max-width: none !important;
}

.settings-form .btn-primary {
  margin-top: 0.6rem;
}

.danger-zone {
  border-color: rgba(255, 0, 0, 0.35);
}

.danger-zone .btn-danger {
  margin-top: 0.75rem;
  background: var(--danger);
  color: #fff;
}

.danger-zone .btn-danger:hover {
  background: var(--danger-dark);
}

/* Space between username and Log out button */
.header-actions #auth-username {
  margin-right: 0.6rem;
}

/* =========================
   RESPONSIVE (single block)
========================= */

@media (max-width: 820px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: block; }

  .logo-img {
    height: 68px;
    padding-top: 4px;
  }

  .header-inner {
    height: 68px;
  }

  /* Prevent iOS from zooming text-entry controls and keep compact page CSS
     from reducing their readable mobile size. Checkboxes/radios retain their
     native sizing and use their associated labels as the touch target. */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  input:not([type]),
  select,
  textarea {
    font-size: 1rem !important;
  }

  .desktop-actions {
    display: none;
  }

  /* footer compact mode */
  .site-footer {
    padding: 1.6rem 0;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .footer-left .logo-img {
    height: 48px;
    padding-top: 0;
    margin: 0 auto;
  }

  .footer-links {
    flex: 0 1 auto;
    width: 100%;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.9rem;
  }

  .footer-meta {
    display: block;
    font-size: 0.85rem;
    opacity: 0.65;
  }

  /* docs layout */
  .docs-layout {
    flex-direction: column;
    gap: 2rem;
  }

  .docs-copy,
  .docs-code {
    max-width: 100%;
  }

  /* tabs compact */
  .tabs {
    gap: 0.5rem;
  }

  .tab {
    flex: 1;
    text-align: center;
    padding: 0.65rem 0;
    font-size: 0.9rem;
  }

  /* code block wrap */
  .code-block {
    font-size: 0.85rem;
    padding: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
  }

  /* dashboard padding */
  .dashboard-content {
    padding: 1.75rem 1.25rem;
  }

  /* account settings mobile */
  .settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
  }

  .settings-form label {
    width: 92vw;
    max-width: 320px;
    margin: 0 auto;
  }

  .settings-form button.btn-primary,
  .settings-form .btn-primary,
  .danger-zone button.btn-danger,
  .danger-zone .btn-danger {
    width: 180px !important;
    max-width: 180px !important;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 821px) and (max-width: 980px) {
  .nav-desktop,
  .desktop-actions {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .logo-img {
    height: 68px;
    padding-top: 4px;
  }

  .header-inner {
    height: 68px;
  }
}
.service-status {
  font-weight: 600;
}

body.modal-open {
  overflow: hidden;
}

.code-tab {
  display: none;
}

.code-tab.active {
  display: block;
}

.service-status--online {
  color: #16a34a;
}

.service-status--offline {
  color: #dc2626;
}

.service-status--unknown {
  color: #b8b8b8;
}
