/* Layout and components. Values come from tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + var(--contour-width) + 16px);
  scroll-padding-bottom: calc(var(--surround-gap) + var(--contour-width) + 16px);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--surround);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-ui);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
img, svg { display: block; }
code, pre { font-family: var(--font-mono); }
strong { font-weight: 500; color: var(--text); }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: var(--ring-stroke) solid var(--signal); outline-offset: 2px; border-radius: 2px; }
main:focus { outline: none; }

.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: 16px; top: 12px; z-index: 60;
  transform: translateY(-200%);
  display: inline-flex; align-items: center; min-height: var(--button-height); padding: 0 20px;
  border-radius: var(--radius-pill); background: var(--contour); color: var(--text);
  font-size: 12.5px; font-weight: 500; text-decoration: none;
}
.skip:focus-visible { transform: none; }

.label {
  font-size: var(--text-label); font-weight: 500; letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--text-muted); line-height: 1.4;
}

.pending {
  display: inline-block; font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.5;
  color: var(--text-faint); border: 1px dashed var(--rule); border-radius: 4px; padding: 1px 8px;
  overflow-wrap: anywhere;
}

/* ---- header on the dark surround ---- */

/* The header and the ivory contour stay in place; the page scrolls inside the contour. */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 40; background: var(--surround); color: var(--on-dark); }
.frame {
  position: fixed; z-index: 30; pointer-events: none;
  top: var(--header-height); left: var(--surround-gap); right: var(--surround-gap);
  bottom: max(var(--surround-gap), env(safe-area-inset-bottom));
  border: var(--contour-width) solid var(--contour); border-radius: var(--radius-sheet);
  box-shadow: 0 0 0 200vmax var(--surround);
}
.site-header .bar {
  display: flex; align-items: center; gap: 8px;
  min-height: var(--header-height);
  padding: 0 max(26px, env(safe-area-inset-right)) 0 max(26px, env(safe-area-inset-left));
}
.wordmark.unnamed .pending { color: var(--on-dark-faint); border-color: rgba(251, 249, 242, 0.3); letter-spacing: 0; text-transform: none; }
.wordmark {
  margin-right: auto; color: var(--on-dark); text-decoration: none;
  font-size: 13px; font-weight: 500; letter-spacing: var(--tracking-mark); text-transform: uppercase;
}
.nav { display: flex; align-items: center; gap: 28px; margin-right: 22px; }
.nav a {
  color: var(--on-dark-nav); text-decoration: none; font-size: var(--text-xs); font-weight: 500;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  padding: 10px 0 8px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: #efede4; }
.nav a[aria-current="page"] { color: var(--on-dark-strong); border-bottom-color: var(--signal); }
.nav a[aria-current="page"]:focus-visible { outline-offset: 4px; }
.action {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--button-height); padding: 0 20px;
  border-radius: var(--radius-pill); background: var(--contour); color: var(--text);
  font-size: 12.5px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.action-marker { background: transparent; color: var(--on-dark); border: 1px solid rgba(251, 249, 242, 0.28); }
.lang-switch {
  display: flex; align-items: center; gap: 4px; margin-right: 22px;
  font-size: var(--text-xs); font-weight: 500; letter-spacing: var(--tracking-label); text-transform: uppercase;
}
.lang-switch a, .lang-current { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; min-width: 24px; color: var(--on-dark-nav); text-decoration: none; }
.lang-switch a:hover { color: #efede4; }
.lang-current { color: var(--on-dark-strong); }
.lang-sep { color: var(--on-dark-faint); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex: none; }
.menu { display: none; }

/* ---- the sheet: ivory contour around the canvas page ---- */

.sheet {
  margin: calc(var(--header-height) + var(--contour-width)) calc(var(--surround-gap) + var(--contour-width))
    calc(max(var(--surround-gap), env(safe-area-inset-bottom)) + var(--contour-width));
  min-height: calc(100vh - var(--header-height) - 2 * var(--contour-width) - var(--surround-gap));
  background: var(--page);
  overflow-x: hidden;
  overflow-x: clip;
}
.page { padding: 0 var(--gutter); }

.strip {
  display: flex; flex-wrap: wrap; align-items: center; row-gap: 6px;
  margin: 0 calc(-1 * var(--gutter)); padding: 11px 20px;
  border-bottom: 1px solid var(--rule-soft); font-size: var(--text-small); line-height: 1.4;
}
.strip-label { font-family: var(--font-mono); font-size: var(--text-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-faint); padding-right: 14px; }
.strip .layer { padding: 0 14px; border-left: 1px solid var(--rule-soft); color: var(--text); }
.strip .layer.current { font-weight: 500; }
.strip .route { font-size: var(--text-xs); font-weight: 400; }
.strip .version-pair { margin-left: auto; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); }
.m-version { margin-top: 4px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); }
.strip-break { display: none; }

