:root {
  --bg-primary: #090d16;
  --bg-secondary: #111827;
  --bg-elevated: #172033;
  --bg-input: #0c1220;
  --border-subtle: #1f2937;
  --border-focus: #38bdf8;
  --border-populated: rgba(56, 189, 248, 0.38);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-cyan: #38bdf8;
  --accent-indigo: #818cf8;
  --accent-emerald: #34d399;
  --accent-amber: #fbbf24;
  --danger-rose: #f87171;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
}

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

html,
body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(circle at 15% 0%, #131c31 0%, var(--bg-primary) 55%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  padding-bottom: 4rem;
}

.app-container {
  width: 100%;
  max-width: 1280px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Action Bar — Non-sticky & compact so it scrolls naturally under Squarespace nav */
.top-header {
  position: relative;
  top: auto;
  z-index: 1;
  background: rgba(9, 13, 22, 0.94);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.65rem 0;
  margin-bottom: 1.15rem;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.brand-title {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.header-metrics-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.metric-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.32rem 0.75rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.metric-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

/* Section Headers */
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.86rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  color: #060911;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

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

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

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

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

.btn-ghost:hover {
  color: var(--danger-rose);
  border-color: rgba(248, 113, 113, 0.4);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .app-container { padding: 0 0.85rem; }
  .header-inner { flex-direction: column; align-items: stretch; }
  .header-metrics-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .header-metrics-actions .btn { grid-column: 1 / -1; width: 100%; min-height: 44px; font-size: 0.88rem; }
  .section-header .btn { width: 100%; min-height: 44px; }
}
