:root {
  --ink: #0B2347;
  --ink-soft: #2C4166;
  --brand: #00367E;
  --brand-hover: #0054A2;
  --orange: #F64800;
  --paper: #FBFBF8;
  --mist: #F1F1EB;
  --tag: #F68A00;
  --tag-soft: #FFE9CC;
  --match: #2E7D1E;
  --slate: #5B6676;
  --line: #E2E2DA;
  --danger: #B3261E;
  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--orange); text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--tag); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; }
h2 { font-size: 1.6rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(620px, 100% - 2.5rem); }
.muted { color: var(--slate); }
.inline { display: inline; margin: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--tag); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 84px; }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 62px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 1.25rem; font-weight: 500; white-space: nowrap; }
.nav-links a { text-decoration: none; }
.nav-links a[aria-current] { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 3px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1rem/1 var(--body); padding: .85rem 1.3rem; border-radius: 6px;
  background: var(--brand); color: #fff; border: 2px solid var(--brand);
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--mist); border-color: var(--brand); }
.btn-small { padding: .55rem .9rem; font-size: .95rem; }
.nav-links .btn { color: var(--paper); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn.danger { color: var(--danger); }

/* hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); max-width: 15ch; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* the price rail: the one bold moment */
.rail-card {
  margin: 0; background: #fff; border: 2px solid var(--brand); border-radius: 10px;
  padding: 1.6rem 1.6rem 1.25rem; box-shadow: 8px 8px 0 var(--tag);
}
.rail-want { font: 800 1.45rem/1.15 var(--display); margin: 0; }
.rail-meta { color: var(--slate); margin: .2rem 0 0; }
.rail { position: relative; height: 64px; margin: 2.6rem 0 .4rem; border-bottom: 2px solid var(--ink); }
.rail-band {
  position: absolute; left: 32%; width: 20%; top: 0; bottom: -2px;
  background: var(--tag-soft); border-inline: 2px dashed var(--ink);
}
.band-tag {
  position: absolute; top: -1.85rem; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--tag); font: 700 .85rem/1 var(--body); padding: .35rem .6rem .35rem 1rem;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}
.dot {
  position: absolute; bottom: 10px; width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: #C9CCD2;
}
.dot.in { background: var(--slate); animation: hit .5s ease-out forwards; }
.dot.d1 { animation-delay: .9s; }
.dot.d2 { animation-delay: 1.5s; }
@keyframes hit {
  0% { transform: scale(1); }
  50% { transform: scale(1.7); background: var(--match); }
  100% { transform: scale(1.25); background: var(--match); box-shadow: 0 0 0 4px rgba(31,138,76,.18); }
}
.rail-scale { display: flex; justify-content: space-between; font-size: .85rem; color: var(--slate); }
.rail-hits { list-style: none; padding: 0; margin: 1.3rem 0 .9rem; }
.rail-hits li {
  display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0;
  border-top: 1px solid var(--line); opacity: 0; animation: show .4s ease-out forwards;
}
.rail-hits .h1 { animation-delay: 1.2s; }
.rail-hits .h2 { animation-delay: 1.8s; }
.rail-hits b { color: var(--match); }
@keyframes show { to { opacity: 1; } }
.rail-card figcaption { font-size: .85rem; color: var(--slate); }

