/* Lemma site. Colours are the app's own: graphite greys leaning toward one fountain-pen blue. */
@font-face { font-family: "Geist"; src: url("assets/fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("assets/fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("assets/fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("assets/fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("assets/fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #fbfbfc; --band: #f3f4f6; --fg: #1b1c21; --muted: #626570; --line: #e1e3e8; --card: #eeeff3; --raised: #ffffff;
  --accent: #3550c6; --on-accent: #ffffff; --shadow: rgb(15 15 20 / 0.10);
  --hl-important: #fff1a1; --hl-definition: #cfe2ff; --hl-question: #ccf0c4;
  --ink-important: #c99700; --ink-definition: #3d7be0; --ink-question: #2f9142;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1c1f; --band: #212226; --fg: #ebecf0; --muted: #9fa2ac; --line: #32343a; --card: #2a2c31; --raised: #24262a;
    --accent: #93a6ff; --on-accent: #0b1020; --shadow: rgb(0 0 0 / 0.5);
    --hl-important: rgb(214 180 50 / 0.3); --hl-definition: rgb(90 140 230 / 0.3); --hl-question: rgb(90 180 100 / 0.28);
    --ink-important: #e2c14a; --ink-definition: #6f9cf0; --ink-question: #6cc47a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.mark-word { font: 600 21px/1 var(--serif); letter-spacing: -0.01em; text-decoration: none; display: inline-flex; align-items: baseline; gap: 4px; }
.mark-word::after { content: ""; width: 8px; height: 8px; border-radius: 1.5px; background: var(--accent); }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 26px; font-size: 14.5px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--fg); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 11px; font: 500 15.5px/1 var(--sans); text-decoration: none; border: 1px solid var(--line); background: var(--raised); color: var(--fg); cursor: pointer; transition: transform 0.12s ease, background-color 0.15s ease; }
.btn:hover { background: var(--card); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-primary:hover { background: color-mix(in srgb, var(--fg) 86%, var(--bg)); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.top nav a.btn-primary { color: var(--bg); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(56px, 9vw, 112px) 0; }
.hero h1 { font: 600 clamp(40px, 6.4vw, 76px)/1.02 var(--serif); letter-spacing: -0.028em; margin: 0; max-width: 22ch; }
.hero .lede { margin: 26px 0 0; max-width: 56ch; font-size: clamp(17px, 1.5vw, 19.5px); line-height: 1.55; color: var(--muted); }
.hero .cta { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hero .cta .quiet { font-size: 14.5px; color: var(--muted); }
.text-link { color: var(--fg); text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--fg) 35%, transparent); }
.text-link:hover { text-decoration-color: var(--fg); }

/* ---------- sections ---------- */
.section { padding-block: clamp(72px, 10vw, 136px); }
.section h2 { font: 600 clamp(30px, 4vw, 46px)/1.08 var(--serif); letter-spacing: -0.022em; margin: 0; max-width: 20ch; text-wrap: balance; }
.section .intro { margin: 18px 0 0; max-width: 58ch; font-size: 17.5px; color: var(--muted); }
.band { background: var(--band); border-block: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }

.window { margin-top: clamp(36px, 5vw, 60px); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--raised); box-shadow: 0 40px 100px -50px var(--shadow); position: relative; }
.window::before { content: ""; position: absolute; top: 3.2%; left: 1.6%; width: 4.6%; aspect-ratio: 54 / 12; background: radial-gradient(circle at 11% 50%, var(--muted) 0 10%, transparent 11%), radial-gradient(circle at 50% 50%, var(--muted) 0 10%, transparent 11%), radial-gradient(circle at 89% 50%, var(--muted) 0 10%, transparent 11%); opacity: 0.45; }
.window img { width: 100%; }
.caption { margin: 14px 0 0; font-size: 14px; color: var(--muted); max-width: 70ch; }


.rows { margin: 44px 0 0; border-top: 1px solid var(--line); }
.rows > div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr); gap: 12px 40px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.rows dt, .rows .k { font-weight: 600; font-size: 16.5px; margin: 0; }
.rows dd, .rows .v { margin: 0; color: var(--muted); font-size: 15.5px; }

.scroll { margin-top: 40px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--raised); }
table.matrix { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 14.5px; line-height: 1.5; }
.matrix th, .matrix td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.matrix thead th { font-weight: 500; font-size: 13.5px; color: var(--muted); background: var(--band); }
.matrix tbody th { font: 600 15.5px/1.35 var(--serif); width: 24%; }
.matrix tbody th small { display: block; font: 400 13px/1.4 var(--sans); color: var(--muted); margin-top: 3px; }
.matrix tr:last-child th, .matrix tr:last-child td { border-bottom: 0; }