main { padding: 64px 0 var(--section-gap); }
main > *, .kit > *, .seg-panel > * { margin-left: auto; margin-right: auto; }
main > *, .seg-panel > * { max-width: var(--measure); }
main > .seg-panel { max-width: none; }
.w-col { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.w-ladder { max-width: var(--measure-ladder); margin-left: auto; margin-right: auto; }
.w-wide { max-width: var(--measure-wide); margin-left: auto; margin-right: auto; }
.w-panel { max-width: var(--measure-panel); margin-left: auto; margin-right: auto; }

/* ---- page header ---- */

.page-head .back { display: inline-flex; gap: 5px; font-size: var(--text-small); font-weight: 500; margin-bottom: 18px; }
.meta + .meta-owner { margin-top: 8px; color: var(--text-muted); }
.eyebrow {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-size: var(--text-label); font-weight: 500; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-muted);
}
.eyebrow::before, .sec::before {
  content: ""; width: var(--ring-size); height: var(--ring-size); box-sizing: content-box;
  border: var(--ring-stroke) solid var(--signal); border-radius: 50%; flex: none;
}
h1 { font-size: var(--text-title); font-weight: 500; line-height: 1.02; letter-spacing: -0.025em; }
.subtitle { margin-top: 18px; font-size: var(--text-lead); color: var(--text); }
.lead { margin-top: 20px; font-size: var(--text-lead); line-height: 1.5; color: var(--text); }
.page-head.home + .prose { margin-top: 28px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; margin-top: 18px; font-size: var(--text-small); color: var(--text); }
.meta > span + span { margin-left: 13px; padding-left: 13px; border-left: 1px solid var(--rule-soft); }
.page-head .meta > .pending + .pending { margin-left: 8px; }
.page-head + .meta, .prose + .meta { margin-top: 20px; font-weight: 500; }

/* ---- reading column ---- */

.prose, .kit p, .kit li, .prose-list li { font-size: var(--text-body); line-height: var(--leading-body); color: var(--text-muted); }
p.prose { margin-top: 20px; }
.prose-list { margin-top: 16px; padding-left: 1.3em; }
.prose-wide { max-width: var(--measure); font-size: var(--text-body); line-height: var(--leading-body); color: var(--text-muted); margin: 16px 0; }
.w-wide.prose-wide { margin-left: auto; margin-right: auto; max-width: var(--measure-wide); padding-right: calc(var(--measure-wide) - var(--measure)); }
.lead.w-col { margin-top: 18px; }
.sec {
  display: flex; align-items: center; gap: 10px;
  margin-top: var(--section-gap); margin-bottom: 18px;
  font-size: var(--text-section); font-weight: 500; letter-spacing: -0.01em; line-height: 1.3;
}
.sec.wide { max-width: var(--measure-wide); }
main > .sec, .seg-panel > .sec { max-width: var(--measure); }
main > .sec.wide, .seg-panel > .sec.wide { max-width: var(--measure-wide); }
main > .sec.at-ladder, .seg-panel > .sec.at-ladder { max-width: var(--measure-ladder); }
main > .prose.w-ladder { max-width: var(--measure-ladder); }
.sec .num { font-weight: 500; }
.small { margin-top: 16px; font-size: var(--text-small); color: var(--text-faint); }
.note { display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; font-size: var(--text-small); color: var(--text-muted); }
.note::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--signal); }
.placeholder-line { margin-top: 20px; }

.contents { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule-soft); }
.contents ol { list-style: none; margin-top: 12px; }
.contents a { display: grid; grid-template-columns: 34px auto 1fr; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); text-decoration: none; }
.contents .c-num { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); }
.contents .c-title { font-weight: 500; }
.contents .c-desc { justify-self: end; text-align: right; font-size: var(--text-small); color: var(--text-muted); }
.contents a:hover .c-title { text-decoration: underline; }

.inpage ul { list-style: none; display: grid; gap: 6px; margin-top: 18px; }
.inpage a { font-size: var(--text-small); }

/* ---- image slots ---- */

.slot { margin-top: 56px; margin-bottom: 8px; }
.slot-box, .portrait .slot-box {
  aspect-ratio: var(--ratio);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center;
  background-color: var(--inset);
  background-image: repeating-linear-gradient(135deg, rgba(27, 26, 22, 0.035) 0 1px, transparent 1px 11px);
  border: 1px solid var(--rule-soft); border-radius: 4px;
}
.slot-ratio { font-family: var(--font-mono); font-size: var(--text-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-faint); }
.slot-intent { max-width: 460px; font-family: var(--font-mono); font-size: var(--text-small); line-height: 1.6; color: var(--text-muted); }
.slot .r-m { display: none; }
.slot.has-image img { display: block; width: 100%; height: auto; aspect-ratio: var(--ratio); object-fit: cover; object-position: var(--focus); border-radius: 4px; background: var(--surround); }
.slot figcaption { margin-top: 10px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); }
.portrait { width: 220px; margin: 6px 0 28px; }
.portrait .slot-box { aspect-ratio: 1 / 1; padding: 16px; }
.portrait figcaption { margin-top: 10px; }

/* ---- pairs, roles, stacks, numbered lists ---- */

.pairs { margin-top: 8px; }
.pair { padding: 20px 0; }
.pair + .pair { border-top: 1px solid var(--rule-soft); }
.pair-term { font-size: var(--text-body); font-weight: 500; }
.pair .prose { margin-top: 6px; }

.roles { margin-top: 48px; }
.role { padding: 24px 0; }
.role + .role { border-top: 1px solid var(--rule-soft); }
.role-title { margin-top: 8px; font-size: var(--text-section); font-weight: 500; }
.role .prose { margin-top: 8px; }

