/* ============================================================================
   tracker-project.css, the /tracker/{slug} land trackers.
   The signature object is the notice of work stapled to every construction
   fence, filled in for this project. Each line is a real field, the punched row
   is the project's stage, and the red stamp is its current status. The notice is
   a physical paper object, so it keeps its own colors in either scheme. Site
   tokens are aliased with fallbacks.
   ========================================================================== */

.tp {
  --tp-ink: var(--ink, oklch(93% 0.03 84));
  --tp-soft: var(--ink-soft, oklch(83% 0.03 84));
  --tp-muted: var(--muted, oklch(72% 0.032 84));
  --tp-hair: var(--hair, oklch(37% 0.05 278));
  --tp-gold: var(--gold, oklch(84% 0.13 86));
  --tp-display: var(--display, "Bricolage Grotesque", system-ui, sans-serif);
  --tp-label: var(--label, "Hanken Grotesk", system-ui, sans-serif);
  /* the notice itself */
  --tp-paper: oklch(95.5% 0.022 88);
  --tp-paper-ink: oklch(24% 0.03 60);
  --tp-paper-soft: oklch(42% 0.03 60);
  --tp-paper-rule: oklch(40% 0.03 60 / 0.22);
  --tp-band: oklch(74% 0.16 62);      /* safety orange */
  --tp-stamp: oklch(52% 0.19 25);     /* rubber-stamp red */
  overflow-x: clip;
}

/* ------------------------------------------------------------ the answer */
.tp-head { margin-bottom: var(--space-xl, 32px); }
.tp-answer {
  font-size: 18px; line-height: 1.6; color: var(--tp-soft);
  max-width: 62ch; margin: 0; text-wrap: pretty;
}

/* ------------------------------------------------------------ the notice */
.tp-notice {
  position: relative;
  background: var(--tp-paper);
  color: var(--tp-paper-ink);
  border-radius: 3px;
  box-shadow: 0 1px 0 oklch(100% 0 0 / 0.5) inset, 0 18px 40px -18px oklch(5% 0.02 280 / 0.75);
  margin: 0 0 var(--space-2xl, 48px);
  padding: 0 0 var(--space-lg, 24px);
}
/* two staples holding it to the fence */
.tp-notice::before, .tp-notice::after {
  content: ""; position: absolute; top: 9px; width: 22px; height: 4px;
  border-radius: 1px; background: oklch(70% 0.01 260);
  box-shadow: 0 1px 0 oklch(30% 0.01 260 / 0.6);
  z-index: 1;
}
.tp-notice::before { left: 18px; }
.tp-notice::after { right: 18px; }

.tp-notice-band {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  background: var(--tp-band);
  color: oklch(18% 0.03 50);
  padding: 22px var(--space-lg, 24px) 12px;
  border-radius: 3px 3px 0 0;
}
.tp-notice-band h2 {
  font-family: var(--tp-display); font-weight: 800;
  font-size: clamp(22px, 5vw, 30px); line-height: 1; margin: 0;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.tp-notice-band span {
  font-family: var(--tp-label); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; text-align: right;
}

.tp-fields { margin: 0; padding: 6px var(--space-lg, 24px) 0; }
.tp-fields > div {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: 4px 16px;
  padding: 11px 0; border-bottom: 1px solid var(--tp-paper-rule);
}
.tp-fields dt {
  font-family: var(--tp-label); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--tp-paper-soft);
  padding-top: 3px;
}
.tp-fields dd {
  margin: 0; font-family: var(--tp-label); font-size: 17px; font-weight: 600;
  line-height: 1.4; color: var(--tp-paper-ink);
}

