/* NexaDroid Design System — aligned to NexaTheme.kt (Obsidian Neural & Luminous Quartz) */

:root {
  --bg: #070b14;
  --header-bg: rgba(7, 11, 20, 0.94);
  --surface: #0f1626;
  --surface-high: #172138;
  --surface-elevated: #0b111e;
  --outline: #24314d;
  --outline-soft: rgba(40, 54, 85, 0.6);
  --text: #f1f5f9;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;

  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, 0.13);
  --cyan-border: rgba(56, 189, 248, 0.36);

  --violet: #818cf8;
  --violet-soft: rgba(129, 140, 248, 0.13);
  --violet-border: rgba(129, 140, 248, 0.34);

  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.13);
  --emerald-border: rgba(52, 211, 153, 0.34);

  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --amber-border: rgba(251, 191, 36, 0.36);

  --crimson: #f87171;
  --crimson-soft: rgba(248, 113, 113, 0.14);
  --crimson-border: rgba(248, 113, 113, 0.36);

  --tab-active-bg: rgba(56, 189, 248, 0.1);
  --grid-line: rgba(56, 189, 248, 0.04);
  --shadow-panel: 0 18px 44px rgba(2, 6, 16, 0.5);
  --shadow-device: 0 28px 68px rgba(0, 0, 0, 0.62);
}

html[data-theme="light"] {
  --bg: #f5f7fb;
  --header-bg: rgba(245, 247, 251, 0.95);
  --surface: #ffffff;
  --surface-high: #eaf0fa;
  --surface-elevated: #f8fafd;
  --outline: #d0dcf0;
  --outline-soft: rgba(208, 220, 240, 0.85);
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #475569;

  --cyan: #0284c7;
  --cyan-soft: rgba(2, 132, 199, 0.1);
  --cyan-border: rgba(2, 132, 199, 0.32);

  --violet: #4f46e5;
  --violet-soft: rgba(79, 70, 229, 0.1);
  --violet-border: rgba(79, 70, 229, 0.3);

  --emerald: #059669;
  --emerald-soft: rgba(5, 150, 105, 0.1);
  --emerald-border: rgba(5, 150, 105, 0.32);

  --amber: #d97706;
  --amber-soft: rgba(217, 119, 6, 0.11);
  --amber-border: rgba(217, 119, 6, 0.34);

  --crimson: #dc2626;
  --crimson-soft: rgba(220, 38, 38, 0.1);
  --crimson-border: rgba(220, 38, 38, 0.32);

  --tab-active-bg: rgba(2, 132, 199, 0.08);
  --grid-line: rgba(2, 132, 199, 0.05);
  --shadow-panel: 0 12px 32px rgba(15, 23, 42, 0.06);
  --shadow-device: 0 24px 56px rgba(15, 23, 42, 0.13);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: clip;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Clean inline code without boxy visual noise */
code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  color: var(--cyan);
}

.hidden {
  display: none !important;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Subtle hairline grid */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, #000 35%, transparent 100%);
}

.container {
  width: min(1160px, 100% - 32px);
  margin-inline: auto;
}

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

/* Header & Mobile Drawer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--outline-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand-tag {
  font-size: 0.72rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--cyan);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-drawer {
  border-top: 1px solid var(--outline-soft);
  background: var(--surface);
  padding: 14px 0 18px;
}

.mobile-drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-link {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
}

.drawer-link:hover {
  background: var(--surface-high);
  color: var(--cyan);
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--outline-soft);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 11px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.87rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-lg {
  padding: 12px 18px;
  font-size: 0.92rem;
}

.btn-primary {
  background: var(--cyan);
  color: #031521;
  font-weight: 700;
}

html[data-theme="light"] .btn-primary {
  color: #ffffff;
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-meta {
  font-size: 0.74rem;
  opacity: 0.85;
  padding-left: 6px;
  border-left: 1px solid currentColor;
}

.btn-outline {
  border-color: var(--outline);
  background: var(--surface);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--cyan);
}

.btn-ghost {
  background: transparent;
  color: var(--cyan);
  padding-inline: 8px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.btn-icon:hover {
  border-color: var(--cyan);
}

.btn-icon.mobile-only {
  display: none;
}

/* Surfaces */
.panel {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-panel);
  min-width: 0;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: start;
  padding: 58px 0 44px;
}

.hero-copy {
  min-width: 0;
  padding-top: 6px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--cyan);
  margin-bottom: 14px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-soft);
  flex-shrink: 0;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 3.8vw, 3.05rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero-lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1rem;
  max-width: 54ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--outline-soft);
}

.spec-strip dt {
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 3px;
}

