/* Chappa Facturare — the public pages (server-rendered). Needs base.css. */

.wrap {
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.wrap.narrow { max-width: 46rem; }

/* ─── Header ───────────────────────────────────────────────────────────── */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--desk);
  border-bottom: 1px solid var(--rule);
}
.head-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand nav cta";
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
}
.site-head .brand { grid-area: brand; }
.head-cta { grid-area: cta; }
.site-nav { grid-area: nav; min-width: 0; }
.site-nav ul {
  display: flex;
  gap: .25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  position: relative;
  display: block;
  padding: .45rem .7rem;
  border-radius: var(--r-2);
  color: var(--ink-2);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t-1), background-color var(--t-1);
}
.site-nav a:hover { color: var(--ink); background: var(--desk-2); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: .7rem;
  right: .7rem;
  bottom: -.72rem;
  height: 2px;
  background: var(--ink);
}

@media (max-width: 900px) {
  .head-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand cta" "nav nav";
    gap: .4rem 1rem;
    padding-top: .55rem;
  }
  .site-nav {
    margin-inline: calc(-1 * clamp(1rem, 4vw, 2rem));
    overflow-x: auto;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 1.5rem), transparent);
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { padding-inline: clamp(1rem, 4vw, 2rem); padding-bottom: .35rem; }
  .site-nav a { padding: .4rem .6rem; font-size: .9rem; }
  .site-nav a[aria-current="page"]::after { bottom: -.4rem; }
}

/* ─── Breadcrumbs ──────────────────────────────────────────────────────── */

.crumbs { padding-top: 1.1rem; }
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .875rem;
  color: var(--ink-3);
}
.crumbs li + li::before {
  content: "/";
  margin: 0 .5rem;
  color: var(--rule-2);
}
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ─── Page scaffolding ─────────────────────────────────────────────────── */

.page { padding-bottom: 5rem; }
.page-intro { padding: 2.2rem 0 1.4rem; max-width: 46rem; }
.page-intro h1, .article-head h1 {
  font-size: clamp(2rem, 2.6vw + 1.2rem, 3rem);
  font-stretch: 90%;
  font-weight: 640;
  letter-spacing: -.022em;
  line-height: 1.06;
}
.lede { margin-top: 1rem; font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); }
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.band { border-top: 1px solid var(--rule); padding-block: clamp(3rem, 6vw, 5rem); }
.band.alt { background: var(--desk-2); }
.band h2, .section h2, .prose-page h2 {
  font-size: clamp(1.5rem, 1.2vw + 1.1rem, 2rem);
  font-stretch: 92%;
  letter-spacing: -.018em;
  margin-bottom: 1.4rem;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.split-lead p { color: var(--ink-2); font-size: 1.0625rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ─── Home: opening ────────────────────────────────────────────────────── */

.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5.5rem); overflow: clip; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 3.8vw + 1.1rem, 4rem);
  font-stretch: 86%;
  font-weight: 650;
  letter-spacing: -.028em;
  line-height: 1;
}
.hero .lede { margin-top: 1.4rem; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 2rem; }
.hero-note { margin-top: 1.4rem; max-width: 30rem; font-size: .9375rem; color: var(--ink-3); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

/* The sample invoice, as a document: plain paper, real numbers. */
.demo { margin: 0; }
.sheet {
  position: relative;
  padding: clamp(1.1rem, 2.4vw, 1.8rem);
  background: var(--paper);
  border-radius: var(--r-1);
  box-shadow: var(--shadow-paper);
  font-size: .875rem;
  line-height: 1.45;
  contain: layout;
  transition: transform var(--t-4) var(--spring), box-shadow var(--t-4) var(--ease-out);
}
.sheet.lift { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.sheet-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.sheet-title { margin: 0; font-size: 1.25rem; font-weight: 650; letter-spacing: -.01em; }
.sheet-kind { margin-right: .3rem; }
.sheet-no { display: inline-block; color: var(--ink-3); font-weight: 450; font-size: 1rem; }
.sheet-no.set { color: var(--ink); font-weight: 650; font-size: 1.25rem; }
.sheet-dates { display: grid; gap: .1rem; margin: 0; font-size: .8125rem; }
.sheet-dates div { display: flex; gap: .6rem; justify-content: flex-end; }
.sheet-dates dt { color: var(--ink-3); }
.sheet-dates dd { margin: 0; min-width: 5.3rem; text-align: right; }
.sheet-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.2rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.sheet-parties > div { display: grid; gap: .1rem; }
.sheet-label { color: var(--ink-3); font-size: .78rem; }
.sheet-parties .code { color: var(--ink-2); font-size: .78rem; }
.sheet-lines th { padding: .45rem 0; border-bottom: 1px solid var(--ink); font-size: .78rem; font-weight: 550; color: var(--ink-2); text-align: right; }
.sheet-lines th:first-child, .sheet-lines td:first-child { text-align: left; }
.sheet-lines td { padding: .5rem 0 .5rem .8rem; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
.sheet-lines td:first-child { padding-left: 0; white-space: normal; }
.sheet-totals { display: grid; gap: .15rem; width: min(17rem, 100%); margin: .9rem 0 0 auto; }
.sheet-totals div { display: flex; justify-content: space-between; gap: 1rem; }
.sheet-totals dt { color: var(--ink-2); }
.sheet-totals dd { margin: 0; }
.sheet-totals .grand { margin-top: .35rem; padding-top: .45rem; border-top: 3px double var(--ink); font-weight: 650; font-size: 1rem; }
.sheet-totals .grand dt { color: var(--ink); }
.sheet-anaf { margin: 1rem 0 0; font-size: .78rem; color: var(--ink-3); opacity: 0; transform: translateY(3px); transition: opacity var(--t-3), transform var(--t-3) var(--ease-out); }
.sheet-anaf.on { opacity: 1; transform: none; }
@media (max-width: 520px) { .sheet-parties { grid-template-columns: 1fr; } }

.stamp {
  position: absolute;
  left: 12%;
  bottom: 5%;
  display: grid;
  place-content: center;
  width: 8.2rem;
  height: 8.2rem;
  border: 4px solid var(--tus);
  border-radius: 50%;
  outline: 1.5px solid var(--tus);
  outline-offset: -11px;
  color: var(--tus);
  font-weight: 700;
  font-stretch: 85%;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: 0;
  transform: rotate(-14deg) scale(1.6);
  pointer-events: none;
  mix-blend-mode: multiply;
}
.stamp span:first-child { font-size: .95rem; }
.stamp span:last-child { font-size: 1.45rem; }
.stamp.on { opacity: .9; transform: rotate(-14deg) scale(1); transition: transform 420ms var(--spring-2), opacity 140ms linear; }
:root[data-theme="dark"] .stamp { mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stamp { mix-blend-mode: screen; } }

/* The four states under the sheet: one moving marker, not four repaints. */
.rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 1.1rem 0 0;
  padding: .8rem 0 0;
  list-style: none;
  font-size: .8125rem;
  color: var(--ink-3);
  border-top: 2px solid var(--rule);
}
.rail li { padding-right: .5rem; transition: color var(--t-2); }
.rail li[aria-current="step"], .rail li.done { color: var(--ink); }
.rail li[aria-current="step"] { font-weight: 600; }
.rail::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 25%;
  height: 2px;
  background: var(--ink);
  transform: translateX(calc(var(--step, 0) * 100%));
  transition: transform var(--t-4) var(--spring);
}
.demo figcaption { margin-top: .9rem; font-size: .8125rem; color: var(--ink-3); }
.demo figcaption .text-btn { margin-left: .4rem; font-size: inherit; }

/* ─── Ledger rows, states, audiences ───────────────────────────────────── */

.ledger { margin: 0; border-bottom: 1px solid var(--rule); }
.ledger > div {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) 1fr;
  gap: 2rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--rule);
}
.ledger dt { font-weight: 600; }
.ledger dt a { color: var(--ink); }
.ledger dd { margin: 0; color: var(--ink-2); max-width: 44rem; }
.ledger.compact > div { grid-template-columns: minmax(8rem, 11rem) 1fr; }
@media (max-width: 700px) { .ledger > div, .ledger.compact > div { grid-template-columns: 1fr; gap: .25rem; } }

