/* hemisphere.almansa.dev. One stylesheet for the landing page and the two
   guides, following the visual identity in brand/README.md: warm paper,
   ink, one copper accent, IBM Plex Sans for the person and IBM Plex Mono for
   what the system knows exactly. Flat planes, 1 px borders, no shadows, no
   gradients. The fonts are self-hosted: the site makes no third-party request. */
@import url("fonts/plex.css");

/* Colour tokens, byte-identical to brand/palette.css (see brand/README.md) so the site
   and the brand never drift; checked by `make lint`. */
:root{--paper:#F6F3EE;--white:#FFFFFF;--mist:#E4DED4;--stone:#A39C91;--muted:#5C554B;--ink:#1F1D1A;--copper:#B5673B;--copper-dark:#8A4A26;--copper-pale:#FBF4EF;--copper-on-ink:#D8895C;--blue:#4B6FB0;--font-sans:'IBM Plex Sans',Helvetica,Arial,sans-serif;--font-mono:'IBM Plex Mono',monospace}

:root {
  --graphite: var(--muted);
  --copper-2: var(--copper-on-ink);
  --ok: #4F7A46;
  --bad: #A5453A;
  --bg: var(--paper);
  --bg-2: var(--white);
  --bg-3: #EFEBE4;
  --fg: var(--ink);
  --fg-2: #3D3830;
  --line: var(--mist);
  --line-2: #D3CCC0;
  --accent: var(--copper);
  --code-bg: var(--ink);
  --code-fg: var(--paper);
  --radius: 6px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font: 17px/1.55 var(--sans);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .15em; }
h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -.03em; margin: 0 0 .5rem; font-weight: 500; }
h1 { font-size: clamp(2.5rem, 5.2vw, 3.5rem); letter-spacing: -.035em; text-wrap: pretty; }
h2 { font-size: clamp(1.5rem, 3vw, 1.75rem); }
h3 { font-size: 1.1rem; letter-spacing: -.015em; }
p { margin: 0 0 1rem; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: .88em; background: var(--bg-3); padding: .1em .35em; border-radius: 4px; color: var(--fg); }
pre {
  margin: 0 0 1.25rem;
  padding: .95rem 1.1rem;
  background: var(--code-bg);
  color: var(--code-fg);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: .85rem;
  line-height: 1.55;
}
pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
pre .c { color: var(--stone); }
pre .p { color: var(--copper-2); user-select: none; }
kbd { font-size: .85em; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 .35em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: .95rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
.table-wrap table { margin: 0; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; }
td code { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.mono { font-family: var(--mono); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 1.5rem; height: 3.75rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--fg); font-weight: 500; font-size: 1.25rem; letter-spacing: -.03em; }
.brand:hover { text-decoration: none; }
.brand img, .brand svg { width: 28px; height: 28px; }
.nav nav { display: flex; gap: 1.5rem; margin-left: auto; font-size: .92rem; align-items: center; }
.nav nav a { color: var(--graphite); }
.nav nav a:hover { color: var(--fg); text-decoration: none; }
.nav nav a[aria-current] { color: var(--fg); }
.nav nav a.button { color: var(--paper); background: var(--ink); padding: .5rem 1rem; border-radius: 999px; font-weight: 500; }
.pill {
  font: 500 .72rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--graphite); border: 1px solid var(--line-2);
  border-radius: 999px; padding: .3rem .6rem; white-space: nowrap;
}

/* Hero */
.hero { padding: 5.5rem 0 3.5rem; }
.hero .wrap { display: grid; gap: 3rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 6fr 5fr; gap: 4rem; } }
.hero .kicker { font: .82rem var(--mono); color: var(--graphite); margin-bottom: 1.5rem; }
.hero h1 { max-width: 16ch; margin-bottom: 1.25rem; }
.hero .tagline { font: 500 1.05rem var(--sans); color: var(--copper); margin: 0 0 .6rem; }
.hero .lede { font-size: 1.2rem; color: var(--fg-2); max-width: 46ch; margin: 0 0 2rem; }
.cta-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 1.25rem; font-size: .95rem; }
.cta-row a { color: var(--fg-2); }
.cta-row a::after { content: " \2192"; }
.hero .proofs { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2rem; font-size: .88rem; color: var(--graphite); padding: 0; list-style: none; }
.hero .proofs li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--copper); margin-right: .55rem; vertical-align: .1em; }