.also { margin: 44px 0 0; padding: 0; list-style: none; columns: 2; column-gap: clamp(32px, 6vw, 88px); }
.also li { break-inside: avoid; padding: 0 0 22px; }
.also strong { display: block; font-weight: 600; font-size: 16.5px; }
.also span { color: var(--muted); font-size: 15.5px; }

.plans { margin-top: 44px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--raised); }
.plan { padding: clamp(24px, 3.4vw, 40px); }
.plan + .plan { border-left: 1px solid var(--line); }
.plan h3 { font: 600 22px/1.2 var(--serif); margin: 0; }
.plan .price { font: 300 clamp(40px, 5vw, 54px)/1 var(--sans); letter-spacing: -0.03em; margin: 18px 0 6px; }
.plan .price small { font: 400 15px/1 var(--sans); letter-spacing: 0; color: var(--muted); margin-left: 8px; white-space: nowrap; }
.plan .terms { font-size: 14.5px; color: var(--muted); margin: 0 0 22px; min-height: 2.9em; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 15.5px; }
.plan li { padding-left: 22px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 9px; height: 5px; border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent); transform: rotate(-45deg); transform-origin: left bottom; }
.trial { margin: 22px 0 0; font-size: 15.5px; color: var(--muted); max-width: 70ch; }

.get { text-align: left; }
.get .box { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.get img { width: 84px; height: 84px; }
.get .req { font-size: 14.5px; color: var(--muted); margin: 6px 0 0; }
[hidden] { display: none !important; }

footer { border-top: 1px solid var(--line); padding-block: 36px 56px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--fg); }
footer .spacer { flex: 1; }

/* ---------- text pages ---------- */
.doc { padding-block: clamp(48px, 7vw, 88px); max-width: 720px; }
.doc h1 { font: 600 clamp(34px, 5vw, 50px)/1.08 var(--serif); letter-spacing: -0.022em; margin: 0 0 20px; }
.doc h2 { font: 600 23px/1.25 var(--serif); margin: 44px 0 12px; }
.doc p, .doc li { font-size: 16.5px; line-height: 1.68; }
.doc li { margin-bottom: 8px; }
.doc code { font: 400 0.88em var(--mono); background: var(--card); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.doc a { color: var(--accent); }
.doc .updated { color: var(--muted); font-size: 14.5px; }

@media (max-width: 860px) {
  .split, .plans { grid-template-columns: minmax(0, 1fr); }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--line); }
  .rows > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .also { columns: 1; }
  .top nav a.hide-s { display: none; }
  .top .wrap { gap: 16px; }
}
kbd { font: 500 0.82em var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--raised); }

