*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: #F4F6FA; color: #14161A; font-family: 'Public Sans', system-ui, sans-serif; }
img { max-width: 100%; }
a { color: #1A3D6E; }
a:hover { color: #8A5A00; }
:focus-visible { outline: 3px solid #E3A73B; outline-offset: 3px; }
section[id] { scroll-margin-top: 16px; }
summary::marker { color: #8A5A00; }

/* ---------- Shared pieces used by main.js ---------- */
.bar { margin-top: 8px; height: 12px; background: #E3E7EE; border-radius: 999px; }
.bar > div { height: 100%; border-radius: 999px; transition: width 0.6s ease; }
.bar-lg { height: 16px; background: #EEF1F6; }
.eyebrow-sm { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #8A5A00; }
.eyebrow-sm.dark { color: #6B4600; }
.pill-accent { align-self: flex-start; background: #E3A73B; color: #1A3D6E; font-size: 14px; font-weight: 800; padding: 6px 14px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.06em; }
.btn-accent { background: #E3A73B; color: #1A3D6E; text-decoration: none; font-weight: 700; font-size: 17px; padding: 14px 24px; border-radius: 999px; min-height: 48px; display: inline-flex; align-items: center; }
.btn-accent:hover { color: #1A3D6E; background: #F0C46A; }
.btn-outline { font: inherit; font-weight: 600; font-size: 17px; padding: 14px 24px; border-radius: 999px; border: 1.5px solid #C9D1DD; background: #FFFFFF; color: #1A3D6E; min-height: 48px; cursor: pointer; }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid #C9D1DD; background: #FFFFFF; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Challenge idea cards */
.idea-card { font: inherit; text-align: left; border: none; padding: 0; margin: 0; cursor: pointer; background: #1A3D6E; color: #FFFFFF; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.idea-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(26,61,110,0.22); }
.idea-card img { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; display: block; }
.idea-card-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.idea-card-title { font-family: 'Archivo', sans-serif; font-stretch: 110%; font-weight: 800; font-size: 26px; line-height: 1.1; }
.idea-card-counts { font-size: 16px; color: #F0C46A; font-weight: 600; }
.idea-card-more { margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.idea-open { grid-column: 1 / -1; background: #FFFFFF; border: 2.5px solid #E3A73B; border-radius: 24px; overflow: hidden; display: flex; flex-wrap: wrap; box-shadow: 0 20px 40px rgba(26,61,110,0.18); scroll-margin-top: 16px; }
.idea-open-side { flex: 1 1 340px; min-width: 0; background: #1A3D6E; display: flex; flex-direction: column; }
.idea-open-side img { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; display: block; }
.idea-open-tag { padding: 24px 28px; color: #FFFFFF; display: flex; flex-direction: column; gap: 10px; }
.idea-open-tag p { margin: 0; font-size: 15px; color: #DCE3EE; }
.idea-open-main { flex: 1.4 1 440px; min-width: 0; padding: 36px; display: flex; flex-direction: column; gap: 22px; color: #14161A; }
.idea-open-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.idea-open-head h3 { margin: 0; font-family: 'Archivo', sans-serif; font-stretch: 110%; font-weight: 850; font-size: 32px; line-height: 1.05; outline: none; }
.idea-open-setup { margin: 0; font-size: 18px; color: #3D4452; }
.mini-board { background: #F4F6FA; border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.mini-row { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 16px; }
.mini-row.strong { font-weight: 700; }
.idea-open-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.idea-open-pair p:not(.eyebrow-sm) { margin: 6px 0 0; font-size: 16px; color: #3D4452; }
.why-box { background: #FBEBC8; border-radius: 16px; padding: 18px 22px; }
.why-box p:not(.eyebrow-sm) { margin: 6px 0 0; font-size: 17px; color: #14161A; }
.idea-open-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Live race */
.race-row { display: flex; justify-content: space-between; gap: 12px; font-weight: 800; font-size: 18px; }
.proof-card { display: flex; gap: 16px; align-items: center; background: #FFFFFF; color: #14161A; border-radius: 18px; padding: 12px; border: 3px solid #FFFFFF; animation: none; }
.proof-card.is-new { border-color: #E3A73B; animation: pop 0.45s ease; }
@keyframes pop { from { transform: translateY(-8px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .proof-card.is-new { animation: none; } .bar > div { transition: none; } }
.proof-card img { width: 112px; height: 84px; object-fit: cover; border-radius: 12px; flex: none; display: block; }
.proof-body { min-width: 0; flex: 1; }
.proof-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.proof-who { font-weight: 800; font-size: 16px; }
.proof-ago { font-size: 13px; color: #5A6372; white-space: nowrap; }
.proof-body p { margin: 4px 0 0; font-size: 15px; color: #3D4452; }
.proof-pill { margin-top: 6px; display: inline-block; font-weight: 800; font-size: 14px; padding: 3px 10px; border-radius: 999px; }
.proof-pill.eng { background: #FBEBC8; color: #6B4600; }
.proof-pill.sales { background: #E7F1FB; color: #1A3D6E; }

/* Draft banner (Terms/Privacy) */
.draft-banner { background: #FBEBC8; color: #6B4600; font-weight: 700; padding: 12px 16px; text-align: center; font-size: 15px; }

/* ---------- Phone and small-tablet adjustments ---------- */
@media (max-width: 760px) {
  header nav a:not(:last-child) { display: none !important; }
  header > div { padding: 14px 16px !important; }
  section { padding-left: 16px !important; padding-right: 16px !important; }
  section[style*="padding: 112px"] { padding-top: 64px !important; padding-bottom: 64px !important; }
  #top { padding-top: 40px !important; padding-bottom: 64px !important; }
  #top p[style*="font-size: 21px"] { font-size: 18px !important; }
  [style*="flex: 1 1 520px"], [style*="flex: 1 1 560px"], [style*="flex: 1 1 480px"], [style*="flex: 1.4 1 480px"],
  [style*="flex: 1 1 440px"], [style*="flex: 1 1 420px"], [style*="flex: 1 1 400px"], [style*="flex: 1 1 380px"],
  [style*="flex: 1.4 1 440px"], [style*="flex: 1 1 340px"], [style*="flex: 1 1 320px"] { flex-basis: 100% !important; }
  [style*="gap: 64px"] { gap: 40px !important; }
  [style*="padding: 36px"], [style*="padding: 40px"] { padding: 24px !important; }
  .idea-open-main { padding: 24px; }
  .idea-open-head h3 { font-size: 26px; }
  .proof-card img { width: 84px; height: 68px; }
  .race-row { font-size: 16px; }
  form[name="pilot"] { padding: 24px !important; }
  #founder img { box-shadow: 12px 12px 0 #E3A73B !important; width: calc(100% - 12px) !important; }
  [style*="font-size: 52px"] { font-size: 44px !important; }
  [style*="font-size: 56px"] { font-size: 46px !important; }
  footer > div { flex-direction: column; align-items: flex-start !important; }
  section[aria-label="Ways to compete"] > div { flex-direction: column; align-items: center; gap: 2px !important; font-size: 17px !important; }
  section[aria-label="Ways to compete"] span[aria-hidden] { display: none; }
  #rivals [style*="flex: 1 1 160px"] { flex: 0 1 120px !important; padding: 12px !important; }
  #rivals [style*="flex: 1 1 160px"] span:first-child { font-size: 12px !important; }
  #rivals [style*="font-size: 40px"] { font-size: 28px !important; }
  #rivals [style*="gap: 20px"] { gap: 12px !important; flex-wrap: nowrap !important; }
}

/* Legal pages */
.legal h1 { font-family: 'Archivo', sans-serif; font-stretch: 112%; font-weight: 850; font-size: clamp(32px, 4vw, 44px); color: #1A3D6E; margin: 0 0 16px; line-height: 1.05; }
.legal h2 { font-family: 'Archivo', sans-serif; font-stretch: 108%; font-weight: 800; font-size: 22px; color: #1A3D6E; margin: 36px 0 8px; }
.legal p, .legal li { font-size: 17px; line-height: 1.65; color: #2A2F38; }
.legal ul { padding-left: 22px; }
@media (max-width: 760px) { .legal { padding: 24px !important; } main { padding-left: 16px !important; padding-right: 16px !important; } }
@media (max-width: 760px) {
  #chips { flex-wrap: nowrap !important; overflow-x: auto; padding-bottom: 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: thin; }
  #chips button { flex: none; }
}

/* "See it in the app" step panel */
#step-panel { scroll-margin-top: 16px; }
.step-panel { margin-top: 28px; background: #FFFFFF; border: 2.5px solid #E3A73B; border-radius: 24px; padding: 28px; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; box-shadow: 0 20px 40px rgba(26,61,110,0.15); }
.step-panel-text { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.step-panel-text h3 { margin: 0; font-family: 'Archivo', sans-serif; font-stretch: 110%; font-weight: 850; font-size: 30px; line-height: 1.08; color: #1A3D6E; outline: none; }
.step-panel-text p:not(.eyebrow-sm) { margin: 0; font-size: 18px; color: #3D4452; }
.step-panel-img { flex: 2 1 480px; min-width: 0; background: #F4F6FA; border-radius: 16px; padding: 16px; display: flex; justify-content: center; }
.step-panel-img img { max-width: 100%; max-height: 760px; object-fit: contain; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,0.12); display: block; }
@media (max-width: 760px) { .step-panel { padding: 18px; } .step-panel-img { flex-basis: 100%; padding: 8px; } .step-panel-img img { max-height: 70vh; } }
