/* Apex Public — deep space, Gemini-clean chrome */
:root {
  --bg: #070b16;
  --bg-elevated: rgba(18, 24, 42, 0.72);
  --bg-sidebar: rgba(8, 12, 24, 0.88);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-active: rgba(124, 156, 255, 0.12);
  --bg-user: rgba(124, 156, 255, 0.14);
  --bg-composer: rgba(14, 20, 36, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8ecf8;
  --text-muted: #9aa3bd;
  --text-dim: #6b7490;
  --accent: #7c9cff;
  --accent-2: #a78bfa;
  --accent-hover: #9ab0ff;
  --accent-glow: rgba(124, 156, 255, 0.35);
  --success: #34d399;
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.1);
  --danger-border: rgba(248, 113, 113, 0.35);
  --offline-bg: rgba(167, 139, 250, 0.08);
  --offline-border: rgba(167, 139, 250, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --sidebar-w: 280px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --composer-max: 780px;
  --msg-max: 780px;
  --page-max: 860px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  position: relative;
}
body.page-download {
  overflow: auto;
  min-height: 100%;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.12em 0.4em;
  border-radius: 5px;
}

/* —— Ambient space —— */
.starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 15% 10%, rgba(124, 156, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 45% at 85% 20%, rgba(167, 139, 250, 0.12), transparent 50%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(56, 189, 248, 0.06), transparent 55%),
    linear-gradient(180deg, #070b16 0%, #0a1020 50%, #070b16 100%);
}

.app {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  width: 100%;
}

/* —— Brand —— */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 35% 30%, #c4d0ff, transparent 45%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 20px var(--accent-glow);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--bg);
  opacity: 0.85;
}
.brand-text { font-size: 1.05rem; }

/* —— Sidebar —— */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  z-index: 40;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 14px 8px;
}
.sidebar-close { display: none; }
.btn-new-chat {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 12px 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn-new-chat:hover {
  background: var(--bg-hover);
  border-color: rgba(124, 156, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(124, 156, 255, 0.15);
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 8px;
  min-height: 0;
}
.chat-item {
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
}
.chat-item:hover { background: var(--bg-hover); }
.chat-item.active { background: var(--bg-active); }
.chat-item-btn {
  flex: 1;
  text-align: left;
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: var(--radius-sm);
}
.chat-item.active .chat-item-btn { color: var(--text); }
.chat-item-delete {
  opacity: 0;
  padding: 8px;
  color: var(--text-dim);
  border-radius: 6px;
  flex-shrink: 0;
}
.chat-item:hover .chat-item-delete { opacity: 1; }
.chat-item-delete:hover { color: var(--danger); background: rgba(248, 113, 113, 0.1); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover {
  background: var(--bg-hover);
  color: var(--text);
  text-decoration: none;
}
.sidebar-link.active {
  background: var(--bg-active);
  color: var(--text);
}

.sidebar-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}
.brand-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 35;
}

/* —— Main / topbar —— */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: transparent;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 22, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
}
.menu-toggle { display: none; }

.model-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 550;
  font-size: 0.92rem;
  max-width: min(420px, 55vw);
  transition: border-color 0.15s, background 0.15s;
}
.model-picker:hover {
  border-color: rgba(124, 156, 255, 0.45);
  background: var(--bg-hover);
}
.model-picker-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-picker-chevron { color: var(--text-dim); flex-shrink: 0; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
}
.status-badge[data-status="online"] { color: var(--success); }
.status-badge[data-status="online"] .status-dot {
  background: var(--success);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
}
.status-badge[data-status="offline"] { color: var(--danger); }
.status-badge[data-status="offline"] .status-dot { background: var(--danger); }
.status-badge[data-status="waking"],
.status-badge[data-status="loading"] { color: #fbbf24; }
.status-badge[data-status="waking"] .status-dot,
.status-badge[data-status="loading"] .status-dot {
  background: #fbbf24;
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.55);
  animation: status-pulse 1.2s ease-out infinite;
}
@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}
.space-frame-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.space-frame {
  flex: 1;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 0;
}
.model-picker { cursor: default; }
.model-picker:hover { background: transparent; }
.load-banner {
  margin: 0.75rem 1.25rem 0;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  background: rgba(124, 156, 255, 0.12);
  border: 1px solid rgba(124, 156, 255, 0.28);
  color: var(--text-muted, #a8b3cf);
  font-size: 0.85rem;
}
.load-banner strong { color: var(--text, #e8ecf8); }
.load-banner progress {
  display: block;
  width: 100%;
  margin-top: 0.45rem;
  height: 0.45rem;
}


.top-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.top-nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}
.top-nav-link:hover {
  color: var(--text);
  background: var(--bg-hover);
  text-decoration: none;
}
.top-nav-link.active {
  color: var(--text);
  background: var(--bg-active);
}

/* —— Buttons —— */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text); }
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1020;
  font-weight: 650;
  border: none;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: filter 0.15s, transform 0.1s;
}
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; color: #0b1020; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.3);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.btn-lg { padding: 14px 22px; font-size: 1rem; border-radius: 12px; }
.btn-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1020;
  flex-shrink: 0;
  transition: filter 0.15s, opacity 0.15s;
}
.btn-send:hover { filter: brightness(1.08); }
.btn-send:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-stop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--danger-border);
}
.btn-stop:hover { background: rgba(248, 113, 113, 0.2); }

