/* golf.unykorn.ai — Refractive Alabaster Liquid Glass (light-first) + Obsidian Vault & Molten Copper / Chrome (dark-second) */
:root {
  --bg: #f3f5f8;
  --bg-elev: rgba(255, 255, 255, 0.78);
  --bg-solid: #ffffff;
  --ink: #111827;
  --muted: #556070;
  --line: rgba(17, 24, 39, 0.11);
  --accent: #b85d27;
  --accent-bright: #d97736;
  --accent-ink: #ffffff;
  --fairway: #1f5c35;
  --ok: #157347;
  --warn: #b45309;
  --bad: #b91c1c;
  --glass-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}

html[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-elev: rgba(18, 24, 36, 0.82);
  --bg-solid: #121824;
  --ink: #eef2f7;
  --muted: #98a4b7;
  --line: rgba(255, 255, 255, 0.11);
  --accent: #d97736;
  --accent-bright: #f08e48;
  --accent-ink: #0b0f17;
  --fairway: #2e854b;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --glass-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

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

body {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Sora', 'IBM Plex Sans', sans-serif;
  letter-spacing: -0.02em;
  margin: 0 0 8px 0;
}

.mono { font-family: 'IBM Plex Mono', monospace; }
.dim { color: var(--muted); }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.hidden { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img { width: 32px; height: 32px; border-radius: 8px; }

.brand-title { font-weight: 700; font-size: 16px; }
.brand-sub { font-size: 12px; color: var(--muted); }

.nav-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--bg-solid);
  color: var(--ink);
}

.pill.ok { color: var(--ok); border-color: rgba(21, 115, 71, 0.35); }
.pill.accent { color: var(--accent); border-color: rgba(217, 119, 54, 0.45); }
.pill.warn { color: var(--warn); border-color: rgba(180, 83, 9, 0.45); }
.pill.bad { color: var(--bad); border-color: rgba(185, 28, 28, 0.45); }

button, .btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-solid);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

button:hover, .btn:hover { transform: translateY(-1px); border-color: var(--accent); }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.primary:hover, .btn.primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); }
button.sm, .btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

input, select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-solid);
  color: var(--ink);
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 10px 0 4px 0;
}

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: var(--bg-elev);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--glass-shadow);
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

/* 3D Hero + Avatar & Finn Pod */
.hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.fairway-stage-wrap {
  position: relative;
  min-height: 440px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #1b4332, #0d1f18);
  box-shadow: var(--glass-shadow);
}

.fairway-mount {
  width: 100%;
  height: 100%;
  min-height: 440px;
}

.fairway-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.fairway-hud {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
  flex-wrap: wrap;
}

.fairway-hud-card {
  pointer-events: auto;
  background: rgba(11, 15, 23, 0.78);
  color: #f3f6fa;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 10px 14px;
  max-width: 440px;
}

.fairway-hud-top {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  gap: 8px;
}

.avatar-pod {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.avatar-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.avatar-frame {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-solid);
  display: flex;
  flex-direction: column;
}

.avatar-frame video,
.avatar-frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #0d121a;
}

.avatar-cap {
  padding: 8px 10px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 5-Stage Protocol Stepper */
.stage-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.stage-btn {
  text-align: left;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
}

.stage-btn.active {
  border-color: var(--accent);
  background: rgba(217, 119, 54, 0.12);
}

.two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.quote-grid,
.agent-grid,
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.card {
  background: var(--bg-solid);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(217, 119, 54, 0.18);
}

.video-card {
  background: var(--bg-solid);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #080b10;
}

.video-meta {
  padding: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

pre.json-box {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-solid);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  overflow-x: auto;
  max-height: 300px;
}

.status-msg {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-solid);
}

.status-msg.ok { border-color: rgba(21, 115, 71, 0.45); color: var(--ok); }
.status-msg.bad { border-color: rgba(185, 28, 28, 0.45); color: var(--bad); }

@media (max-width: 1024px) {
  .hero-grid, .two-col, .three-col { grid-template-columns: 1fr; }
  .stage-tabs { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .container { padding: 14px; }
  .stage-tabs { grid-template-columns: 1fr; }
  .avatar-duo { grid-template-columns: 1fr; }
}
