/* ============================================================
   tool.css — production styling for the Pickleball Swing Check
   landing + tool. Chosen look: terminal (IBM Plex Mono) · warm
   surface · blue primary + yellow secondary · plain buttons.
   Wired to app.js (classes: choices, cta, overlay, think,
   chip, cue, line/lbl, whyline, drillbox, error, capture…).
   ============================================================ */
:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-2: #f4f2ee;
  --ink: #15181d;
  --muted: #5b6470;
  --line: #ece8e1;
  --line-strong: #ddd7cc;

  --accent: #1b39c9;        /* blue text/labels */
  --accent-fill: #2347ff;   /* blue button */
  --accent-on: #ffffff;
  --accent-hover: #1736e6;
  --accent-2: #dcf64a;      /* yellow */

  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-2); color: var(--ink); }
main { max-width: 600px; margin: 0 auto; padding: clamp(28px, 6vw, 52px) 22px 72px; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-fill) 45%, transparent);
  outline-offset: 2px; border-radius: 4px;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 14px; top: 14px; background: var(--surface); padding: 8px 12px; border: 2px solid var(--accent-fill); border-radius: 8px; z-index: 20; }

/* ---- hero ---- */
.kicker { color: var(--accent); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; display: inline-block; }
.kicker::after { content: ""; display: block; width: 30px; height: 3px; border-radius: 2px; background: var(--accent-2); margin-top: 9px; }
h1 { font-family: var(--mono); font-size: 1.92rem; font-weight: 700; line-height: 1.28; letter-spacing: -0.01em; margin-top: 14px; }
h1 .fix { color: var(--accent); }
.sub { font-size: 1.02rem; color: var(--muted); margin-top: 16px; max-width: 46ch; }
.rule { border: none; border-top: 1px dashed var(--line-strong); margin: 22px 0; }

/* ---- card ---- */
.card {
  margin-top: 26px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 1px 2px rgba(20,30,60,.05);
  padding: clamp(18px, 4vw, 24px);
}

/* ---- buttons ---- */
.choices { display: flex; flex-direction: column; gap: 11px; }
.cta {
  width: 100%; min-height: 54px; padding: 15px 22px;
  border-radius: 8px; font-family: var(--mono);
  font-size: 1.02rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px solid transparent;
  background: var(--accent-fill); color: var(--accent-on);
  transition: filter .15s, transform .06s;
}
.cta:hover { filter: brightness(1.06); }
.cta:active { transform: scale(.992); }
.cta:disabled { opacity: .5; cursor: default; }
.cta.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.cta.secondary:hover { filter: none; background: var(--surface-2); }
.ico { width: 18px; height: 18px; flex: none; }
.hint { color: var(--muted); font-size: .82rem; text-align: center; margin-top: 14px; line-height: 1.5; }
.hint .dotsep, .meta .dotsep { opacity: .5; margin: 0 6px; }

/* ---- preview / overlay ---- */
#previewWrap { position: relative; }
#preview { width: 100%; border-radius: 12px; margin-bottom: 14px; background: #000; max-height: 420px; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.overlay .count { font-family: var(--mono); font-weight: 700; font-size: 92px; color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.6); }
.overlay .rec { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,.6); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; font-family: var(--mono); }
.overlay .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.reset { display: inline-block; color: var(--muted); font-size: .84rem; margin-top: 16px; cursor: pointer; }
.reset:hover { color: var(--accent); }

/* ---- thinking loader ---- */
.think { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 26px 0; }
.glyph { font-size: 18px; color: var(--accent); display: inline-block; }
.shimmer { font-family: var(--mono); font-size: 15px; font-weight: 500; background: linear-gradient(90deg,#c2c2bb 0%,#c2c2bb 38%,var(--ink) 50%,#c2c2bb 62%,#c2c2bb 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.8s linear infinite; }
@keyframes shimmer { from { background-position: 160% 0; } to { background-position: -160% 0; } }
@media (prefers-reduced-motion: reduce) { .shimmer { animation: none; color: var(--muted); } .cta { transition: none; } }

/* ---- result ---- */
.result { min-height: 70px; }
.chip { display: inline-block; background: color-mix(in srgb, var(--accent-2) 38%, transparent); color: var(--accent); font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 5px 11px; border-radius: 999px; }
.cue { font-family: var(--mono); font-weight: 700; font-size: 1.55rem; line-height: 1.18; letter-spacing: -0.01em; margin: 14px 0 6px; text-wrap: balance; }
.line { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: baseline; font-size: 1rem; margin-top: 14px; }
.lbl { font-weight: 700; font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); flex: none; padding-top: 3px; }
.whyline { color: var(--muted); font-size: .92rem; margin-top: 10px; margin-left: calc(2.4rem + 12px); }
.drillbox { margin-top: 18px; padding: 14px 16px; background: var(--surface-2); border-left: 4px solid var(--accent-2); border-radius: 0 10px 10px 0; font-size: .96rem; }
.drillbox .lbl { display: block; color: var(--accent); margin-bottom: 5px; }
.error { color: #b42318; font-size: 1rem; }
@media (max-width: 440px) { .whyline { margin-left: 0; } }

/* ---- email capture ---- */
.capture { margin-top: 24px; text-align: center; }
.capture-lead { font-weight: 700; font-size: 1.12rem; margin-bottom: 4px; }
.capture-sub { font-weight: 500; color: var(--muted); margin-bottom: 14px; max-width: 42ch; margin-left: auto; margin-right: auto; }
#emailForm { display: flex; gap: 8px; max-width: 380px; margin: 0 auto; }
#emailInput { flex: 1; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; font-family: var(--mono); font-size: 15px; min-height: 48px; background: var(--surface); }
#emailForm button { padding: 12px 18px; background: var(--accent-fill); color: var(--accent-on); border: none; border-radius: 10px; font-family: var(--mono); font-weight: 600; cursor: pointer; min-height: 48px; white-space: nowrap; }
#emailForm button:hover { background: var(--accent-hover); }
#emailForm button:disabled { opacity: .6; cursor: default; }
.capture-done { color: var(--muted); font-weight: 600; }

/* ---- trust + nav ---- */
.meta { font-size: .84rem; color: var(--muted); margin-top: 16px; text-align: center; }
nav.foot { margin-top: 16px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; font-size: .84rem; }
nav.foot a { color: var(--ink); }

/* ---- supporting content ---- */
.content { margin-top: 36px; }
.content section { margin-top: 32px; }
.content h2 { font-family: var(--mono); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); display: flex; align-items: center; gap: 9px; }
.content h2::before { content: ""; width: 18px; height: 3px; border-radius: 2px; background: var(--accent-2); flex: none; }
.content p, .content li { font-size: .96rem; color: var(--ink); line-height: 1.6; }
.content ol { margin: 12px 0 0 20px; display: grid; gap: 10px; }
.content li::marker { color: var(--accent); }
.faq dl { margin-top: 8px; }
.faq dt { font-weight: 600; margin-top: 18px; font-size: 1rem; }
.faq dd { margin: 6px 0 0; font-size: .95rem; color: var(--muted); line-height: 1.6; }
.toplink { font-size: .82rem; margin-top: 16px; display: inline-block; }
.madeby { margin-top: 30px; font-size: .76rem; color: var(--muted); }

@media (max-width: 440px) { h1 { font-size: 1.7rem; } main { padding: 28px 18px 56px; } }