.stack .stack-item { padding: 22px 0; }
.stack-item + .stack-item { border-top: 1px solid var(--rule-soft); }
.stack .label { display: flex; align-items: center; gap: 8px; }
.stack-title { margin-top: 10px; font-size: var(--text-body); font-weight: 500; }
.stack-text { margin-top: 6px; font-size: 15px; line-height: 1.65; color: var(--text-muted); }

.entry-chip {
  position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px;
  border: 1px solid var(--rule); border-radius: 50%; background: var(--page);
  font-family: var(--font-mono); font-size: var(--text-label); font-weight: 500; letter-spacing: 0; color: var(--text); text-decoration: none; text-transform: uppercase;
}
a.entry-chip:hover { border-color: var(--text); }

.numbered { list-style: none; margin-top: 8px; }
.numbered li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 18px 0; }
.numbered li + li { border-top: 1px solid var(--rule-soft); }
.numbered .n { font-size: 24px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; color: var(--text-faint); }
.num-title { font-size: var(--text-body); font-weight: 500; }
.num-text { margin-top: 4px; font-size: var(--text-body); line-height: 1.6; color: var(--text-muted); }
.num-text.solo { margin-top: 0; }

.ladder { list-style: none; margin-top: 8px; }
.rung { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 28px 0; }
.rung + .rung { border-top: 1px solid var(--rule-soft); }
.rung-num { font-size: var(--text-title); font-weight: 500; letter-spacing: -0.04em; line-height: 0.95; color: var(--text-faint); }
.rung-primary .rung-num { color: var(--text); }
.rung-title { margin-top: 6px; font-size: var(--text-section); font-weight: 500; }
.rung-text { margin-top: 8px; font-size: var(--text-ui); color: var(--text-muted); }
.rung-note { margin-top: 6px; font-size: var(--text-ui); font-weight: 500; color: var(--text); }
.rung-link { margin-top: 12px; font-size: var(--text-small); font-weight: 500; }
.offer-price { font-size: 28px; font-weight: 500; line-height: 1.25; letter-spacing: -0.015em; color: var(--text); }
.offer .offer-rows { margin-top: 16px; border-top: 1px solid var(--rule-soft); }
.offer .offer-rows li { color: var(--text); }
.offer .offer-action { margin-top: 20px; }
.offer .offer-note { margin-top: 10px; }
.pending-row .pending-chips .btn { margin-right: 4px; }
.rung-link .btn { margin-top: 4px; }

.rows { list-style: none; margin-top: 4px; }
.rows li { padding: 12px 0; font-size: var(--text-body); color: var(--text-muted); }
.rows li + li { border-top: 1px solid var(--rule-soft); }

.labelled { margin-top: 36px; }
.labelled .prose { margin-top: 8px; }
.labelled + .labelled { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--rule-soft); }

.plain-list { list-style: none; margin-top: 4px; }
.plain-list li { padding: 12px 0; font-size: var(--text-ui); }
.plain-list li + li { border-top: 1px solid var(--rule-soft); }

.rail { list-style: none; margin-top: 8px; }
.rail li { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 14px 0; }
.rail li + li > div { border-top: 1px solid var(--rule-soft); }
.rail li + li { padding-top: 0; }
.rail li + li > div { padding-top: 14px; }
.rail li::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.rail li:first-child::before { top: 20px; }
.rail li:last-child::before { bottom: auto; height: 20px; }
.rail li + li:last-child::before { height: 20px; }
.rail-dot { position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px var(--page); }
.rail li + li .rail-dot { margin-top: 20px; }
.rail-title { font-size: var(--text-ui); font-weight: 500; color: var(--text); }
.rail-text { margin-top: 4px; font-size: var(--text-body); line-height: 1.6; color: var(--text-muted); }
.numbered-rail li::before { left: 11px; }
.numbered-rail li + li > div { border-top: 0; }
.rail-num { position: relative; z-index: 1; display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid var(--rule); border-radius: 50%; background: var(--page); font-size: 10px; color: var(--text-faint); }
.numbered-rail li { grid-template-columns: 24px 1fr; }
.numbered-rail li + li .rail-num { margin-top: 14px; }
.sec-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-top: var(--section-gap); margin-bottom: 18px; }
.sec-row > .sec { margin: 0; }
.sec-row.inline { justify-content: flex-start; }
.sec-aside { font-size: var(--text-xs); color: var(--text-faint); }

/* ---- buttons ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--button-height); padding: 0 20px; border-radius: var(--radius-pill);
  border: 1px solid transparent; font-size: 12.5px; font-weight: 500; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--text); color: var(--contour); }
.btn-primary:hover { background: #33312a; }
.btn-outline { border-color: #b5b3a8; color: var(--text); }
.btn-outline:hover { border-color: var(--text); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }

/* ---- the crossing diagram ---- */

