/* ============================================================
   PrizePilot — visual identity
   Direction: calm academic-clinical. Ink navy + viridian brand,
   coral used ONLY as a deadline-urgency signal (never decoration).
   Display: Space Grotesk · Body: Inter · Data: Space Mono
   ============================================================ */

:root {
  --ink:      #0F1E33;   /* primary text, deep navy */
  --ink-2:    #4A5B6E;   /* secondary text */
  --ink-3:    #7E8C9A;   /* tertiary / captions */
  --paper:    #F5F6F4;   /* page background, cool paper */
  --card:     #FFFFFF;
  --line:     #E4E5DF;   /* hairline borders */
  --line-2:   #EEEFEA;

  --teal:     #0E8C7F;   /* brand accent (clinical/growth) */
  --teal-2:   #12B3A0;   /* brighter, for gradients/hover */
  --teal-ink: #0A5F57;   /* teal text on light */
  --teal-wash:#E7F3F1;

  /* Functional urgency signals — semantic, not brand */
  --closing:  #E4572E;   /* <= 7 days */
  --soon:     #C98A00;   /* <= 21 days */
  --upcoming: #2F6FB0;   /* <= 60 days */
  --later:    #6B7A88;   /* > 60 days */
  --opens:    #0E8C7F;

  --radius:   14px;
  --radius-sm:9px;
  --shadow:   0 1px 2px rgba(15,30,51,.05), 0 6px 20px rgba(15,30,51,.06);
  --shadow-lg:0 20px 50px rgba(15,30,51,.12);
  --maxw:     1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 .4em;
  font-weight: 600;
}

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

.mono { font-family: "Space Mono", ui-monospace, monospace; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 560px; }

/* ---------- Nav ---------- */
.nav {
  border-bottom: 1px solid var(--line);
  background: rgba(245,246,244,.85);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.nav-in {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 22px;
  display: flex; align-items: center; gap: 20px;
}
.brand {
  font-family: "Space Grotesk", sans-serif; font-weight: 700;
  font-size: 20px; letter-spacing: -0.03em; color: var(--ink);
  display: inline-flex; align-items: center; gap: 9px;
}
.brand:hover { text-decoration: none; }
.brand .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--teal), var(--teal-2), var(--teal));
  box-shadow: 0 0 0 3px var(--teal-wash);
}
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-links a {
  color: var(--ink-2); padding: 7px 12px; border-radius: 8px; font-size: 14.5px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--ink); background: var(--line-2); text-decoration: none; }