.states { position: relative; margin: 0; padding: 0; list-style: none; }
.states li { position: relative; padding: 0 0 1.6rem 2.1rem; }
.states li::before {
  content: "";
  position: absolute;
  left: .35rem;
  top: .35rem;
  width: .7rem;
  height: .7rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--desk);
}
.states li::after {
  content: "";
  position: absolute;
  left: calc(.7rem - 1px);
  top: 1.25rem;
  bottom: .15rem;
  width: 2px;
  background: var(--rule);
}
.states li:last-child::before { background: var(--tus); border-color: var(--tus); box-shadow: 0 0 0 3px var(--desk), 0 0 0 4.5px var(--tus); }
.states li:last-child::after { display: none; }
.states h3 { font-size: 1.0625rem; margin-bottom: .3rem; }
.states p { margin: 0; color: var(--ink-2); }

.audience { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(2rem, 5vw, 4rem); }
.audience section { padding: 1.2rem 0 1.4rem; border-top: 1px solid var(--rule-2); }
.audience h3 { font-size: 1.125rem; margin-bottom: .45rem; }
.audience p { margin: 0; color: var(--ink-2); }
@media (max-width: 700px) { .audience { grid-template-columns: 1fr; } }

/* ─── Code ─────────────────────────────────────────────────────────────── */

.code-block, pre.code {
  margin: 0;
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
  font-size: .84rem;
  line-height: 1.6;
  tab-size: 2;
}
.code-wrap { position: relative; margin: 1rem 0; }
.code-wrap .copy {
  position: absolute;
  top: .5rem;
  right: .5rem;
  opacity: 0;
  transition: opacity var(--t-1);
}
.code-wrap:hover .copy, .code-wrap .copy:focus-visible { opacity: 1; }
@media (hover: none) { .code-wrap .copy { opacity: 1; } }
.code-tabs { display: flex; gap: .2rem; margin: 1rem 0 -.5rem; }
.code-tabs button {
  padding: .35rem .7rem;
  border: 1px solid transparent;
  border-radius: var(--r-2) var(--r-2) 0 0;
  background: none;
  color: var(--ink-2);
  font-size: .85rem;
  font-weight: 550;
  cursor: pointer;
}
.code-tabs button.on { background: var(--paper); border-color: var(--rule); border-bottom-color: var(--paper); color: var(--ink); }

/* ─── Prose (guides, docs, product pages) ──────────────────────────────── */

.prose-page { max-width: 46rem; }
.prose-page > section { padding: 2.2rem 0 .6rem; border-top: 1px solid var(--rule); }
.prose-page > section.section-first { border-top: 0; padding-top: .6rem; }
.prose-page h2 { margin-bottom: .9rem; }
.prose-page p, .prose-page li { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.65; }
.prose-page b { color: var(--ink); }
.prose-page ul, .prose-page ol, .prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.1em; }
.prose-page li + li, .prose li + li { margin-top: .4rem; }
.page-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 2.5rem; }

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 46rem) minmax(12rem, 16rem);
  justify-content: space-between;
  gap: 3rem;
  align-items: start;
}
.article-head { padding: 2.2rem 0 1.6rem; }
.article-head .meta { margin: 1rem 0 0; font-size: .875rem; color: var(--ink-3); }
.prose { font-size: 1.0625rem; line-height: 1.68; }
.prose > * + * { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose b, .prose strong { color: var(--ink); }
.prose h2 {
  margin: 2.6rem 0 .8rem;
  font-size: 1.5rem;
  font-stretch: 92%;
  letter-spacing: -.016em;
}
.prose h3 { margin: 1.8rem 0 .6rem; font-size: 1.15rem; }
.prose h2:first-child { margin-top: .5rem; }
.prose code:not(pre code) { padding: .08em .3em; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-1); }
.prose table { margin: 1.2rem 0 1.4rem; font-size: .9375rem; }
.prose th, .prose td { padding: .55rem .75rem .55rem 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose thead th { border-bottom-color: var(--ink); color: var(--ink); font-weight: 600; }
.prose td { color: var(--ink-2); }
.article-aside { position: sticky; top: 5.5rem; padding-top: 2.6rem; }
@media (max-width: 1000px) {
  /* minmax(0, …): a wide table or code line scrolls inside, not the page. */
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .article-aside { display: none; }
  .prose table { display: block; max-width: 100%; overflow-x: auto; }
}

.toc-title { font-size: .875rem; color: var(--ink-3); font-weight: 550; margin-bottom: .6rem; }
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--rule); }
.toc li { margin: 0; }
.toc a {
  display: block;
  margin-left: -1px;
  padding: .3rem 0 .3rem .9rem;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  font-size: .875rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color var(--t-1), border-color var(--t-2);
}
.toc .toc-h3 a { padding-left: 1.7rem; font-size: .8125rem; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--ink); }

table.facts { margin: 1.2rem 0 1.5rem; }
table.facts th[scope="row"] { width: 38%; color: var(--ink); font-weight: 550; }

/* ─── FAQ ──────────────────────────────────────────────────────────────── */

.faq { max-width: 50rem; border-bottom: 1px solid var(--rule); }
.qa { border-top: 1px solid var(--rule); }
.qa summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.05rem 0;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.qa summary::after {
  content: "";
  flex: none;
  width: .75rem;
  height: .75rem;
  margin-right: .2rem;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  color: var(--ink-2);
  transition: transform var(--t-3) var(--spring);
}
.qa[open] summary::after { transform: rotate(45deg); }
.qa summary:hover h3 { color: var(--tus); }
.qa-a { padding: 0 3rem 1.2rem 0; color: var(--ink-2); line-height: 1.65; }
.qa[open] .qa-a { animation: qa-in var(--t-3) var(--ease-out); }
@keyframes qa-in { from { opacity: 0; transform: translateY(-4px); } }
.after-faq { margin-top: 1.6rem; }

/* ─── Guides index, pricing, developers ────────────────────────────────── */