.crossing { margin-top: 8px; }
.x-card { max-width: 430px; margin: 0 auto; padding: 20px 24px 16px; text-align: center; background: var(--inset); border: 1px solid var(--rule); border-radius: var(--radius-card); }
.x-title { margin-top: 6px; font-size: var(--text-section); font-weight: 500; }
.x-text { margin-top: 8px; font-size: var(--text-small); line-height: 1.55; color: var(--text-muted); }
.x-axis { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule-soft); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-faint); }
.x-line { flex: 1; height: 1px; background: var(--rule); }
.x-beads { letter-spacing: 0.2em; color: var(--text); }
.x-head, .x-rows li { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: start; }
.x-head { margin-top: 26px; padding-bottom: 10px; border-bottom: 1px solid var(--rule-soft); font-size: var(--text-table-head); letter-spacing: var(--tracking-table-head); text-transform: uppercase; color: var(--text-faint); }
.x-head span:first-child { grid-column: 1; text-align: right; }
.x-head span:last-child { grid-column: 3; }
.x-rows { list-style: none; position: relative; }
.x-rows::before { content: ""; position: absolute; left: 50%; top: -27px; bottom: -14px; width: 1px; background: var(--text); transform: translateX(-0.5px); }
.x-rows li { padding: 16px 0; border-bottom: 1px solid var(--rule-soft); }
.x-cap { text-align: right; font-weight: 500; font-size: var(--text-ui); }
.x-dot { position: relative; justify-self: center; width: 9px; height: 9px; margin-top: 16px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 4px var(--page); }
.x-ret { font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.x-pill { position: relative; width: max-content; margin: 14px auto 0; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--text); color: var(--contour); font-size: var(--text-xs); font-weight: 500; }

/* ---- contract ---- */

.contract { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 8px; }
.contract .label { padding-bottom: 10px; border-bottom: 1px solid var(--rule); color: var(--text-faint); }
.contract ul { list-style: none; margin-top: 8px; }
.contract li { padding: 7px 0; font-size: var(--text-ui); }

/* ---- dark panels ---- */

.panel {
  position: relative; overflow: hidden; margin-top: 64px; margin-bottom: 8px;
  padding: 44px 48px; border-radius: var(--radius-card); background: var(--inverse); color: var(--on-dark);
}
.panel .panel-in { position: relative; max-width: var(--measure); }
.panel .label { color: var(--on-dark-faint); }
.panel-title { margin-top: 12px; font-size: 24px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; color: var(--on-dark-strong); }
.panel-big { margin-top: 12px; font-size: 24px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.35; color: var(--on-dark-strong); }
.panel-text { margin-top: 14px; font-size: var(--text-body); line-height: var(--leading-body); color: var(--on-dark-muted); }
.panel-small { margin-top: 14px; font-size: var(--text-small); color: var(--on-dark-faint); }
.panel .rays { position: absolute; left: 0; bottom: 0; width: 340px; height: 340px; fill: none; stroke: rgba(251, 249, 242, 0.07); stroke-width: 1; pointer-events: none; }
.quote blockquote p { font-size: 24px; font-weight: 500; line-height: 1.35; letter-spacing: -0.015em; color: var(--on-dark-strong); }
.quote figcaption { margin-top: 16px; }
main > .panel + .labelled { margin-top: 56px; }

/* ---- tables ---- */

.table-wrap { margin-top: 12px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { padding: 9px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: bottom; font-size: var(--text-table-head); font-weight: 500; letter-spacing: var(--tracking-table-head); text-transform: uppercase; color: var(--text-faint); }
.tbl td { padding: var(--row-pad) 12px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; font-size: 13.5px; line-height: 1.55; color: var(--text-muted); overflow-wrap: anywhere; }
.tbl td:first-child { color: var(--text); font-weight: 500; }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl code, .kit code, .skill-fields code, .res-route code { font-size: 0.86em; }

.entries { margin-top: 4px; }
.entries > .prose-wide:first-child { margin-top: 0; }
.entry-table td { font-size: var(--text-ui); color: var(--text); font-weight: 400; }
.entry-table td:first-child { width: 44px; }
.entry-table .e-start { color: var(--text-muted); }
.entry-chip.static { background: transparent; }

/* ---- the gate spine ---- */

.gates-block > .prose-wide:first-child { margin-top: 0; }
.spine-head, .spine { display: grid; grid-template-columns: 56px minmax(0, 1fr) 200px; column-gap: 24px; }
.spine-head { margin-top: 22px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); font-size: var(--text-table-head); letter-spacing: var(--tracking-table-head); text-transform: uppercase; color: var(--text-faint); }
.spine-head span:last-child { padding-left: 0; }
.g-enter { grid-column: 1; grid-row: var(--r); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 0; border-bottom: 1px solid var(--rule-soft); }
.g-main { position: relative; grid-column: 2; grid-row: var(--r); padding: 24px 0 24px 34px; border-bottom: 1px solid var(--rule-soft); }
.g-main::after { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--text); }
.g-main[style*="--r:1;"]::after { top: 36px; }
.g-main.hollow::after { bottom: auto; height: 36px; }
.g-main::before { content: ""; position: absolute; z-index: 1; left: 0; top: 32px; width: 9px; height: 9px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px var(--page); }
.g-main.hollow::before { background: var(--page); border: 1.5px solid var(--text); }
.g-title { display: flex; align-items: baseline; gap: 12px; font-size: var(--text-section); font-weight: 500; }
.g-num { font-size: 40px; font-weight: 500; letter-spacing: -0.04em; line-height: 0.9; color: var(--text-faint); }
.g-do summary { display: none; }
.g-do p { margin: 12px 0 18px; font-size: var(--text-body); line-height: var(--leading-spine); color: var(--text-muted); }
.g-exit { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--rule-soft); font-size: 12.5px; }
.g-exit .label { font-size: 9.5px; color: var(--text-faint); }
.g-tpl { font-size: var(--text-small); font-weight: 500; white-space: nowrap; }
.g-ev { grid-column: 3; grid-row: var(--r) / span var(--span); align-self: start; margin: 20px 0; padding: 14px 16px; border-radius: 10px; background: var(--inset); }
.g-ev.note-only { background: none; padding: 0; margin-top: 30px; }
.ev-title { font-size: 12.5px; font-weight: 500; }
.ev-text { margin-top: 6px; font-size: var(--text-xs); line-height: 1.55; color: var(--text-muted); }
.ev-note { font-size: var(--text-xs); line-height: 1.55; color: var(--text-faint); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--rule-soft); font-size: var(--text-small); color: var(--text-muted); }
.legend .label { color: var(--text-faint); }
.st { display: inline-flex; align-items: center; gap: 7px; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.st-pass::before { background: var(--state-pass); }
.st-open::before { background: var(--state-open); }
.st-blocked::before { background: var(--state-blocked); }
.seg-control { display: none; }

/* ---- first case ---- */

.jump { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-top: 24px; padding: 14px 0; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.jump ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; flex: 1; min-width: 0; }
.jump a { font-size: var(--text-small); }
.gatemap { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule-soft); }
.gm-dots { list-style: none; display: flex; gap: 6px; }
.gm-dots li { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--rule); border-radius: 50%; font-size: 10.5px; color: var(--text); }
.gm-dots li.off { opacity: 0.35; }
.gm-text { font-size: var(--text-small); line-height: 1.5; color: var(--text-muted); }
.gm-link { font-size: var(--text-small); font-weight: 500; white-space: nowrap; }

