/* ============================================================================
   BagGap by PinHigh HQ // Clubhouse Emerald + Championship Gold + Print Card
   ============================================================================ */

:root {
  --bg-canvas: #07110d;
  --bg-surface: #0d1c16;
  --bg-elevated: #142a21;
  --border-subtle: rgba(110, 231, 183, 0.14);
  --border-strong: rgba(110, 231, 183, 0.30);
  --text-primary: #f2f7f4;
  --text-secondary: #a8bfb5;
  --text-muted: #6f8c80;
  --emerald: #10b981;
  --emerald-bright: #34d399;
  --gold-soft: #f5d061;
  --amber: #f59e0b;
  --crimson: #ef4444;
  --sky: #38bdf8;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.42);
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(16, 185, 129, 0.14), transparent 65%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(234, 179, 8, 0.08), transparent 60%);
  color: var(--text-primary);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--emerald-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(7, 17, 13, 0.88);
  border-bottom: 1px solid var(--border-subtle);
}

.site-nav-inner {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-lockup:hover { text-decoration: none; }
.brand-lockup .accent { color: var(--gold-soft); }

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981, #047857);
  border: 1px solid rgba(245, 208, 97, 0.45);
  display: grid;
  place-items: center;
}

.nav-links { display: flex; align-items: center; gap: 1.1rem; }
.nav-links a { color: var(--text-secondary); font-size: 0.88rem; font-weight: 500; }
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.btn-ghost, .btn-gold, .btn-emerald {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.52rem 0.9rem;
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.14s ease, border-color 0.15s ease;
  text-decoration: none;
}

.btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--border-subtle); color: var(--text-primary); }
.btn-ghost:hover { border-color: var(--border-strong); text-decoration: none; }
.btn-gold { background: linear-gradient(135deg, #f5c84c, #d99b18); color: #0b1410; box-shadow: 0 6px 20px rgba(234, 179, 8, 0.25); }
.btn-gold:hover { transform: translateY(-1px); text-decoration: none; }
.btn-emerald { background: linear-gradient(135deg, #10b981, #059669); color: #04130d; }
.btn-emerald:hover { transform: translateY(-1px); text-decoration: none; }

.container { max-width: 1340px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

.hero { text-align: center; max-width: 880px; margin: 0.4rem auto 1.4rem; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(234, 179, 8, 0.10);
  border: 1px solid rgba(234, 179, 8, 0.30);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3.05rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.03em; margin-bottom: 0.7rem; }
.hero h1 span { background: linear-gradient(90deg, #34d399, #f5d061); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--text-secondary); font-size: 1.01rem; max-width: 720px; margin: 0 auto 1.2rem; }

.preset-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 1.4rem; }
.preset-btn {
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
}
.preset-btn:hover { border-color: var(--border-strong); color: var(--text-primary); }
.preset-btn.active { background: rgba(16, 185, 129, 0.16); border-color: var(--emerald-bright); color: var(--text-primary); }

.workspace-grid { display: grid; grid-template-columns: 420px 1fr; gap: 1.35rem; align-items: start; }

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.95rem; padding-bottom: 0.65rem; border-bottom: 1px solid var(--border-subtle); }
.panel-title { font-size: 1.04rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.step-badge { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; color: #06140e; background: var(--emerald-bright); padding: 0.12rem 0.45rem; border-radius: 6px; }

.control-group { margin-bottom: 0.95rem; }
.control-label-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.35rem; }
.control-label-row label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.control-value { font-family: var(--font-mono); font-size: 0.88rem; font-weight: 700; color: var(--gold-soft); }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--emerald-bright);
  border: 2px solid #06140e;
  cursor: pointer;
}

.mini-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.mini-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
}
.mini-pill:hover { border-color: var(--emerald-bright); color: var(--text-primary); }

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
  background: var(--bg-canvas);
  padding: 0.22rem;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
}
.seg-btn {
  padding: 0.42rem 0.3rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.seg-btn.active { background: var(--bg-elevated); color: var(--emerald-bright); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.35); }

.control-divider { border: 0; border-top: 1px dashed var(--border-subtle); margin: 1rem 0; }

/* Club Roster Table */
.club-list { display: flex; flex-direction: column; gap: 0.35rem; max-height: 390px; overflow-y: auto; padding-right: 2px; }
.club-row {
  display: grid;
  grid-template-columns: 22px 1fr 64px 72px;
  gap: 0.45rem;
  align-items: center;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.36rem 0.55rem;
  font-size: 0.82rem;
}
.club-row.inactive { opacity: 0.48; }
.club-row input[type="checkbox"] { accent-color: var(--emerald-bright); width: 15px; height: 15px; cursor: pointer; }
.club-num {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  padding: 0.24rem 0.35rem;
  text-align: right;
}
.club-num:focus { outline: none; border-color: var(--emerald-bright); }

.add-club-row { display: flex; gap: 0.45rem; margin-top: 0.65rem; }
.select-input {
  flex: 1;
  padding: 0.48rem 0.65rem;
  border-radius: 8px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
}

/* Right Results Column */
.results-col { display: flex; flex-direction: column; gap: 1.2rem; }

.verdict-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  flex-wrap: wrap;
}
.verdict-banner.status-pass { border-color: rgba(16, 185, 129, 0.45); background: linear-gradient(135deg, rgba(16, 185, 129, 0.13), var(--bg-surface) 58%); }
.verdict-banner.status-caution { border-color: rgba(245, 158, 11, 0.45); background: linear-gradient(135deg, rgba(245, 158, 11, 0.13), var(--bg-surface) 58%); }
.verdict-banner.status-warn { border-color: rgba(249, 115, 22, 0.5); background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), var(--bg-surface) 58%); }
.verdict-banner.status-fail { border-color: rgba(239, 68, 68, 0.55); background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), var(--bg-surface) 58%); }