.guide-list { max-width: 50rem; margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--rule); }
.guide-list li { display: grid; grid-template-columns: 1fr auto; gap: .2rem 2rem; padding: 1.15rem 0; border-top: 1px solid var(--rule); }
.guide-list a { display: grid; gap: .25rem; text-decoration: none; }
.guide-list .g-title { color: var(--ink); font-weight: 600; font-size: 1.125rem; }
.guide-list a:hover .g-title { color: var(--tus); text-decoration: underline; text-underline-offset: .18em; }
.guide-list .g-desc { color: var(--ink-2); }
.guide-list time { color: var(--ink-3); font-size: .875rem; white-space: nowrap; padding-top: .2rem; }
@media (max-width: 640px) { .guide-list li { grid-template-columns: 1fr; } }

.table-scroll { overflow-x: auto; margin: 1.4rem 0; }
table.compare { min-width: 40rem; font-size: .9375rem; }
table.compare th, table.compare td { padding: .65rem .8rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
table.compare thead th { border-bottom: 2px solid var(--ink); font-weight: 600; }
table.compare tbody th { font-weight: 550; color: var(--ink); width: 30%; }
table.compare td { color: var(--ink-2); }

.dev-grid { display: grid; grid-template-columns: minmax(0, 46rem) minmax(15rem, 20rem); justify-content: space-between; gap: 3rem; align-items: start; }
.dev-aside { position: sticky; top: 5.5rem; padding: 1.4rem; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-2); }
.dev-aside h2 { font-size: 1rem; margin-bottom: .8rem; }
.dev-aside h3 { font-size: .9375rem; margin: 1.4rem 0 .5rem; color: var(--ink-2); }
.resource-list, .file-list { margin: 0; padding: 0; list-style: none; }
.resource-list a { display: grid; gap: .1rem; padding: .65rem 0; border-top: 1px solid var(--rule); text-decoration: none; }
.resource-list li:first-child a { border-top: 0; padding-top: 0; }
.resource-list b { color: var(--ink); }
.resource-list a:hover b { color: var(--tus); }
.resource-list span { color: var(--ink-3); font-size: .875rem; }
.file-list li { padding: .2rem 0; font-size: .875rem; }
@media (max-width: 960px) { .dev-grid { grid-template-columns: 1fr; } .dev-aside { position: static; } }

.not-found .code-404 { margin: 0 0 .4rem; font-size: 1rem; color: var(--ink-3); font-family: var(--mono); }
.plain-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: 0; list-style: none; }

/* ─── Footer ───────────────────────────────────────────────────────────── */

