/* CommandPark portal + marketing landing — dark theme */
:root {
  --bg: #0a0a0a;
  --card: #161616;
  --border: #2a2a2a;
  --text: #eee;
  --muted: #9aa0a6;
  --accent: #1e88e5;
  --error: #ffb74d;
  --pico-background-color: #0a0a0a;
  --pico-color: #eee;
  --pico-muted-color: #9aa0a6;
  --pico-primary-background: #1e88e5;
  --pico-primary-border: #1e88e5;
  --pico-card-background-color: #161616;
  --pico-card-border-color: #2a2a2a;
  --pico-form-element-background-color: #111;
  --pico-form-element-border-color: #2a2a2a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 1.25rem;
}

a {
  color: #fff;
}

a:hover {
  color: #fff;
  opacity: 0.85;
}

.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.topnav-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  margin-left: auto;
  flex: 0 1 auto;
}

.lang-row {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.lang-label {
  margin: 0;
}

.lang-label select {
  width: auto;
  max-width: 13rem;
  min-width: 9rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.88rem;
  line-height: 1.3;
  border-radius: 8px;
}

.topnav a {
  font-size: 0.9rem;
  text-decoration: none;
}

.nav-firmware {
  white-space: nowrap;
}

html[dir="rtl"] .topnav-right {
  align-items: flex-start;
}

html[dir="rtl"] .lang-row {
  justify-content: flex-start;
}

.link-device-card {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.link-device-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.btn-row-stack {
  flex-direction: column;
}

.btn-equal {
  width: 100%;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
}

.btn-row-stack .btn-equal {
  flex: 1 1 auto;
}

a.btn-link {
  text-decoration: none;
  box-sizing: border-box;
}

a.btn-link.primary {
  color: #fff;
}

.commandpark-embed-section {
  padding-top: 0;
}

.commandpark-embed-section .card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 1.25rem 0 0;
}

.flash-hub-section {
  padding-top: 0;
}

.portal-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.btn-row-stack {
  gap: 0.5rem;
}

.nav-back-row {
  margin-bottom: 1rem;
}

.nav-back-row a {
  font-size: 0.9rem;
  text-decoration: none;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 1rem 0;
}

.field span {
  font-size: 0.9rem;
}

.field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

input,
textarea,
select {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #111;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
}

button.primary {
  background: var(--accent);
  color: #fff;
}

button.secondary {
  background: #444;
  color: #fff;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.user-row .logout-btn {
  width: auto;
  max-width: 45%;
  flex: 0 0 auto;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
  word-break: break-all;
}

.error {
  color: var(--error);
  font-size: 0.88rem;
  margin: 0.5rem 0 0;
}

.ok {
  color: #81c784;
  font-size: 0.88rem;
}

.status-card {
  margin: 1.25rem 0;
  padding: 1rem;
  background: #111;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.status-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.field-tight {
  margin: 0 0 0.85rem;
}

.status-device-actions {
  margin: 0 0 0.85rem;
}

.status-device-actions .btn-equal {
  width: 100%;
  max-width: 100%;
}

.link-device-details {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.link-device-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  user-select: none;
}

.link-device-details[open] summary {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.btn-hint {
  margin: 0.35rem 0 0;
}

.status-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
}

.status-card dt {
  color: var(--muted);
  font-size: 0.85rem;
}

.status-card dd {
  margin: 0;
}

#googleSignInButton {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.release-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.release-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.release-item:last-child {
  border-bottom: none;
}

.release-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.release-item time {
  font-size: 0.8rem;
  color: var(--muted);
}

.release-item p {
  margin: 0.5rem 0 0;
  white-space: pre-wrap;
  font-size: 0.9rem;
}

.badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: #1b3a1f;
  color: #81c784;
  margin-left: 0.35rem;
}

.admin-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.5rem 0 1rem;
}

.admin-releases h2 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1rem;
}

.admin-release-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-release-item:last-child {
  border-bottom: none;
}

.admin-release-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-release-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.admin-release-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-release-changelog {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  white-space: pre-wrap;
  color: var(--muted);
}

.admin-release-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.admin-release-actions button {
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  min-height: auto;
}

.admin-release-edit textarea {
  margin-top: 0.5rem;
  min-height: 5rem;
  font-size: 0.88rem;
}