/* steps */
.steps { padding: 4rem 0; background: var(--brand); color: #fff; }
.steps h2 { color: var(--paper); }
.step-list { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.step-list li { counter-increment: step; }
.step-list li::before {
  content: counter(step); display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem;
  background: var(--tag); color: var(--ink); font: 800 1.1rem/1 var(--display); border-radius: 50%; margin-bottom: 1rem;
}
.step-list h3 { color: var(--paper); }
.step-list p { color: #D3DDEC; max-width: 34ch; }

/* who */
.who { padding: 4.5rem 0; }
.who-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; }
.who-grid p { max-width: 44ch; color: var(--ink-soft); }
.facts { margin: 0; }
.facts div { padding: 1rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--ink-soft); }

/* forms */
.form-page { padding: 3rem 0 4rem; }
.form { display: grid; gap: 1.3rem; margin: 1.5rem 0; }
.form label { display: grid; gap: .4rem; font-weight: 600; }
.form small { font-weight: 400; color: var(--slate); font-size: .9rem; }
input:not([type=checkbox]), select {
  font: 400 1rem/1.4 var(--body); color: var(--ink); background: #fff;
  border: 1.5px solid #B9BEC6; border-radius: 6px; padding: .7rem .8rem; width: 100%;
}
input:focus, select:focus { border-color: var(--ink); outline: 3px solid var(--tag); outline-offset: 0; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .8rem; }
legend { font-weight: 600; margin-bottom: .6rem; padding: 0; }
.price-fields { grid-template-columns: 1fr 1fr; }
.price-fields label { font-weight: 500; }
.full { grid-column: 1 / -1; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label.check { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--ink); }
.is-soon { color: var(--slate); }
.bulk { background: var(--mist); padding: 1rem; border-radius: 8px; }
.bulk legend { float: left; width: 100%; margin-bottom: .2rem; }
.bulk label:not(.check) { font-weight: 500; }

.errors { border-left: 4px solid var(--danger); background: #FCEDEC; padding: .9rem 1rem; border-radius: 0 6px 6px 0; }
.errors p { margin: 0; font-weight: 600; }
.errors ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.flash { margin: 1.25rem 0 0; padding: .8rem 1rem; border-radius: 6px; background: var(--mist); }
.flash-success { background: #E6F4EC; border-left: 4px solid var(--match); }
.flash-info { border-left: 4px solid var(--slate); }
.notice { background: var(--tag-soft); padding: .8rem 1rem; border-radius: 6px; }
.warn-box { background: #FCEDEC; }
.warn { color: var(--danger); }

/* dashboard */
.page { padding: 2.5rem 0 4rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head h1 { margin-bottom: .3rem; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.crumb { margin: 0 0 .6rem; font-size: .95rem; }
.section-title { margin-top: 2.75rem; font-size: 1.3rem; }

.pricetag {
  display: inline-block; background: var(--tag); font-weight: 600; font-size: .9rem;
  padding: .25rem .65rem .25rem 1.05rem; margin: .15rem 0 .45rem;
  clip-path: polygon(9px 0, 100% 0, 100% 100%, 9px 100%, 0 50%);
}
.alert-list { list-style: none; padding: 0; margin: 0; border-top: 3px solid var(--orange); }
.alert-row { display: grid; grid-template-columns: 1fr auto auto; gap: 1.5rem; align-items: center; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.alert-title { font: 700 1.25rem/1.2 var(--display); text-decoration: none; display: block; margin-bottom: .25rem; }
.alert-meta { color: var(--ink-soft); margin: 0; font-size: .95rem; }
.alert-status { color: var(--slate); font-size: .88rem; margin: .2rem 0 0; }
.is-paused .alert-title, .is-paused .alert-meta { color: var(--slate); }
.is-paused .pricetag { background: var(--line); }
.match-count { text-decoration: none; color: var(--slate); text-align: right; white-space: nowrap; }
.match-count b { display: block; font: 800 1.6rem/1 var(--display); color: var(--ink); }

.empty { border: 2px dashed #C9CCD2; border-radius: 10px; padding: 2.5rem 1.5rem; text-align: center; }
.empty p { color: var(--ink-soft); max-width: 46ch; margin-inline: auto; }

.match-list { list-style: none; padding: 0; margin: 0; }
.match { display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.thumb { width: 72px; height: 72px; border-radius: 6px; background: var(--mist); display: grid; place-items: center; overflow: hidden; color: var(--slate); font-size: .8rem; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.match-title { font-weight: 600; text-decoration: none; }
.match-title:hover { text-decoration: underline; }
.match-meta { margin: .15rem 0 0; color: var(--slate); font-size: .9rem; }
.match-price { margin: 0; font: 800 1.2rem/1 var(--display); color: var(--match); }
.danger-zone { margin-top: 3rem; }

.prose { padding: 3rem 0 4rem; }
.prose h2 { font-size: 1.25rem; margin-top: 1.8rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; font-size: .9rem; color: var(--slate); }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-inner p { max-width: 60ch; margin: 0; }
.site-footer a { color: var(--slate); }

@media (max-width: 860px) {
  .hero-grid, .who-grid { grid-template-columns: 1fr; }
  .step-list { grid-template-columns: 1fr; gap: 1.75rem; }
}
@media (max-width: 560px) {
  .nav-links { gap: .8rem; font-size: .95rem; }
  .logo img { height: 42px; }
  .nav-links > a:not(.btn) { display: none; }
  .two, .price-fields { grid-template-columns: 1fr; }
  .alert-row { grid-template-columns: 1fr auto; }
  .alert-row form { grid-column: 1 / -1; }
  .match { grid-template-columns: 56px 1fr; }
  .thumb { width: 56px; height: 56px; }
  .match-price { grid-column: 2; }
  .facts div { grid-template-columns: 1fr; gap: .2rem; }
  .rail-card { box-shadow: 5px 5px 0 var(--tag); }
}
@media (prefers-reduced-motion: reduce) {
  .dot.in { animation: none; background: var(--match); transform: scale(1.25); }
  .rail-hits li { animation: none; opacity: 1; }
}
