/* ============================================================================
   LANTERN — SHARED STYLES
   Used by every Bet Check screen. Colours and type come from the existing
   handlelantern.com landing page so the tool looks like the same product.
   ========================================================================== */

:root {
  --ink:        #0d1117;   /* page background */
  --ink-soft:   #161b22;   /* cards */
  --paper:      #f5f2ea;   /* body text */
  --line:       #2a3038;   /* borders and dot leaders */
  --muted:      #8b96a5;   /* secondary text */
  --green:      #2ecc71;   /* GOOD PRICE */
  --green-deep: #1a9e57;
  --red:        #e5534b;   /* OVERPRICED */
  --slate:      #9fb3c8;   /* FAIR PRICE — neutral, deliberately not a signal */

  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* The wordmark only. Everything else on every screen stays Inter. */
  --mark: 'Lexend', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 0 24px 80px; }

/* ---- Page header ---- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 24px 0 8px;
}
.back {
  color: var(--muted); text-decoration: none;
  font-size: 15px; font-weight: 600;
  padding: 6px 10px 6px 0;
  display: inline-flex; align-items: baseline; gap: 6px;
}
.back .mark {
  font-family: var(--mark); font-weight: 800;
  color: var(--green); letter-spacing: -0.01em;
}
.back:hover { color: var(--paper); }
.back:hover .mark { color: var(--green-deep); }
.screen-title {
  font-size: 20px; font-weight: 750; letter-spacing: -0.01em;
}

/* ---- Form ---- */
.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: 14px; font-weight: 650;
  margin-bottom: 7px; color: var(--paper);
}
.field .optional { color: var(--muted); font-weight: 500; }
.field input {
  width: 100%;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px 16px;
  color: var(--paper);
  font-size: 16px;               /* 16px stops iOS zooming on focus */
  font-family: var(--sans);
}
.field input::placeholder { color: #5b6675; }
.field input:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: transparent;
}
.field input.invalid { border-color: var(--red); }
.field .hint { font-size: 13.5px; color: var(--muted); margin-top: 7px; }
.field .error { font-size: 13.5px; color: var(--red); margin-top: 7px; display: none; }
.field .error.show { display: block; }

.conditional { display: none; }
.conditional.show { display: block; }

.btn {
  width: 100%;
  background: var(--green);
  color: #062a16;
  border: none; border-radius: 10px;
  padding: 16px 24px;
  font-size: 16px; font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--green-deep); color: #fff; }
.btn-quiet {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line);
}
.btn-quiet:hover { background: var(--ink-soft); color: var(--paper); }

/* ---- The output card: a receipt ---- */
.card {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px;
  margin-top: 8px;
}

.slot { margin-bottom: 26px; }
.slot:last-child { margin-bottom: 0; }