.site-foot { padding: 3rem 0 2.5rem; border-top: 1px solid var(--rule); background: var(--desk-2); font-size: .9rem; }
.foot-grid { display: grid; grid-template-columns: minmax(14rem, 1.6fr) repeat(3, minmax(9rem, 1fr)); gap: 2rem; }
.foot-brand p { margin-top: .9rem; max-width: 22rem; color: var(--ink-2); }
.foot-col h2 { font-size: .875rem; font-weight: 600; margin-bottom: .6rem; }
.foot-col ul { margin: 0; padding: 0; list-style: none; }
.foot-col li { padding: .18rem 0; }
.foot-col a { color: var(--ink-2); text-decoration: none; }
.foot-col a:hover { color: var(--ink); text-decoration: underline; }
.foot-note { margin: 2.2rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: .8125rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ─── Integration docs: the opening (js/devshow.js) ─────────────────────────
   Without the script every piece reads as plain text. With it (`.live`):
   transforms and opacity only; nothing runs while it is off screen. */

.dv-hero .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.dv-hero h1 { font-size: clamp(2.3rem, 3.1vw + 1.1rem, 3.5rem); }
.dv-hero .hero-actions a:not(.btn) { color: var(--ink-2); }
.dv-hero .hero-actions a:not(.btn):hover { color: var(--ink); }

/* The fold: one invoice, two sides. */
.dv-fold { margin: 0; min-width: 0; }
.dv-fold-bar { position: relative; display: flex; gap: 1.4rem; margin-bottom: .75rem; }
.dv-fold-bar button {
  padding: .35rem 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .9375rem;
  font-weight: 560;
  color: var(--ink-3);
  cursor: pointer;
  transition: color var(--t-2);
}
.dv-fold-bar button[aria-pressed="true"] { color: var(--ink); }
.dv-fold-bar button:focus-visible { outline: 2px solid var(--tus); outline-offset: 3px; border-radius: 2px; }
.dv-fold-ind {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 2px;
  background: var(--ink);
  transform-origin: 0 50%;
  transform: translateX(var(--ix, 0)) scaleX(var(--iw, 0));
  transition: transform var(--t-4) var(--spring);
}
.dv-sheet {
  /* Rows share one height whatever their own font: rem, not em. */
  --lh: calc(.7rem * 1.62);
  position: relative;
  padding: 1.05rem 1.15rem;
  background: var(--paper);
  border-radius: var(--r-1);
  box-shadow: var(--shadow-paper);
  font: .7rem/var(--lh) var(--mono);
  overflow: hidden;
}
.dv-sheet pre { margin: 0; padding: 0; border: 0; background: none; font: inherit; white-space: normal; overflow: visible; }
.dv-sheet .l, .dv-sheet .r { display: block; height: var(--lh); overflow: hidden; white-space: pre; text-overflow: ellipsis; }
.dv-xml .l { color: var(--ink-3); }
.dv-xml .l.you { color: var(--tus); }
.dv-out { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.dv-out .lab { font: 550 .78rem/var(--lh) var(--font); color: var(--ink-3); }
.dv-out .code { color: var(--ink); }
.dv-out .you { color: var(--tus); }
.dv-out .led { font: .8rem/var(--lh) var(--font); color: var(--ink-2); }
.dv-out .led::before {
  content: "";
  display: inline-block;
  width: .45rem;
  height: .45rem;
  margin: 0 .6rem 0 .1rem;
  border: 1.5px solid var(--ink-3);
  border-radius: 1px;
  vertical-align: .04rem;
}
.dv-out .evt { color: var(--ok); }
.dv-fold figcaption { margin-top: .8rem; font-size: .875rem; line-height: 1.5; color: var(--ink-3); }

.dv-fold.live .dv-sheet { height: calc(var(--rows) * var(--lh) + 2.1rem); }
.dv-fold.live .dv-xml, .dv-fold.live .dv-out { position: absolute; inset: 1.05rem 1.15rem; margin: 0; padding: 0; border: 0; }
.dv-fold.live .l, .dv-fold.live .r { position: absolute; left: 0; right: 0; top: calc(var(--at) * var(--lh)); }
.dv-fold.live .l { transform-origin: 0 50%; }
/* Folded: each XML row closes onto the row it becomes, group by group. */
.dv-fold.live[data-state="js"] .l {
  opacity: 0;
  transform: translateY(calc((var(--to) - var(--at)) * var(--lh))) scaleY(.02);
  transition: transform .62s cubic-bezier(.6, 0, .18, 1) calc(var(--d) * 1ms), opacity .18s linear calc(var(--d) * 1ms + 380ms);
}
.dv-fold.live[data-state="xml"] .l {
  transition: transform .72s var(--spring) calc(var(--d) * .55ms + 120ms), opacity .12s linear calc(var(--d) * .55ms + 120ms);
}
.dv-fold.live .r { opacity: 0; transform: translateY(.45em); transition: opacity .12s linear, transform .12s linear; }
.dv-fold.live[data-state="js"] .r {
  opacity: 1;
  transform: none;
  transition: opacity .3s ease calc(var(--d) * 1ms + 200ms), transform .7s var(--spring) calc(var(--d) * 1ms + 200ms);
}
.dv-fold.instant .l, .dv-fold.instant .r { transition: none !important; }
@media (max-width: 960px) { .dv-hero .hero-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .dv-sheet { --lh: calc(.62rem * 1.62); font-size: .62rem; padding: .85rem .8rem; } .dv-fold.live .dv-xml, .dv-fold.live .dv-out { inset: .85rem .8rem; } }

/* The hour: a 60-minute rule whose needle follows the reading. */
.dv-hour, .dv-sec { overflow-x: clip; }
.dv-hour-head { max-width: 46rem; }
.dv-hour-head p { margin: 0; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.6; }
.dv-dial { position: sticky; top: 4rem; z-index: 3; margin: 1.4rem 0 0; padding: .8rem 0 .7rem; background: var(--desk); border-bottom: 1px solid var(--rule); overflow: clip; }
@media (max-width: 900px) { .dv-dial { top: 6.1rem; } }
.dv-track { position: relative; height: 3rem; margin-inline: 1.4rem; }
.dv-segs { position: absolute; left: 0; right: 0; top: 1.15rem; display: flex; gap: 3px; }
.dv-segs span {
  flex: var(--w) 1 0;
  min-width: 0;
  padding-top: .3rem;
  border-top: 2px solid var(--rule-2);
  font-size: .72rem;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--t-3), border-color var(--t-3);
}
.dv-segs span.on { color: var(--ink-2); border-top-color: var(--ink); }
.dv-segs span.cur { color: var(--tus); border-top-color: var(--tus); }
.dv-ticks { position: absolute; left: 0; bottom: 0; width: 100%; height: .6rem; stroke: var(--rule-2); }
.dv-ticks line { vector-effect: non-scaling-stroke; stroke-width: 1; }
.dv-run { position: absolute; inset: 0; transform: translateX(calc(var(--p, 0) * 100%)); pointer-events: none; }
.dv-needle { position: absolute; left: -1px; top: 1.05rem; bottom: -.1rem; width: 2px; background: var(--tus); }
.dv-read { position: absolute; left: 0; top: 0; transform: translateX(-50%); font-size: .78rem; font-weight: 650; color: var(--tus); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dv-scale { display: flex; justify-content: space-between; margin: .25rem 1.4rem 0; font-size: .7rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dv-dial:not(.live) .dv-run { display: none; }
.dv-steps { max-width: 52rem; margin: 0; padding: 0; list-style: none; }
.dv-step { position: relative; display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: 1.4rem; padding: 1.7rem 0 1.9rem; border-bottom: 1px solid var(--rule); }
.dv-at { padding-top: .1rem; font-size: .875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; transition: color var(--t-3); }
.dv-at b { margin-right: .15rem; font-size: 1.7rem; font-weight: 640; letter-spacing: -.02em; color: inherit; }
.dv-step.on .dv-at { color: var(--ink); }
.dv-step h3 { margin: 0 0 .4rem; font-size: 1.2rem; }
.dv-step p { max-width: 40rem; margin: 0; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.6; }
.dv-cmd { max-width: 40rem; margin: .85rem 0 0; padding: .6rem .8rem; overflow-x: auto; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-1); font-size: .8rem; }
.dv-last { min-height: 9.5rem; }
.dv-last p { max-width: min(40rem, calc(100% - 8rem)); }
.dv-last .dv-stamp { left: auto; right: 2%; top: 1.4rem; bottom: auto; width: 7rem; height: 7rem; }
.dv-stamp span:first-child { font-size: .72rem; }
.dv-stamp span:last-child { font-size: 1.15rem; }
@media (max-width: 640px) { .dv-last p { max-width: none; padding-bottom: 6rem; } .dv-step { grid-template-columns: minmax(0, 1fr); gap: .3rem; } .dv-segs span { font-size: 0; } .dv-last .dv-stamp { top: auto; bottom: .6rem; width: 5.6rem; height: 5.6rem; } }

/* The desk: a real assertion, signed and checked in this browser. */
.dv-sec .split { align-items: start; }
.dv-real { margin-top: 1rem; padding: .75rem .9rem; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-1); font-size: .9375rem; color: var(--ink-2); }
.dv-desk { position: relative; margin: 0; padding: 1.15rem 1.2rem 1.2rem; background: var(--paper); border-radius: var(--r-1); box-shadow: var(--shadow-paper); }
.dv-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.dv-lane { padding-bottom: .55rem; border-bottom: 2px solid var(--rule); transition: border-color var(--t-3); }
.dv-lane b { display: block; font-size: .875rem; }
.dv-lane span { display: block; margin-top: .15rem; font-size: .75rem; line-height: 1.35; color: var(--ink-3); }
.dv-lane.here { border-bottom-color: var(--ink); }
.dv-road { position: relative; height: 4.3rem; margin-top: .8rem; }
.dv-slip { position: absolute; left: 0; top: 0; width: calc((100% - 1.6rem) / 3); }
.dv-desk.live .dv-slip { transform: translateX(calc(var(--lane, 0) * (100% + .8rem))); transition: transform .6s var(--spring); }
.dv-jws {
  display: block;
  max-height: 4.05rem;
  padding: .4rem .5rem;
  overflow: hidden;
  background: var(--desk);
  border: 1px dashed var(--rule-2);
  border-radius: var(--r-1);
  font-size: .68rem;
  line-height: 1.4;
  word-break: break-all;
}
.dv-jws .h { color: var(--ink-3); }
.dv-jws .p { display: inline; color: var(--ink); }
.dv-jws .s { color: var(--tus); }
.dv-jws .p.edited { color: var(--bad); }
.dv-claims { display: block; margin-top: .5rem; padding: .5rem .6rem; background: var(--paper-2); border-radius: var(--r-1); font-size: .7rem; line-height: 1.5; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.dv-claims mark { padding: 0 .15em; background: var(--bad-wash); color: var(--bad); border-radius: 2px; }
.dv-checks { display: grid; gap: .45rem; margin: 1rem 0 0; padding: 0; list-style: none; font-size: .9rem; color: var(--ink-2); }
.dv-checks li { display: flex; gap: .6rem; align-items: flex-start; transition: color var(--t-2), opacity var(--t-2); }
.dv-mark { flex: none; width: 1rem; height: 1rem; margin-top: .15rem; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; border: 1.5px solid var(--rule-2); border-radius: 2px; transition: border-color var(--t-2); }
.dv-mark .t { stroke: var(--ok); stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .32s var(--ease-out); }
.dv-mark .x { stroke: var(--bad); stroke-dasharray: 12; stroke-dashoffset: 12; transition: stroke-dashoffset .2s var(--ease-out); }
.dv-mark .x2 { transition-delay: .12s; }
.dv-checks li.ok { color: var(--ink); }
.dv-checks li.ok .dv-mark { border-color: var(--ok); }
.dv-checks li.ok .t { stroke-dashoffset: 0; }
.dv-checks li.no { color: var(--bad); }
.dv-checks li.no .dv-mark { border-color: var(--bad); }
.dv-checks li.no .x { stroke-dashoffset: 0; }
.dv-checks li.later { opacity: .4; }
.dv-verdict { position: relative; min-height: 6.4rem; margin-top: .9rem; }
.dv-msg { max-width: 62%; margin: 0; font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.dv-verdict .dv-stamp { left: auto; right: 3%; top: -.6rem; bottom: auto; width: 6.6rem; height: 6.6rem; }
.stamp.bad { border-color: var(--bad); outline-color: var(--bad); color: var(--bad); }
.dv-tries { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--rule); }
@media (max-width: 640px) { .dv-lane span { display: none; } .dv-msg { max-width: 100%; padding-right: 6rem; } .dv-verdict .dv-stamp { width: 5.4rem; height: 5.4rem; } }
.dv-desk.rewind .dv-slip { transition: none; }

/* ─── Developer docs: the three ways (overview) ─────────────────────────── */
.dv-ways { margin: 0; min-width: 0; }
.dv-ways-bar { position: relative; display: flex; flex-wrap: wrap; gap: .3rem 1.3rem; margin-bottom: .75rem; }
.dv-ways-bar button {
  padding: .35rem 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .9375rem;
  font-weight: 560;
  color: var(--ink-3);
  cursor: pointer;
  transition: color var(--t-2);
}
.dv-ways-bar button[aria-selected="true"] { color: var(--ink); }
.dv-ways-bar button:focus-visible { outline: 2px solid var(--tus); outline-offset: 3px; border-radius: 2px; }
.dv-way-label { margin: .9rem 0 .3rem; font: 550 .78rem/1.4 var(--font); color: var(--ink-3); }
.dv-way-label:first-child { margin-top: 0; }
.dv-way b { font-weight: inherit; color: var(--tus); }
.dv-ways.live .dv-way-label { display: none; }
.dv-ways.live .dv-ways-sheet { height: calc(var(--rows) * var(--lh) + 2.1rem); }
.dv-ways.live .dv-way { position: absolute; inset: 1.05rem 1.15rem; }
.dv-ways.live .dv-way .l { position: absolute; left: 0; right: 0; top: calc(var(--i) * var(--lh)); transform-origin: 0 0; }
/* Leaving: the rows fold shut, top first. Arriving: they open after them. */
.dv-ways.live .dv-way .l {
  opacity: 0;
  transform: translateY(-.35em) scaleY(.04);
  transition: transform .26s cubic-bezier(.5, 0, .75, 0) calc(var(--i) * 16ms), opacity .14s linear calc(var(--i) * 16ms + 90ms);
}
.dv-ways.live .dv-way.on .l {
  opacity: 1;
  transform: none;
  transition: transform .62s var(--spring) calc(var(--i) * 34ms + 210ms), opacity .2s ease calc(var(--i) * 34ms + 210ms);
}
.dv-ways.instant .l { transition: none !important; }
.dv-clock { margin: 1rem 0 0; }
.dv-clock-track { position: relative; height: 2.1rem; margin-inline: 1.2rem; border-bottom: 1px solid var(--rule-2); }
.dv-clock-track::after { content: "60 min"; position: absolute; right: -.2rem; bottom: -1.25rem; font-size: .68rem; color: var(--ink-3); }
.dv-mark {
  position: absolute;
  left: calc(var(--at) / 60 * 100%);
  bottom: .3rem;
  transform: translateX(-50%);
  font-size: .75rem;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color var(--t-3);
}
.dv-mark::after { content: ""; position: absolute; left: 50%; top: calc(100% + .1rem); width: 1px; height: .35rem; background: var(--rule-2); }
.dv-mark[data-m="3"] { transform: translateX(-100%); }
.dv-mark[data-m="3"]::after { left: 100%; }
.dv-mark.on { color: var(--tus); font-weight: 650; }
.dv-clock .dv-run { position: absolute; inset: 0; transform: translateX(calc(var(--p, 0) * 100%)); transition: transform .7s var(--spring); pointer-events: none; }
.dv-clock .dv-needle { position: absolute; left: -1px; bottom: -.35rem; height: .8rem; width: 2px; background: var(--tus); }
.dv-clock:not(.live) .dv-run { display: none; }
.dv-ways figcaption { margin-top: 1.5rem; font-size: .875rem; line-height: 1.5; color: var(--ink-3); min-height: 2.7em; }

/* ─── Developer docs: overview sections ─────────────────────────────────── */
.page.developers .wrap > section, .page.developers .dev-overview > section { padding: 2.6rem 0 .4rem; border-top: 1px solid var(--rule); }
.page.developers .wrap > section h2, .page.developers .dev-overview > section h2 { margin-bottom: .9rem; font-size: clamp(1.4rem, 1vw + 1.1rem, 1.8rem); font-stretch: 92%; letter-spacing: -.016em; }
.dv-modes-lead { max-width: 44rem; margin: 0 0 1.2rem; color: var(--ink-2); font-size: 1.0625rem; }
.dv-compare-wrap { overflow-x: auto; }
.dv-compare { width: 100%; min-width: 40rem; border-collapse: collapse; font-size: .9375rem; }
.dv-compare th, .dv-compare td { padding: .7rem .9rem .7rem 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.dv-compare thead th { border-bottom: 1px solid var(--ink); font-size: 1rem; }
.dv-compare thead a { color: var(--ink); text-decoration: none; }
.dv-compare thead a:hover { color: var(--tus); text-decoration: underline; }
.dv-compare tbody th { width: 13rem; font-weight: 550; color: var(--ink-2); }
.dv-compare td { color: var(--ink-2); }
.dv-common ul { max-width: 46rem; padding-left: 1.2rem; }
.dv-common li { margin-top: .55rem; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.6; }
.dv-common b { color: var(--ink); }
.dv-map-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; margin: 0; padding: 0; list-style: none; counter-reset: dv; }
.dv-map-list li { counter-increment: dv; border-top: 1px solid var(--rule); }
.dv-map-list a { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .1rem .4rem; padding: .85rem 0; color: inherit; text-decoration: none; }
.dv-map-list a::before { content: counter(dv); grid-row: span 2; font-size: .875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: .1rem; }
.dv-map-list b { font-weight: 600; transition: color var(--t-1); }
.dv-map-list span { color: var(--ink-3); font-size: .9rem; line-height: 1.45; }
.dv-map-list a:hover b { color: var(--tus); }
@media (max-width: 720px) { .dv-map-list { grid-template-columns: minmax(0, 1fr); } }
.dv-intro { font-size: 1.125rem; color: var(--ink-2); }

/* ─── Developer docs: menu, previous / next ─────────────────────────────── */
/* The documentation's pages: a panel left of the text, numbered, the
   current one filled. The page's own contents stay a thin list on the
   right ("Pe pagină"): two different things, two different looks. */
.docs-wrap { max-width: 84rem; }
.docs-grid {
  display: grid;
  grid-template-columns: 14.5rem minmax(0, 46rem) minmax(11rem, 13rem);
  justify-content: space-between;
  gap: 2.75rem;
  align-items: start;
}
.docs-grid > .article { grid-column: 2; }
.docs-grid > .docs-side { grid-row: 1 / span 2; }
.docs-grid > .docs-opening { grid-column: 2 / -1; min-width: 0; }
.docs-opening .wrap { max-width: none; padding-inline: 0; }
.docs-opening .hero { padding-block: 2.2rem 2.8rem; }
.docs-opening .lk-head { padding-top: 2.2rem; }
.docs-opening .lk-studio { height: calc(100dvh - 6.5rem); border: 1px solid var(--rule); border-radius: var(--r-2); overflow: hidden; }
.docs-grid > .article-aside { grid-column: 3; max-height: calc(100vh - 5.5rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.docs-side { position: sticky; top: 5.5rem; margin-top: 2.2rem; max-height: calc(100vh - 6.5rem); overflow-y: auto; padding: .35rem; border: 1px solid var(--rule); border-radius: var(--r-2); background: var(--paper); }
.docs-set { display: grid; gap: .1rem; margin-bottom: .35rem; padding: .7rem .75rem .8rem; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.docs-set-k { font-size: .75rem; color: var(--ink-3); }
.docs-set-n { font-size: 1rem; font-weight: 650; letter-spacing: -.01em; color: var(--ink); transition: color var(--t-1); }
.docs-set:hover .docs-set-n { color: var(--tus); }
.docs-pages { margin: 0; padding: 0; list-style: none; }
.docs-pages a { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); align-items: baseline; padding: .42rem .6rem; border-radius: var(--r-1); color: var(--ink-2); font-size: .9rem; line-height: 1.3; text-decoration: none; transition: background-color var(--t-1), color var(--t-1); }
.docs-pages .n { font-size: .75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.docs-pages a:hover { background: var(--paper-2); color: var(--ink); }
.docs-pages a[aria-current="page"] { background: var(--tus-wash); color: var(--tus); font-weight: 600; }
.docs-pages a[aria-current="page"] .n { color: var(--tus); }
.docs-other { display: grid; gap: .1rem; margin-top: .35rem; padding: .7rem .75rem .45rem; border-top: 1px solid var(--rule); font-size: .875rem; color: var(--ink-2); text-decoration: none; transition: color var(--t-1); }
.docs-other span { font-size: .75rem; color: var(--ink-3); }
.docs-other:hover { color: var(--tus); }
/* A tool as the opening (the theme editor): the page as wide as the window,
   the tool over everything right of the panel; the text under it keeps its
   measure and its contents beside it. */
.wrap.wide { max-width: none; }
.docs-wrap.wide .docs-grid { grid-template-columns: 14.5rem minmax(0, 46rem) minmax(11rem, 13rem) minmax(0, 1fr); justify-content: start; }
@media (max-width: 1240px) {
  .docs-grid, .docs-wrap.wide .docs-grid { grid-template-columns: 14rem minmax(0, 1fr); }
  .docs-grid > .article-aside { display: none; }
}
@media (max-width: 1000px) {
  .docs-grid, .docs-wrap.wide .docs-grid { grid-template-columns: minmax(0, 1fr); }
  .docs-grid > .docs-side { display: none; }
  .docs-grid > .article, .docs-grid > .docs-opening { grid-column: 1; }
}
/* Narrow: the same panel, folded above the text, saying where you are. */
.docs-menu { display: none; margin: 1.2rem 0 0; border: 1px solid var(--rule); border-radius: var(--r-2); background: var(--paper); }
.docs-menu summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: .75rem; align-items: center; padding: .65rem .85rem; cursor: pointer; list-style: none; }
.docs-menu summary::-webkit-details-marker { display: none; }
.docs-menu summary::after { content: ""; grid-column: 2; grid-row: 1 / span 2; width: .5rem; height: .5rem; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: translateY(-2px) rotate(45deg); transition: transform var(--t-2) var(--ease-out); }
.docs-menu[open] summary::after { transform: translateY(2px) rotate(225deg); }
.docs-menu-set { grid-column: 1; font-weight: 650; }
.docs-menu-here { grid-column: 1; font-size: .875rem; color: var(--ink-3); }
.docs-side-inline { position: static; margin: 0; max-height: none; border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: none; }
.docs-side-inline .docs-set { display: none; }
@media (max-width: 1000px) { .docs-menu { display: block; } }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.prev-next a { display: grid; gap: .15rem; padding: .8rem .9rem; border: 1px solid var(--rule); border-radius: var(--r-1); color: inherit; text-decoration: none; transition: border-color var(--t-1), transform var(--t-2) var(--ease-out); }
.prev-next a:hover { border-color: var(--ink-3); }
.prev-next a:active { transform: translateY(1px); }
.prev-next span { font-size: .8125rem; color: var(--ink-3); }
.prev-next b { font-weight: 600; }
.prev-next .next { grid-column: 2; text-align: right; }

/* ─── The look editor (/dezvoltatori/aspect, js/lookeditor.js) ──────────── */
.lk-head { padding: clamp(2rem, 4vw, 3rem) 0 1.6rem; }
.lk-head h1 { max-width: 40rem; font-size: clamp(2.2rem, 2.8vw + 1.2rem, 3.3rem); font-stretch: 90%; font-weight: 640; letter-spacing: -.022em; line-height: 1.04; }
.lk-head .lede { max-width: 44rem; }
.lk-studio {
  display: grid;
  grid-template-columns: minmax(19rem, 23rem) minmax(0, 1fr);
  height: calc(100dvh - 4rem - 1px);
  min-height: 34rem;
  border-block: 1px solid var(--rule);
  background: var(--desk-2);
}
.lk-studio > .lk-wait { padding: 2rem 1.2rem; color: var(--ink-3); }

/* The controls: a sheet of short sections, scrolled on its own. */
.lk-panel { display: flex; flex-direction: column; min-height: 0; background: var(--paper); border-right: 1px solid var(--rule); }
.lk-secs { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.lk-sec { display: grid; gap: .75rem; padding: 1.1rem 1.2rem 1.25rem; border-top: 1px solid var(--rule); }
.lk-sec:first-child { border-top: 0; }
.lk-sec h2 { font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.lk-subhead { margin-top: .3rem; font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.lk-note { margin: 0; font-size: .8125rem; line-height: 1.45; color: var(--ink-3); }
.lk-note.bad { color: var(--bad); }
.lk-note:empty { display: none; }
.lk-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: center; gap: .6rem; }
.lk-row.lk-tail > :first-child { grid-column: 2; }
.lk-label { font-size: .875rem; color: var(--ink-2); }
.lk-ctl { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.lk-ctl input[type="range"] { flex: 1; min-width: 0; accent-color: var(--tus); }
.lk-ctl input[type="range"].off { opacity: .45; }
.lk-out { min-width: 4.2rem; font-size: .8125rem; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.lk-ctl select { min-height: 2.2rem; padding-block: .3rem; font-size: .875rem; }

.lk-seg { position: relative; display: inline-flex; max-width: 100%; padding: 3px; border: 1px solid var(--rule); border-radius: calc(var(--r-2) + 2px); background: var(--desk-2); overflow-x: auto; scrollbar-width: none; }
.lk-seg button { position: relative; z-index: 1; padding: .3rem .62rem; border: 0; border-radius: var(--r-2); background: none; color: var(--ink-2); font-size: .8125rem; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color var(--t-1); }
.lk-seg button:hover { color: var(--ink); }
.lk-seg button.on { color: var(--ink); font-weight: 600; }
.lk-seg-thumb { position: absolute; top: 3px; bottom: 3px; left: 0; width: var(--w, 0); border-radius: var(--r-2); background: var(--paper); box-shadow: 0 1px 2px rgb(20 23 22 / .1), inset 0 0 0 1px var(--rule); transform: translateX(var(--x, 0)); transition: transform var(--t-3) var(--spring), width var(--t-3) var(--spring); }

/* Presets: chips of their colours over the name. */
.lk-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr)); gap: .45rem; }
.lk-preset { display: grid; gap: .4rem; padding: .55rem .6rem .5rem; border: 1px solid var(--rule); border-radius: var(--r-2); background: var(--paper); text-align: left; font-size: .8125rem; font-weight: 550; cursor: pointer; transition: border-color var(--t-1); }
.lk-preset:hover { border-color: var(--ink-3); }
.lk-chips { display: flex; }
.lk-chips i { width: 1.05rem; height: 1.05rem; margin-right: -.3rem; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--paper), inset 0 0 0 1px rgb(0 0 0 / .12); }

/* Colours: a swatch, the name, its hex, where it comes from. */
.lk-palette { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
.lk-colors { display: grid; gap: .1rem; }
.lk-color { display: grid; grid-template-columns: 2rem minmax(0, 1fr) 5.6rem 4.6rem; align-items: center; gap: .55rem; padding: .22rem 0; }
.lk-swatch { width: 1.85rem; height: 1.85rem; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14); }
.lk-swatch::-webkit-color-swatch-wrapper { padding: 0; }
.lk-swatch::-webkit-color-swatch { border: 0; border-radius: 50%; }
.lk-swatch::-moz-color-swatch { border: 0; border-radius: 50%; }
.lk-color .lk-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-panel .lk-hex { min-height: 2rem; padding: .2rem .45rem; font-family: var(--mono); font-size: .8125rem; }
.lk-state { padding: 0; border: 0; background: none; color: var(--ink-3); font-size: .75rem; text-align: right; }
.lk-color.set .lk-state { color: var(--tus); cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .18em; }
.lk-state:disabled { cursor: default; }
.lk-more summary { padding: .35rem 0; color: var(--ink-2); font-size: .875rem; cursor: pointer; }
.lk-more[open] summary { margin-bottom: .3rem; }

.lk-checks { display: grid; gap: .3rem; margin: 0; padding: 0; list-style: none; font-size: .8125rem; }
.lk-checks li { display: grid; grid-template-columns: 1.7rem minmax(0, 1fr) auto; align-items: center; gap: .55rem; color: var(--ink-2); }
.lk-checks b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.lk-checks li.low b { color: var(--bad); }
.lk-pair { position: relative; width: 1.5rem; height: 1rem; }
.lk-pair i { position: absolute; top: 0; width: 1rem; height: 1rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14); }
.lk-pair .bg { right: 0; }
.lk-pair .fg { left: 0; z-index: 1; box-shadow: 0 0 0 1.5px var(--paper), inset 0 0 0 1px rgb(0 0 0 / .14); }

/* Fonts, each shown in itself. */
.lk-fonts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.lk-font { display: grid; gap: .05rem; padding: .5rem .65rem; border: 1px solid var(--rule); border-radius: var(--r-2); background: var(--paper); text-align: left; cursor: pointer; transition: border-color var(--t-1), box-shadow var(--t-2); }
.lk-font b { font-size: 1.05rem; font-weight: 600; line-height: 1.2; }
.lk-font span { font-size: .75rem; color: var(--ink-3); }
.lk-font:hover { border-color: var(--ink-3); }
.lk-font.on { border-color: var(--tus); box-shadow: inset 0 0 0 1px var(--tus); }

.lk-check { display: inline-flex; align-items: flex-start; gap: .55rem; font-size: .875rem; cursor: pointer; }
.lk-check input { margin-top: .15rem; accent-color: var(--tus); }
.lk-check small { display: block; color: var(--ink-3); font-size: .75rem; }
.lk-toggles { display: grid; gap: .5rem; margin-top: .2rem; }

/* Sections: drag by the grip, or use the arrow keys on it. */
.lk-sections { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.lk-sections li { display: flex; align-items: center; gap: .45rem; padding: .3rem .4rem .3rem .2rem; border-radius: var(--r-1); background: var(--paper); font-size: .875rem; }
.lk-sections li.dragging { position: relative; z-index: 2; box-shadow: var(--shadow-lift); }
.lk-sections label { display: flex; flex: 1; align-items: center; gap: .5rem; cursor: pointer; }
.lk-sections input { accent-color: var(--tus); }
.lk-handle { display: grid; gap: 2px; place-content: center; width: 1.6rem; height: 1.6rem; padding: 0; border: 0; border-radius: var(--r-1); background: none; color: var(--ink-3); cursor: grab; touch-action: none; }
.lk-handle:hover { background: var(--desk-2); color: var(--ink); }
.lk-handle i { display: block; width: .8rem; height: 1.5px; background: currentColor; border-radius: 1px; }
.lk-sections li.dragging .lk-handle { cursor: grabbing; }

.lk-field { display: grid; gap: .25rem; font-size: .8125rem; color: var(--ink-2); }
.lk-field input { min-height: 2.2rem; font-size: .875rem; }

/* The JSON: lines that just changed light up once. */
.lk-json { margin: 0; max-height: 22rem; overflow: auto; padding: .75rem .85rem; border: 1px solid var(--rule); border-radius: var(--r-2); background: var(--paper-2); font-family: var(--mono); font-size: .75rem; line-height: 1.55; white-space: pre; }
.lk-json .k { color: var(--ink); }
.lk-json .s { color: var(--ok); }
.lk-json .n, .lk-json .w { color: var(--tus); }
.lk-json .ln { display: inline-block; min-width: 100%; border-radius: 2px; }
.lk-json .ln.new { animation: lk-line 1.2s var(--ease-out); }
@keyframes lk-line { from { background: var(--tus-wash); } }
.lk-import { font-family: var(--mono); font-size: .75rem; }
.lk-actions { display: flex; justify-content: flex-end; margin-top: .4rem; }
/* Above the controls' own layers (segment labels, a dragged row) when it sticks. */
.lk-foot { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: .45rem; padding: .75rem 1.2rem; border-top: 1px solid var(--rule); background: var(--paper); }
.lk-foot .quiet { margin-left: auto; }

/* The stage: the app at its own width, scaled to fit. */
.lk-stage { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; }
.lk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; padding: .6rem 1rem; border-bottom: 1px solid var(--rule); background: var(--desk); }
.lk-screens { display: flex; flex-wrap: wrap; gap: .2rem; margin-left: auto; }
.lk-screens button { padding: .3rem .6rem; border: 0; border-radius: var(--r-2); background: none; color: var(--ink-2); font-size: .8125rem; cursor: pointer; transition: background-color var(--t-1), color var(--t-1); }
.lk-screens button:hover { color: var(--ink); background: var(--desk-2); }
.lk-screens button.on { color: var(--ink); font-weight: 600; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); }
/* Auto margins centre a device that fits and never cut one that does not. */
.lk-view { display: flex; flex-direction: column; align-items: center; min-height: 0; padding: 24px; overflow: auto; overscroll-behavior: contain; }
.lk-device { position: relative; flex: none; margin-block: auto; overflow: hidden; border-radius: 10px; background: var(--paper); box-shadow: 0 0 0 1px var(--rule), var(--shadow-lift); transform-origin: 0 0; opacity: 0; transition: opacity var(--t-4) var(--ease-out); }
.lk-stage.live .lk-device { opacity: 1; }
/* Phone and tablet: a dark bezel drawn outside the screen (the stage's 24 px padding holds it). */
.lk-device[data-device="phone"] { border-radius: 26px; box-shadow: 0 0 0 7px #151917, 0 0 0 8px var(--rule-2), var(--shadow-lift); }
.lk-device[data-device="tablet"] { border-radius: 16px; box-shadow: 0 0 0 10px #151917, 0 0 0 11px var(--rule-2), var(--shadow-lift); }
.lk-frame { display: block; border: 0; transform-origin: 0 0; background: var(--desk); }

@media (max-width: 1000px) {
  .lk-studio { grid-template-columns: minmax(0, 1fr); height: auto; }
  .lk-stage { order: -1; height: 72svh; border-bottom: 1px solid var(--rule); }
  .lk-panel { border-right: 0; }
  .lk-secs { overflow: visible; }
  .lk-foot { position: sticky; bottom: 0; }
  .lk-screens { margin-left: 0; }
}
@media (max-width: 520px) {
  .lk-row { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  .lk-row.lk-tail > :first-child { grid-column: 1; }
}

/* The app's icons and toasts, used by the look editor (core.js icon(), toast()). */
.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.toasts { position: fixed; left: 50%; bottom: 1rem; z-index: 60; display: grid; gap: .5rem; justify-items: center; width: min(28rem, calc(100vw - 1.5rem)); transform: translateX(-50%); pointer-events: none; }
.toast { position: relative; display: flex; align-items: center; gap: .6rem; width: 100%; padding: .7rem .6rem .7rem 1rem; overflow: hidden; border-radius: var(--r-2); background: var(--ink); color: var(--desk); box-shadow: var(--shadow-lift); pointer-events: auto; }
.toast-text { flex: 1; }
.toast-x { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; padding: 0; border: 0; border-radius: var(--r-1); background: none; color: inherit; opacity: .6; cursor: pointer; }
.toast-x:hover { opacity: 1; }
.toast::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor; opacity: .35; transform-origin: left; animation: toast-life var(--life, 3600ms) linear forwards; }
.toast.held::after { animation-play-state: paused; }
.toast.ok::before, .toast.bad::before { content: ""; flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--ok); }
.toast.bad::before { background: var(--bad); border-radius: 1px; }
@keyframes toast-life { to { transform: scaleX(0); } }

/* ─── Developers: the two paths ─────────────────────────────────────────── */
.dv-choose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: .4rem 0 2.6rem; border-top: 1px solid var(--ink); }
.dv-path { display: flex; flex-direction: column; gap: .55rem; padding: 1.5rem 2rem 1.6rem 0; color: inherit; text-decoration: none; }
.dv-path + .dv-path { padding: 1.5rem 0 1.6rem 2rem; border-left: 1px solid var(--rule); }
.dv-path-q { font-size: .875rem; font-weight: 600; color: var(--ink-3); }
.dv-path h2 { margin: 0; font-size: clamp(1.5rem, 1.2vw + 1.1rem, 2rem); font-stretch: 92%; letter-spacing: -.018em; transition: color var(--t-1); }
.dv-path p { margin: 0; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.55; max-width: 34rem; }
.dv-path ul { margin: .2rem 0 0; padding-left: 1.1rem; color: var(--ink-2); font-size: .9375rem; line-height: 1.6; }
.dv-path-go { margin-top: auto; padding-top: .6rem; font-weight: 600; color: var(--tus); }
.dv-path-go::after { content: " \2192"; display: inline-block; transition: transform var(--t-1) var(--spring); }
.dv-path:hover h2 { color: var(--tus); }
.dv-path:hover .dv-path-go::after { transform: translateX(.25rem); }
.dv-path:focus-visible { outline: 2px solid var(--tus); outline-offset: 4px; }
@media (max-width: 760px) {
  .dv-choose { grid-template-columns: minmax(0, 1fr); }
  .dv-path, .dv-path + .dv-path { padding: 1.4rem 0; border-left: 0; }
  .dv-path + .dv-path { border-top: 1px solid var(--rule); }
}

/* ─── API reference blocks (rendered from the contract) ─────────────────── */
.prose .endpoint { margin: 2rem 0 0; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.prose .endpoint h3 { margin-top: 0; }
.ep-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin: .3rem 0 .6rem; }
.prose .ep-line code { padding: 0; background: none; border: 0; font-size: .9375rem; overflow-wrap: anywhere; }
.ep-m { display: inline-block; min-width: 3.7rem; padding: .1rem .4rem; border-radius: var(--r-1); font: 650 .75rem/1.4 var(--mono); text-align: center; letter-spacing: .02em; }
.ep-get { color: var(--tus); background: var(--tus-wash); }
.ep-post { color: var(--ok); background: var(--ok-wash); }
.ep-patch, .ep-put { color: var(--warn); background: var(--warn-wash); }
.ep-delete { color: var(--bad); background: var(--bad-wash); }
.ep-perm { margin: 0 0 .6rem; font-size: .875rem; color: var(--ink-3); }
.ep-io { margin: .9rem 0 .3rem; font-size: .9375rem; }
.prose table.fields { width: 100%; }
.prose table.fields td:first-child { white-space: nowrap; }
.fields .ty { font: .8125rem var(--mono); color: var(--ink-3); }
.fields .where { font-size: .75rem; color: var(--ink-3); }
.prose h3[id^="obiect-"] { margin-top: 2.4rem; }

/* Screenshots of the app (<!--shot:…--> in the docs). */
.prose figure.shot { margin: 1.5rem 0 1.9rem; }
.prose figure.shot img { display: block; max-width: 100%; height: auto; border: 1px solid var(--rule); border-radius: var(--r-2); background: var(--paper); }
.prose figure.shot figcaption { margin-top: .55rem; font-size: .875rem; line-height: 1.5; color: var(--ink-3); }
.dv-path-img { display: block; width: 100%; height: auto; margin: 0 0 .6rem; transition: transform .32s var(--spring); }
.dv-path:hover .dv-path-img { transform: translateY(-3px); }
