/* rank.fast — instrumentation world. Cool paper, ink, three functional state colours. */

:root {
  --paper: #F2F4F3;
  --paper-deep: #E9ECEA;
  --ink: #14181C;
  --muted: #6B7A80;
  --ok: #1E6F5C;
  --pend: #C2762A;
  --fail: #A03A2B;
  --line: rgba(20, 24, 28, 0.14);
  --line-strong: rgba(20, 24, 28, 0.32);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 1px; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 76rem; margin: 0 auto; padding: 0 1.25rem; }
.page-narrow { max-width: 50rem; }

/* ---------- header ---------- */
.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-head .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 1.1rem; padding-bottom: 1.1rem; gap: 1.5rem; flex-wrap: wrap;
}
.wordmark {
  font-family: var(--display);
  font-stretch: 122%;
  font-weight: 740;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark .dot { color: var(--ok); }
.site-nav { display: flex; gap: 1.6rem; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 4.5rem 0 3.5rem; border-bottom: 1px solid var(--line); }
.hero h1 {
  font-family: var(--display);
  font-stretch: 118%;
  font-weight: 730;
  font-size: clamp(2.1rem, 5.4vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 21ch;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--ok); }
.hero .sub {
  margin-top: 1.4rem;
  max-width: 58ch;
  font-size: 1.15rem;
  color: var(--muted);
}
.hero .sub strong { color: var(--ink); font-weight: 600; }
.hero .actions { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-block;
  font-family: var(--body); font-weight: 600; font-size: 1rem;
  padding: 0.78rem 1.5rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: background 160ms ease-out, color 160ms ease-out;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #2A3138; border-color: #2A3138; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- section scaffolding ---------- */
section { padding: 4rem 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
h2 {
  font-family: var(--display);
  font-stretch: 116%;
  font-weight: 700;
  font-size: clamp(1.55rem, 3.2vw, 2.3rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 0.6rem;
  text-wrap: balance;
}
h3 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 680;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  margin: 2.2rem 0 0.5rem;
}
.lede { color: var(--muted); max-width: 62ch; margin-bottom: 2.2rem; }
.prose p { max-width: 68ch; margin: 0.9rem 0; }
.prose ul, .prose ol { max-width: 66ch; margin: 0.9rem 0 0.9rem 1.4rem; }
.prose li { margin: 0.35rem 0; }
.prose code, .u, .num {
  font-family: var(--mono);
  font-size: 0.92em;
}
.prose blockquote {
  border-left: 1px solid var(--line-strong);
  padding-left: 1.2rem; margin: 1.4rem 0; color: var(--muted);
  max-width: 62ch;
}

/* ---------- the crawl timeline (signature element) ---------- */
.timeline-block { background: var(--paper); }
.tl-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem;
}
.tl-meta .stamp { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.tl-meta .stamp .live { color: var(--pend); }

.timeline {
  border: 1px solid var(--line-strong);
  background: #FBFCFB;
  overflow-x: auto;
}
.tl-inner { min-width: 40rem; }
.tl-row {
  display: grid;
  grid-template-columns: minmax(11rem, 16rem) 1fr minmax(10rem, 12rem);
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--line);
}
.tl-row:first-child { border-top: 0; }
.tl-url { font-family: var(--mono); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-url .tl-sub { display: block; font-size: 0.68rem; color: var(--muted); margin-top: 0.15rem; }
.tl-track { position: relative; height: 1.4rem; }
.tl-track .rail {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--line-strong);
  transform-origin: left center;
}
.tl-mark {
  position: absolute; top: 50%;
  width: 9px; height: 9px;
  transform: translate(-50%, -50%);
}
.tl-mark.publish { background: var(--ink); }
.tl-mark.gscreq { background: transparent; border: 1.5px solid var(--muted); transform: translate(-50%, -50%) rotate(45deg); }
.tl-mark.submit { background: transparent; border: 1.5px solid var(--ink); border-radius: 50%; }
.tl-mark.crawl { background: var(--muted); border-radius: 50%; }
.tl-mark.index { background: var(--ok); }
.tl-now {
  position: absolute; top: 15%; bottom: 15%;
  width: 1px; background: var(--pend);
}
.tl-status { font-family: var(--mono); font-size: 0.78rem; text-align: right; white-space: nowrap; }
.tl-status.pending { color: var(--pend); }
.tl-status.ok { color: var(--ok); }
.tl-status.fail { color: var(--fail); }
.tl-axis {
  display: flex; justify-content: space-between;
  padding: 0.5rem 1.1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
}
.tl-legend {
  display: flex; gap: 1.6rem; flex-wrap: wrap;
  margin-top: 0.9rem;
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted);
}
.tl-legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.tl-legend i { width: 9px; height: 9px; display: inline-block; }
.tl-legend .l-publish { background: var(--ink); }
.tl-legend .l-gscreq { border: 1.5px solid var(--muted); transform: rotate(45deg); }
.tl-legend .l-submit { border: 1.5px solid var(--ink); border-radius: 50%; }
.tl-legend .l-crawl { background: var(--muted); border-radius: 50%; }
.tl-legend .l-index { background: var(--ok); }
.tl-legend .l-now { width: 1px; height: 11px; background: var(--pend); }

@media (prefers-reduced-motion: no-preference) {
  .tl-drawn .rail { animation: draw 900ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .tl-drawn .tl-mark, .tl-drawn .tl-now { animation: appear 400ms ease-out both; animation-delay: var(--d, 500ms); }
}
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

/* ---------- log feed ---------- */
.log {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.9;
  border: 1px solid var(--line);
  background: #FBFCFB;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  white-space: pre;
  color: var(--muted);
}
.log b { color: var(--ink); font-weight: 500; }
.log .ok { color: var(--ok); }
.log .pend { color: var(--pend); }

/* ---------- pipeline (how a URL moves) ---------- */
.pipeline { border: 1px solid var(--line-strong); background: #FBFCFB; }
.pipe-step {
  display: grid;
  grid-template-columns: minmax(9rem, 13rem) 1fr;
  gap: 1.5rem;
  padding: 1.5rem 1.4rem;
  border-top: 1px solid var(--line);
}
.pipe-step:first-child { border-top: 0; }
.pipe-step .state { font-family: var(--mono); font-size: 0.85rem; padding-top: 0.15rem; }
.pipe-step .state .arrow { color: var(--muted); }
.pipe-step h3 { margin: 0 0 0.3rem; }
.pipe-step p { color: var(--muted); max-width: 58ch; }
.pipe-step p strong { color: var(--ink); font-weight: 600; }
.state-ok { color: var(--ok); }
.state-pend { color: var(--pend); }
.state-fail { color: var(--fail); }

/* ---------- plain-terms table ---------- */
.terms { width: 100%; border-collapse: collapse; }
.terms th, .terms td {
  text-align: left; vertical-align: top;
  padding: 0.7rem 1.5rem 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}
.terms th { font-weight: 600; white-space: nowrap; width: 16rem; }
.terms td { max-width: 62ch; }
.page-narrow .terms th { width: 11rem; }
.terms td { color: var(--muted); }
.terms td strong { color: var(--ink); }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-foot .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }
.site-foot .mono { font-family: var(--mono); font-size: 0.78rem; }

/* ---------- blog ---------- */
.post-list { list-style: none; margin: 0; max-width: 68ch; }
.post-list li { border-bottom: 1px solid var(--line); padding: 1.4rem 0; }
.post-list time { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); display: block; margin-bottom: 0.3rem; }
.post-list a { font-family: var(--display); font-stretch: 112%; font-weight: 680; font-size: 1.25rem; letter-spacing: -0.01em; text-decoration: none; }
.post-list a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.post-list p { color: var(--muted); margin-top: 0.35rem; }

.post-head { padding: 3.5rem 0 0; }
.post-head time { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.post-head h1 {
  font-family: var(--display); font-stretch: 116%; font-weight: 720;
  font-size: clamp(1.8rem, 4.2vw, 3rem); line-height: 1.08;
  letter-spacing: -0.022em; margin: 0.5rem 0 0.8rem; max-width: 24ch; text-wrap: balance;
}
.post-head .tracked {
  font-family: var(--mono); font-size: 0.8rem; color: var(--pend);
  border: 1px solid var(--line-strong); display: inline-block; padding: 0.3rem 0.7rem; margin-top: 0.6rem;
}
article.prose { padding: 2rem 0 4rem; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .hero { padding: 3rem 0 2.5rem; }
  section { padding: 2.8rem 0; }
  .pipe-step { grid-template-columns: 1fr; gap: 0.4rem; }
  .site-nav { gap: 1.1rem; }
  .terms, .terms tbody, .terms tr, .terms th, .terms td { display: block; width: 100%; }
  .terms th { padding-bottom: 0.15rem; border-bottom: 0; }
  .terms td { padding-top: 0; }
}