.spec-strip dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* Router Inspector */
.router-inspector {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.inspector-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inspector-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.inspector-title strong {
  display: block;
  font-size: 0.86rem;
  color: var(--text);
  word-break: break-word;
}

.inspector-title span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.orb-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 35% 35%, var(--cyan), var(--violet));
  box-shadow: 0 0 16px var(--cyan-soft);
  animation: pulseOrb 2.2s ease-in-out infinite;
}

.orb-mini.is-offline {
  background: radial-gradient(circle at 35% 35%, var(--amber), var(--emerald));
  box-shadow: 0 0 16px var(--amber-soft);
}

@keyframes pulseOrb {
  0%, 100% { transform: scale(0.92); opacity: 0.9; }
  50% { transform: scale(1.06); opacity: 1; }
}

.route-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.route-local {
  color: var(--emerald);
  background: var(--emerald-soft);
  border-color: var(--emerald-border);
}

.route-cloud {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: var(--cyan-border);
}

.policy-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: var(--surface-elevated);
  border: 1px solid var(--outline-soft);
}

.policy-btn {
  padding: 6px 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.policy-btn.active {
  background: var(--surface-high);
  color: var(--cyan);
}

.flag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.flag-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.flag-toggle input {
  accent-color: var(--cyan);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: var(--surface-elevated);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.chip.active {
  color: var(--text);
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.prompt-input-wrap {
  display: flex;
  gap: 8px;
}

.prompt-input-wrap input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--outline);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
}

.inspector-trace {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--outline-soft);
}

.trace-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  font-size: 0.8rem;
}

.trace-key {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.trace-val {
  color: var(--text);
  word-break: break-word;
}

.trace-output {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--outline-soft);
  font-size: 0.86rem;
  color: var(--text-soft);
}

.trace-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 0.71rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.tag-cyan {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: var(--cyan-border);
}

.tag-emerald {
  color: var(--emerald);
  background: var(--emerald-soft);
  border-color: var(--emerald-border);
}

.tag-violet {
  color: var(--violet);
  background: var(--violet-soft);
  border-color: var(--violet-border);
}

.tag-amber {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: var(--amber-border);
}

.tag-crimson {
  color: var(--crimson);
  background: var(--crimson-soft);
  border-color: var(--crimson-border);
}

/* Sections */
section[id] {
  scroll-margin-top: 82px;
}

.section {
  padding: 56px 0;
}

.section-head {
  max-width: 66ch;
  margin-bottom: 26px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 6px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* Pillars */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 16px;
  padding: 20px;
  min-width: 0;
}

.pillar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pillar-num {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cyan);
}

.pillar-mod {
  font-size: 0.72rem;
  color: var(--muted);
}

.pillar-card h3 {
  margin: 0 0 8px;
  font-size: 1.03rem;
}

.pillar-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* 8 Compose Screens Showcase */
.screens-workspace {
  display: grid;
  grid-template-columns: 324px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.screen-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.screen-tab {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

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

.screen-tab.active {
  color: var(--text);
  border-color: var(--cyan);
  background: var(--tab-active-bg);
}

.tab-idx {
  font-size: 0.74rem;
  color: var(--cyan);
  padding-top: 2px;
  flex-shrink: 0;
}

.screen-tab strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
}

.screen-tab small {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 2px;
}

.device-stage {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.device-frame {
  width: 100%;
  max-width: 405px;
  background: var(--bg);
  border: 2px solid var(--outline);
  border-radius: 30px;
  padding: 12px 12px 10px;
  box-shadow: var(--shadow-device);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.device-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 10px;
  font-size: 0.7rem;
  color: var(--muted);
}

.device-camera {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface-high);
  border: 1px solid var(--outline);
}

.device-screen {
  background: var(--bg);
  border: 1px solid var(--outline-soft);
  border-radius: 20px;
  padding: 12px;
  min-height: 455px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.d-card {
  background: var(--surface);
  border: 1px solid var(--outline-soft);
  border-radius: 14px;
  padding: 11px;
}

.d-card-highlight {
  border-color: var(--cyan-border);
}

.d-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.d-header-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.d-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.d-sub {
  font-size: 0.72rem;
  color: var(--muted);
}

.d-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.d-chip {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--outline);
  background: var(--surface-high);
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 600;
}

.d-chip.on {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-soft);
}

.d-bubble {
  padding: 10px 11px;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.d-bubble-user {
  align-self: flex-end;
  max-width: 86%;
  background: var(--surface-high);
  border: 1px solid var(--outline);
}

.d-bubble-ai {
  background: var(--surface);
  border: 1px solid var(--outline-soft);
}

.d-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--cyan-border);
  background: var(--cyan-soft);
  color: var(--cyan);
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
}

