/* Tokens from lumnik-site/styles.css: glacial night, one yellow light. */
:root {
  color-scheme: dark;
  --nuit: #060d16;
  --glace: #122233;
  --givre: #1c3349;
  --neige: #d1d7e0;
  --brume: #9198a1;
  --lumiere: #ffd24a;
  --lueur: rgba(255, 210, 74, 0.14);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --maxw: 1120px;
  --radius: 14px;
  --stage-height: clamp(460px, 65svh, 680px);
}

* { box-sizing: border-box; }
html { background: var(--nuit); color: var(--neige); }
body { margin: 0; font: 16px/1.6 var(--sans); background: var(--nuit); }
:focus-visible { outline: 2px solid var(--lumiere); outline-offset: 2px; }

.top, main { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--givre); }
.brand { font: 600 20px var(--serif); color: var(--neige); text-decoration: none; }
.brand .dot { color: var(--lumiere); }
.crumb { color: var(--neige); }
.meta { color: var(--brume); font-size: 14px; }
.meta .lang { color: var(--neige); text-underline-offset: 3px; }
.meta .lang:hover { color: var(--lumiere); }

.hero { padding: 48px 0 24px; max-width: 760px; }
h1 { font: 500 clamp(32px, 5vw, 52px)/1.1 var(--serif); margin: 0 0 20px; }
.lede { color: var(--brume); font-size: 18px; margin: 0 0 20px; }
.goal { font-size: 19px; margin: 0 0 20px; padding: 10px 14px; border-left: 3px solid var(--lumiere); background: rgba(255, 210, 74, 0.06); }
.goal strong { color: var(--lumiere); font-weight: 600; margin-right: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tag { border: 1px solid var(--givre); border-radius: 999px; padding: 2px 12px; font-size: 13px; }
.tag.kind { color: var(--lumiere); border-color: rgba(255, 210, 74, 0.4); }
.tag.edition { font-weight: 600; }
.tag.edition a { color: inherit; text-decoration: none; }
.tag.edition-pro { border-color: var(--lumiere); }

.steps-nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 1px solid var(--givre);
  border-radius: var(--radius) var(--radius) 0 0; margin-top: 32px; overflow: hidden; }
.steps-nav a { display: flex; flex-direction: column; padding: 12px 14px; color: var(--neige);
  text-decoration: none; border-right: 1px solid var(--givre); border-bottom: 3px solid transparent; }
.steps-nav a:last-child { border-right: 0; }
.steps-nav a[aria-current] { background: var(--lueur); border-bottom-color: var(--lumiere); }
.steps-nav .num { font-weight: 600; font-size: 14px; }
.steps-nav .sub { color: var(--brume); font-size: 13px; }

.step { overflow: hidden; border: 1px solid var(--givre); border-top: 0; margin-bottom: 24px; }
.js .step[data-inactive] { display: none; }
.views { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0;
  height: var(--stage-height); }
.view-tabs { display: flex; gap: 4px; min-width: 0; overflow-x: auto; padding: 0 12px;
  border-bottom: 1px solid var(--givre); }
.view-tabs button { background: none; border: 0; color: var(--brume); font: 500 14px var(--sans);
  flex: none; padding: 14px 10px; border-bottom: 2px solid transparent; cursor: pointer; }
.view-tabs button[aria-selected="true"] { color: var(--lumiere); border-bottom-color: var(--lumiere); }
.view-panel { min-width: 0; min-height: 0; overflow: auto; padding: 16px 20px 20px;
  scrollbar-gutter: stable; }
.view-panel-commands { background: var(--glace); padding: 0; }
.view-panel-commands .terminal { min-height: 100%; border-radius: 0; padding: 18px 0; }