/* ---------- the app, playing itself ---------- */
.play { margin-top: clamp(44px, 6vw, 68px); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: 0 50px 110px -50px var(--shadow); }
.play-chrome, .vault-chrome { height: 42px; display: flex; align-items: center; gap: 14px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--band); font: 500 13px/1 var(--sans); color: var(--muted); }
.play-lights { display: flex; gap: 7px; flex: none; }
.play-lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.play-title { flex: 1; text-align: center; color: var(--fg); }
.play-pad { width: 47px; }
.play-body { display: grid; grid-template-columns: 190px minmax(0, 1fr) 320px; height: 470px; }
.play-nav { border-right: 1px solid var(--line); background: var(--band); padding: 16px 12px; font-size: 13.5px; display: grid; align-content: start; gap: 2px; }
.play-nav span { padding: 7px 10px; border-radius: 7px; color: var(--muted); }
.play-nav span.on { background: var(--card); color: var(--fg); }
.play-main { padding: 28px 40px; overflow: hidden; position: relative; }
.play-add { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; background: var(--raised); font-size: 15px; color: var(--muted); }
.play-typed { color: var(--fg); }
.play-caret { width: 1.5px; height: 18px; background: var(--fg); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.play-paper { position: absolute; inset: 28px 40px; font: 400 17.5px/1.75 var(--serif); opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s; }
.play-paper.in { opacity: 1; transform: none; }
.play-paper h2 { font: 600 26px/1.2 var(--serif); margin: 0 0 4px; letter-spacing: -0.01em; }
.play-paper p { margin: 0 0 1em; }
.play-paper .play-au { font: 400 14.5px/1.4 var(--sans); color: var(--muted); margin-bottom: 20px; }
.play-hl { background-image: linear-gradient(var(--hl-definition), var(--hl-definition)); background-repeat: no-repeat; background-size: 0% 100%; transition: background-size .9s cubic-bezier(.2,.7,.2,1); -webkit-box-decoration-break: clone; box-decoration-break: clone; border-radius: 3px; }
.play-hl.on { background-size: 100% 100%; }
.play-side { border-left: 1px solid var(--line); background: var(--band); padding: 16px 18px; font-size: 14.5px; line-height: 1.6; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.play-tabs { display: flex; gap: 2px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.play-tabs span { padding: 5px 8px; border-radius: 6px; }
.play-tabs span.on { background: var(--card); color: var(--fg); }
.play-q { margin: 0; font-weight: 500; opacity: 0; transition: opacity .3s; }
.play-q.in, .play-saved.in { opacity: 1; }
.play-a { margin: 0; font-family: var(--serif); font-size: 15.5px; }
.play-saved { margin: auto 0 0; font-size: 12.5px; color: var(--muted); opacity: 0; transition: opacity .4s; display: flex; gap: 7px; align-items: center; }
.play-saved::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-question); flex: none; }
.play-steps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; gap: 8px 26px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.play-steps li { transition: color .3s; }
.play-steps li.on { color: var(--fg); }

/* ---------- the vault, growing ---------- */
.vault { margin-top: clamp(40px, 5vw, 60px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: stretch; }
.vault-win { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--raised); box-shadow: 0 40px 100px -50px var(--shadow); display: flex; flex-direction: column; }
.vault-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); flex: 1; min-height: 470px; }
.vault-tree { list-style: none; margin: 0; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--band); font-size: 13px; line-height: 1.3; }
.vault-tree li { padding: 5px 8px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vault-tree .dir { color: var(--muted); font-weight: 500; margin-top: 8px; }
.vault-tree .dir:first-child { margin-top: 0; }
.vault-tree .f { padding-left: 20px; transition: opacity .4s, transform .4s, background-color .6s; }
.vault-tree .f.open { background: var(--card); }
.vault-tree .f.new { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.vault-note { padding: 22px 26px; font-size: 14.5px; line-height: 1.6; min-width: 0; }
.vault-note h3 { font: 600 24px/1.2 var(--serif); margin: 0 0 8px; }
.vault-note h4 { font: 600 13.5px/1.3 var(--sans); margin: 18px 0 6px; color: var(--muted); }
.vault-note p { margin: 0; }
.vn-props { font: 400 12px/1.7 var(--mono); color: var(--fg); border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 16px !important; overflow-wrap: anywhere; }
.vn-props span { color: var(--muted); display: inline-block; min-width: 54px; }
.vn-props { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vn-links span, .vn-appears span { color: var(--accent); }
.vn-appears { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vn-appears li { padding-left: 14px; position: relative; transition: opacity .45s, transform .45s; }
.vn-appears li::before { content: ""; position: absolute; left: 0; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.vn-appears li span { display: block; }
.js .vault [data-at] { opacity: 0; transform: translateY(4px); }
.js .vault [data-at].shown { opacity: 1; transform: none; }
.graph { border: 1px solid var(--line); border-radius: 14px; background: var(--raised); display: flex; flex-direction: column; overflow: hidden; }
.graph svg { width: 100%; height: auto; display: block; flex: 1; }
.graph-now { margin: 0; padding: 12px 18px 16px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); min-height: 3.2em; }
.graph-now b { color: var(--fg); font-weight: 600; }
.g-edge { stroke: var(--line); stroke-width: 1.2; transition: stroke .4s, stroke-width .4s, opacity .4s; }
.g-edge.prereq { stroke-dasharray: 3 4; }
.g-edge.fresh { stroke: var(--accent); stroke-width: 1.6; }
.g-node circle { transition: r .5s cubic-bezier(.2,.7,.2,1), fill .4s; }
.g-node .halo { fill: var(--accent); opacity: 0; transition: opacity .6s; }
.g-node.fresh .halo { opacity: .18; }
.g-node.paper circle.dot { fill: var(--fg); }
.g-node.concept circle.dot { fill: var(--accent); }
.g-node text { font: 500 15px var(--sans); fill: var(--muted); transition: fill .3s; }
.g-node.paper text { font: 600 16px var(--serif); fill: var(--fg); }
.g-node, .g-edge { transition: opacity .5s; }
.g-hidden { opacity: 0; }
.graph svg.hovering .g-node:not(.near), .graph svg.hovering .g-edge:not(.near) { opacity: .18; }
.g-node { cursor: default; }
.vault-rows { margin-top: clamp(40px, 5vw, 56px); }
.hero h1 { max-width: 20ch; }

@media (max-width: 980px) {
  .play-body { grid-template-columns: minmax(0, 1fr) 280px; }
  .play-nav { display: none; }
  .vault { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .play-body { grid-template-columns: minmax(0, 1fr); height: auto; }
  .play-main { height: 300px; padding: 20px; }
  .play-paper { inset: 20px; font-size: 16px; }
  .play-side { border-left: 0; border-top: 1px solid var(--line); min-height: 230px; }
  .vault-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .vault-tree { display: none; }
}