/* —— Messages —— */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px 12px;
  scroll-behavior: smooth;
}
.msg {
  display: flex;
  gap: 14px;
  max-width: var(--msg-max);
  margin: 0 auto 22px;
  padding: 0 8px;
}
.msg-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 2px;
}
.msg-user .msg-avatar {
  background: rgba(124, 156, 255, 0.2);
  color: var(--accent);
  font-size: 0.65rem;
}
.msg-assistant .msg-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1020;
}
.msg-error .msg-avatar {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}
.msg-body { flex: 1; min-width: 0; }
.msg-role {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--text-muted);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.msg-bubble {
  padding: 0;
}
.msg-user .msg-bubble {
  display: inline-block;
  background: var(--bg-user);
  border: 1px solid rgba(124, 156, 255, 0.2);
  border-radius: 14px 14px 4px 14px;
  padding: 10px 14px;
  max-width: 100%;
}
.msg-content {
  font-size: 0.98rem;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.msg-user .msg-content { white-space: pre-wrap; }
.msg-content p { margin: 0 0 0.75em; }
.msg-content p:last-child { margin-bottom: 0; }
.msg-content ul, .msg-content ol { margin: 0.4em 0 0.8em; padding-left: 1.4em; }
.msg-content pre {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  margin: 0.6em 0;
}
.msg-content code {
  font-family: var(--mono);
  font-size: 0.88em;
}
.msg-content pre code {
  background: none;
  padding: 0;
}
.msg-content a { word-break: break-all; }
.msg-content blockquote {
  margin: 0.6em 0;
  padding: 0.2em 0 0.2em 0.9em;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}
.msg-error .msg-bubble {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 12px;
  padding: 12px 14px;
}
.msg-error .tip {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--danger-border);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.streaming-cursor::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
  color: var(--accent);
}
@keyframes blink {
  50% { opacity: 0; }
}

/* Empty + offline states */
.empty-state, .offline-state {
  max-width: 520px;
  margin: 8vh auto 0;
  text-align: center;
  padding: 32px 20px;
}
.empty-logo, .offline-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0b1020;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 40px var(--accent-glow);
}
.offline-logo {
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 0 30px rgba(100, 116, 139, 0.35);
  font-size: 1.35rem;
}
.empty-state h2, .offline-state h2 {
  margin: 0 0 10px;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.empty-state p, .offline-state p {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.98rem;
}
.empty-sub, .offline-tip {
  font-size: 0.88rem !important;
  color: var(--text-dim) !important;
  margin-top: 12px !important;
}
.offline-state {
  background: var(--offline-bg);
  border: 1px solid var(--offline-border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.offline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 22px;
}
.chip {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover {
  background: var(--bg-active);
  border-color: rgba(124, 156, 255, 0.4);
  color: var(--text);
}

/* —— Composer —— */
.composer-wrap {
  flex-shrink: 0;
  padding: 8px 16px 18px;
  background: linear-gradient(180deg, transparent, rgba(7, 11, 22, 0.85) 30%);
}
.composer {
  max-width: var(--composer-max);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  background: var(--bg-composer);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(124, 156, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.composer:focus-within {
  border-color: rgba(124, 156, 255, 0.45);
  box-shadow: var(--shadow), 0 0 0 3px rgba(124, 156, 255, 0.12);
}
.composer textarea {
  flex: 1;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  min-height: 24px;
  max-height: 200px;
  line-height: 1.45;
  padding: 8px 0;
}
.composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
}
.composer-hint {
  max-width: var(--composer-max);
  margin: 8px auto 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* —— Modal —— */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 4, 12, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none !important; }
.modal {
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #101828;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #101828;
  z-index: 1;
}
.modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > span, .field legend {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.field input[type="url"],
.field input[type="text"],
.field textarea {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus {
  border-color: rgba(124, 156, 255, 0.5);
}
.field textarea { resize: vertical; min-height: 100px; line-height: 1.45; }
.field small { font-size: 0.78rem; color: var(--text-dim); }
.field input[type="range"] { width: 100%; accent-color: var(--accent); }
.field-mode { border: none; margin: 0; padding: 0; }
.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mode-option {
  display: flex;
  cursor: pointer;
}
.mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.mode-option span {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-weight: 550;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.mode-option input:checked + span {
  background: var(--bg-active);
  border-color: rgba(124, 156, 255, 0.5);
  color: var(--text);
}
.mode-option:hover span { background: var(--bg-hover); }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

/* —— Download page —— */
.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 22, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.download-main {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 40px 20px 64px;
}
.hero { margin-bottom: 32px; }
.eyebrow {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
  font-weight: 750;
  line-height: 1.15;
}
.hero-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  line-height: 1.6;
}
.download-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  margin-bottom: 36px;
}
.download-card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.model-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.35rem;
  color: #0b1020;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 28px var(--accent-glow);
}
.download-card h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 700;
}
.model-filename {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 24px;
}
.spec-grid dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 650;
  margin-bottom: 4px;
}
.spec-grid dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.98rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.download-note {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid var(--offline-border);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.model-id-line {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.steps-section, .reqs-section { margin-bottom: 36px; }
.steps-section h2, .reqs-section h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  font-weight: 700;
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.steps li::before {
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--bg-active);
  color: var(--accent);
  grid-row: 1 / span 2;
}
.steps li strong {
  grid-column: 2;
  font-size: 0.98rem;
}
.steps li span {
  grid-column: 2;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.reqs {
  margin: 0;
  padding-left: 1.2em;
  color: var(--text-muted);
}
.reqs li { margin-bottom: 8px; }
.site-footer {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}

/* —— Mobile —— */
@media (max-width: 800px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: inline-flex; }
  .sidebar-overlay:not([hidden]) { display: block; }
  .menu-toggle { display: inline-flex; }
  .top-nav .top-nav-link { display: none; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .download-card { padding: 20px; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; }
}
@media (max-width: 480px) {
  .model-picker-label { max-width: 110px; }
  .status-badge .status-text { display: none; }
}