.file { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.filename { font: 13px var(--mono); color: var(--brume); }
.copy { background: none; border: 1px solid var(--givre); color: var(--neige); border-radius: 8px;
  font: 13px var(--sans); padding: 4px 10px; cursor: pointer; }
.code { margin: 0; font: 13px/1.6 var(--mono); overflow-x: auto; background: var(--glace);
  border-radius: 10px; padding: 14px 0; }
.code code { display: block; min-width: max-content; }
.yaml .line { display: block; padding: 0 16px; }
.yaml .line.hl { background: var(--lueur); box-shadow: inset 3px 0 var(--lumiere); }
.yaml .key { color: #9cc4ff; }
.yaml .str { color: #b5e3a8; }
.yaml .comment { color: var(--brume); font-style: italic; }
.yaml .dash { color: var(--lumiere); }
.terminal code { padding: 0 16px; white-space: pre; }
.terminal .cmd { color: var(--neige); font-weight: 500; }
.terminal .prompt { color: var(--lumiere); }
.terminal .out { color: #b9c3cf; }
.terminal .note { color: var(--lumiere); }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--givre); white-space: nowrap; }
th { color: var(--brume); font: 500 12px var(--mono); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0; }
.facts dt { color: var(--brume); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.transition { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.transition .doc { width: 100%; color: var(--brume); }
.transition .state { font: 500 15px var(--mono); border: 1px solid var(--givre); border-radius: 8px; padding: 6px 12px; }
.transition .state.now { border-color: var(--lumiere); color: var(--lumiere); }
.transition .arrow { color: var(--lumiere); }
.shot { margin: 0 0 20px; }
.shot img { display: block; width: auto; max-width: 100%; height: auto; border: 1px solid var(--givre); border-radius: 10px; }
.shot figcaption { color: var(--brume); font-size: 13px; margin-top: 6px; }
.code + .file { margin-top: 20px; }
.sources { color: var(--brume); font: 12px var(--mono); margin: 16px 0 0; overflow-wrap: anywhere; }

.explain { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .8fr);
  align-items: start; gap: 24px; min-width: 0; padding: 20px 24px; border-bottom: 1px solid var(--givre); }
.explain h2 { font: 500 26px/1.2 var(--serif); margin: 0 0 12px; }
.explain p { color: var(--brume); margin: 0 0 16px; }
.points { list-style: none; padding: 0; margin: 0 0 16px; }
.points li { display: flex; gap: 12px; margin-bottom: 12px; }
.points .n { flex: none; width: 24px; height: 24px; border: 1px solid var(--lumiere); border-radius: 50%;
  color: var(--lumiere); font-size: 13px; display: grid; place-items: center; }
.points p { margin: 2px 0 0; font-size: 14px; }
.proves { border-left: 1px solid var(--givre); padding-left: 20px; }
.proves h3 { font: 600 13px var(--sans); color: var(--lumiere); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .04em; }

.limits { margin: 40px 0 64px; max-width: 760px; }
.limits h2 { font: 500 24px var(--serif); }
.limits li { color: var(--brume); margin-bottom: 8px; }

@media (max-width: 860px) {
  .step { overflow: visible; }
  .views { height: min(520px, 60svh); }
  .steps-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(120px, 1fr);
    overflow-x: auto; }
  .view-panel { padding: 12px; }
  .view-panel-commands { padding: 0; }
  .explain { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 16px; }
  .proves { border-left: 0; border-top: 1px solid var(--givre); padding: 12px 0 0; }
  /* phone = cards: a record reads top to bottom instead of scrolling sideways */
  table, tbody, tr, td { display: block; min-width: 0; }
  thead { display: none; }
  td { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 12px; white-space: normal;
    overflow-wrap: anywhere; padding: 6px 0; }
  td::before { content: attr(data-label); color: var(--brume); font: 12px var(--mono); }
}

@media (prefers-reduced-motion: no-preference) {
  .steps-nav a, .view-tabs button { transition: background-color .2s, color .2s, border-color .2s; }
}

/* the catalogue of every published scenario */
.meta a { color: var(--neige); text-underline-offset: 3px; }
.catalogue .group h2 { font: 500 24px/1.2 var(--serif); margin: 32px 0 16px; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card a { display: flex; flex-direction: column; gap: 10px; height: 100%; box-sizing: border-box; padding: 20px;
  border: 1px solid var(--givre); border-radius: 12px; color: var(--neige); text-decoration: none; }
.card a:hover, .card a:focus-visible { border-color: var(--lumiere); background: var(--lueur); }
.card h3 { font: 500 20px/1.25 var(--serif); margin: 0; padding-right: 56px; }
/* The edition a scenario needs, as a band across the card's corner. */
.card a { position: relative; overflow: hidden; }
.ribbon { position: absolute; top: 14px; right: -34px; width: 120px; transform: rotate(45deg);
  text-align: center; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 0; border-top: 1px solid var(--givre); border-bottom: 1px solid var(--givre); color: var(--neige); background: var(--givre); }
.ribbon-pro { background: var(--lumiere); border-color: var(--lumiere); color: var(--nuit); }
.card p { color: var(--brume); margin: 0; }
/* Rows (the default): one scenario per line, the goal under the title, so a visitor picks what to read. */
.view-rows .cards { grid-template-columns: 1fr; gap: 10px; }
.view-rows .card a { padding: 16px 20px; gap: 6px; }
.view-rows .card .open { margin-top: 4px; }
.card .goal { margin: 0; padding: 0; border: 0; background: none; color: var(--brume); font-size: 15px; max-width: none; }
.view-tiles .card .goal { display: none; }
.layout-switch { display: flex; justify-content: flex-end; gap: 6px; margin-top: 16px; }
.layout-switch button { font: inherit; font-size: 14px; color: var(--neige); background: none; cursor: pointer;
  border: 1px solid var(--givre); border-radius: 999px; padding: 4px 12px; }
.layout-switch button[aria-pressed="true"] { border-color: var(--lumiere); color: var(--lumiere); }
.card .open { margin-top: auto; color: var(--lumiere); font-size: 14px; }

/* The catalogue's head: how many scenarios, how many on the free edition, and the families. */
.count { color: var(--neige); margin: 0 0 16px; }
.count a { color: var(--lumiere); text-underline-offset: 3px; }
.families { display: flex; flex-wrap: wrap; gap: 8px; }
.families a { border: 1px solid var(--givre); border-radius: 999px; padding: 4px 12px; color: var(--neige);
  text-decoration: none; font-size: 14px; }
.families a:hover, .families a:focus-visible { border-color: var(--lumiere); color: var(--lumiere); }
.group-line { color: var(--brume); margin: -8px 0 16px; max-width: 760px; }

/* The closing block of a scenario page: where to try what the page showed. */
.try { margin: -24px 0 64px; max-width: 760px; padding: 20px 24px; border: 1px solid rgba(255, 210, 74, 0.4);
  border-radius: var(--radius); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; }
.try p { margin: 0; color: var(--neige); }
.try-button { display: inline-block; padding: 10px 18px; border-radius: 999px; background: var(--lumiere);
  color: var(--nuit); font-weight: 600; text-decoration: none; }
.try-button:hover, .try-button:focus-visible { box-shadow: 0 0 24px var(--lueur); }

/* Page tabs: the walkthrough and the brief. Without the script both panels show, one after the other. */
.page-tabs { display: flex; gap: 4px; margin-top: 8px; border-bottom: 1px solid var(--givre); }
.page-tabs button { background: none; border: 0; color: var(--brume); font: 600 15px var(--sans);
  padding: 12px 14px; border-bottom: 3px solid transparent; cursor: pointer; }
.page-tabs button[aria-selected="true"] { color: var(--neige); border-bottom-color: var(--lumiere); }
.page-tabs button:hover { color: var(--neige); }

.brief { max-width: 760px; padding: 8px 0 24px; }
.brief-slide { padding: 28px 0; border-bottom: 1px solid var(--givre); }
.brief-slide:last-child { border-bottom: 0; }
.brief-kicker { color: var(--lumiere); font: 600 13px var(--sans); letter-spacing: 0.08em;
  text-transform: uppercase; margin: 0 0 8px; }
.brief h2 { font: 500 clamp(24px, 3.4vw, 32px)/1.2 var(--serif); margin: 0 0 12px; }
.brief h3 { font: 500 22px/1.3 var(--serif); margin: 16px 0 8px; }
.brief p { margin: 0 0 12px; font-size: 17px; }
.brief-lead { color: var(--lumiere); font-size: 19px; }
.brief-note { color: var(--brume); font-size: 14px; }
.brief-list { margin: 8px 0 12px; padding-left: 22px; font-size: 17px; }
.brief-list li { margin: 6px 0; }
.brief-list.tone-green li::marker { color: #62e39b; }
.brief-list.tone-yellow li::marker { color: var(--lumiere); }
.brief-list.tone-cyan li::marker { color: #82ddf5; }
.brief-code { background: var(--glace); border: 1px solid var(--lumiere); border-radius: var(--radius);
  padding: 14px 18px; overflow-x: auto; font: 500 15px/1.5 var(--mono); color: var(--lumiere); margin: 8px 0 14px; }
.brief-quote { margin: 8px 0 14px; padding: 16px 20px; border: 1px solid var(--lumiere); border-radius: var(--radius);
  background: var(--glace); }
.brief-quote figcaption { color: var(--lumiere); font: 600 13px var(--sans); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 6px; }
.brief-quote blockquote { margin: 0; font: 400 16px/1.5 var(--mono); }
.lede-list { color: var(--brume); font-size: 18px; margin: -12px 0 20px; padding-left: 22px; }
.lede-list li { margin: 2px 0; }
.lede-list li::marker { color: var(--lumiere); }
.prose-list { margin: 4px 0 8px; padding-left: 20px; }
.prose-list li { margin: 2px 0; }
.prose-list li::marker { color: var(--lumiere); }
.explain .prose-list { color: var(--brume); margin: -8px 0 16px; }

.source { margin: 0 0 16px; }
.source figcaption { font: 500 13px var(--mono, monospace); color: var(--lumiere); margin: 0 0 6px; }
.source pre { overflow-x: auto; white-space: pre; margin: 0; }
.source-more { color: var(--brume); font-size: 13px; margin: 6px 0 0; }