.steps { list-style: none; margin-top: 16px; }
.step { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; padding: 36px 0; }
.step + .step { border-top: 1px solid var(--rule-soft); }
.step-num { font-size: 32px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; color: var(--text-faint); }
.step-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.step-title { font-size: var(--text-section); font-weight: 500; }
.step-gate { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); }
.step .prose { margin-top: 10px; max-width: var(--measure); }
.fields { margin-top: 18px; max-width: 620px; }
.field { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule-soft); }
.field dt { padding-top: 2px; }
.field dd { font-size: 13.5px; line-height: 1.55; color: var(--text); }
.fields .label { font-size: 9.5px; color: var(--text-faint); }
.field.exit dd { font-weight: 500; }
/* About's publication rows: labels such as “Téléchargements” need a wider column than the step fields. */
.pub-fields .field { grid-template-columns: 150px minmax(0, 1fr); }
.step-template { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-top: 12px; font-size: 12.5px; font-weight: 500; }
.step-template .label { font-size: 9.5px; color: var(--text-faint); }

/* ---- resources ---- */

.tabset { margin-top: 48px; }
.tabbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 51px; border-bottom: 1px solid var(--rule); }
.tabbar:has(.tablist-slot:empty) { border-bottom: 0; }
[role="tablist"] { display: flex; gap: 2px; }
[role="tab"] {
  min-height: 40px; padding: 10px 14px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none;
  font: inherit; font-size: 12.5px; font-weight: 500; color: var(--text-muted); cursor: pointer;
}
[role="tab"]:hover { color: var(--text); }
[role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--signal); }
.gate-filter { display: flex; align-items: center; gap: 10px; padding: 6px 0 8px; }
.gate-filter[hidden] { display: none; }
.gate-filter .label { color: var(--text-faint); }
.gate-filter select {
  min-height: 36px; min-width: 190px; padding: 0 36px 0 14px; border: 1px solid var(--rule); border-radius: var(--radius-pill);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%231b1a16' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
  font: inherit; font-size: 12.5px; color: var(--text); -webkit-appearance: none; appearance: none;
}
.js .tab-heading { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tab-panel > .tab-heading { margin-top: 48px; }
.tab-panel:first-of-type > .tab-heading { margin-top: 8px; }
.js .tab-panel[hidden] { display: none; }
.js .tab-panel { scroll-margin-top: 64px; }
.res-list { list-style: none; }
.tab-panel > .prose { max-width: var(--measure); }
.res-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--rule-soft); }
.res-row[hidden] { display: none; }
.res-num { padding-top: 7px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); }
.res-name { font-size: var(--text-section); font-weight: 500; }
.res-caption { margin-top: 4px; font-size: var(--text-xs); color: var(--text-faint); }
.res-route { margin-top: 2px; font-size: var(--text-xs); color: var(--text-faint); }
.res-desc { margin-top: 10px; font-size: var(--text-body); line-height: 1.6; color: var(--text-muted); max-width: var(--measure); }
.res-link { padding-top: 6px; font-size: var(--text-small); font-weight: 500; white-space: nowrap; }
.res-after { max-width: var(--measure-wide); margin-top: 16px; font-size: var(--text-small); color: var(--text-faint); }
.res-after a { color: var(--text); font-weight: 500; }

