/* Liquid PureScript — Swiss/International Typographic Style.
   Light, gridded, type-led. Palette shared with the signal-box flagship
   so the verification family reads as one house. */

:root {
  --paper:    #fbfbf9;
  --ink:      #1f1f1d;
  --muted:    #8a8a84;
  --hairline: #e3e3df;
  --panel:    #f1f1ed;
  --safe:     #2e7d32;
  --unsafe:   #d64545;
  --unknown:  #a9791f;
  --maxw:     1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

code, pre, .mono {
  font-family: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--hairline); }
a:hover { border-color: var(--ink); }

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.6rem 2rem 4rem;
}

/* ── Masthead ─────────────────────────────────────────────── */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.7rem;
  margin-bottom: 0;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wordmark {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: none;
}
.wordmark:hover { border: none; }
.wordmark .lpsq { color: var(--muted); }

.masthead .colophon {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Page navigation banner ───────────────────────────────── */

.page-nav {
  display: flex;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 2.6rem;
  flex-wrap: wrap;
}
.page-nav a,
.page-nav span {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.7rem 1.3rem 0.7rem 0;
  margin-right: 1.3rem;
  color: var(--muted);
  border: none;
}
.page-nav a:hover { color: var(--ink); border: none; }
.page-nav .current { color: var(--ink); font-weight: 700; }
.page-nav .repo { margin-left: auto; margin-right: 0; }

/* ── Headings & type scale ────────────────────────────────── */

.kicker {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

h1.title {
  font-size: 2.7rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  max-width: 15em;
}

.lede {
  font-size: 1.22rem;
  line-height: 1.5;
  max-width: 34em;
  margin: 0 0 2.4rem;
}
.lede .muted { color: var(--muted); }

section { margin: 0 0 3rem; }

h2 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-top: 1px solid var(--hairline);
  padding-top: 0.7rem;
  margin: 0 0 1.1rem;
}
h2 .idx { color: var(--muted); margin-right: 0.9rem; font-variant-numeric: tabular-nums; }

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.8rem 0 0.5rem;
}

p { max-width: 40em; }
p.wide { max-width: 46em; }
.muted { color: var(--muted); }
.caption { color: var(--muted); font-size: 0.85rem; max-width: 40em; }

/* ── Code & spec blocks ───────────────────────────────────── */

pre {
  background: var(--panel);
  border-left: 3px solid var(--ink);
  padding: 1rem 1.2rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 0.4rem 0 0;
}
pre code { font-size: inherit; }
p code, li code, td code {
  background: var(--panel);
  padding: 0.05em 0.35em;
  font-size: 0.86em;
  border-radius: 2px;
}

.filetag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

/* two-up code / spec */
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin: 0.6rem 0 0;
}
.pair pre { margin-top: 0.35rem; }

/* verdict console */
.console {
  background: var(--ink);
  color: #ecece7;
  border-left: 3px solid var(--ink);
  padding: 1rem 1.2rem;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
  margin: 1rem 0 0;
  white-space: pre;
}
.console .ok   { color: #7fce83; }
.console .bad  { color: #f08a8a; }
.console .unk  { color: #e0b877; }
.console .dim  { color: #9a9a94; }
.console .prompt { color: #9a9a94; }

/* ── Verdict badges ───────────────────────────────────────── */

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15em 0.55em;
  border: 1px solid currentColor;
  border-radius: 2px;
  vertical-align: middle;
  white-space: nowrap;
}
.badge.safe    { color: var(--safe); }
.badge.unsafe  { color: var(--unsafe); }
.badge.unknown { color: var(--unknown); }

/* ── Stat strip ───────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--hairline);
  padding: 1.2rem 0;
  margin: 0 0 3rem;
}
.stat .n {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat .n.green { color: var(--safe); }
.stat .n.red   { color: var(--unsafe); }
.stat .l {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ── Pipeline diagram ─────────────────────────────────────── */

.pipeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.6rem;
  align-items: stretch;
  margin: 1.4rem 0 0.6rem;
}
.node {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 0.7rem 0.9rem;
  font-size: 0.82rem;
}
.node .nm { font-weight: 700; display: block; }
.node .ds { color: var(--muted); font-size: 0.76rem; display: block; margin-top: 0.15rem; }
.node.input { background: var(--panel); border-style: dashed; }
.node.solver { background: var(--ink); color: var(--paper); }
.node.solver .ds { color: #c9c9c4; }
.node.span2 { grid-column: 1 / 3; }
.flowlabel {
  grid-column: 1 / 3;
  text-align: center;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0.1rem 0;
}

/* ── Grammar table ────────────────────────────────────────── */

.grammar {
  border-collapse: collapse;
  width: 100%;
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
}
.grammar td {
  border-bottom: 1px solid var(--hairline);
  padding: 0.55rem 1rem 0.55rem 0;
  vertical-align: top;
}
.grammar td.lhs { font-weight: 700; white-space: nowrap; width: 8rem; }
.grammar td.rhs code { background: none; padding: 0; }

/* ── Verdict listing (golden table) ───────────────────────── */

.module-block { margin: 0 0 2.2rem; }
.module-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.4rem;
  margin-bottom: 0.3rem;
}
.module-head h3 { margin: 0; font-size: 1.15rem; }
.module-head .file { color: var(--muted); font-size: 0.8rem; }

.verdicts { border-collapse: collapse; width: 100%; }
.verdicts tr { border-bottom: 1px solid var(--hairline); }
.verdicts td { padding: 0.5rem 1rem 0.5rem 0; vertical-align: top; }
.verdicts td.fn { font-weight: 700; width: 11rem; white-space: nowrap; }
.verdicts td.fn code { background: none; padding: 0; }
.verdicts td.vb { width: 7rem; }
.verdicts td.note { color: var(--muted); font-size: 0.86rem; }
.verdicts td.note .cx {
  color: var(--unsafe);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.82rem;
}

/* ── Roadmap phases ───────────────────────────────────────── */

.phase {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.4rem;
  border-top: 1px solid var(--hairline);
  padding: 1.2rem 0;
}
.phase .ph-id { }
.phase .ph-id .tag {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.phase .ph-id .st {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.12em 0.5em;
  border: 1px solid currentColor;
  border-radius: 2px;
}
.st.done  { color: var(--safe); }
.st.now   { color: var(--ink); }
.st.next  { color: var(--unknown); }
.st.open  { color: var(--muted); }
.phase h3 { margin-top: 0; }

/* ── Callout / honesty notes ──────────────────────────────── */

.note-box {
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--unknown);
  background: var(--paper);
  padding: 0.9rem 1.1rem;
  margin: 1.2rem 0 0;
  font-size: 0.9rem;
  max-width: 46em;
}
.note-box strong { letter-spacing: 0.02em; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* ── Footer ───────────────────────────────────────────────── */

footer {
  border-top: 2px solid var(--ink);
  margin-top: 3.5rem;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 720px) {
  h1.title { font-size: 2rem; }
  .pair, .pipeline, .stats, .two-col { grid-template-columns: 1fr; }
  .stats { gap: 1.1rem; }
  .node.span2 { grid-column: auto; }
  .flowlabel { grid-column: auto; }
  .phase { grid-template-columns: 1fr; gap: 0.5rem; }
  .verdicts td.fn { width: auto; }
}