.d-dialog {
  border: 1px solid var(--amber);
  background: var(--surface-elevated);
  border-radius: 14px;
  padding: 11px;
  font-size: 0.78rem;
}

.d-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.d-subtabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: var(--surface);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--outline-soft);
}

.d-subtab {
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 2px;
  cursor: pointer;
}

.d-subtab.active {
  background: var(--surface-high);
  color: var(--cyan);
}

.d-graph-box {
  background: var(--surface);
  border: 1px solid var(--outline-soft);
  border-radius: 14px;
  padding: 10px;
}

.d-graph-svg {
  width: 100%;
  height: 155px;
  display: block;
}

.d-graph-node {
  cursor: pointer;
}

.d-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--outline-soft);
  font-size: 0.76rem;
}

.d-list-item strong {
  display: block;
  font-size: 0.78rem;
}

.d-list-item span {
  color: var(--muted);
  font-size: 0.7rem;
}

.d-interactive-item {
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

.d-interactive-item.active-item {
  border-color: var(--cyan);
  background: var(--tab-active-bg);
}

.d-progress {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-high);
  overflow: hidden;
  margin-top: 6px;
}

.d-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--emerald));
}

.device-navbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px 4px 2px;
  border-top: 1px solid var(--outline-soft);
}

.dnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 2px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.dnav-item svg {
  width: 17px;
  height: 17px;
}

.dnav-item.active {
  color: var(--cyan);
  background: var(--cyan-soft);
}

/* Architecture Explorer */
.arch-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 18px;
}

.arch-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--cyan);
  margin-bottom: 12px;
}

.module-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.mod-btn {
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--outline);
  background: var(--surface-elevated);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mod-btn:hover {
  border-color: var(--cyan);
}

.mod-btn.active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.module-detail {
  padding: 16px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--outline-soft);
}

.module-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.module-detail h3 {
  margin: 0;
  font-size: 0.98rem;
}

.module-detail p {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

.backend-panel h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
}

.backend-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.endpoint-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.endpoint-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--surface-elevated);
  border: 1px solid var(--outline-soft);
  font-size: 0.76rem;
}

.endpoint-list li span {
  color: var(--emerald);
  font-weight: 600;
  flex-shrink: 0;
}

.endpoint-list li code {
  color: var(--text);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}

.backend-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* Security */
.security-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.sec-card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 16px;
  padding: 18px;
  min-width: 0;
}

.sec-code {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--emerald);
  margin-bottom: 8px;
}

.sec-card h3 {
  margin: 0 0 8px;
  font-size: 0.96rem;
}

.sec-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Quick Start */
.build-panel {
  padding: 16px;
}

.build-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.build-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.build-tab {
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--outline);
  background: var(--surface-elevated);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.build-tab.active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.copy-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--outline);
  background: var(--surface-high);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.build-code {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--outline-soft);
  overflow-x: auto;
  max-width: 100%;
  font-size: 0.82rem;
  line-height: 1.65;
}

.build-code code {
  color: var(--text-soft);
  font-size: inherit;
}

/* Footer */
.site-footer {
  margin-top: 32px;
  border-top: 1px solid var(--outline-soft);
  padding: 26px 0 38px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.footer-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.footer-brand strong {
  display: block;
  font-size: 0.9rem;
}

.footer-brand span {
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-brand a {
  color: var(--text-soft);
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

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

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 38px;
  }

  .security-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .arch-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .nav-links,
  .nav-desktop-only {
    display: none;
  }

  .btn-icon.mobile-only {
    display: inline-flex;
  }

  .screens-workspace {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .screen-tabs {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .screen-tab {
    flex: 0 0 auto;
    min-width: 205px;
    scroll-snap-align: start;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 24px);
  }

  .panel,
  .pillar-card,
  .sec-card {
    padding: 16px;
  }

  .section {
    padding: 40px 0;
  }

  .pillar-grid,
  .security-grid {
    grid-template-columns: 1fr;
  }

  .spec-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .prompt-input-wrap {
    flex-direction: column;
  }

  .policy-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drawer-actions {
    grid-template-columns: 1fr;
  }

  .device-frame {
    border-radius: 24px;
    padding: 10px 9px 8px;
  }

  .device-screen {
    border-radius: 16px;
    padding: 10px;
    min-height: 430px;
  }

  .endpoint-list li {
    font-size: 0.71rem;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .orb-mini {
    animation: none;
  }

  .btn {
    transition: none;
  }
}