.nav-links a.active { color: var(--teal-ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: "Inter", sans-serif; font-weight: 600; font-size: 15px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-ink); text-decoration: none; box-shadow: var(--shadow); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--line-2); text-decoration: none; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1a2f4a; text-decoration: none; }
.btn-sm { padding: 8px 13px; font-size: 13.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-danger { background: #fff; color: var(--closing); border-color: #F3D2C6; }
.btn-danger:hover { background: #FDEDE7; text-decoration: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-p { padding: 22px; }
.grid { display: grid; gap: 18px; }

/* ---------- Pills / tags ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: "Space Mono", monospace; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-closing  { color: var(--closing);  background: #FCEAE3; }
.pill-soon     { color: var(--soon);     background: #FBF1D8; }
.pill-upcoming { color: var(--upcoming); background: #E7F0F9; }
.pill-later    { color: var(--later);    background: #EEF1F3; }
.pill-opens    { color: var(--opens);    background: var(--teal-wash); }

.chip {
  display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 500;
  padding: 4px 10px; border-radius: 999px; background: var(--teal-wash);
  color: var(--teal-ink); border: 1px solid #D3E7E3;
}
.chip-muted { background: var(--line-2); color: var(--ink-2); border-color: var(--line); }

.tier-badge {
  font-family: "Space Mono", monospace; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px;
  border-radius: 6px; background: var(--ink); color: #fff;
}

/* ---------- Score bar (signature element) ---------- */
.score {
  display: flex; align-items: center; gap: 10px;
}
.score-num {
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 22px;
  color: var(--ink); line-height: 1; min-width: 62px;
}
.score-num small { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.score-track {
  flex: 1; height: 9px; background: var(--line-2); border-radius: 999px; overflow: hidden;
}
.score-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
}
.subscores { margin-top: 14px; display: grid; gap: 7px; }
.subscore { display: grid; grid-template-columns: 120px 1fr 34px; align-items: center; gap: 10px; }
.subscore .lbl { font-family: "Space Mono", monospace; font-size: 11px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .03em; }
.subscore .mini { height: 5px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.subscore .mini > span { display: block; height: 100%; background: var(--teal); border-radius: 999px; }
.subscore .val { font-family: "Space Mono", monospace; font-size: 11.5px; color: var(--ink-2); text-align: right; }

/* ---------- Match card ---------- */
.match {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); transition: box-shadow .15s ease, transform .1s ease;
}
.match:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.match-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.match-title { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 18px; color: var(--ink); }
.match-title a { color: inherit; }
.match-provider { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.match-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.meta-data { font-family: "Space Mono", monospace; font-size: 12px; color: var(--ink-2); }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ---------- Hero ---------- */
.hero { padding: 62px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow {
  font-family: "Space Mono", monospace; font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--teal-ink);
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 700; }
.hero .lede { font-size: 18.5px; color: var(--ink-2); margin: 18px 0 26px; max-width: 30em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 26px; margin-top: 34px; }
.stat .n { font-family: "Space Grotesk", sans-serif; font-size: 26px; font-weight: 700; color: var(--ink); }
.stat .l { font-size: 13px; color: var(--ink-3); }

/* ---------- Sections ---------- */
.section { padding: 46px 0; }
.section-head { max-width: 42em; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(24px, 3.5vw, 34px); }
.section-head p { color: var(--ink-2); font-size: 16.5px; }
.kicker { font-family: "Space Mono", monospace; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--teal-ink); margin-bottom: 10px; }

.feature-grid { grid-template-columns: repeat(3, 1fr); }
.feature h3 { font-size: 18px; }
.feature p { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.feature .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--teal-wash);
  display: grid; place-items: center; margin-bottom: 12px; color: var(--teal-ink); font-weight: 700;
  font-family: "Space Mono", monospace; }

/* ---------- Steps ---------- */
.steps { grid-template-columns: repeat(4, 1fr); }
.step .no { font-family: "Space Mono", monospace; color: var(--teal-ink); font-weight: 700; font-size: 13px; }
.step h3 { font-size: 16.5px; margin-top: 6px; }
.step p { color: var(--ink-2); font-size: 14px; margin: 0; }

/* ---------- Pricing ---------- */
.price-grid { grid-template-columns: repeat(3, 1fr); align-items: start; }
.price { padding: 26px 24px; }
.price.featured { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal), var(--shadow-lg); }
.price .tname { font-family: "Space Mono", monospace; text-transform: uppercase; letter-spacing: .08em;
  font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.price .amt { font-family: "Space Grotesk", sans-serif; font-size: 40px; font-weight: 700; margin: 8px 0 2px; }
.price .amt span { font-size: 15px; color: var(--ink-3); font-weight: 500; }
.price ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 9px; }
.price li { font-size: 14.5px; color: var(--ink-2); padding-left: 24px; position: relative; }
.price li::before { content: "→"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 15px; color: var(--ink); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-wash); }
textarea { resize: vertical; min-height: 120px; }

.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex; align-items: center; cursor: pointer;
  padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13.5px; color: var(--ink-2); background: #fff; user-select: none;
  transition: all .12s ease;
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check:has(input:checked) { background: var(--teal-wash); border-color: var(--teal); color: var(--teal-ink); font-weight: 600; }
.check:hover { border-color: var(--teal); }

.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-card { flex: 1; min-width: 150px; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card .inner { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; height: 100%; transition: all .12s; }
.radio-card:has(input:checked) .inner { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-wash); }
.radio-card .rt { font-weight: 600; font-size: 14.5px; }
.radio-card .rd { font-size: 13px; color: var(--ink-3); }