.skills { margin-top: 4px; }
.tool-seg { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 14px; }
.tool-seg[hidden] { display: none; }
.tool-seg .label { color: var(--text-faint); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: var(--radius-pill); }
.seg button {
  min-height: 32px; padding: 0 14px; border: 0; border-radius: var(--radius-pill); background: none;
  font: inherit; font-size: 11.5px; font-weight: 500; color: var(--text-muted); cursor: pointer;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--contour); }
.skill-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.skill-card { padding: var(--card-pad); border: 1px solid var(--rule); border-radius: var(--radius-card); transition: opacity 0.15s, border-color 0.15s; }
.skill-card.is-selected { border-color: var(--text); }
.skill-card.is-dimmed { opacity: 0.55; }
.skill-title { font-size: var(--text-section); font-weight: 500; }
.skill-fields { margin-top: 14px; }
.skill-fields .field { grid-template-columns: 96px minmax(0, 1fr); border-top: 0; padding: 6px 0; font-size: 12.5px; }
.skill-fields dt { color: var(--text-muted); }
.skill-fields dd { font-size: 12.5px; }
.skill-fields code, .kit code, .tbl code { padding: 2px 6px; border-radius: 5px; background: rgba(27, 26, 22, 0.06); overflow-wrap: anywhere; }
.skill-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--rule-soft); }

/* ---- next band, pending row, footer ---- */

.next {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 24px;
  margin-top: var(--section-gap); padding-top: 28px; border-top: 1px solid var(--rule-soft);
}
.next .label { grid-column: 1; color: var(--text-faint); }
.next-text { grid-column: 1; font-size: var(--text-section); font-weight: 500; line-height: 1.35; }
.next-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; gap: 10px; }
.pending-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: var(--section-gap); padding-top: 24px; border-top: 1px solid var(--rule-soft); }
.pending-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; row-gap: 8px;
  margin: 0 calc(-1 * var(--gutter)); padding: 22px 26px;
  border-top: 1px solid var(--rule-soft); font-size: var(--text-small); color: var(--text-muted);
}
.site-footer > * + * { margin-left: 13px; padding-left: 13px; border-left: 1px solid var(--rule-soft); }
.site-footer .copy { color: var(--text-faint); }
.site-footer a { color: var(--text); }
.site-footer .llms { margin-left: auto; border-left: 0; padding-left: 0; }
.site-footer .llms code { font-size: var(--text-xs); }

/* ---- kit text on resource pages ---- */

.source-file { display: flex; align-items: baseline; gap: 8px; margin-top: 56px; font-size: var(--text-xs); color: var(--text-faint); }
.source-file .label { color: var(--text-faint); }
.kit + .source-file { margin-top: 80px; }
.kit { margin-top: 14px; }
.kit h2 { margin-top: 0; font-size: 28px; font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; }
.kit h3 { display: flex; align-items: center; gap: 10px; margin-top: 48px; font-size: var(--text-section); font-weight: 500; line-height: 1.3; }
.kit h3::before { content: ""; width: var(--ring-size); height: var(--ring-size); box-sizing: content-box; border: var(--ring-stroke) solid var(--signal); border-radius: 50%; flex: none; }
.kit h4 { margin-top: 32px; font-size: 15px; font-weight: 500; }
.kit p { margin-top: 16px; }
.kit h2 + p { margin-top: 18px; }
.kit ul, .kit ol { margin-top: 16px; padding-left: 1.3em; }
.kit li + li { margin-top: 6px; }
.kit .table-wrap { margin-top: 20px; }
.kit .tbl td { font-size: 13.5px; }
.code {
  margin-top: 20px; padding: 18px 20px; border: 1px solid var(--rule-soft); border-radius: var(--radius-card);
  background: var(--inset); color: var(--text);
  font-size: 12.5px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal;
}
.code code { font-size: inherit; padding: 0; background: none; }

/* ---- start a case: one starter per tool ---- */

.starter { margin-top: 20px; }
.starter-fields { margin-top: 0; }
.starter .prose { margin-top: 18px; max-width: var(--measure); }
.prompt-file { margin-top: 20px; max-width: var(--measure); font-size: 13.5px; line-height: 1.55; color: var(--text-muted); }
.prompt { display: flex; flex-direction: column; }
.prompt .code { margin-top: 8px; }
.copy-button {
  align-self: flex-end; margin-top: 12px; min-height: 32px; padding: 0 16px; border: 1px solid var(--rule); border-radius: var(--radius-pill);
  background: transparent; font: inherit; font-size: 12px; font-weight: 500; color: var(--text); cursor: pointer;
}
.copy-button:hover { background: var(--inset); }

.layout-about .page-head .eyebrow { margin-top: 0; }

/* ---- mobile ---- */