.grade-badge {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  border: 2px solid currentColor;
  flex-shrink: 0;
}
.status-pass .grade-badge { color: var(--emerald-bright); background: rgba(16, 185, 129, 0.15); }
.status-caution .grade-badge { color: var(--gold-soft); background: rgba(245, 158, 11, 0.15); }
.status-warn .grade-badge { color: #fb923c; background: rgba(249, 115, 22, 0.16); }
.status-fail .grade-badge { color: #f87171; background: rgba(239, 68, 68, 0.16); }

.svg-stage {
  background: #06100c;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 0.7rem;
}
.svg-stage svg { display: block; width: 100%; height: auto; }

/* Alerts & Recommendations */
.alerts-grid { display: flex; flex-direction: column; gap: 0.55rem; }
.alert-item {
  padding: 0.75rem 0.95rem;
  border-radius: 10px;
  font-size: 0.86rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
}
.alert-item.sev-fail { border-color: rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.09); }
.alert-item.sev-warn { border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.09); }
.alert-item.sev-pass { border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.09); }

.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.9rem; margin-top: 0.85rem; }
.gear-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
}
.amz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #f5c84c, #d99b18);
  color: #09130e;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}
.amz-btn:hover { transform: translateY(-1px); text-decoration: none; }

/* Pocket Yardage Card */
.yardage-card-shell {
  background: var(--bg-canvas);
  border: 2px solid var(--emerald-bright);
  border-radius: 14px;
  padding: 1.15rem;
  font-family: var(--font-mono);
}
.yardage-card-shell.ink-saver {
  background: #ffffff;
  color: #111827;
  border-color: #111827;
}
.yardage-card-shell.ink-saver th { background: #f3f4f6; color: #111827; border-bottom: 1px solid #9ca3af; }
.yardage-card-shell.ink-saver td { color: #111827; border-bottom: 1px solid #e5e7eb; }
.yardage-card-shell.ink-saver .yc-sub { color: #4b5563; }

.yc-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; margin-top: 0.65rem; }
.yc-table th, .yc-table td { padding: 0.34rem 0.45rem; border-bottom: 1px solid var(--border-subtle); text-align: left; }
.yc-table th { color: var(--gold-soft); font-size: 0.7rem; text-transform: uppercase; }
.yc-table td.num, .yc-table th.num { text-align: right; }

.section-block { margin-top: 2rem; }
.guides-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.guide-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
}
.guide-card:hover { border-color: var(--emerald-bright); text-decoration: none; }
.guide-card p { font-size: 0.85rem; color: var(--text-secondary); }
.guide-link-label { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; color: var(--emerald-bright); }

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 60;
  background: #0e241b;
  color: var(--text-primary);
  border: 1px solid var(--emerald-bright);
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

.site-footer { margin-top: 3.5rem; border-top: 1px solid var(--border-subtle); padding: 2rem 1.25rem 3rem; background: rgba(5, 12, 9, 0.75); }
.footer-inner { max-width: 1340px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.85rem; }
.footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.15rem; font-size: 0.86rem; }
.ftc-disclosure { font-size: 0.8rem; color: var(--text-muted); padding: 0.85rem 1rem; border-radius: 10px; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border-subtle); }

.article-wrap { max-width: 860px; margin: 1.5rem auto 3rem; padding: 0 1.25rem; }
.article-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-card); }
.article-card h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 800; line-height: 1.15; margin-bottom: 0.8rem; }
.article-card h2 { font-size: 1.28rem; font-weight: 700; color: var(--emerald-bright); margin: 1.65rem 0 0.6rem; }
.article-card p, .article-card li { color: var(--text-secondary); font-size: 0.97rem; margin-bottom: 0.72rem; }
.article-card ul { padding-left: 1.35rem; margin-bottom: 1rem; }
.spec-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; font-size: 0.88rem; }
.spec-table th, .spec-table td { padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--border-subtle); text-align: left; }
.spec-table th { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; color: var(--gold-soft); background: var(--bg-canvas); }
.callout-box { padding: 1.1rem 1.25rem; border-radius: 12px; background: rgba(16, 185, 129, 0.10); border: 1px solid rgba(52, 211, 153, 0.32); margin: 1.25rem 0; }

/* ── Print Stylesheet: Print ONLY the 3.5" x 5.5" Pocket Yardage Card ── */
@media print {
  body { background: #fff !important; color: #000 !important; padding: 0 !important; }
  .site-nav, .hero, .preset-bar, aside.panel, .verdict-banner, #chart-panel, #alerts-panel, #guides, .site-footer, .no-print {
    display: none !important;
  }
  .container, .workspace-grid, .results-col { display: block !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
  #yardage-card-panel { border: none !important; box-shadow: none !important; padding: 0 !important; background: #fff !important; }
  #pocket-card {
    width: 3.5in !important;
    min-height: 5.5in !important;
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    border-radius: 6px !important;
    padding: 0.22in !important;
    margin: 0.2in auto !important;
  }
  #pocket-card th, #pocket-card td { color: #000 !important; border-color: #999 !important; }
}

@media (max-width: 1080px) {
  .workspace-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .guides-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