/* Command box with copy button */
.cmd {
  display: flex; align-items: center; gap: .75rem;
  background: var(--code-bg); color: var(--code-fg);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  font-family: var(--mono); font-size: .9rem; line-height: 1.4;
  overflow-x: auto;
}
.cmd .p { color: var(--copper-2); user-select: none; }
.cmd code { background: none; padding: 0; white-space: nowrap; flex: 1 1 auto; min-width: 0; overflow-x: auto; color: inherit; }
.cmd button {
  margin-left: auto; flex: none;
  font: 500 .72rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--paper); background: transparent; border: 1px solid var(--graphite);
  border-radius: 999px; padding: .45rem .7rem; cursor: pointer;
}
.cmd button:hover { border-color: var(--paper); }
.cmd button[data-done] { color: var(--copper-2); border-color: var(--copper-2); }
.cmd-meta { margin-top: .7rem; font: .82rem var(--mono); color: var(--graphite); }
.cmd-meta span + span::before { content: "\00b7"; margin: 0 .5rem; }

/* The fact: the visual unit of the brand */
.recall-demo { display: flex; flex-direction: column; gap: 1rem; }
.recall-demo .you { font: .8rem var(--mono); color: var(--graphite); }
.recall-demo .prompt { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; font-size: 1rem; }
.facts { display: flex; flex-direction: column; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.fact {
  position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .85rem 1rem .85rem 2rem; font-size: .97rem; line-height: 1.5;
}
.fact::before { content: ""; position: absolute; left: .85rem; top: 1.25rem; width: 8px; height: 8px; border-radius: 50%; background: var(--copper); }
.fact .when { display: block; font: .75rem var(--mono); color: var(--graphite); margin-bottom: .25rem; }
.fact .text { display: block; color: var(--fg); }
.fact .text b { font-weight: 500; }
.fact .src { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; font: .75rem var(--mono); color: var(--graphite); align-items: center; }
.fact .src a { color: var(--graphite); }
.fact.superseded { color: var(--stone); background: transparent; }
.fact.superseded::before { background: transparent; border: 1.5px solid var(--stone); }
.fact.superseded .text, .fact.superseded .when, .fact.superseded .src { color: var(--stone); }
.tag { display: inline-block; font: .72rem/1 var(--mono); padding: .25rem .45rem; border: 1px solid var(--line); border-radius: 4px; color: var(--graphite); background: var(--paper); }
.tag.sealed { color: var(--copper); border-color: var(--copper); }

/* Sections */
.section { padding: 4.5rem 0; border-top: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 2.25rem; }
.section-head .kicker, .kicker { font: .78rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--graphite); margin-bottom: .7rem; }
.section-head p { color: var(--fg-2); }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem 1.4rem; }
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--fg-2); margin: 0; font-size: .95rem; }
.card .glyph { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; margin-bottom: .9rem; border: 1px solid var(--line-2); color: var(--ink); }
.card .glyph svg { width: 28px; height: 28px; stroke-width: 1.5; }
.card .n { font: 500 .8rem var(--mono); color: var(--graphite); margin-bottom: .6rem; display: block; }

.two { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: start; }
.two > *, .grid > *, .pipeline > *, .docs > *, .hero .wrap > * { min-width: 0; }
@media (min-width: 960px) { .two { grid-template-columns: 5fr 6fr; gap: 3.5rem; } }

/* Numbers */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0; padding: 0; list-style: none; }
.stats li { border-top: 1px solid var(--line-2); padding-top: .9rem; }
.stats b { display: block; font: 500 2rem/1.1 var(--mono); letter-spacing: -.02em; color: var(--ink); }
.stats span { font-size: .9rem; color: var(--graphite); }

/* Timeline of a fact */
.timeline { list-style: none; margin: 1.5rem 0 0; padding: 0; border-left: 1px solid var(--line-2); }
.timeline li { position: relative; padding: 0 0 1.25rem 1.5rem; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: .45rem; width: 9px; height: 9px; border-radius: 50%; background: var(--copper); }
.timeline li.superseded::before { background: var(--paper); border: 1.5px solid var(--stone); }
.timeline li.superseded { color: var(--stone); }
.timeline .when { display: block; font: .75rem var(--mono); color: var(--graphite); }
.timeline li.superseded .when { color: var(--stone); }

/* Sources */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.chips li { display: flex; align-items: center; gap: .5rem; font: .85rem var(--mono); padding: .4rem .7rem; border-radius: 4px; background: var(--white); border: 1px solid var(--line); color: var(--fg-2); }
.chips li svg { width: 28px; height: 28px; flex: none; stroke: currentColor; }
.chips li em { font-style: normal; color: var(--stone); font-size: .85em; margin-left: .1rem; }

