/* =====================================================================
   OddsHawk — stylesheet
   Plain CSS, no build step (spec section 3). Dark by default: the
   dashboard is watched during live matches, often on a phone at night.
   ===================================================================== */

:root {
  --bg:        #0d1117;
  --bg-raised: #161b22;
  --bg-inset:  #1c2230;
  --border:    #262d3a;
  --text:      #e6edf3;
  --text-dim:  #8b97a8;
  --accent:    #f0a020;
  --accent-dk: #c47f10;
  --danger:    #f0503c;
  --success:   #3fb950;
  --radius:    10px;
  --wrap:      1080px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

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

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 2rem; letter-spacing: -.02em; }
h2 { font-size: 1.4rem; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
  position: sticky; top: 0; z-index: 20;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 62px; flex-wrap: wrap;
}
.brand {
  font-weight: 700; font-size: 1.15rem; color: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;              /* the logo is a link; make it tappable */
}
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text-dim); font-size: .94rem;
  display: inline-flex; align-items: center; min-height: 44px;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  /* 11px of padding either side puts every button at 44px, the minimum
     comfortable tap target. At 9px they measured 41px on every page —
     close enough to look right and be missed often. */
  display: inline-block; padding: 11px 18px; border-radius: var(--radius);
  font-weight: 600; font-size: .94rem; border: 1px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s;
  background: transparent; font-family: inherit; line-height: 1.4;
  min-height: 44px;
}
.btn-primary { background: var(--accent); color: #1a1204; }
.btn-primary:hover { background: var(--accent-dk); text-decoration: none; }
/* background must be explicit: .btn-ghost is used on <button> as well as
   <a>, and a bare <button> otherwise keeps the browser's light default,
   which renders as unreadable pale-on-pale in this dark theme. */
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text) !important; }
.btn-ghost:hover { border-color: var(--text-dim); text-decoration: none; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Tier chips ---------- */
.tier-chip {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-dim);
}
.tier-chip.tier-starter { color: var(--accent); border-color: var(--accent); }
.tier-chip.tier-pro     { background: var(--accent); color: #1a1204; border-color: var(--accent); }

/* ---------- Cards & forms ---------- */
.card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
}
.auth-card { max-width: 430px; margin: 48px auto; }
.auth-card h1 { font-size: 1.5rem; }
.auth-sub { color: var(--text-dim); margin: 0 0 22px; font-size: .95rem; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .87rem; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 10px 12px; font-size: 1rem;
  background: var(--bg-inset); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.field .hint { font-size: .8rem; color: var(--text-dim); margin-top: 5px; }

.form-foot { margin-top: 20px; font-size: .9rem; color: var(--text-dim); text-align: center; }

/* ---------- Notices ---------- */
.notice {
  padding: 12px 15px; border-radius: 8px; margin-bottom: 20px;
  font-size: .92rem; border: 1px solid;
}
.notice-error   { background: rgba(240,80,60,.10);  border-color: rgba(240,80,60,.42);  color: #ffb3a7; }
.notice-success { background: rgba(63,185,80,.10);  border-color: rgba(63,185,80,.42);  color: #8ce39a; }
.notice-info    { background: rgba(240,160,32,.10); border-color: rgba(240,160,32,.42); color: #ffd08a; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }

.dev-link {
  display: block; margin-top: 10px; padding: 9px; border-radius: 6px;
  background: var(--bg-inset); font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .8rem; word-break: break-all;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 64px;
  padding: 26px 0; color: var(--text-dim); font-size: .88rem;
}
.site-footer p { margin: 0 0 6px; }
.fine-print { font-size: .8rem; opacity: .75; }

/* ---------- Small screens ---------- */
@media (max-width: 620px) {
  h1 { font-size: 1.6rem; }
  .header-inner { min-height: 56px; }
  .site-nav { gap: 12px; }
  .auth-card { margin: 26px auto; padding: 22px; }
}

/* =====================================================================
   Landing page
   ===================================================================== */

.btn-lg { padding: 13px 26px; font-size: 1rem; }

.hero { padding: 68px 0 12px; max-width: 760px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .13em; font-size: .75rem;
  font-weight: 700; color: var(--accent); margin: 0 0 14px;
}
.hero h1 { font-size: 2.9rem; letter-spacing: -.03em; margin-bottom: 20px; }
.lede { font-size: 1.13rem; color: var(--text-dim); margin: 0 0 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { font-size: .84rem; color: var(--text-dim); margin-top: 14px; }

/* ---------- Example alert ---------- */
.alert-demo { margin: 46px 0 4px; }
.demo-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 20px 22px; max-width: 560px;
}
.demo-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.demo-badge {
  background: var(--danger); color: #fff; font-size: .75rem; font-weight: 700;
  letter-spacing: .07em; padding: 3px 9px; border-radius: 4px;
}
.demo-time { color: var(--text-dim); font-size: .86rem; font-variant-numeric: tabular-nums; }
.demo-match { font-size: 1.2rem; font-weight: 700; margin: 0 0 2px; }
.demo-match span { color: var(--text-dim); margin: 0 6px; }
.demo-league { color: var(--text-dim); font-size: .84rem; margin: 0 0 12px; }
.demo-detail { font-size: .92rem; margin: 0; color: var(--text-dim); }
.odds-before { color: var(--text-dim); text-decoration: line-through; }
.odds-arrow  { color: var(--text-dim); margin: 0 2px; }
.odds-after  { color: var(--success); font-weight: 700; }
.odds-delta  { color: var(--accent); font-weight: 700; margin-left: 4px; }

/* ---------- How it works ---------- */
.how { padding: 68px 0 0; }
.section-sub { color: var(--text-dim); margin: -6px 0 28px; }
.steps { list-style: none; padding: 0; margin: 26px 0 0;
         display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.steps li {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #1a1204; font-weight: 700; font-size: .9rem;
  margin-bottom: 12px;
}
.steps h3 { font-size: 1.03rem; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--text-dim); font-size: .92rem; }

/* ---------- Pricing ---------- */
.pricing { padding: 68px 0 0; }
.plans { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); margin-top: 26px; align-items: start; }
.plan {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; position: relative;
}
.plan-featured { border-color: var(--accent); }
.plan-flag {
  position: absolute; top: -11px; left: 26px;
  background: var(--accent); color: #1a1204; font-size: .75rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px;
}
.plan h3 { font-size: 1.1rem; margin-bottom: 4px; }
.price { font-size: 2.1rem; font-weight: 700; margin: 0 0 18px; letter-spacing: -.02em; }
.price span { font-size: .95rem; font-weight: 400; color: var(--text-dim); }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; }
.plan li {
  padding: 7px 0 7px 22px; position: relative; font-size: .92rem;
  border-bottom: 1px solid var(--border);
}
.plan li:last-child { border-bottom: 0; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.plan li.muted { color: var(--text-dim); }
.plan li.muted::before { content: "—"; color: var(--text-dim); }

/* ---------- Closing band ---------- */
.cta-band {
  margin: 68px 0 0; padding: 44px 26px; text-align: center;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { color: var(--text-dim); margin: 0 0 22px; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .steps, .plans { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .hero { padding-top: 44px; }
  .hero h1 { font-size: 2rem; }
  .hero h1 br { display: none; }
  .lede { font-size: 1rem; }
  .hero-cta .btn { width: 100%; text-align: center; }
  .how, .pricing { padding-top: 46px; }
}

/* =====================================================================
   Dashboard
   ===================================================================== */

.dash-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 34px 0 20px;
}
.dash-head h1 { font-size: 1.7rem; margin-bottom: 4px; }
.dash-sub { color: var(--text-dim); margin: 0; font-size: .93rem; }

.dash-status {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-dim); font-size: .85rem;
  background: var(--bg-raised); border: 1px solid var(--border);
  padding: 7px 13px; border-radius: 999px; white-space: nowrap;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); flex: none;
  animation: pulse 2.4s ease-in-out infinite;
}
.live-dot.stale { background: var(--danger); animation: none; }
.live-dot.flash { background: var(--accent); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Upgrade banner (free tier) ---------- */
.upgrade-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
  padding: 15px 18px; border-radius: var(--radius);
  background: rgba(240,160,32,.09); border: 1px solid rgba(240,160,32,.4);
}
.upgrade-banner strong { color: var(--accent); }
.upgrade-banner span { color: var(--text-dim); font-size: .92rem; }

/* ---------- Feed ---------- */
.alert-feed { display: flex; flex-direction: column; gap: 14px; }

.alert-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 17px 19px;
}
.alert-card.is-new { animation: flash-in .9s ease-out; border-left-color: var(--success); }
@keyframes flash-in {
  0%   { background: rgba(63,185,80,.16); transform: translateY(-4px); }
  100% { background: var(--bg-raised);    transform: none; }
}

.alert-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.alert-badge {
  background: var(--danger); color: #fff; font-size: .75rem; font-weight: 700;
  letter-spacing: .07em; padding: 3px 8px; border-radius: 4px;
}
.alert-age { color: var(--text-dim); font-size: .82rem; font-variant-numeric: tabular-nums; }

.alert-match { font-size: 1.1rem; font-weight: 700; margin: 0 0 2px; }
.alert-score { color: var(--text-dim); margin: 0 8px; font-variant-numeric: tabular-nums; }
.alert-meta { color: var(--text-dim); font-size: .82rem; margin: 0 0 10px; }
.alert-detail { font-size: .9rem; color: var(--text-dim); margin: 0 0 8px; }
.alert-odds { margin: 0; font-size: .95rem; font-variant-numeric: tabular-nums; }

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center; padding: 52px 22px; color: var(--text-dim);
  background: var(--bg-raised); border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.empty-title { font-size: 1.05rem; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.empty-state p { margin: 0; font-size: .92rem; }

@media (max-width: 620px) {
  .dash-head { padding-top: 24px; }
  .dash-head h1 { font-size: 1.4rem; }
  .upgrade-banner .btn { width: 100%; text-align: center; }
  .alert-match { font-size: 1rem; }
}

/* Users who prefer less motion get none of the attention-grabbing bits. */
@media (prefers-reduced-motion: reduce) {
  .live-dot, .alert-card.is-new { animation: none; }
}

/* =====================================================================
   Upgrade page and tier notices
   ===================================================================== */

.upgrade-page { padding: 34px 0 0; }
.upgrade-page h1 { font-size: 1.7rem; }

.plan-blurb { color: var(--text-dim); font-size: .88rem; margin: -8px 0 16px; }
.plan-current { border-color: var(--success); }
.plan-flag-current { background: var(--success); color: #06210c; }
.plan-btn-disabled { opacity: .55; cursor: not-allowed; }

.lapse-notice {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.lapse-notice a { margin-left: auto; font-weight: 600; }

/* ---------- Account page ---------- */
.account-page { padding: 34px 0 0; max-width: 620px; }
.account-page h1 { font-size: 1.7rem; margin-bottom: 20px; }
.account-card { margin-bottom: 20px; }
.account-card h2 { font-size: 1.08rem; margin-bottom: 14px; }
.plan-line { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.plan-price { font-weight: 700; font-size: 1.05rem; }
.account-detail { color: var(--text-dim); font-size: .9rem; margin: 0 0 12px; }
.account-fine { font-size: .82rem; opacity: .8; margin-top: 12px; margin-bottom: 0; }

/* ---------- Checkout ---------- */
.paypal-button { min-height: 46px; }
.cancel-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }


/* =====================================================================
   Step 8 polish — legibility floor, focus, motion
   ===================================================================== */

/* No text falls below 12px. The small-caps labels in particular were
   rendering at 10.4px, which is decorative rather than readable. */
.fine-print, .hint, .account-fine, .alert-age, .alert-meta,
.demo-time, .demo-league, .plan-blurb, .hero-note {
  font-size: max(0.78rem, 12px);
}

/* Inline links sit inside sentences and cannot be padded to 44px without
   breaking the line, so they get a larger hit area that does not affect
   layout, plus an underline so they are not signalled by colour alone. */
.form-foot a, .account-detail a, .lapse-notice a, .notice a {
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 6px 2px;
}

/* Keyboard users need to see where they are. */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip past the header straight to the content. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #1a1204; padding: 12px 18px;
  font-weight: 700; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* ---------- Error pages ---------- */
.error-page { max-width: 520px; margin: 76px auto; text-align: center; }
.error-code {
  font-size: 3.6rem; font-weight: 800; line-height: 1;
  color: var(--accent); margin: 0 0 8px; letter-spacing: -.03em;
}
.error-page h1 { font-size: 1.6rem; margin-bottom: 10px; }
.error-message { color: var(--text-dim); margin: 0 0 26px; }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 620px) {
  .error-page { margin: 44px auto; }
  .error-actions .btn { width: 100%; text-align: center; }
}