/* ---------- Alerts / notices ---------- */
.notice { padding: 12px 15px; border-radius: 10px; font-size: 14.5px; margin-bottom: 18px; }
.notice-err { background: #FCEAE3; color: #A23217; border: 1px solid #F3D2C6; }
.notice-ok { background: var(--teal-wash); color: var(--teal-ink); border: 1px solid #D3E7E3; }
.notice-info { background: #EEF1F3; color: var(--ink-2); border: 1px solid var(--line); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-family: "Space Mono", monospace; font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line-2); font-size: 14.5px; vertical-align: top; }

/* ---------- Layout bits ---------- */
.page { padding: 34px 0 60px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; margin: 0; }
.page-head p { color: var(--ink-2); margin: 4px 0 0; }
.bucket { margin-bottom: 26px; }
.bucket-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bucket-head .label { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 15px; }
.bucket-head .count { font-family: "Space Mono", monospace; font-size: 12px; color: var(--ink-3); }
.stack { display: grid; gap: 12px; }
.muted { color: var(--ink-3); }
.small { font-size: 13.5px; }
.strip { display: flex; gap: 14px; flex-wrap: wrap; }
.strip .card-p { flex: 1; min-width: 160px; }
.big-num { font-family: "Space Grotesk", sans-serif; font-size: 30px; font-weight: 700; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; flex-wrap: wrap; }
.seg a { padding: 8px 14px; font-size: 13.5px; color: var(--ink-2); border-right: 1px solid var(--line); font-weight: 500; }
.seg a:last-child { border-right: none; }
.seg a:hover { background: var(--line-2); text-decoration: none; }
.seg a.on { background: var(--ink); color: #fff; }

.divider { height: 1px; background: var(--line); margin: 26px 0; border: none; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--ink-3); font-size: 13.5px; margin-top: 40px; }
.footer-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.disclaimer { background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; font-size: 13px; color: var(--ink-2); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .feature-grid, .steps, .price-grid { grid-template-columns: 1fr; }
  .subscore { grid-template-columns: 96px 1fr 34px; }
  .nav-links a.hide-sm { display: none; }
}

/* ---------- Landscape / wide displays ----------
   Defaults are single-column and content-first. Landscape and desktop viewports
   have horizontal room going spare, so cards flow into columns and the shell
   widens — rather than stranding a 1080px ribbon in a 1600px screen. */

@media (min-width: 1200px) { :root { --maxw: 1240px; } }
@media (min-width: 1600px) { :root { --maxw: 1380px; } }

/* Card collections that should column-up when there's width for it. Use .cards
   (not .stack) for anything that still reads well side-by-side. */
.cards { display: grid; gap: 14px; align-items: start; }
@media (min-width: 900px)  { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Give the hero's prize panel a little more room once there's space for it. */
@media (min-width: 1200px) { .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; } }

/* Short landscape viewports (laptops, tablets held sideways, projectors): claw
   back vertical padding so the primary action stays above the fold. */
@media (orientation: landscape) and (max-height: 760px) {
  .hero { padding: 30px 0 26px; }
  .hero-stats { margin-top: 20px; }
  .section { padding: 30px 0; }
  .page { padding: 22px 0 40px; }
  .nav-in { padding-top: 10px; padding-bottom: 10px; }
}

/* ---------- Landing: plan teaser, callout, review steps ---------- */
.trio { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.highlight { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal), var(--shadow-lg); }
.plan-name { font-family: "Space Mono", monospace; text-transform: uppercase; letter-spacing: .07em;
  font-size: 12px; color: var(--ink-3); font-weight: 700; }
.plan-price { font-family: "Space Grotesk", sans-serif; font-size: 30px; font-weight: 700; margin: 4px 0 2px; }
.plan-price span { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.plan-tag { font-size: 14.5px; color: var(--teal-ink); font-weight: 600; margin-bottom: 12px; }
.plan ul { list-style: none; padding: 0; margin: 6px 0 20px; display: grid; gap: 9px; }
.plan li { font-size: 14.5px; color: var(--ink-2); padding-left: 22px; position: relative; }
.plan li::before { content: "→"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.plan .btn { margin-top: auto; }
.ribbon { display: inline-block; background: var(--teal); color: #fff; font-family: "Space Mono", monospace;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
.callout { background: var(--teal-wash); border: 1px solid #D3E7E3; border-radius: var(--radius); padding: 30px 28px; }
.callout h2 { margin: 0 0 8px; }
.callout p { color: var(--ink-2); margin: 0; font-size: 16.5px; max-width: 46em; }
.center { text-align: center; }
.center .section-head { margin-left: auto; margin-right: auto; }
@media (max-width: 860px) { .trio { grid-template-columns: 1fr; } }

/* ---------- A11y ---------- */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
