/* Sticky header — responsive */
.app-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 12px clamp(14px, 3vw, 28px);
  background: rgba(26, 32, 88, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
}
.app-header .brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; letter-spacing: 0.2px;
  flex-shrink: 0;
}
.app-header .brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 16px var(--accent-glow);
  display: grid; place-items: center; font-size: 16px;
}
.app-header nav {
  display: flex; gap: 4px; align-items: center;
  flex: 1; justify-content: center; min-width: 0;
}
.app-header nav a {
  font-size: 13px; color: var(--muted); text-decoration: none;
  padding: 6px 12px; border-radius: 6px;
  white-space: nowrap;
  transition: color 120ms, background 120ms;
}
.app-header nav a:hover { color: var(--text); background: var(--panel-2); }
.app-header .status {
  display: flex; gap: 8px; align-items: center; font-size: 12px;
  flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end;
}
.app-header .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted);
  font-size: 11px; font-family: var(--mono);
  white-space: nowrap;
}

/* Header breakpoints */
@media (max-width: 900px) {
  .app-header nav { display: none; }
  .app-header { justify-content: space-between; }
}
@media (max-width: 560px) {
  .app-header .brand span:last-child { display: none; }   /* keep just the logo */
  .app-header .pill .pill-label { display: none; }        /* keep only colon + value */
  .app-header .pill { padding: 4px 8px; font-size: 10.5px; }
  .app-header { padding: 10px 14px; gap: 8px; }
}
@media (max-width: 400px) {
  #model-pill { display: none; }
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--faint);
}
.status-dot.connected { background: var(--good); box-shadow: 0 0 8px var(--good); }
.status-dot.running { background: var(--warn); box-shadow: 0 0 8px var(--warn); animation: pulse 1s infinite; }
.status-dot.error { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Section wrapper */
.section { padding: clamp(40px, 6vw, 72px) clamp(14px, 3vw, 28px); }
.section .inner { max-width: 1400px; margin: 0 auto; }
.section-title {
  font-size: 13px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.2px;
  margin: 0 0 10px;
}
.section-heading {
  font-size: clamp(22px, 3vw, 30px); font-weight: 700; margin: 0 0 24px; letter-spacing: -0.4px;
}

/* Demo three-column layout */
.demo-grid {
  display: grid;
  grid-template-columns: 260px minmax(360px, 460px) 1fr;
  gap: clamp(12px, 1.5vw, 20px);
  min-height: 540px;
}
@media (max-width: 1280px) {
  .demo-grid { grid-template-columns: 240px 1fr; }
  .demo-grid .panel-output { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .demo-grid { grid-template-columns: 1fr; }
  .samples-list { max-height: 240px; }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(14px, 2vw, 20px);
  display: flex; flex-direction: column; gap: 12px;
}
.panel h3 {
  font-size: 12px; color: var(--muted);
  font-weight: 600; letter-spacing: 0.9px; text-transform: uppercase;
  margin: 0;
}
.panel .panel-sub { font-size: 11px; color: var(--faint); }

.row { display: flex; gap: 10px; align-items: center; }
.row label { font-size: 12px; color: var(--muted); min-width: 110px; }

.spacer { flex: 1; }

/* Footer */
.app-footer {
  padding: 28px 24px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 12px; text-align: center;
}
.app-footer a { color: var(--accent); text-decoration: none; }
.app-footer a:hover { text-decoration: underline; }