.legal-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 480px) {
  .btn-row {
    flex-direction: column;
  }

  .btn-row button {
    width: 100%;
  }
}

/* —— Marketing landing (CommandPark) —— */
.landing {
  background: var(--bg);
}

.brand-link {
  text-decoration: none;
  color: var(--text);
}

.brand-link:hover {
  opacity: 0.85;
}

.nav-home {
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 3.25rem;
}

.site-header {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: grid;
  grid-template-columns: minmax(9rem, auto) minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 2rem;
  row-gap: 0.75rem;
}

.site-header-end,
.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.site-header-actions {
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.site-header-action-cta {
  display: flex;
  justify-content: flex-end;
}

.site-header-action-cta .site-nav-cta {
  white-space: nowrap;
  padding: 0.35rem 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: transparent;
}

.site-header-action-cta .site-nav-cta:hover {
  color: var(--text);
  border-color: var(--muted);
}

.site-logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.5rem 0.65rem;
  min-width: 0;
}

.site-nav.site-nav-desktop {
  gap: 0.35rem 0.45rem;
}

.site-nav-desktop--app {
  display: grid;
  grid-template-columns:
    minmax(4.75rem, 1fr)
    minmax(3.25rem, 1fr)
    minmax(5.25rem, 1fr)
    minmax(6.75rem, 1fr)
    minmax(4.75rem, 1fr);
  align-items: center;
  justify-items: stretch;
  width: 100%;
  max-width: 38rem;
  margin: 0 auto;
  padding: 0;
  flex-wrap: nowrap;
}

.site-nav-desktop--landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding-left: 0;
  margin-left: 0;
  max-width: 100%;
}

.site-nav-rows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: min(100%, 40rem);
  margin: 0 auto;
}

.site-nav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.45rem;
}

.site-header-inner--landing {
  align-items: start;
}

.site-header-inner--landing .site-logo {
  align-self: center;
}

.site-header-inner--landing .site-header-actions {
  align-self: center;
}

.site-nav-slot {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.site-nav-desktop--app .site-nav-slot {
  width: 100%;
}

.site-nav-desktop--app .site-nav-slot .site-nav-link,
.site-nav-desktop--app .site-nav-slot a.site-nav-link {
  width: 100%;
  text-align: center;
  white-space: nowrap;
}

.site-nav-slot--hidden {
  display: none !important;
}

.site-nav a.site-nav-link,
.site-nav .site-nav-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
  padding: 0.35rem 0.55rem;
  text-decoration: none;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: inset 0 -2px 0 transparent;
  box-sizing: border-box;
}

.site-nav a.site-nav-link:hover,
.site-nav .site-nav-link:hover {
  color: var(--text);
}

.site-nav a.site-nav-cta,
.site-nav .site-nav-cta {
  border-color: var(--border);
  color: var(--text);
}

.site-nav .nav-link-active.site-nav-link {
  color: var(--text) !important;
  background: transparent !important;
  font-weight: 500;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.mobile-nav .mobile-nav-link,
.mobile-nav a.mobile-nav-link {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;
  padding: 0.35rem 0;
  text-decoration: none;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: inset 0 -2px 0 transparent;
  box-sizing: border-box;
}

.mobile-nav .mobile-nav-link.mobile-nav-cta,
.mobile-nav a.mobile-nav-link.mobile-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 0.35rem;
  padding: 0.45rem 0.9rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: none;
}

.mobile-nav .mobile-nav-link.mobile-nav-cta:hover,
.mobile-nav a.mobile-nav-link.mobile-nav-cta:hover {
  color: var(--text);
  border-color: var(--muted);
}

