/* os.blockle.org — BlockleOS.
   Dark, technical, instrument-panel. No build step: plain CSS, one file.
   Semantic colour is load-bearing here: measured / spec / pending are three
   different kinds of claim and the page must never let them look alike. */

:root {
  --bg:        #07090c;
  --bg-2:      #0b0e13;
  --panel:     #10141b;
  --panel-2:   #141924;
  --line:      #1d2531;
  --line-2:    #2b3545;
  --ink:       #e9eef5;
  --ink-soft:  #b7c3d2;
  --muted:     #8b98a9;
  --accent:    #7aa2f7;
  --accent-2:  #a8c3ff;

  /* The three kinds of claim. */
  --measured:  #45d1a0;
  --spec:      #7aa2f7;
  --pending:   #e3b341;
  --nofit:     #ef8da3;

  --radius: 12px;
  --maxw: 1140px;
  --readw: 70ch;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
          Inter, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono",
          "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ── type ─────────────────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.021em;
  margin: 0;
  font-weight: 650;
  text-wrap: balance;
}
h1 { font-size: clamp(2.05rem, 5.2vw, 3.45rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.05rem); }
h3 { font-size: 1.14rem; }
h4 { font-size: 0.98rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

strong { color: #fff; font-weight: 650; }
em { color: var(--ink); }

code, .mono { font-family: var(--mono); font-size: 0.88em; font-variant-ligatures: none; }
p code, li code, td code, th code, dd code {
  background: rgba(122, 162, 247, 0.1);
  border: 1px solid rgba(122, 162, 247, 0.18);
  border-radius: 5px;
  padding: 0.08em 0.36em;
  color: var(--accent-2);
  white-space: nowrap;
}

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ── layout ───────────────────────────────────────────────────────────── */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.read { max-width: var(--readw); }
.section { padding: 58px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section > .wrap > h2 { margin-bottom: 14px; }
.section-lede { color: var(--ink-soft); max-width: var(--readw); font-size: 1.04rem; }

.kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

hr.rule { border: 0; border-top: 1px solid var(--line); margin: 44px 0; }

/* ── header ───────────────────────────────────────────────────────────── */

header.bar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 9, 12, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar .wrap {
  display: flex; align-items: center; gap: 20px;
  min-height: 60px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 650; font-size: 1.02rem; color: var(--ink);
  letter-spacing: -0.015em; flex: none;
}
.brand:hover { color: #fff; text-decoration: none; }
.brand svg { width: 22px; height: 22px; flex: none; }
.brand .os { color: var(--accent); }

.bar nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.bar nav::-webkit-scrollbar { display: none; }
.bar nav a {
  color: var(--ink-soft); font-size: 0.93rem; font-weight: 500;
  padding: 6px 11px; border-radius: 8px; white-space: nowrap;
}
.bar nav a:hover { color: #fff; background: var(--panel-2); text-decoration: none; }
.bar nav a[aria-current="page"] { color: #fff; background: var(--panel-2); }

@media (max-width: 640px) {
  .bar .wrap { flex-wrap: wrap; gap: 8px; padding-bottom: 8px; }
  .bar nav { margin-left: -4px; width: 100%; }
  html { scroll-padding-top: 120px; }
}

/* ── phase banner ─────────────────────────────────────────────────────── */

.phase-strip {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  padding: 9px 22px;
}
.phase-strip strong { color: var(--ink-soft); font-weight: 600; }

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero { padding: 72px 0 8px; }
.hero .wrap { max-width: 1000px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--mono);
  font-size: 0.73rem; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--accent-2);
  padding: 5px 12px;
  border: 1px solid rgba(122, 162, 247, 0.3);
  border-radius: 999px;
  background: rgba(122, 162, 247, 0.07);
}
.hero h1 { margin: 24px 0 20px; max-width: 24ch; }
.hero .lede {
  color: var(--ink-soft);
  font-size: clamp(1.06rem, 2.1vw, 1.26rem);
  line-height: 1.55;
  max-width: 62ch;
}
.hero .lede strong { color: #fff; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: inherit; font-size: 0.96rem; font-weight: 600;
  padding: 0.68em 1.2em; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #06101f; }
.btn-primary:hover { background: var(--accent-2); color: #06101f; }
.btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; }

/* ── receipts strip ───────────────────────────────────────────────────── */

.receipts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 46px 0 0;
}
.receipts > div { background: var(--panel); padding: 18px 20px; }
.receipts dt {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}
.receipts dd {
  margin: 0; font-size: 1.02rem; font-weight: 600; color: var(--ink);
  line-height: 1.3;
}
.receipts dd.ok { color: var(--measured); }
.receipts dd.pend { color: var(--pending); }
.receipts dd small { display: block; font-size: 0.78rem; font-weight: 400; color: var(--muted); margin-top: 4px; line-height: 1.4; }
@media (max-width: 860px) { .receipts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .receipts { grid-template-columns: 1fr; } }

/* ── cards ────────────────────────────────────────────────────────────── */

.cards { display: grid; gap: 16px; margin-top: 30px; }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.cards.c2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .cards.c3 { grid-template-columns: 1fr; } .cards.c2 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.card .n {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
  display: block;
}
.card h3 { margin-bottom: 9px; }
.card p { color: var(--ink-soft); font-size: 0.97rem; }

/* ── tables ───────────────────────────────────────────────────────────── */

.tscroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 26px 0;
  background: var(--panel);
}
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 560px; }
caption {
  caption-side: top; text-align: left; padding: 15px 18px 0;
  color: var(--muted); font-size: 0.85rem; line-height: 1.5;
}
thead th {
  text-align: left; font-weight: 600; font-size: 0.74rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  padding: 13px 16px; border-bottom: 1px solid var(--line-2);
  white-space: nowrap; vertical-align: bottom;
}
tbody td, tbody th {
  padding: 13px 16px; border-top: 1px solid var(--line);
  vertical-align: top; color: var(--ink-soft); text-align: left;
  font-weight: 400;
}
tbody tr:first-child td, tbody tr:first-child th { border-top: 0; }
tbody th { color: var(--ink); font-weight: 600; }
tbody tr:hover td, tbody tr:hover th { background: rgba(122, 162, 247, 0.035); }
td .sub, th .sub { display: block; color: var(--muted); font-size: 0.86em; font-weight: 400; margin-top: 3px; line-height: 1.45; }
td.n, th.n { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── status pills ─────────────────────────────────────────────────────── */

.pill {
  display: inline-block;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px; white-space: nowrap;
  border: 1px solid;
}
.pill.measured { color: var(--measured); background: rgba(69, 209, 160, 0.11); border-color: rgba(69, 209, 160, 0.3); }
.pill.spec     { color: var(--spec);     background: rgba(122, 162, 247, 0.11); border-color: rgba(122, 162, 247, 0.3); }
.pill.pending  { color: var(--pending);  background: rgba(227, 179, 65, 0.11);  border-color: rgba(227, 179, 65, 0.3); }
.pill.nofit    { color: var(--nofit);    background: rgba(239, 141, 163, 0.1);  border-color: rgba(239, 141, 163, 0.3); }
.pill.muted    { color: var(--muted);    background: rgba(139, 152, 169, 0.1);  border-color: rgba(139, 152, 169, 0.26); }

.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 22px 0 0; padding: 0; list-style: none; }
.legend li { display: flex; align-items: flex-start; gap: 9px; font-size: 0.9rem; color: var(--muted); max-width: 46ch; }
.legend .pill { margin-top: 2px; flex: none; }

/* ── callouts ─────────────────────────────────────────────────────────── */

.note {
  border-left: 3px solid var(--line-2);
  background: var(--bg-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 26px 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
  max-width: calc(var(--readw) + 4ch);
}
.note .nt {
  display: block; font-family: var(--mono); font-size: 0.71rem;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.note.warn { border-left-color: var(--pending); }
.note.warn .nt { color: var(--pending); }
.note.good { border-left-color: var(--measured); }
.note.good .nt { color: var(--measured); }
.note.design { border-left-color: var(--accent); }
.note.design .nt { color: var(--accent); }

/* ── code blocks ──────────────────────────────────────────────────────── */

pre {
  background: #05070a;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 19px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 22px 0;
  font-family: var(--mono);
  font-size: 0.83rem;
  line-height: 1.72;
  color: var(--ink-soft);
  tab-size: 4;
}
pre code { background: none; border: 0; padding: 0; white-space: pre; color: inherit; font-size: inherit; }
pre .c { color: var(--muted); }
pre .k { color: var(--accent); }
pre .o { color: var(--measured); }

/* ── lists ────────────────────────────────────────────────────────────── */

.plain { list-style: none; padding: 0; margin: 24px 0 0; }
.plain > li {
  padding: 15px 0 15px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  max-width: calc(var(--readw) + 6ch);
}
.plain > li:first-child { border-top: 0; }
.plain > li > b, .plain > li > strong { color: #fff; display: block; margin-bottom: 4px; font-weight: 650; }

ul.bul, ol.bul { color: var(--ink-soft); padding-left: 1.25em; max-width: var(--readw); margin: 0 0 1.1em; }
ul.bul li, ol.bul li { margin-bottom: 0.5em; }
ul.bul li::marker { color: var(--accent); }
ol.bul li::marker { color: var(--accent); font-family: var(--mono); font-size: 0.9em; }

/* ── numbered flow ────────────────────────────────────────────────────── */

.flow { counter-reset: step; list-style: none; padding: 0; margin: 30px 0 0; }
.flow > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 26px 52px;
  border-left: 1px solid var(--line);
  margin-left: 15px;
  color: var(--ink-soft);
}
.flow > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.flow > li::before {
  content: counter(step);
  position: absolute; left: -15px; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line-2);
  color: var(--accent); font-family: var(--mono); font-size: 0.82rem; font-weight: 600;
}
.flow > li h3 { margin-bottom: 7px; }
.flow > li p { max-width: var(--readw); }

/* ── phase list ───────────────────────────────────────────────────────── */

.phase {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 14px;
}
.phase.done { border-color: rgba(69, 209, 160, 0.35); background: linear-gradient(180deg, rgba(69,209,160,0.05), var(--panel) 60%); }
.phase-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.phase-head h3 { font-size: 1.16rem; }
.phase-head .ph { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); letter-spacing: 0.08em; }
.phase p { color: var(--ink-soft); font-size: 0.97rem; }
.phase dl { display: grid; grid-template-columns: max-content 1fr; gap: 7px 16px; margin: 14px 0 0; font-size: 0.92rem; }
.phase dt { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 3px; }
.phase dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 620px) {
  .phase dl { grid-template-columns: 1fr; gap: 2px 0; }
  .phase dd { margin-bottom: 10px; }
}

/* ── CTA block ────────────────────────────────────────────────────────── */

.cta {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 32px 30px;
  margin-top: 30px;
}
.cta h2 { font-size: 1.5rem; margin-bottom: 12px; }
.cta p { color: var(--ink-soft); max-width: var(--readw); }

/* ── footer ───────────────────────────────────────────────────────────── */

footer.foot {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding: 34px 0 56px;
  color: var(--muted);
  font-size: 0.89rem;
}
footer.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: baseline; justify-content: space-between; }
footer.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer.foot a { color: var(--ink-soft); }
footer.foot .fine { width: 100%; max-width: 78ch; color: var(--muted); line-height: 1.6; margin: 0; }

/* skip link */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #06101f; padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip:focus { left: 0; text-decoration: none; }
