/* Velocity demo — shared styles */
:root {
  --accent: #0A3655;
  --accent-dark: #072540;
  --accent-light: #eef4f9;
  --alert: #A8313F;
  --alert-light: #fef2f2;
  --ink: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --card: #ffffff;
  --serif: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.beta-pill {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
}

.accent { color: var(--accent); }
.bg-accent { background: var(--accent); color: white; }
.bg-accent:hover { background: var(--accent-dark); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: white;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.15s;
}
.btn:hover { background: #f3f4f6; }
.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled {
  background: #d1d5db;
  border-color: #d1d5db;
  cursor: not-allowed;
}

.assumption-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #78350f;
  border-radius: 4px;
  margin: 2px;
  cursor: pointer;
}
.assumption-chip:hover { background: #fde68a; }

.confidence-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
}
.conf-high { background: #d1fae5; color: #065f46; }
.conf-medium { background: #fef3c7; color: #92400e; }
.conf-low { background: #fee2e2; color: #991b1b; }

.streaming-cursor::after {
  content: '▊';
  display: inline-block;
  animation: blink 1s infinite;
  margin-left: 1px;
  color: var(--accent);
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--accent);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.stepper {
  display: flex;
  gap: 4px;
  align-items: center;
}
.stepper-dot {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}
.stepper-dot.active { background: var(--accent); }
.stepper-dot.done { background: #6b7280; }

/* Gate overlay */
#gate-overlay {
  position: fixed;
  inset: 0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: 16px;
}
#gate-overlay.hidden { display: none; }
#gate-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
#gate-input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  outline: none;
}
#gate-input:focus { border-color: var(--accent); }
#gate-error {
  color: var(--accent);
  font-size: 12px;
  height: 16px;
}

/* Small responsive helpers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Demo nav (top of demo pages) */
.demo-nav {
  border-bottom: 1px solid var(--border);
  background: white;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.demo-nav a { color: var(--muted); text-decoration: none; font-size: 13px; }
.demo-nav a:hover { color: var(--ink); }

.brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand::before {
  content: '';
  width: 22px;
  height: 14px;
  background: url("optro-mark.svg") center/contain no-repeat;
  display: inline-block;
  flex-shrink: 0;
}
.pip {
  width: 28px;
  height: 18px;
  background: url("optro-mark.svg") center/contain no-repeat;
  display: inline-block;
}

/* ============================================================
   REFINED POLISH — single layer, modern-minimalist quality
   Replaces all prior polish iterations. Scoped, non-destructive,
   focused on type rendering, focus rings, and transition easing.
   No universal border overrides. No layered shadows. No heavy
   chrome. Inspired by Harvey / Linear / Vercel design vocabulary.
   ============================================================ */

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-feature-settings: "ss01", "cv11", "cv02";
  letter-spacing: -0.005em;
}

h1, h2, h3, h4, h5, h6 {
  font-feature-settings: "ss01", "cv11", "cv02";
  letter-spacing: -0.022em;
  font-weight: 600;
}

h1 { line-height: 1.08; }
h2 { line-height: 1.2; }
h3 { line-height: 1.3; }

/* Subtle focus rings on interactive elements only */
*:focus { outline: none; }
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 54, 85, 0.12);
}
a:focus-visible {
  outline: 2px solid rgba(10, 54, 85, 0.35);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Mono ligatures on code */
code, kbd, samp, pre,
.mono, [class*="mono"], [class*="-mono"] {
  font-feature-settings: "ss01", "cv01", "cv02", "cv11";
}

/* Smoother default easing on every transition */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Disable text-selection highlight on interactive nav chrome */
nav, button, .btn, [role="button"] {
  -webkit-tap-highlight-color: transparent;
}
