/* Octropy's pages (site/octropy): the landing page and the docs article.
   Cream and ink, in the faces Neptunion's pages use (Mona Sans at its normal
   width, Martian Mono for code and small print; 2026-11-11: the condensed face
   read as stretched upward). One colour, Neptunion's blue, only on what is live
   or at work (Lars, 2026-11-11: blue, not orange). */

:root {
  --ground: #f5f5f1;
  --panel: #ffffff;
  --ink: #0b0b0c;
  --ink-2: #4a4a46;
  --ink-3: #85857e;
  --line: #e2e2db;
  --line-2: #cbcbc2;
  --blue: #6a9df4;
  --night: #0e0e10;

  --sans: "Mona Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1280px;
  --gut: clamp(20px, 4vw, 56px);
  --gap: clamp(96px, 11vw, 160px);
  --bar-h: 68px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--ground); scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 24px); }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 17.5px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 580; font-stretch: 104%; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blue); color: #000; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

/* ---------------------------------------------------------------- the bar */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(245, 245, 241, .86); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.bar.stuck { border-bottom-color: var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 24px; height: var(--bar-h); }
/* The name, typed out, is the mark (Lars, 2026-11-11). */
.mark { font: 650 22px/1 var(--sans); font-stretch: 106%; letter-spacing: -.04em; color: var(--ink); text-decoration: none; }
.bar nav { display: flex; gap: clamp(18px, 2.4vw, 32px); margin-left: auto; font-size: 15px; font-weight: 500; }
.bar nav a { color: var(--ink-2); text-decoration: none; transition: color .15s; }
.bar nav a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 20px;
  border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--ground);
  font: 500 15.5px/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: #2b2b2e; border-color: #2b2b2e; }
.btn.ghost { background: none; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); background: none; }
.btn.sm { height: 38px; padding: 0 15px; font-size: 14.5px; }
.go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.arrow { display: inline-flex; align-items: center; gap: .45em; font-weight: 500; text-decoration: none; }
.arrow::after { content: "\2192"; transition: transform .2s; }
.arrow:hover::after, a:hover .arrow::after { transform: translateX(4px); }

/* Small print: captions under pictures. */
.cap { margin-top: 16px; font: 400 12px/1.6 var(--mono); color: var(--ink-3); }

/* A status, said in words with a square: filled blue when it runs today,
   outlined while it is built, dashed when it follows. */
.st { display: inline-flex; align-items: center; gap: 8px; font: 400 11.5px/1 var(--mono); font-style: normal; color: var(--ink-2); white-space: nowrap; letter-spacing: 0; }
.st::before { content: ""; width: 7px; height: 7px; border: 1px solid var(--ink-2); flex: none; }
.st.live::before { background: var(--blue); border-color: var(--blue); }
.st.wait::before { background: var(--ink); border-color: var(--ink); }
.st.next::before { border-style: dashed; border-color: var(--ink-3); }
.st.next { color: var(--ink-3); }

/* ---------------------------------------------------------------- the type */
h1 { font-size: clamp(48px, 6.6vw, 100px); font-weight: 600; font-stretch: 106%; letter-spacing: -.048em; line-height: .94; }
h2 { font-size: clamp(36px, 4.6vw, 66px); }
h3 { font-size: 24px; letter-spacing: -.025em; }

/* ---------------------------------------------------------------- the opening
   The words on the left; the machines in a lens to their right that fades out at
   its rim and reaches in behind the title, a look into a world wider than the
   window (Lars, 2026-11-11). The lens's shape is set by octropy.js, which also
   places the work inside it. */
.hero { position: relative; display: flex; align-items: center; min-height: clamp(560px, calc(100svh - var(--bar-h)), 840px); padding: 40px 0 64px; overflow: hidden; }
.hero > .wrap { position: relative; z-index: 1; width: 100%; }
.hero h1 { max-width: 6.9em; }
.hero .lead { margin-top: clamp(24px, 2.6vw, 34px); max-width: 27em; font-size: clamp(18.5px, 1.5vw, 21px); line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.hero .go { margin-top: 32px; }
.field { position: absolute; top: 0; right: 0; bottom: 0; width: 70%; }
.field canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.field-cap { position: absolute; z-index: 1; right: var(--gut); bottom: 22px; margin: 0; max-width: 46em; text-align: right; }

/* ---------------------------------------------------------------- a part */
.part { padding-top: var(--gap); }
.part > .wrap > h2, .part .head { margin-bottom: clamp(36px, 4.5vw, 64px); }
/* A title with one sentence beside it, sitting on the same line. */
.head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(32px, 5vw, 80px); align-items: end; }
.head p { max-width: 30em; color: var(--ink-2); text-wrap: pretty; }