.mobile-nav .nav-link-active.site-nav-link,
.mobile-nav .nav-link-active.mobile-nav-link {
  color: var(--text) !important;
  background: transparent !important;
  font-weight: 500;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.mobile-nav .nav-link-active.btn {
  background: transparent !important;
  color: var(--text) !important;
  border: none;
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Mobile drawer: no pill buttons — plain links + underline when active */
.site-nav-drawer .btn-primary,
.mobile-nav .btn-primary {
  display: inline-block;
  padding: 0.35rem 0;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.3;
  background: transparent !important;
  color: var(--muted);
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.site-nav-drawer .btn-primary:hover,
.mobile-nav .btn-primary:hover {
  color: var(--text);
  opacity: 1;
}

.site-nav-drawer .btn-primary.nav-link-active,
.site-nav-drawer .nav-link-active.btn-primary,
.mobile-nav .btn-primary.nav-link-active,
.mobile-nav .nav-link-active.btn-primary {
  color: var(--text) !important;
  background: transparent !important;
  border: none;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.mobile-nav-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.35rem 0 0.15rem;
}

.mobile-nav-lang {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.lang-picker-mobile {
  overflow: hidden;
  width: 100%;
}

.lang-picker-track {
  display: flex;
  width: 200%;
  transition: transform 0.22s ease;
}

.lang-picker-mobile.is-sub .lang-picker-track {
  transform: translateX(-50%);
}

html[dir="rtl"] .lang-picker-mobile.is-sub .lang-picker-track {
  transform: translateX(50%);
}

.lang-picker-panel,
.lang-slide-panel {
  flex: 0 0 50%;
  width: 50%;
  min-width: 0;
}

.lang-picker-trigger,
.lang-slide-back,
.lang-slide-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.55rem 0;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: start;
}

.lang-picker-trigger {
  justify-content: space-between;
  gap: 0.75rem;
}

.lang-picker-trigger:hover,
.lang-slide-back:hover,
.lang-slide-option:hover {
  color: var(--text);
}

.lang-picker-chevron {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
}

.lang-slide-back {
  margin-bottom: 0.35rem;
  padding-top: 0;
  color: var(--text);
}

.lang-slide-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.lang-slide-option.is-active {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.site-nav-sep {
  display: none !important;
}

.site-nav-cta {
  margin-left: 0;
}

.site-header-lang {
  margin: 0;
  flex-shrink: 0;
}

.site-header-lang select,
.site-footer-lang select {
  width: auto;
  max-width: 13rem;
  min-width: 9rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.88rem;
  line-height: 1.3;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #111;
  color: var(--text);
}

.site-footer-lang {
  margin: 1.25rem auto 0;
  display: flex;
  justify-content: center;
}

.site-footer-lang.lang-label--compact select {
  min-width: 8rem;
  font-size: 0.85rem;
}

.portal-page .wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

.hero-compact {
  padding: 2.5rem 1.25rem 2rem;
}

.portal-section {
  padding-top: 0;
  padding-bottom: 3rem;
}

.auth-loading {
  text-align: center;
  padding: 1.25rem 1rem;
  font-size: 0.95rem;
}

html.auth-pending #authView,
html.auth-pending #panel {
  display: none !important;
}

.portal-inner {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.portal-page .section-inner {
  max-width: 520px;
}

.portal-page main {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.portal-page .hero-inner {
  max-width: 520px;
}

.device-telemetry-card {
  margin-top: 1rem;
}

#telemetryList dt {
  color: var(--muted);
}

.lan-ip-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.lan-ip-cell #stLanIp {
  display: block;
}

.telemetry-lan-hint {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.flash-page .flash-checklist {
  max-width: 36rem;
  margin: 0 auto 0;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.55;
}

.flash-panel {
  max-width: 520px;
  margin: 0 auto;
}

.flash-target-field {
  display: block;
  margin-bottom: 1rem;
}

.flash-target-field select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #111;
  color: var(--text);
  font-size: 0.95rem;
}

.flash-log {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #111;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--muted);
}

.flash-actions {
  margin-top: 1rem;
}

.portal-page .site-header-inner,
.flash-page .site-header-inner {
  grid-template-columns: minmax(9rem, auto) minmax(0, 1fr) auto;
}

.site-notify-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
}

.site-notify-btn:hover {
  border-color: var(--muted);
  color: var(--text);
}

.site-notify-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.portal-signed-in .portal-hero,
body.portal-signed-in .portal-hero {
  display: none;
}

.portal-flash-native[hidden] {
  display: none !important;
}

.flash-desktop-only {
  display: grid;
  gap: 0.85rem;
}

.flash-desktop-only h1 {
  margin: 0;
  font-size: 1.35rem;
}


.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 199;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.mobile-nav-backdrop[hidden] {
  display: none !important;
}

.mobile-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 12rem;
  padding: 0;
  max-width: 1080px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.mobile-nav[hidden] {
  display: none !important;
}

.mobile-nav-close {
  align-self: flex-end;
  margin: 0.65rem 1rem 0;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-nav-close:hover {
  color: var(--text);
  border-color: var(--muted);
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
  padding: 0 1.25rem 1rem;
  overflow-y: auto;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, background 0.15s;
}

.btn:hover {
  opacity: 0.92;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-lg {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
}

.hero {
  padding: 3.5rem 1.25rem 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(30, 136, 229, 0.18), transparent),
    var(--bg);
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 1rem;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 5vw, 2.65rem);
  line-height: 1.15;
  font-weight: 700;
}

.hero-lead {
  margin: 0 auto 1.75rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-lead code {
  font-size: 0.88em;
  background: #1a1a1a;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 2;
}

/* Keep marketing CTAs clickable above sticky header on small screens */
.hero-cta a.btn,
.cta-band a.btn {
  position: relative;
  z-index: 2;
}

.hero-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.auth-notice {
  max-width: 640px;
  margin: 0 auto 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid #5c4a00;
  border-radius: 8px;
  background: rgba(251, 188, 5, 0.08);
  color: #f5e6a8;
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-notice a {
  color: #8ab4ff;
  font-weight: 600;
}

.auth-notice strong {
  color: #fff;
}

.section {
  padding: 3.5rem 1.25rem;
}

.section-alt {
  background: #0f0f0f;
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.section-inner-narrow {
  max-width: 640px;
}

.section-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  text-align: center;
}

.section-lead {
  text-align: center;
  color: var(--muted);
  max-width: 32rem;
  margin: 0 auto 2.5rem;
  line-height: 1.55;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.35rem;
}

.feature-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 640px;
  margin-inline: auto;
}

.step {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.step:last-child {
  border-bottom: none;
}

.step-num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  font-size: 0.95rem;
}

.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.examples-subtitle {
  margin: 2rem auto 1rem;
  max-width: 720px;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.examples-list {
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
  max-width: 720px;
}

.examples-list li {
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.examples-list strong {
  color: var(--text);
}

.examples-note {
  margin: 1.25rem auto 0;
  max-width: 720px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
}

.compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 480px;
}

.compare-table th,
.compare-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table thead th {
  background: #111;
  color: var(--text);
  font-weight: 600;
}

.compare-table tbody th {
  color: var(--muted);
  font-weight: 500;
}

.compare-table td:first-of-type {
  color: var(--muted);
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
  border-bottom: none;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.25rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 0;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.cta-band {
  padding: 3rem 1.25rem 4rem;
  text-align: center;
  background: linear-gradient(180deg, #0f0f0f 0%, var(--bg) 100%);
}

.cta-band-inner h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.cta-band-inner p {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem 2.5rem;
}

.site-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.footer-legal {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 1rem;
}

.footer-legal-compact {
  font-size: 0.62rem;
  line-height: 1.4;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.footer-legal-compact a {
  white-space: nowrap;
}

.footer-legal code {
  font-size: 0.95em;
}

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

.footer-links a {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-links .nav-link-active {
  display: inline;
  background: transparent;
  color: var(--text) !important;
  font-weight: 600;
  padding: 0;
  border-radius: 0;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* SEO / about block below portal (homepage) */
.seo-about {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 2.5rem 1rem 3rem;
  background: #0d0d0d;
}

.seo-about-inner {
  max-width: 720px;
  margin: 0 auto;
}

.seo-about h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.seo-about section {
  margin-bottom: 2rem;
}

.seo-about .faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--card);
}

.seo-about .faq-item summary {
  cursor: pointer;
  font-weight: 600;
}

@media (max-width: 768px) {
  .portal-page .site-header-inner,
  .flash-page .site-header-inner {
    grid-template-columns: 1fr auto 1fr;
  }

  .site-header-inner {
    grid-template-columns: 1fr auto 1fr;
    column-gap: 0.75rem;
  }

  .nav-toggle {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .site-logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    text-align: center;
  }

  .site-nav {
    display: none;
  }

  .site-header-end {
    display: none;
  }

  .site-header-end.site-header-end--native {
    display: flex;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-items: center;
    gap: 0.35rem;
  }

  .site-header-end--native .site-header-lang {
    display: none !important;
  }

  .site-header-inner--landing .site-header-actions {
    display: none;
  }

  .site-nav-drawer:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    overflow: hidden;
  }

  html.mobile-nav-open {
    overflow: hidden;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
  }
}