/* Pipeline */
.pipeline { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pipeline .step { position: relative; padding: 1.25rem 1.3rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.pipeline .step .n { display: block; font: 500 .8rem var(--mono); color: var(--copper); margin-bottom: .7rem; }
.pipeline .step h3 { font-size: 1.05rem; }
.pipeline .step p { font-size: .93rem; color: var(--fg-2); margin: 0; }
.pipeline .step .layer { position: absolute; top: 1.25rem; right: 1.2rem; font: .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--stone); }

/* Plurilake */
.plurilake { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); padding: 2rem; }
.plurilake .bridge-row { display: flex; align-items: center; justify-content: center; gap: 1rem; font-size: 1.1rem; font-weight: 500; letter-spacing: -.02em; margin-bottom: 1.5rem; }
.plurilake .bridge-row .side { display: flex; align-items: center; gap: .5rem; }
.plurilake .bridge-row svg { width: 28px; height: 28px; stroke: currentColor; }
.plurilake .bridge-arrows { display: flex; align-items: center; gap: .3rem; color: var(--stone); font-size: 1.3rem; }
.plurilake .soon { font: .72rem var(--mono); color: var(--blue); border: 1px solid var(--blue); border-radius: 999px; padding: .25rem .6rem; margin-left: .5rem; }
.plurilake .grid + .grid { margin-top: 1rem; }
.plurilake a { color: var(--blue); }

/* Channels */
.status-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--ok); margin-right: .45rem; vertical-align: middle; }
.status-dot.hold { background: var(--copper); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--graphite); font-size: .9rem; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: baseline; }
.footer nav { display: flex; gap: 1.25rem; margin-left: auto; }
.footer a { color: var(--fg-2); }
.footer .mono { font-size: .8rem; }

/* Docs layout */
.docs { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0 5rem; }
@media (min-width: 1000px) { .docs { grid-template-columns: 240px minmax(0, 46rem); gap: 4rem; } }
.toc { font-size: .9rem; }
@media (min-width: 1000px) { .toc { position: sticky; top: 5rem; align-self: start; max-height: calc(100vh - 6rem); overflow: auto; } }
.toc .kicker { margin-bottom: .6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: .3rem 0 .3rem .9rem; color: var(--graphite); margin-left: -1px; border-left: 1px solid transparent; }
.toc li a:hover { color: var(--fg); text-decoration: none; }
.toc li a.active { color: var(--fg); border-left-color: var(--copper); }
.toc li li a { padding-left: 1.7rem; font-size: .85rem; color: var(--stone); }
.toc .also { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }

article h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: .6rem; }
article .lede { font-size: 1.15rem; color: var(--fg-2); margin-bottom: 2.5rem; }
article h2 { font-size: 1.5rem; margin: 3rem 0 .9rem; padding-top: .5rem; }
article h3 { font-size: 1.1rem; margin: 2rem 0 .6rem; }
article h2 a.anchor, article h3 a.anchor { color: var(--line-2); margin-left: .4rem; font-weight: 400; opacity: 0; }
article h2:hover a.anchor, article h3:hover a.anchor { opacity: 1; }
article p, article li { color: var(--fg-2); }
article li { margin-bottom: .35rem; }
article strong { color: var(--fg); font-weight: 500; }
article ul, article ol { padding-left: 1.4rem; margin: 0 0 1.1rem; }
article table code, article li code, article p code { color: var(--fg); }

.callout { border: 1px solid var(--line); border-left: 3px solid var(--copper); border-radius: var(--radius); background: var(--white); padding: .9rem 1.1rem; margin: 0 0 1.25rem; font-size: .95rem; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--bad); }
.callout.note { border-left-color: var(--blue); }
.callout .label { display: block; font: .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--graphite); margin-bottom: .3rem; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.steps > li { position: relative; padding-left: 2.6rem; margin-bottom: 1.5rem; }
.steps > li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: .1rem; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--white); border: 1px solid var(--line-2);
  color: var(--fg); font: 500 .85rem var(--mono);
}
.steps > li > h3 { margin-top: 0; }

.cmdtable td:first-child { white-space: nowrap; }
.cmdtable td:first-child code { color: var(--fg); }

.prev-next { display: flex; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .95rem; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  td code, th code, .cmdtable td:first-child { white-space: normal; overflow-wrap: anywhere; }
  .table-wrap td, .table-wrap td code { white-space: nowrap; overflow-wrap: normal; }
  .table-wrap td:last-child { white-space: normal; }
  .table-wrap th, .table-wrap td { padding: .55rem .4rem; }
  .hide-sm { display: none; }
  .stack-sm tr { display: block; padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .stack-sm th, .stack-sm td { display: block; border: 0; padding: .1rem 0; }
  .stack-sm th { font-size: .72rem; }
  .cmd-meta span { display: inline-block; white-space: nowrap; }
  .hero h1 { font-size: 2.2rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .nav nav { gap: .9rem; font-size: .9rem; }
  .nav .pill, .nav nav a.button { display: none; }
  .section { padding: 3rem 0; }
  .cmd { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
