/* saltlick landing page. Mineral: a faint isometric crystal lattice, violet
   for the directory, red for a refusal, green for a check the reader made.
   System fonts only. */
:root {
  --paper: #f7f6f9; --panel: #ffffff; --ink: #211c2e; --quiet: #57516a; --rule: #dcd7e5; --grid: #e9e5f0;
  --accent: #5a389c; --accent-soft: #ece4fa; --on-accent: #ffffff; --track: #5a389c; --reader: #0f6a5c;
  --good: #1b7a44; --bad: #b3261e; --code-bg: #f1eff5;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121019; --panel: #18151f; --ink: #ebe7f3; --quiet: #a59fb5; --rule: #2d2839; --grid: #1d1a27;
    --accent: #c1a3ff; --accent-soft: #2b2342; --on-accent: #170e2a; --track: #c1a3ff; --reader: #5fd3bf;
    --good: #66d39a; --bad: #ff8f86; --code-bg: #0e0c14;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); }
a { color: var(--track); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
code, pre { font-family: var(--mono); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* top bar */
.top { position: relative; z-index: 2; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 16px var(--mono); }
.brand img { width: 28px; height: 28px; }
.top nav { display: flex; gap: 22px; font: 15px var(--mono); }
.top nav a { color: var(--quiet); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .top nav a:not(.gh) { display: none; } }

/* hero: fills the first screen; the numbers strip sits at its bottom edge */
.hero { position: relative; overflow: hidden; min-height: calc(100svh - 64px); display: flex; flex-direction: column;
  background-image: repeating-linear-gradient(30deg, var(--grid) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(150deg, var(--grid) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 69.28px); }
.bgcode { position: absolute; inset: 0 0 auto auto; width: 62%; margin: 0; padding: 40px 0 0; color: var(--ink); opacity: .07;
  font: 15px/1.7 var(--mono); white-space: pre; pointer-events: none; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
.hero-grid { position: relative; flex: 1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 24px; padding-bottom: 28px; }
.prompt { font: 600 16px var(--mono); color: var(--track); margin: 0 0 6px; }
.prompt .cur { display: inline-block; width: .6em; height: 1.05em; vertical-align: -.15em; background: var(--accent); margin-left: 4px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.wordmark { font: 900 clamp(44px, 5.9vw, 84px)/1.02 var(--mono); letter-spacing: -0.04em; margin: 0; white-space: nowrap; }
.tagline { font-weight: 700; font-size: clamp(19px, 1.9vw, 25px); line-height: 1.3; color: var(--accent); margin: 14px 0 10px; }
.tagnote { font: 600 14px var(--mono); color: var(--quiet); margin: -4px 0 14px; }
.lede { color: var(--quiet); margin: 0 0 24px; max-width: 38em; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 1px solid var(--rule); background: var(--panel);
  color: var(--ink); font: 700 16px var(--sans); text-decoration: none; border-radius: 3px; }
.btn svg { width: 18px; height: 18px; }
.btn.star { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn:hover { border-color: var(--ink); }
.cmd { display: flex; align-items: stretch; border: 1px solid var(--rule); background: var(--panel); border-radius: 3px; max-width: 640px; }
.cmd pre { flex: 1; margin: 0; padding: 12px 14px; font-size: 14px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.cmd .dollar { color: var(--good); user-select: none; }
.copy { border: 0; border-left: 1px solid var(--rule); background: none; color: var(--accent); font: 700 14px var(--mono); padding: 0 16px; cursor: pointer; }

/* the session: three parties and what passed between them */
.session { background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.session .actors { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--rule); }
.actors rect { fill: var(--panel); stroke: var(--rule); stroke-width: 1.5; rx: 6; }
.actors .on rect { stroke: var(--accent); stroke-width: 2.5; }
.actors text { font: 600 13px var(--sans); fill: var(--ink); }
.actors .sub { font: 11.5px var(--mono); fill: var(--quiet); font-weight: 400; }
.actors .wire { stroke: var(--rule); stroke-width: 2; fill: none; }
.actors .wire.on { stroke: var(--accent); }
.actors .aloud { stroke: var(--reader); stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
.actors .aloud-t { font: 11.5px var(--sans); fill: var(--reader); }
.actors .pkt { fill: var(--accent); }
.actors .pkt.bad { fill: var(--bad); }
.term { margin: 0; padding: 10px 14px; height: calc(15 * 1.6em + 20px); overflow: hidden; background: var(--code-bg);
  font: 12.5px/1.6 var(--mono); color: var(--quiet); white-space: pre-wrap; overflow-wrap: anywhere; }
.term .cmdl { color: var(--ink); }
.term .s2 { color: var(--good); font-weight: 700; } .term .s4 { color: var(--bad); font-weight: 700; }
.term .adv { color: var(--accent); }
.term .ok { color: var(--good); font-weight: 700; } .term .no { color: var(--bad); font-weight: 700; }
.term .rd { color: var(--reader); }
.session .foot { padding: 8px 12px; font-size: 13px; color: var(--quiet); border-top: 1px solid var(--rule); }
.invariant { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 16px 20px; font-size: 19px; font-weight: 700; margin: 0 0 24px; border-radius: 0 4px 4px 0; }

/* numbers strip */
.numbers { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); background: var(--panel); margin-bottom: 14px; }
.numbers > div { padding: 16px 20px; border-left: 1px solid var(--rule); min-width: 0; }
.numbers > div:first-child { border-left: 0; }
.numbers .n { display: block; font: 800 34px/1.1 var(--mono); color: var(--accent); }
.numbers .l { display: block; font-weight: 700; }
.numbers code { display: block; font-size: 11.5px; color: var(--quiet); overflow-wrap: anywhere; margin-top: 4px; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .bgcode { width: 100%; }
  .numbers { grid-template-columns: repeat(2, 1fr); }
  .numbers > div:nth-child(3) { border-left: 0; }
  .numbers > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 600px) {
  .hero-grid { padding-top: 8px; }
  .prompt { font-size: 14px; }
  .bgcode { opacity: .045; }
  .lede { font-size: 16px; margin-bottom: 18px; }
  .btn { padding: 10px 14px; font-size: 15px; }
  .cmd pre { font-size: 12.5px; }
  .numbers .n { font-size: 26px; }
  .numbers > div { padding: 12px 14px; }
}

/* sections */
section.band { padding: 72px 0; border-top: 1px solid var(--rule); }
h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 19px; margin: 0 0 6px; }
.sub { color: var(--quiet); max-width: 46em; margin: 0 0 32px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--panel); border: 1px solid var(--rule); border-top: 3px solid var(--accent); padding: 22px; border-radius: 3px; }
.card p { margin: 0; color: var(--quiet); }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .feature { grid-template-columns: minmax(0, 1fr); } }
figure { margin: 0; }
figure img { width: 100%; height: auto; display: block; background: var(--panel); border: 1px solid var(--rule); border-radius: 3px; }
figcaption { font-size: 14px; color: var(--quiet); margin-top: 8px; }
.json { background: var(--code-bg); border: 1px solid var(--rule); padding: 12px 14px; font-size: 13px; overflow-x: auto; border-radius: 3px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--quiet); }
td code { font-size: 13px; overflow-wrap: anywhere; }
.scroll { overflow-x: auto; }
.num { font-family: var(--mono); color: var(--accent); font-weight: 700; }
pre.block { background: var(--code-bg); border: 1px solid var(--rule); padding: 14px; overflow-x: auto; font-size: 14px; border-radius: 3px; }
/* a command shows whole: it wraps at spaces, continuation lines hang two characters in */
pre[data-box="command"] { white-space: pre-wrap; overflow-wrap: anywhere; }
pre .ln { display: block; padding-left: 2ch; text-indent: -2ch; }
/* a word with a hyphen or slash moves to the next line whole, and breaks only if it alone is wider than the box */
pre .ln .w { display: inline-block; max-width: 100%; text-indent: 0; }
footer { border-top: 1px solid var(--rule); padding: 32px 0 48px; color: var(--quiet); font-size: 15px; }
footer a { margin-right: 18px; }