.slot-header {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

/* Slot 1 — bet identity */
.bet-label { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.bet-meta  { font-size: 14.5px; color: var(--muted); margin-top: 3px; }

/* Slot 2 — the verdict stamp */
.stamp {
  font-size: 24px; font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}
.stamp.good  { color: var(--green); }
.stamp.fair  { color: var(--slate); }
.stamp.over  { color: var(--red); }
.stamp.none  { color: var(--slate); font-size: 19px; }
.why { font-size: 15.5px; color: var(--paper); max-width: 34em; }

/* Ledger rows with dot leaders */
.row {
  display: flex; align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  font-size: 15.5px;
}
.row-label { white-space: nowrap; }
.row-dots {
  flex: 1 1 auto;
  border-bottom: 1px dotted var(--line);
  transform: translateY(-4px);
  min-width: 12px;
}
.row-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 15px;
}
.row-value.pos { color: var(--green); }
.row-value.neg { color: var(--red); }

.info {
  color: var(--slate);
  font-size: 12px;
  vertical-align: super;
  margin-left: 3px;
}

/* The aha / teaching line that closes a block */
.aha {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  font-size: 15px;
  color: var(--paper);
}

/* Slot 6 — worth knowing */
.note { font-size: 15px; margin-bottom: 10px; }
.note:last-child { margin-bottom: 0; }

/* Slot 7 — details footer */
.details {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.details .entry {
  font-size: 13.5px; color: var(--muted);
  margin-bottom: 10px; line-height: 1.5;
}
.details .entry:last-child { margin-bottom: 0; }

.tap-correct {
  background: none; border: none;
  color: var(--green); font-family: var(--sans);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; padding: 0; text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Action zone: below the card, outside the template ---- */
.actions { margin-top: 20px; display: flex; gap: 10px; }
.actions .btn { flex: 1; }

.capture {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 20px;
  margin-top: 16px;
}
.capture p { font-size: 15px; margin-bottom: 14px; }
.capture form { display: flex; gap: 10px; flex-wrap: wrap; }
.capture input {
  flex: 1 1 200px; min-width: 0;
  background: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 14px; color: var(--paper);
  font-size: 16px; font-family: var(--sans);
}
.capture input::placeholder { color: #5b6675; }
.capture button {
  flex: 0 0 auto;
  background: var(--green); color: #062a16;
  border: none; border-radius: 10px;
  padding: 13px 20px; font-size: 15px; font-weight: 700;
  font-family: var(--sans); cursor: pointer;
}
.capture button:hover { background: var(--green-deep); color: #fff; }
.capture .done { color: var(--green); font-weight: 650; }

/* ---- Footer ---- */
.footer {
  margin-top: 44px; padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.footer a { color: var(--muted); }

.hidden { display: none !important; }

@media (max-width: 420px) {
  .wrap { padding: 0 18px 60px; }
  .card { padding: 20px 16px; }
  .row { font-size: 14.5px; }
  .row-value { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ============================================================================
   PARLAY — leg inputs and the probability ladder
   ========================================================================== */

.leg {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 16px 4px;
  margin-bottom: 14px;
  background: rgba(255,255,255,0.012);
}
.leg-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.leg-num {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted);
}
.leg-remove {
  background: none; border: none; color: var(--muted);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  font-family: var(--sans); padding: 4px 6px;
}
.leg-remove:hover { color: var(--red); }

/* Prop toggle */
.toggle {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 18px; cursor: pointer;
}
.toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); flex: 0 0 auto; }
.toggle .toggle-text { font-size: 14.5px; }
.toggle .toggle-hint { font-size: 13px; color: var(--muted); margin-top: 2px; }

.add-leg {
  width: 100%;
  background: transparent; color: var(--paper);
  border: 1px dashed var(--line); border-radius: 10px;
  padding: 14px; font-size: 15px; font-weight: 650;
  font-family: var(--sans); cursor: pointer; margin-bottom: 24px;
}
.add-leg:hover { border-color: var(--green); color: var(--green); }
.add-leg:disabled { opacity: 0.4; cursor: default; }
.add-leg:disabled:hover { border-color: var(--line); color: var(--paper); }

/* The same-game question */
.question {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--ink-soft); padding: 22px 20px; margin-top: 8px;
}
.question h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.question p { font-size: 14.5px; color: var(--muted); margin-bottom: 16px; }
.question .choices { display: flex; gap: 10px; flex-wrap: wrap; }
.question .choices button {
  flex: 1 1 90px;
  background: transparent; color: var(--paper);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 10px; font-size: 15px; font-weight: 650;
  font-family: var(--sans); cursor: pointer;
}
.question .choices button:hover { border-color: var(--green); color: var(--green); }

/* The ladder */
.ladder { width: 100%; border-collapse: collapse; }
.ladder th {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-align: right;
  padding-bottom: 10px;
}
.ladder th:first-child { text-align: left; }
.ladder td {
  padding: 7px 0; font-size: 15px;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  text-align: right; white-space: nowrap;
}
.ladder td:first-child {
  font-family: var(--sans); text-align: left;
  padding-right: 14px; white-space: normal;
}
.ladder td:nth-child(2) { padding-right: 18px; color: var(--muted); }

@media (max-width: 380px) {
  .ladder td, .ladder th { font-size: 13.5px; }
  .ladder td:first-child { font-size: 14px; }
}

/* ============================================================================
   PROP — the YOUR ESTIMATE block
   ========================================================================== */

.estimate-prompt { font-size: 15.5px; margin-bottom: 14px; }

.estimate-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.estimate-row input {
  width: 92px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--paper);
  font-size: 16px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.estimate-row input::placeholder { color: #5b6675; font-family: var(--sans); }
.estimate-row input:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: transparent;
}
.estimate-row .unit { font-size: 16px; color: var(--muted); }

.estimate-out {
  margin-top: 14px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  font-size: 15px;
  min-height: 1px;
}
.estimate-out.above { border-left-color: var(--green); }
.estimate-out.below { border-left-color: var(--red); }
.estimate-hint { font-size: 13.5px; color: var(--muted); margin-top: 10px; }

/* The ambiguity clarifier under the estimate box */
.clarify { margin-top: 12px; }
.clarify .q { font-size: 14.5px; color: var(--muted); margin-bottom: 9px; }
.clarify .opts { display: flex; gap: 8px; flex-wrap: wrap; }
.clarify .opts button {
  flex: 1 1 150px;
  background: transparent; color: var(--paper);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 10px; font-size: 14px; font-weight: 600;
  font-family: var(--sans); cursor: pointer; text-align: left;
}
.clarify .opts button:hover { border-color: var(--green); color: var(--green); }
.clarify .opts button.on { border-color: var(--green); color: var(--green); }

.estimate-bar {
  font-size: 15px;
  margin-bottom: 12px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  color: var(--paper);
}
.estimate-formats { font-size: 13px; color: var(--muted); margin-top: 9px; }

/* "or" divider between two mutually exclusive inputs */
.orbar {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 20px; font-size: 13px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700;
}
.orbar::before, .orbar::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.field input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.field.off label, .field.off .hint { opacity: 0.4; }

/* The or-divider inside a parlay leg is conditional, and must stay flex */
.orbar.conditional { display: none; }
.orbar.conditional.show { display: flex; }

/* ============================================================================
   HOME PAGE — the four bet-type buttons
   ========================================================================== */

.home-wrap { max-width: 560px; margin: 0 auto; padding: 0 24px 60px; }

.wordmark {
  padding-top: 40px;
  font-family: var(--mark);
  font-size: clamp(30px, 7vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--green);
  line-height: 1;
}

.eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-top: 26px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(46,204,113,0.15);
  flex: 0 0 auto;
}

.home-h1 {
  font-size: clamp(28px, 6.5vw, 40px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 16px 0 14px;
}
.home-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 26em;
  margin-bottom: 34px;
}

.pick { display: grid; gap: 12px; }

.pick a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  text-decoration: none;
  color: var(--paper);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pick a:hover { border-color: var(--green); background: rgba(46,204,113,0.045); }
.pick .name { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.pick .desc { font-size: 14px; color: var(--green); margin-top: 3px; }
.pick .arrow { color: var(--muted); font-size: 20px; flex: 0 0 auto; }
.pick a:hover .arrow { color: var(--green); }

.home-footer {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.home-footer strong { color: var(--paper); font-weight: 650; }
.home-footer a { color: var(--muted); }

@media (max-width: 400px) {
  .pick a { padding: 17px 18px; }
  .pick .name { font-size: 17.5px; }
}

/* Home page — secondary asks. Deliberately unstyled: no card, no border, no
   heading. The four buttons are the page; these must not compete with them. */
.home-secondary { margin-top: 30px; }
.home-secondary p.lede {
  font-size: 14.5px; color: var(--muted); margin-bottom: 11px; max-width: 32em;
}
.home-secondary form { display: flex; gap: 8px; flex-wrap: wrap; }
.home-secondary input {
  flex: 1 1 180px; min-width: 0;
  background: var(--ink-soft); border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 13px; color: var(--paper); font-size: 16px; font-family: var(--sans);
}
.home-secondary input::placeholder { color: #5b6675; }
.home-secondary input:focus {
  outline: 2px solid var(--green); outline-offset: 1px; border-color: transparent;
}
.home-secondary button {
  flex: 0 0 auto; background: transparent; color: var(--paper);
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 17px;
  font-size: 14.5px; font-weight: 650; font-family: var(--sans); cursor: pointer;
}
.home-secondary button:hover { border-color: var(--green); color: var(--green); }
.home-secondary .done { color: var(--green); font-weight: 650; font-size: 14.5px; }

.survey-line {
  text-align: center; margin-top: 20px;
  font-size: 14.5px; color: var(--muted);
}
.survey-line a {
  color: var(--paper); text-decoration: underline;
  text-underline-offset: 3px; font-weight: 600;
}
.survey-line a:hover { color: var(--green); }

/* ============================================================================
   PREDICTION MARKET SCREENS
   ========================================================================== */

/* Two-tab switcher between the single-contract and combo screens */
.pm-tabs { display: flex; gap: 8px; margin: 6px 0 22px; }
.pm-tabs a {
  flex: 1; text-align: center; text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 10px; font-size: 15px; font-weight: 650;
  color: var(--muted); background: transparent;
}
.pm-tabs a:hover { border-color: var(--green); color: var(--green); }
.pm-tabs a.on { color: var(--paper); background: var(--ink-soft); border-color: var(--line); }

/* Kalshi | Polymarket segmented control */
.platform { margin-bottom: 22px; }
.platform .lbl {
  display: block; font-size: 14px; font-weight: 650; margin-bottom: 7px;
}
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button {
  flex: 1; background: transparent; color: var(--muted);
  border: none; padding: 12px 10px; font-size: 15px; font-weight: 650;
  font-family: var(--sans); cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink-soft); color: var(--paper); }
.seg button:hover { color: var(--green); }

/* Two price boxes side by side inside a leg */
.pair { display: flex; gap: 10px; }
.pair .field { flex: 1 1 0; min-width: 0; }


/* The side selector must not read as decoration — it changes which price is
   being graded, so the active choice is green and the inactive one recedes. */
.seg.side button.on {
  background: rgba(46,204,113,0.12);
  color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}
.seg.side button { padding: 13px 10px; font-weight: 700; }
.side-lbl { display: block; font-size: 14px; font-weight: 650; margin-bottom: 7px; }
/* The price you are not buying steps back so the pair reads at a glance. */
.field.dim label, .field.dim input { opacity: 0.55; }