@media (max-width: 860px) {
  .site-header .bar { padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
  .nav, .site-header .action { display: none; }
  .lang-switch { margin-right: 8px; }
  .lang-switch a, .lang-current { min-height: 44px; min-width: 36px; }
  .menu { display: block; }
  .menu-button {
    display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(251, 249, 242, 0.25);
    border-radius: 50%; color: var(--on-dark); cursor: pointer; list-style: none;
  }
  .menu-button::-webkit-details-marker { display: none; }
  .menu-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
  .menu .i-close, .menu[open] .i-open { display: none; }
  .menu[open] .i-close { display: block; }
  .menu-sheet {
    position: fixed; left: var(--surround-gap); right: var(--surround-gap); top: var(--header-height);
    bottom: max(var(--surround-gap), env(safe-area-inset-bottom)); z-index: 50; overflow-y: auto; overscroll-behavior: contain;
    padding: 20px 20px max(24px, env(safe-area-inset-bottom));
    border: var(--contour-width) solid var(--contour); border-radius: var(--radius-sheet); background: var(--page); color: var(--text);
  }
  body:has(.menu[open]) .sheet, body:has(.menu[open]) .frame { display: none; }
  .menu-sheet .label { color: var(--text-faint); margin-bottom: 4px; }
  .m-rows { list-style: none; margin-bottom: 28px; }
  .m-rows a { display: flex; align-items: center; gap: 10px; min-height: 56px; border-bottom: 1px solid var(--rule-soft); font-size: var(--text-body); font-weight: 500; text-decoration: none; }
  .m-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
  .m-rows a[aria-current="page"] .m-dot { background: var(--signal); }
  .m-here { margin-left: auto; font-size: var(--text-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-faint); }
  .m-arrow { margin-left: auto; color: var(--text-muted); }
  .m-here + .m-arrow { margin-left: 12px; }
  .m-layers { list-style: none; display: grid; gap: 4px; margin: 6px 0 12px; font-size: 12.5px; }
  .m-layers li > * { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
  .m-layers code { font-size: var(--text-xs); }
  .m-action { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin-top: 24px; border-radius: var(--radius-pill); background: var(--text); color: var(--contour); font-size: 12.5px; font-weight: 500; text-decoration: none; }
  .m-action-marker { background: transparent; color: var(--text); border: 1px solid var(--rule); }
  .m-about { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 8px; font-size: var(--text-small); }

  .strip { padding: 10px 16px; }
  .strip-label { padding-right: 10px; }
  .strip .layer { padding: 0 10px; }
  .strip .layer.current .route, .strip a.layer:not(.twin) .route, .strip .layer.twin .layer-name { display: none; }
  .strip-break { display: block; flex-basis: 100%; height: 0; }
  .strip .layer.twin { padding-left: 0; border-left: 0; }
  .strip .layer, .strip a { min-height: 24px; display: inline-flex; align-items: center; }
  .strip a.layer { position: relative; }
  .strip a.layer::after { content: ""; position: absolute; inset: -10px 0; }
  .wordmark { display: inline-flex; align-items: center; min-height: 44px; }

  main { padding-top: 32px; }
  .page-head .back { min-height: 44px; display: inline-flex; align-items: center; margin-bottom: 6px; }
  .subtitle, .lead { font-size: 18px; }
  .contents a { grid-template-columns: 28px 1fr; min-height: 44px; }
  .contents .c-desc { grid-column: 2; justify-self: start; text-align: left; }
  .inpage a, .jump a { display: inline-flex; align-items: center; min-height: 44px; }
  .inpage ul { gap: 0; }
  .slot { margin-top: 40px; }
  .slot-box { aspect-ratio: var(--ratio-m); padding: 16px; }
  .slot.has-image img { aspect-ratio: var(--ratio-m); }
  .slot .r-d { display: none; }
  .slot .r-m { display: inline; }
  .slot-intent { font-size: var(--text-xs); }
  .rung { grid-template-columns: 44px 1fr; padding: 24px 0; }
  .rung-num { font-size: 30px; }
  .rung-link a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
  .x-head, .x-rows li { grid-template-columns: 24px 1fr; }
  .x-head span:first-child { grid-column: 2; text-align: left; }
  .x-head span:last-child { display: none; }
  .x-rows::before { left: 12px; top: -14px; }
  .x-rows li { row-gap: 4px; }
  .x-dot { grid-column: 1; grid-row: 1; margin-top: 6px; }
  .x-cap { grid-column: 2; grid-row: 1; text-align: left; }
  .x-ret { grid-column: 2; grid-row: 2; }
  .x-pill { margin-left: 0; }
  .x-axis { gap: 6px; }
  .contract { grid-template-columns: 1fr; gap: 28px; }
  .panel { margin-top: 48px; padding: 28px 22px; }
  .panel-title, .panel-big, .quote blockquote p { font-size: 21px; }
  .offer-price { font-size: 24px; }
  .panel .rays { width: 220px; height: 220px; }
  .tbl.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { padding: 14px 0; border-bottom: 1px solid var(--rule-soft); }
  .tbl.stack tr:last-child { border-bottom: 0; }
  .tbl.stack td { padding: 2px 0; border: 0; }
  .tbl.stack td + td::before { content: attr(data-label); display: block; margin: 8px 0 2px; font-size: var(--text-table-head); font-weight: 500; letter-spacing: var(--tracking-table-head); text-transform: uppercase; color: var(--text-faint); }
  .kit .tbl { display: block; }
  .kit .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .kit .tbl tbody, .kit .tbl tr, .kit .tbl td { display: block; width: 100%; }
  .kit .tbl tr { padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
  .kit .tbl td { padding: 2px 0; border: 0; }
  .kit .tbl td + td::before { content: attr(data-label); display: block; margin: 8px 0 2px; font-size: var(--text-table-head); font-weight: 500; letter-spacing: var(--tracking-table-head); text-transform: uppercase; color: var(--text-faint); }
  .entry-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .entry-table, .entry-table tbody { display: block; }
  .entry-table tr { display: grid; grid-template-columns: 40px 1fr; gap: 2px 10px; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
  .entry-table td { padding: 0; border: 0; }
  .entry-table td:first-child { grid-row: 1 / span 2; }
  .w-wide.prose-wide { padding-right: 0; }

  .seg-control:not([hidden]) { display: flex; justify-content: flex-start; margin-top: 40px; }
  .seg-control .seg { width: 100%; }
  .seg-control .seg button { flex: 1; min-height: 44px; font-size: 12.5px; }
  .js-seg[data-active="gates"] [data-seg-panel="entries"],
  .js-seg[data-active="entries"] [data-seg-panel="gates"] { display: none; }

  .spine-head { display: none; }
  .spine { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
  .g-enter { grid-column: 2; grid-row: var(--mr); flex-direction: row; align-items: flex-start; padding: 22px 0 0; border-bottom: 0; }
  .g-main { grid-column: 1; grid-row: var(--mr); padding: 20px 0 20px 26px; }
  .g-main::before { top: 28px; }
  .g-main[style*="--r:1;"]::after { top: 32px; }
  .g-main.hollow::after { height: 32px; }
  .g-ev { grid-column: 1 / -1; grid-row: var(--mr); margin: 0 0 0 26px; border-radius: 8px; }
  .g-ev.note-only { margin: 12px 0 0 26px; }
  .g-num { font-size: 30px; }
  .g-do summary {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; list-style: none;
    font-size: var(--text-small); font-weight: 500; text-decoration: underline; text-underline-offset: 3px;
  }
  .g-do summary::-webkit-details-marker { display: none; }
  .g-do summary::after { content: "▾"; font-size: 10px; text-decoration: none; }
  .g-do[open] summary::after { content: "▴"; }
  .g-do p { margin: 4px 0 14px; }
  .g-exit { grid-template-columns: 1fr; gap: 4px; }
  .g-tpl { white-space: normal; }
  .g-tpl { padding: 10px 0; }
  .g-tpl a { position: relative; }
  .g-tpl a::after { content: ""; position: absolute; inset: -12px -8px; }
  .g-ev + .g-enter, .g-ev + .g-enter + .g-main { margin-top: 12px; }

  .entry-chip::after { content: ""; position: absolute; inset: -10px; }
  .stack .label .entry-chip::after { inset: -10px; }

  .jump { gap: 0 14px; }
  .jump ul { gap: 0 16px; }
  .gatemap { grid-template-columns: 1fr; gap: 10px; }
  .gm-link a { display: inline-flex; align-items: center; min-height: 44px; }
  .step { grid-template-columns: 36px minmax(0, 1fr); padding: 28px 0; }
  .step-num { font-size: 24px; }
  .field, .pub-fields .field { grid-template-columns: 1fr; gap: 2px; }
  .step-template a, .plain-list a { display: inline-flex; align-items: center; min-height: 44px; }

  .tabbar { border-bottom: 0; min-height: 0; }
  [role="tablist"] { width: 100%; border-bottom: 1px solid var(--rule); }
  [role="tab"] { flex: 1; min-height: 44px; padding: 10px 6px; }
  .gate-filter { width: 100%; }
  .gate-filter select { flex: 1; min-height: 44px; }
  .js .tab-panel { scroll-margin-top: 116px; }
  .res-row { grid-template-columns: 28px minmax(0, 1fr); gap: 4px 10px; padding: 20px 0; }
  .res-num { padding-top: 5px; }
  .res-route { display: none; }
  .res-link { grid-column: 2; justify-self: end; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-top: 0; }
  .tool-seg { justify-content: space-between; }
  .seg button { min-height: 44px; }
  .skill-cards { grid-template-columns: 1fr; gap: 16px; }
  .skill-card { padding: 20px; }
  .res-after a, .prose a { overflow-wrap: anywhere; }

  .next { grid-template-columns: 1fr; }
  .next-actions { grid-column: 1; grid-row: auto; margin-top: 12px; }
  .pending-row { align-items: flex-start; }

  .site-footer { padding: 18px 20px; }
  .site-footer .copy { flex-basis: 100%; border-left: 0; }
  .site-footer .copy + a { margin-left: 0; padding-left: 0; border-left: 0; }
  .site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer .llms { margin-left: 13px; padding-left: 13px; border-left: 1px solid var(--rule-soft); }

  .kit { margin-top: 40px; }
  .kit h2 { font-size: 24px; }
  .kit h3 { margin-top: 36px; }
  .code { padding: 14px 14px; font-size: 12px; }
  .copy-button { min-height: 44px; }
  .kit a, .prose a, .rung-link a, .next-actions a, .actions a { overflow-wrap: anywhere; }
  .portrait { width: 180px; }
  .meta { row-gap: 10px; }
}

@media print {
  .site-header, .frame, .skip { position: static; }
  .frame { display: none; }
  .sheet { margin: 0; }
}