.tp-stage { position: relative; padding: 16px var(--space-lg, 24px) 0; }
.tp-stage-label {
  font-family: var(--tp-label); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--tp-paper-soft);
  margin: 0 0 8px;
}
.tp-stages {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
}
.tp-stages li {
  position: relative;
  font-family: var(--tp-label); font-size: 11.5px; font-weight: 600; line-height: 1.25;
  color: var(--tp-paper-soft);
  border: 1.5px dashed var(--tp-paper-rule);
  border-radius: 3px; padding: 26px 6px 8px; text-align: center;
}
/* the punch hole on each step */
.tp-stages li::before {
  content: ""; position: absolute; top: 8px; left: 50%; translate: -50% 0;
  width: 11px; height: 11px; border-radius: 50%;
  border: 1.5px solid var(--tp-paper-soft);
}
.tp-stages li.is-past { border-style: solid; border-color: var(--tp-paper-rule); color: var(--tp-paper-ink); }
.tp-stages li.is-past::before { background: var(--tp-paper-ink); border-color: var(--tp-paper-ink); }
.tp-stages li.is-now {
  border: 2px solid var(--tp-stamp); color: var(--tp-paper-ink); font-weight: 800;
}
.tp-stages li.is-now::before { background: var(--tp-stamp); border-color: var(--tp-stamp); box-shadow: 0 0 0 3px oklch(52% 0.19 25 / 0.18); }

.tp-stamp {
  position: absolute; right: var(--space-lg, 24px); top: 4px;
  font-family: var(--tp-display); font-weight: 800; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--tp-stamp); border: 2.5px solid var(--tp-stamp); border-radius: 4px;
  padding: 3px 9px; rotate: -6deg; opacity: 0.88;
  pointer-events: none; white-space: nowrap;
}

/* ------------------------------------------------------------ sections */
.tp-h2 {
  font-family: var(--tp-display); font-size: clamp(24px, 4vw, 30px);
  line-height: 1.1; margin: 0 0 var(--space-md, 16px); color: var(--tp-ink);
}
.tp-coming, .tp-trail, .tp-faq, .tp-plan, .tp-sources { margin: 0 0 var(--space-2xl, 48px); }

.tp-list { list-style: none; margin: 0; padding: 0; counter-reset: tp; }
.tp-list li {
  counter-increment: tp;
  display: grid; grid-template-columns: 2.25rem 1fr; gap: 2px 12px;
  padding: 14px 0; border-top: 1px solid var(--tp-hair);
}
.tp-list li:last-child { border-bottom: 1px solid var(--tp-hair); }
.tp-list li::before {
  content: counter(tp, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--tp-display); font-weight: 800; font-size: 20px; color: var(--tp-gold);
}
.tp-list strong { font-size: 18px; color: var(--tp-ink); }
.tp-list span { font-size: 15.5px; line-height: 1.5; color: var(--tp-soft); }

.tp-trail .trail-meeting-head { font-size: 13px; }
.tp-trail .trail-empty { text-align: left; padding: 0; }

.tp-faq h3 { font-family: var(--tp-label); font-size: 18px; font-weight: 700; margin: 20px 0 6px; color: var(--tp-ink); }
.tp-faq p { font-size: 16.5px; line-height: 1.6; color: var(--tp-soft); margin: 0; max-width: 64ch; }

.tp-plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tp-plan :where(a) {
  display: inline-block; padding: 10px 14px; border: 1px solid var(--tp-hair); border-radius: 999px;
  color: var(--tp-ink); text-decoration: none; font-family: var(--tp-label); font-weight: 600; font-size: 15px;
}
.tp-plan :where(a):hover, .tp-plan :where(a):focus-visible { border-color: var(--tp-gold); color: var(--tp-gold); }

.tp-sources ul { margin: 0; padding-left: 1.1em; }
.tp-sources li { font-size: 14.5px; line-height: 1.6; color: var(--tp-muted); }

/* ------------------------------------------------------------ small screens */
@media (max-width: 560px) {
  .tp-notice-band { flex-direction: column; align-items: flex-start; gap: 6px; }
  .tp-notice-band span { text-align: left; }
  .tp-fields > div { grid-template-columns: 1fr; }
  .tp-stages { grid-template-columns: repeat(3, 1fr); }
  .tp-stage { padding-top: 48px; }
  .tp-stamp { top: 10px; right: auto; left: var(--space-lg, 24px); rotate: -3deg; }
  .tp-stage-label { position: absolute; top: 18px; right: var(--space-lg, 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .tp-plan :where(a) { transition: none; }
}
