/* Project Leap demo system — Pragma brand (see BRAND.md) */

:root {
  --navy: #18305C;
  --navy-deep: #002453;
  --ink: #323232;
  --muted: rgba(33, 37, 41, 0.62);
  --hairline: #E3E6EA;
  --wash: #F5F6F8;
  --card: #FFFFFF;
  --orange: #F1602E;
  --orange-deep: #E24301;
  --gold: #D2AD39;
  --teal: #02658F;
  --blue: #3D6DB5;
  --ochre: #B8912A;
  --danger: #AF2526;
  --good: #2E7D4F;
  --shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.12);
  --shadow-lift: 0 10px 30px -8px rgba(24, 48, 92, 0.22);
  --radius: 10px;
  --sans: "Roboto", -apple-system, Arial, "Helvetica Neue", sans-serif;
  --mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --warm-grad: linear-gradient(90deg, #E24302 0%, #D2AD39 100%);
  --cool-grad: linear-gradient(90deg, #18305C 0%, #02658F 100%);
}

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

html { -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: #fff;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
}

/* ---------- top bar ---------- */

.bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--hairline);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.bar .back {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.bar .back:hover { color: var(--orange); }

.bar .demo-id {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--navy);
  background: var(--wash);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.bar h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar .logo { height: 22px; display: block; opacity: 0.92; }

/* ---------- layout ---------- */

.stage {
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(24px, 4vh, 44px) clamp(20px, 5vw, 56px) 64px;
}

/* ---------- shared bits ---------- */

.panel {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
}

.btn {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 8px;
  padding: 11px 22px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
}
.btn:hover { background: var(--orange-deep); }
.btn:active { transform: scale(0.98); }
.btn:disabled { background: #9aa5b4; cursor: default; transform: none; }
.btn:focus-visible, .chip-btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.mono { font-family: var(--mono); }

/* fade/slide entrance */
.rise { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* chart tooltip */
.tip {
  position: fixed;
  pointer-events: none;
  background: var(--navy-deep);
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
  padding: 7px 11px;
  border-radius: 7px;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transform: translate(-50%, calc(-100% - 10px));
  transition: opacity 0.12s ease;
  z-index: 50;
  white-space: nowrap;
}
.tip.on { opacity: 1; }
.tip .tip-k { color: rgba(255, 255, 255, 0.65); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