/* ---------------------------------------------------------------- what it replaces */
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; }
.svc { font-size: 15.5px; color: var(--ink-2); }
.svc thead th { padding: 0 24px 14px 0; font-size: 13.5px; font-weight: 500; color: var(--ink-3); border-bottom: 1px solid var(--ink); }
.svc td { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--line); }
.svc td:first-child { width: 38%; padding-right: clamp(24px, 4vw, 56px); }
.svc td:first-child b { display: block; font: 580 23px/1.1 var(--sans); font-stretch: 104%; letter-spacing: -.025em; color: var(--ink); }
.svc td:first-child span { display: block; margin-top: 8px; max-width: 30em; }
.svc td:last-child { padding-right: 0; padding-top: 30px; white-space: nowrap; }
.svc td:not(:first-child):not(:last-child) { padding-top: 28px; }
.svc td em { font-style: normal; color: var(--ink); }
.svc .grp th { padding: 40px 0 12px; font-size: 13.5px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
.svc tbody tr.grp:first-child th { padding-top: 26px; }

/* ---------------------------------------------------------------- the SDK */
.tabs { display: inline-flex; gap: 2px; max-width: 100%; padding: 4px; margin-bottom: 16px; background: #e9e9e2; border-radius: 11px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { padding: 9px 16px; border: 0; border-radius: 8px; background: none; cursor: pointer; font: 500 14.5px/1 var(--sans); color: var(--ink-2); white-space: nowrap; transition: color .15s, background .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.pane { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; }
.pane[hidden] { display: none; }
/* The code in Neptunion's own colours: its blue for the language, its grey-blue for words. */
.code { margin: 0; padding: 28px 30px; overflow-x: auto; background: var(--night); border-radius: 14px; color: #ececef; font: 400 13.5px/1.8 var(--mono); tab-size: 4; }
.code .k { color: var(--blue); }
.code .s { color: #c9cfe2; }
.code .c { color: #6c7186; }
.pane .log { padding: 24px 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }

/* A log, written out a line at a time once it is on screen. */
.log { font: 400 12.5px/1.6 var(--mono); }
.log li { display: grid; grid-template-columns: 6.6em minmax(0, 1fr); gap: 0 14px; padding: 7px 0; opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .35s; }
.log li.in { opacity: 1; transform: none; }
.log li b { font-weight: 500; color: var(--ink); }
.log li span { color: var(--ink-2); }
.log li.cmd { display: block; padding-bottom: 12px; }
.log li.cmd span { color: var(--ink); }
.log li.lost b, .log li.lost span { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.log.night { background: var(--night); border-radius: 12px; padding: 20px 22px; }
.log.night li b { color: #ececef; }
.log.night li span { color: #9a9faf; }
.log.night li.cmd span { color: var(--blue); }

/* ---------------------------------------------------------------- the market */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; padding: clamp(26px, 3vw, 38px); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.card header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card h3 { font-size: clamp(26px, 2.4vw, 32px); }
.card > p { margin-top: 14px; color: var(--ink-2); max-width: 32em; }
.card .log { margin-top: 28px; }
.card .log:not(.night) { padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; }
.card .arrow { margin-top: auto; padding-top: 28px; font-size: 15.5px; }

/* ---------------------------------------------------------------- the box: host first, the network, its state */
.ways { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(300px, 400px); gap: clamp(28px, 4vw, 56px); align-items: start; }
.way { border-top: 1px solid var(--ink); padding-top: 20px; }
.way h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.way h3 small { font: 400 11.5px/1 var(--mono); letter-spacing: 0; color: var(--ink-3); }
.way p { margin-top: 14px; color: var(--ink-2); }
.way p + p { margin-top: 10px; }
.way .arrow { margin-top: 20px; font-size: 15.5px; }
.sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 24px 48px -28px rgba(0, 0, 0, .22); overflow: hidden; }
.sheet-top { display: grid; gap: 3px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.sheet-top b { font-weight: 600; font-size: 16px; }
.sheet-top span { font-size: 13.5px; color: var(--ink-3); }

.sheet .kv { display: grid; gap: 2px; padding: 11px 20px; }
.sheet .kv + .kv { border-top: 1px solid var(--line); }
.sheet .kv span { font: 400 11.5px/1.5 var(--mono); color: var(--ink-3); }
.sheet .kv b { font-weight: 500; font-size: 15px; }
/* Words beside a log of about their height (the box proving itself, the cheques). */
.split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.split.proof { margin-top: clamp(56px, 6vw, 88px); }
.part .head + .split.proof { margin-top: 0; }
.split h3 { font-size: clamp(24px, 2.2vw, 30px); max-width: 16em; }
.split .body { margin-top: 16px; max-width: 32em; color: var(--ink-2); }
.split .log:not(.night) { padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }

/* ---------------------------------------------------------------- Neptunion */
.nep { position: relative; display: flex; align-items: flex-end; min-height: clamp(440px, 46vw, 620px); border-radius: 18px; overflow: hidden; background: #000; color: #fff; text-decoration: none; isolation: isolate; }
.nep img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; z-index: -2; transition: transform 1.6s cubic-bezier(.2, .7, .2, 1); }
.nep:hover img { transform: scale(1.025); }
/* The night on the left of the frame, kept dark enough for the words. */
.nep::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .35) 45%, transparent 70%); }
.nep-t { padding: clamp(28px, 4.5vw, 64px); max-width: 520px; }
.nep h2 { font-size: clamp(46px, 6vw, 88px); font-weight: 600; font-stretch: 108%; letter-spacing: -.045em; }
.nep p { margin-top: 18px; color: #c9cfe2; font-size: 17.5px; }
.nep-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }
.nep .st { color: #c9cfe2; }
.nep .st::before { border-color: #c9cfe2; }
.nep .arrow { color: #fff; }

/* ---------------------------------------------------------------- status */
.road { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.road > div { border-top: 1px solid var(--ink); padding-top: 18px; }
.road h3 { font-size: 0; }
.road h3 .st { font-size: 12px; color: var(--ink); }
.road ul { margin-top: 14px; }
.road li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.road.earn h3 { font-size: 22px; }
.road.earn p { margin-top: 10px; color: var(--ink-2); }
.moat { margin-top: clamp(28px, 3vw, 40px); max-width: 52em; color: var(--ink-2); }

/* ---------------------------------------------------------------- the end, kept short (Lars, 2026-11-11) */
.end { padding-top: clamp(64px, 8vw, 112px); }
.end-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; padding: clamp(26px, 3vw, 36px) clamp(26px, 3.4vw, 44px); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.end h2 { font-size: clamp(30px, 3.2vw, 44px); }
.end p { margin-top: 8px; color: var(--ink-2); }

/* ---------------------------------------------------------------- footer: only what is not on this page */
footer { padding: 28px 0 36px; font-size: 14.5px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
footer .mark { font-size: 18px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
footer nav a { color: var(--ink-2); text-decoration: none; }
footer nav a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- the docs article */
.pill { display: inline-block; font-style: normal; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--ground); font-size: 13px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
.pill.plan { background: none; color: var(--ink); }
.doc { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: clamp(32px, 6vw, 96px); padding-top: clamp(36px, 5vw, 72px); padding-bottom: var(--gap); }
.toc { position: sticky; top: calc(var(--bar-h) + 32px); align-self: start; display: grid; gap: 7px; font-size: 15px;
  /* The plan has nineteen decisions: the list scrolls rather than run off the window. */
  max-height: calc(100vh - var(--bar-h) - 64px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.toc::-webkit-scrollbar { display: none; }
.toc b { font-weight: 500; color: var(--ink-3); margin-bottom: 6px; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a.sub { padding-left: 14px; }
.toc a:hover, .toc a.here { color: var(--ink); }
.toc a.here { font-weight: 500; }
article { font-size: 18px; line-height: 1.65; }
article h1 { font-size: clamp(40px, 5.4vw, 68px); }
article .standfirst { font-size: clamp(20px, 1.8vw, 23px); line-height: 1.42; color: var(--ink-2); margin-top: 20px; }
article .by { font: 400 12px/1.6 var(--mono); color: var(--ink-3); margin-top: 16px; }
article h2 { font-size: clamp(28px, 3vw, 38px); margin-top: 64px; }
article h3 { font-size: 23px; margin-top: 40px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
article p, article ol, article .table { margin-top: 18px; }
article ol { padding-left: 22px; display: grid; gap: 10px; list-style: decimal; }
article ul { padding-left: 22px; display: grid; gap: 10px; list-style: disc; }
article code { font: 400 .82em/1 var(--mono); padding: 2px 5px; background: #ebebe4; border-radius: 4px; }
article td code { white-space: nowrap; }
/* The plan's two diagrams, written out as steps. */
article .log.flow { margin-top: 22px; padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.log.flow li { grid-template-columns: minmax(9em, 14em) minmax(0, 1fr); opacity: 1; transform: none; }
.log.flow li.note span { color: var(--ink-3); }
article b { font-weight: 600; }
article table { font-size: 16px; }
article th, article td { padding: 14px 20px 14px 0; border-bottom: 1px solid var(--line); }
article th { font-size: 13.5px; font-weight: 500; color: var(--ink-3); border-bottom-color: var(--ink); }
article td { color: var(--ink-2); }
article td:first-child { font-weight: 500; color: var(--ink); white-space: nowrap; }
article .sum { margin-top: 56px; padding: 24px 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
article .sum p:first-child { margin-top: 0; }
article .sum p { margin-top: 6px; }
.doc + footer { border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- narrower */
@media (max-width: 1100px) {
  .ways { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ways .sheet-fig { grid-column: 1 / -1; width: min(100%, 440px); }
}
@media (max-width: 1000px) {
  .head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .pane, .split { grid-template-columns: minmax(0, 1fr); }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .log.flow li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .toc { display: none; }
}
@media (max-width: 820px) {
  /* The lens goes under the words instead of beside them. */
  .hero { display: block; min-height: 0; padding: 44px 0 0; }
  .field { position: relative; width: 100%; height: 380px; margin-top: 8px; }
  .field-cap { position: static; padding: 0 var(--gut); margin-top: -6px; max-width: none; text-align: left; }
  .duo, .road, .ways { grid-template-columns: minmax(0, 1fr); }
  /* The services table becomes one block per service: squeezed into four
     columns every cell is a word wide. */
  .svc thead { display: none; }
  .svc, .svc tbody, .svc tr, .svc td, .svc .grp th { display: block; width: auto; }
  .svc tr:not(.grp) { padding: 22px 0; border-bottom: 1px solid var(--line); }
  .svc td, .svc td:first-child, .svc td:not(:first-child):not(:last-child), .svc td:last-child { padding: 0; border: 0; white-space: normal; width: auto; }
  .svc td[data-k] { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 12px; margin-top: 10px; font-size: 15px; }
  .svc td[data-k]::before { content: attr(data-k); color: var(--ink-3); }
  .svc td:first-child { margin-bottom: 6px; }
  .svc td:last-child { margin-top: 14px; }
  .svc .grp th { padding: 34px 0 12px; }
  .nep img { object-position: 78% 30%; }
  .nep::before { background: linear-gradient(0deg, rgba(0, 0, 0, .86), rgba(0, 0, 0, .5) 50%, rgba(0, 0, 0, .1)); }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .bar .wrap { gap: 16px; }
  .bar nav { display: none; }
  .bar .btn { margin-left: auto; }
  .code { padding: 22px 20px; font-size: 12.5px; }
  .log { font-size: 12px; }
  .log li { grid-template-columns: 5.6em minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .log li { opacity: 1; transform: none; transition: none; }
  .nep img, .arrow::after { transition: none; }
}
