/* PanelCraft site: one stylesheet. Tokens first; everything below references tokens only.
   Type: Inter (variable, self-hosted). No third-party requests. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; /* taste-skill-ignore */
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; /* taste-skill-ignore */
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* colour: one ground, one ink, one accent, one dark field */
  --ground: #ffffff;
  --paper: #f3f4f6;
  --paper-2: #e7e9ed;
  --ink: #0d1117;
  --ink-2: #3a424d;
  --rule: #cfd4db;
  --accent: #1555c4;
  --accent-hover: #0f43a0;
  --accent-ink: #ffffff;
  --night: #0d1117;
  --night-2: #161b23;
  --night-3: #202733;
  --night-ink: #eef1f5;
  --night-muted: #aeb7c4;
  --accent-on-night: #8db4ff;
  /* type: five steps */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-small: 0.9375rem;
  --t-body: 1rem;
  --t-lead: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem);
  --t-h2: clamp(1.75rem, 1.35rem + 1.4vw, 2.625rem);
  --t-h1: clamp(1.625rem, 1.1rem + 2.6vw, 3.375rem);
  --t-h3: 1.25rem;
  --t-stat: 1.5rem;
  /* space */
  --gutter: clamp(16px, 3vw, 32px);
  --gap: clamp(20px, 2.4vw, 32px);
  --sec: clamp(64px, 8vw, 112px);
  --radius: 4px;
  --header-h: 60px;
  --toc-h: 44px;
  --max: clamp(1280px, 75vw, 1440px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--toc-h) + 16px); }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 var(--t-body)/1.6 var(--font); font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-wrap: break-word; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.night :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--accent-on-night); }
::selection { background: var(--accent); color: var(--accent-ink); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; background: var(--ground); color: var(--ink); padding: 10px 14px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--gap); }

/* ---- type ---- */
h1, h2, h3 { font-weight: 650; letter-spacing: -0.022em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: var(--t-h1); letter-spacing: -0.03em; line-height: 1.06; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.012em; line-height: 1.25; }
h4 { font-size: var(--t-body); font-weight: 650; line-height: 1.3; }
.lead { font-size: var(--t-lead); line-height: 1.5; color: var(--ink-2); max-width: 62ch; }
.prose p + p { margin-top: 1em; }
.prose { max-width: 66ch; color: var(--ink-2); }
.prose strong, .lead strong { color: var(--ink); font-weight: 600; }
.small { font-size: var(--t-small); line-height: 1.5; }
.night { background: var(--night); color: var(--night-ink); }
.night .lead, .night .prose { color: var(--night-muted); }
.night a:hover { color: var(--accent-on-night); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font: 600 var(--t-body)/1 var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s ease, transform .15s ease; }
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn--quiet { background: var(--paper-2); color: var(--ink); }
.btn--quiet:hover { background: var(--rule); color: var(--ink); }
.night .btn { background: var(--night-ink); color: var(--ink); }
.night .btn:hover { background: #fff; color: var(--accent); }
.night .btn--quiet { background: var(--night-3); color: var(--night-ink); }
.night .btn--quiet:hover { background: #2b3444; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link { font-weight: 600; text-decoration: none; color: var(--accent); }
.link::after { content: "\00a0\2192"; }
.link:hover { text-decoration: underline; }
.night .link { color: var(--accent-on-night); }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--night); color: var(--night-ink); }
.site-header .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 0 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--t-h3); letter-spacing: -0.02em; text-decoration: none; color: var(--night-ink); min-height: var(--header-h); }
.brand:hover { color: #fff; }
.brand svg { width: 26px; height: 26px; }
.nav-toggle { margin-left: auto; min-height: 44px; padding: 0 14px; background: var(--night-3); color: var(--night-ink); border: 0; border-radius: var(--radius); font: 600 var(--t-small)/1 var(--font); cursor: pointer; }
.primary-nav { flex: 1 0 100%; order: 3; padding-bottom: 12px; }
html.js .primary-nav[hidden] { display: none; }
.primary-nav ul { display: flex; flex-direction: column; }
.primary-nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--night-ink); font-weight: 500; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--accent-on-night); }
.header-tools { display: flex; align-items: center; gap: 12px; }
.header-cta { min-height: 40px; padding: 0 16px; font-size: var(--t-small); }
.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; background: var(--night-3); border-radius: var(--radius); cursor: pointer; font-size: var(--t-small); font-weight: 600; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 190px; padding: 6px; background: var(--night-3); border-radius: var(--radius);  } 
.lang li { display: flex; }
.lang a, .lang span { flex: 1; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 2px; text-decoration: none; font-size: var(--t-small); color: var(--night-ink); }
.lang a:hover { background: var(--night-2); color: #fff; }
.lang span { color: var(--night-muted); }
.lang [aria-current] { background: var(--night-2); }
@media (min-width: 1000px) {
  .nav-toggle { display: none; }
  .primary-nav, html.js .primary-nav[hidden] { display: block; flex: 1; order: 0; padding: 0; }
  .primary-nav ul { flex-direction: row; gap: 4px; }
  .primary-nav a { padding: 0 12px; min-height: var(--header-h); font-size: var(--t-small); }
  .header-tools { order: 2; margin-left: auto; }
}
@media (max-width: 999px) { .header-tools { margin-left: auto; } .header-tools .header-cta { display: none; } .nav-toggle { margin-left: 0; } }

/* in-page contents bar (documentation feel) */
.toc { position: sticky; top: var(--header-h); z-index: 30; background: var(--paper); display: none; }
.toc ul { display: flex; flex-wrap: wrap; gap: 0 4px; min-height: var(--toc-h); align-items: center; }
.toc a { display: inline-flex; align-items: center; min-height: var(--toc-h); padding: 0 9px; font-size: var(--t-small); font-weight: 500; text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--accent); }
.toc a.is-active { color: var(--ink); font-weight: 650; border-bottom: 3px solid var(--accent); }
@media (min-width: 1100px) { .toc { display: block; } }

/* ---- sections ---- */
.section { padding-block: var(--sec); }
.section--paper { background: var(--paper); }
.section--tight { padding-block: calc(var(--sec) * .6); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px var(--gap); margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { max-width: 62ch; }
@media (min-width: 900px) { .section-head { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; } .section-head > :first-child { grid-column: 1 / span 6; } .section-head > :last-child { grid-column: 8 / span 5; } .section-head--wide > :first-child { grid-column: 1 / span 8; } }

/* hero */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(40px, 5vw, 72px); }
.hero-top { display: grid; gap: 24px var(--gap); margin-bottom: clamp(28px, 4vw, 48px); }
.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 56ch; }
.hero-cta { display: grid; gap: 20px; align-content: start; }
.hero-note { color: var(--ink-2); font-size: var(--t-body); max-width: 40ch; }
.hero-left { display: grid; gap: 20px; align-content: start; }
@media (min-width: 1000px) { .hero-top { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; } .hero-left { grid-column: 1 / span 7; } .hero h1 { max-width: none; } .hero-cta { grid-column: 9 / span 4; } .hero .lead { font-size: var(--t-body); } }

/* figures: image is always shown whole inside its aspect-ratio box */
.fig { margin: 0; }
.fig__box { aspect-ratio: var(--ar); background: var(--night-2); border-radius: var(--radius); overflow: hidden; }
.fig__box img, .fig__box a, .fig__box picture { display: block; width: 100%; height: 100%; }
@media (max-width: 699px) { .fig__box { aspect-ratio: var(--ar-m, var(--ar)); } }
.fig__box img { object-fit: contain; }
.fig figcaption { margin-top: 12px; font-size: var(--t-small); color: var(--ink-2); line-height: 1.5; max-width: 70ch; }
.night .fig figcaption { color: var(--night-muted); }
.fig--on-paper .fig__box { background: var(--paper-2); }

/* proof strip: facts as a definition grid */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--paper-2); }
.facts > div { background: var(--paper); padding: 20px 18px 22px; }
.facts dt { font-size: var(--t-stat); font-weight: 650; letter-spacing: -0.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.facts dd { margin-top: 6px; font-size: var(--t-small); line-height: 1.45; color: var(--ink-2); }
@media (min-width: 700px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .facts { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* model -> outputs diagram */
.model { display: grid; gap: 12px; }
.model__src { background: var(--night); color: var(--night-ink); padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); display: grid; gap: 10px; align-content: start; }
.model__src h3 { font-size: var(--t-stat); }
.model__src p { color: var(--night-muted); font-size: var(--t-body); max-width: 48ch; }
.model__outs { display: grid; gap: 12px; grid-template-columns: repeat(1, minmax(0, 1fr)); }
.model__out { background: var(--paper); padding: 18px 18px 20px; border-radius: var(--radius); display: grid; gap: 6px; align-content: start; text-decoration: none; }
.model__out:hover { background: var(--paper-2); color: var(--ink); }
.model__out h4 { font-size: var(--t-body); }
.model__out p { font-size: var(--t-body); color: var(--ink-2); line-height: 1.5; }
.section--paper .model__out { background: var(--ground); }
.section--paper .model__out:hover { background: var(--paper-2); }
@media (min-width: 560px) { .model__outs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .model { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } .model__outs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* capability sections */
.cap { display: grid; gap: clamp(24px, 3vw, 40px) var(--gap); grid-template-columns: minmax(0, 1fr); }
.cap__text { display: grid; gap: 20px; align-content: start; }
.cap__text h2 { font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.125rem); }
.cap__fig { min-width: 0; }
@media (min-width: 1000px) {
  .cap { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .cap__text { grid-column: 1 / span 5; }
  .cap__fig { grid-column: 6 / span 7; }
  .cap--rev .cap__text { grid-column: 8 / span 5; grid-row: 1; }
  .cap--rev .cap__fig { grid-column: 1 / span 7; grid-row: 1; }
  .cap--fig5 .cap__text { grid-column: 1 / span 7; }
  .cap--fig5 .cap__fig { grid-column: 8 / span 5; }
  .cap--fig5.cap--rev .cap__text { grid-column: 6 / span 7; }
  .cap--fig5.cap--rev .cap__fig { grid-column: 1 / span 5; }
  .cap__fig--sticky { position: sticky; top: calc(var(--header-h) + var(--toc-h) + 24px); }
}
.cap-full { margin-top: clamp(28px, 4vw, 48px); }
.cap-full.grid > div { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 1000px) { .cap-full.grid > div { grid-column: span var(--span, 12); } }
.cap-intro { display: grid; gap: 16px var(--gap); }
@media (min-width: 900px) { .cap-intro { grid-template-columns: repeat(12, minmax(0, 1fr)); } .cap-intro > :first-child { grid-column: 1 / span 6; } .cap-intro > :last-child { grid-column: 8 / span 5; } }

/* specification lists */
.specs { display: grid; }
.specs > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 14px; }
.specs > div:nth-child(odd) { background: var(--paper); }
.section--paper .specs > div:nth-child(odd) { background: var(--ground); }
.night .specs > div:nth-child(odd) { background: var(--night-2); }
.specs dt { font-weight: 600; font-size: var(--t-body); line-height: 1.45; }
.specs dd { font-size: var(--t-body); line-height: 1.5; color: var(--ink-2); }
.night .specs dd { color: var(--night-muted); }
@media (min-width: 560px) { .specs > div { grid-template-columns: minmax(0, 11fr) minmax(0, 20fr); gap: 16px; } }
.bullets { display: grid; gap: 10px; }
.bullets li { position: relative; padding-left: 20px; line-height: 1.5; color: var(--ink-2); }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; background: var(--accent); }
.night .bullets li { color: var(--night-muted); }
.night .bullets li::before { background: var(--accent-on-night); }
.bullets strong { color: var(--ink); font-weight: 600; }
.night .bullets strong { color: var(--night-ink); }

/* tables */
.tbl-wrap { max-width: 100%; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--t-body); line-height: 1.5; }
.tbl caption { text-align: left; padding-bottom: 12px; font-weight: 650; font-size: var(--t-body); }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 14px 16px; }
.tbl thead th { background: var(--night); color: var(--night-ink); font-weight: 600; }
.tbl tbody th { font-weight: 600; }
.tbl tbody tr { border-bottom: 1px solid var(--rule); }
.tbl tbody tr:nth-child(even) { background: var(--paper); }
.section--paper .tbl tbody tr:nth-child(even) { background: var(--ground); }
.tbl .c { text-align: center; }
.tbl .yes, .tbl .no { font-weight: 600; }
.tbl .no { color: var(--ink-2); font-weight: 400; }
.tbl .dash { font-size: 1.125rem; }
.tbl td.is-col, .tbl th.is-col { border-left: 3px solid var(--accent); }
@media (max-width: 759px) {
  .tbl, .tbl tbody, .tbl tr, .tbl th, .tbl td { display: block; width: 100%; }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl tbody tr { padding: 10px 0 12px; margin-bottom: 8px; background: var(--paper); border: 0; }
  .section--paper .tbl tbody tr { background: var(--ground); }
  .tbl tbody tr:nth-child(even) { background: var(--paper); }
  .section--paper .tbl tbody tr:nth-child(even) { background: var(--ground); }
  .tbl th { padding: 6px 14px 2px; font-size: 1rem; }
  .tbl td { padding: 4px 14px; display: grid; grid-template-columns: minmax(0, 9fr) minmax(0, 14fr); gap: 12px; }
  .tbl td::before { content: attr(data-label); font-weight: 600; color: var(--ink-2); }
  .tbl td.c { text-align: left; }
  .tbl caption { display: block; width: 100%; }
  .tbl--2 td { display: block; }
  .tbl--2 td::before { display: none; }
  .tbl--2 th { font-size: var(--t-body); }
}

/* workflow (dark field) */
.flow { display: grid; gap: 12px; counter-reset: flow; }
.flow li { background: var(--night-2); padding: 22px 20px 24px; border-radius: var(--radius); display: grid; gap: 10px; align-content: start; }
.flow h3 { font-size: var(--t-h3); }
.flow p { font-size: var(--t-body); line-height: 1.55; color: var(--night-muted); }
.flow .io { display: grid; gap: 2px; margin-top: 6px; }
.flow .io b { font-weight: 600; color: var(--night-ink); }
.flow .io span { color: var(--night-muted); }
@media (min-width: 640px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1240px) { .flow { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* columns of prose blocks (data, security) */
.cols { display: grid; gap: clamp(24px, 3vw, 40px) var(--gap); }
.cols > div { display: grid; gap: 12px; align-content: start; }
@media (min-width: 760px) { .cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* plans */
.plans { display: grid; gap: 12px; }
.plan { background: var(--ground); padding: clamp(20px, 2.4vw, 28px); border-radius: var(--radius); display: grid; gap: 16px; align-content: start; }
.section--paper .plan { background: var(--ground); }
.plan h3 { font-size: var(--t-stat); }
.plan__price { display: grid; gap: 2px; }
.plan__price b { font-size: var(--t-h2); letter-spacing: -0.03em; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.plan__price b small { font-size: var(--t-small); font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.plan__price span { font-size: var(--t-small); color: var(--ink-2); }
.plan__for { color: var(--ink-2); font-size: var(--t-body); }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } .plan-note { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan-note p { max-width: 62ch; }
.footer-base p { max-width: 72ch; }
.plan-note { display: grid; gap: 8px var(--gap); margin-top: 24px; color: var(--ink-2); font-size: var(--t-small); }

/* faq */
.faq { display: grid; gap: 8px; }
.faq details { background: var(--paper); border-radius: var(--radius); }
.section--paper .faq details { background: var(--ground); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 64px; padding: 14px 20px; cursor: pointer; font-weight: 650; font-size: var(--t-body); line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.5rem; font-weight: 400; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] { background: var(--paper-2); }
.section--paper .faq details[open] { background: var(--ground); }
.faq .ans { padding: 0 20px 20px; max-width: 70ch; color: var(--ink-2); }
.faq .ans p + p { margin-top: 0.8em; }

/* cta */
.cta { display: grid; gap: 28px var(--gap); }
.cta h2 { max-width: 34ch; }
@media (min-width: 900px) { .cta { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; } .cta > :first-child { grid-column: 1 / span 7; } .cta > :last-child { grid-column: 9 / span 4; } }
.cta-side { display: grid; gap: 14px; }

/* footer */
.site-footer { background: var(--night-2); color: var(--night-muted); padding-block: clamp(48px, 6vw, 72px) 28px; font-size: var(--t-small); }
.site-footer a { color: var(--night-ink); text-decoration: none; }
.site-footer a:hover { color: var(--accent-on-night); text-decoration: underline; }
.footer-grid { display: grid; gap: 32px var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; display: grid; gap: 14px; align-content: start; max-width: 40ch; }
.footer-brand .brand { min-height: 0; }
.footer-col h2 { font-size: var(--t-small); font-weight: 650; letter-spacing: 0; color: var(--night-ink); margin-bottom: 10px; }
.footer-col a { display: inline-flex; min-height: 32px; align-items: center; }
.footer-base { margin-top: 48px; padding-top: 20px; display: grid; gap: 12px; background: none; }
.footer-base ul { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-langs { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-langs [aria-current] { color: var(--night-ink); font-weight: 600; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: minmax(0, 3fr) repeat(5, minmax(0, 2fr)); } .footer-brand { grid-column: auto; } }

/* motion: entrance only when JS is on; content is never hidden without it */
@media (prefers-reduced-motion: no-preference) {
  html.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
  html.js .rv.in { opacity: 1; transform: none; }
  html.js .rv.d1 { transition-delay: .07s; } html.js .rv.d2 { transition-delay: .14s; }
  .fig__box img { transition: transform .6s ease; }
  .fig__box a:hover img { transform: scale(1.012); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print { .site-header, .toc, .site-footer { display: none; } }

.fig__box video { display: block; width: 100%; height: 100%; object-fit: contain; }
.hero .lead { max-width: 56ch; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }

.tbl .cell { display: block; max-width: 80ch; }

/* ---- legal pages (tools/lib/legal.mjs) ---- */
.legal-head { background: var(--paper); padding-block: 24px clamp(24px, 4vw, 40px); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: var(--t-small); color: var(--ink-2); margin-bottom: 20px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--rule); }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--accent); }
.legal-head h1 { font-size: clamp(1.875rem, 1rem + 3.2vw, 3.75rem); }
.legal-lead { margin-top: 14px; max-width: 62ch; font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); }
.legal-updated { margin-top: 12px; color: var(--ink-2); font-size: var(--t-small); }
.legal-links ul { display: flex; flex-wrap: wrap; gap: 8px 8px; margin-top: 20px; }
.legal-links a, .legal-links span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--radius); background: var(--ground); font-size: var(--t-small); font-weight: 500; text-decoration: none; color: var(--ink-2); }
.legal-links a:hover { color: var(--accent); background: var(--paper-2); }
.legal-links span[aria-current] { background: var(--ink); color: var(--ground); font-weight: 600; }
.legal-body { display: grid; gap: 28px; padding-block: 32px var(--sec); align-items: start; }
.ltoc { border-radius: var(--radius); padding: 16px 18px; background: var(--paper); }
.ltoc h2 { font-size: var(--t-small); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 650; color: var(--ink-2); margin-bottom: 8px; }
.ltoc ol { list-style: decimal; padding-left: 1.6em; display: grid; gap: 2px; }
.ltoc li::marker { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ltoc a { display: block; padding: 5px 0; font-size: var(--t-small); line-height: 1.35; text-decoration: none; color: var(--ink-2); }
.ltoc a:hover { color: var(--accent); }
.ltoc a.is-active { color: var(--ink); font-weight: 650; }
.legal-doc { min-width: 0; max-width: 70ch; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); }
.legal-doc h2 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem); color: var(--ink); margin: 2.2em 0 0.6em; text-wrap: pretty; }
.legal-doc h2:first-child, .legal-doc .legal-draft + h2 { margin-top: 0; }
.legal-doc h3 { color: var(--ink); margin: 1.8em 0 0.5em; }
.legal-doc p, .legal-doc ul, .legal-doc ol, .legal-doc blockquote, .legal-doc .legal-table, .legal-doc pre { margin-top: 1em; }
.legal-doc h2 + p, .legal-doc h2 + ul, .legal-doc h2 + ol { margin-top: 0; }
.legal-doc ul { list-style: disc; padding-left: 1.4em; }
.legal-doc ol { list-style: decimal; padding-left: 1.6em; }
.legal-doc li { padding-left: 0.2em; }
.legal-doc li + li { margin-top: 0.55em; }
.legal-doc strong { color: var(--ink); font-weight: 600; }
.legal-doc a { color: var(--accent); overflow-wrap: anywhere; }
.legal-doc a:hover { color: var(--accent-hover); }
.legal-doc .anchor { margin-left: 0.4em; font-weight: 400; text-decoration: none; opacity: 0; color: var(--ink-2); }
.legal-doc :is(h2, h3):hover .anchor, .legal-doc .anchor:focus-visible { opacity: 1; }
.legal-doc blockquote { border-left: 3px solid var(--accent); padding-left: 1em; color: var(--ink-2); }
.legal-doc hr { border: 0; height: 4px; background: var(--paper); margin: 2em 0; }
.legal-doc pre { background: var(--paper); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; font-size: 0.875rem; line-height: 1.5; }
.legal-table { overflow-x: auto; max-width: 100%; border-radius: var(--radius); background: var(--paper); }
.legal-table table { width: 100%; border-collapse: collapse; font-size: var(--t-small); line-height: 1.45; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; } /* taste-skill-ignore: real table rules */
.legal-table th { background: var(--paper); color: var(--ink); font-weight: 650; }
.legal-table tr:last-child td { border-bottom: 0; }
mark.ph { background: #fff1a8; color: #3b2f00; outline: 2px dashed #b58900; outline-offset: 1px; padding: 0 3px; border-radius: 2px; font-weight: 600; overflow-wrap: anywhere; }
.legal-draft { margin: 0 0 1.6em; padding: 12px 14px; background: #fff1a8; border-radius: var(--radius); color: #3b2f00; font-size: var(--t-small); line-height: 1.5; }
.legal-more { margin-top: 1em; padding: 18px 20px; background: var(--paper); border-radius: var(--radius); font-size: var(--t-small); }
.legal-more h2 { font-size: var(--t-body); margin: 0 0 0.6em; padding: 0; border: 0; }
.legal-more ul { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; padding: 0; margin: 0; }
.legal-more li { padding: 0; margin: 0; }
.legal-more li + li { margin: 0; }
@media (min-width: 1000px) {
  .legal-body { grid-template-columns: 250px minmax(0, 1fr); column-gap: clamp(40px, 5vw, 80px); }
  .legal-more { grid-column: 1 / -1; }
  .ltoc { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; background: none; border-radius: 0; padding: 4px 0; }
}
@media print {
  .legal-head { background: none; border: 0; padding: 0 0 12pt; }
  .legal-lead, .legal-links, .crumbs, .ltoc, .legal-more, .legal-draft, .legal-doc .anchor { display: none !important; }
  .legal-body { display: block; padding: 0; }
  .legal-doc { max-width: none; font-size: 11pt; line-height: 1.5; color: #000; }
  .legal-doc h2 { break-after: avoid; color: #000; }
  .legal-doc li, .legal-table tr { break-inside: avoid; }
  .legal-doc a { color: #000; text-decoration: underline; }
  .legal-doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; overflow-wrap: anywhere; }
  mark.ph { background: none; outline: 0; }
}

/* ---- inner pages ---- */
.bc { background: var(--paper); }
.bc ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; min-height: 44px; font-size: var(--t-small); }
.bc li { display: inline-flex; align-items: center; }
.bc li + li::before { content: "/"; margin: 0 10px; color: var(--ink-2); }
.bc a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.bc a:hover { color: var(--accent); text-decoration: underline; }
.bc [aria-current] { font-weight: 600; }
.hero--inner { padding-block: clamp(32px, 4vw, 56px) clamp(32px, 4vw, 56px); }
.hero--inner h1 { max-width: 22ch; }
.h-small { font-size: var(--t-h3); margin-bottom: 20px; }

.rich > * + * { margin-top: 1em; }
.rich p, .rich li { color: var(--ink-2); }
.rich p strong, .rich li strong { color: var(--ink); font-weight: 600; }
.rich h3 { margin-top: 1.6em; color: var(--ink); }
.rich h3:first-child { margin-top: 0; }
.rich .specs, .rich .tbl-wrap, .rich .fig, .rich .figs, .rich .cols { margin-top: 1.25em; }
.rich > p { max-width: 70ch; }
.cap--solo .cap__text { max-width: 78ch; }
.steps { list-style: none; counter-reset: step; display: grid; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding: 12px 14px 12px 52px; background: var(--paper); min-height: 48px; }
.section--paper .steps li { background: var(--ground); }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; display: grid; place-items: center; background: var(--ink); color: var(--night-ink); font-weight: 650; font-size: var(--t-small); font-variant-numeric: tabular-nums; }
.callout { background: var(--paper-2); padding: 16px 18px; border-left: 4px solid var(--accent); max-width: 70ch; color: var(--ink); }
.section--paper .callout { background: var(--ground); }
.code { margin: 0; padding: 14px 16px; background: var(--night); color: var(--night-ink); overflow-x: auto; font: 0.875rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-width: 100%; }
.figs { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.linklist { display: grid; gap: 10px; }
.linklist li { display: grid; gap: 2px; }
.linklist span { color: var(--ink-2); font-size: var(--t-small); }

.related { display: grid; gap: 12px; }
.related a { display: grid; gap: 4px; padding: 18px; background: var(--ground); border-radius: var(--radius); text-decoration: none; min-height: 88px; align-content: start; }
.related a:hover { background: var(--paper-2); color: var(--ink); }
.related b { font-weight: 650; }
.related span { color: var(--ink-2); font-size: var(--t-body); line-height: 1.5; }
@media (min-width: 640px) { .related { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .related { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* documentation layout: side navigation + article */
.doc { display: grid; gap: 24px var(--gap); }
.doc__nav ul { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.doc__nav a { display: inline-flex; align-items: center; min-height: 36px; font-size: var(--t-small); text-decoration: none; color: var(--ink-2); }
.doc__nav a:hover { color: var(--accent); text-decoration: underline; }
.doc__navtitle { font-weight: 650; font-size: var(--t-small); margin-bottom: 4px; }
.doc__body { min-width: 0; display: grid; gap: clamp(40px, 5vw, 72px); }
.doc__sec h2 { margin-bottom: 20px; }
.doc__sec { scroll-margin-top: calc(var(--header-h) + 16px); }
@media (min-width: 1000px) {
  .doc { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .doc__nav { grid-column: 1 / span 3; position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
  .doc__nav ul { display: grid; gap: 0; }
  .doc__nav--letters ul { display: flex; flex-wrap: wrap; gap: 0 6px; }
  .doc__nav a { min-height: 34px; }
  .doc__body { grid-column: 4 / span 9; }
}
html { scroll-padding-top: calc(var(--header-h) + 16px); }
html.has-toc { scroll-padding-top: calc(var(--header-h) + var(--toc-h) + 16px); }
.glossary { display: grid; gap: 0; }
.glossary > div { display: grid; gap: 4px; padding: 14px 16px; scroll-margin-top: calc(var(--header-h) + 16px); }
.glossary > div:nth-child(odd) { background: var(--paper); }
.glossary dt { font-weight: 650; }
.glossary dd { color: var(--ink-2); max-width: 70ch; }
.changelog { display: grid; gap: clamp(40px, 5vw, 64px); max-width: 860px; }
.changelog h2 { margin-bottom: 4px; }

/* billing toggle (pure CSS) */
.billing { display: inline-flex; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: var(--radius); margin-bottom: 20px; }
.billing label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 2px; cursor: pointer; font-weight: 600; }
#bill-m:checked ~ .billing label[for="bill-m"], #bill-y:checked ~ .billing label[for="bill-y"] { background: var(--ink); color: var(--night-ink); }
#bill-m:focus-visible ~ .billing label[for="bill-m"], #bill-y:focus-visible ~ .billing label[for="bill-y"] { outline: 3px solid var(--accent); outline-offset: 2px; }
#bill-m:checked ~ .plans .price-y, #bill-y:checked ~ .plans .price-m { display: none; }
.plan__price p { display: grid; gap: 2px; }
.plan .btn { width: 100%; }

/* download */
.dls { display: grid; gap: 12px; }
.dl { background: var(--paper); padding: clamp(20px, 2.4vw, 28px); border-radius: var(--radius); display: grid; gap: 14px; align-content: start; }
.dl .btn { justify-self: start; }
.dl__req { color: var(--ink-2); }
@media (min-width: 800px) { .dls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tbl--3 th, .tbl--3 td { vertical-align: top; }

.cap__text.rich { gap: 0; display: block; }
.cap__text.rich > h2 { margin-bottom: 20px; }
.cap__fig.rich { display: block; }

code { overflow-wrap: anywhere; }
.tbl td, .tbl th, .rich p, .rich li { overflow-wrap: break-word; }

/* text-only page heads: the headline leads the first screen */
@media (min-width: 1000px) {
  .hero--text h1 { font-size: clamp(3rem, 5vw, 4.5rem); }
  .hero--text h1 { grid-column: 1 / -1; max-width: none; }
  .hero--text .hero-cta { grid-column: 1 / span 7; }
  .hero--text .hero-aside { grid-column: 9 / span 4; align-self: start; padding: 18px 20px; background: var(--paper); border-left: 4px solid var(--accent); }
  .hero--text .hero-aside .hero-note { max-width: none; }
  .hero--text .hero-top { row-gap: 28px; }
  .hero--text .hero-note { max-width: 70ch; }
}
.doc__body { gap: clamp(88px, 8vw, 112px); }
.related li.rv { display: block; }

.hero--text .hero-aside { display: block; }
@media (max-width: 999px) { .hero--text .hero-aside { padding: 14px 16px; background: var(--paper); border-left: 4px solid var(--accent); } }
.plan { display: flex; flex-direction: column; }
.plan .btn { margin-top: auto; }
.plan > .bullets { margin-bottom: 8px; }
@media (min-width: 900px) { .plan__for { min-height: 3.2em; } }

.strip { display: grid; gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (min-width: 1000px) { .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.strip .fig figcaption { font-size: var(--t-small); }

.hero--text { padding-bottom: clamp(8px, 2vw, 24px); }
.hero--text + .section { padding-top: clamp(32px, 4vw, 56px); }

.tbl code, .rich p code, .rich li code { word-break: break-all; }

.hero--text .lead { font-size: var(--t-lead); }
@media (min-width: 1000px) { .hero--text .lead { font-size: var(--t-lead); } }
.changelog .rv + .rv { margin-top: 24px; }

.tbl tbody th { overflow-wrap: anywhere; }

/* contents bar: one row; if a language needs more room the bar scrolls sideways instead of wrapping */
.toc ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.toc ul::-webkit-scrollbar { display: none; }
.toc li { flex: none; }
.toc a { padding: 0 8px; white-space: nowrap; }

/* long button labels in some languages wrap instead of overflowing */
.btn { white-space: normal; text-align: center; line-height: 1.25; padding-block: 10px; }
.dl .btn { justify-self: stretch; }
@media (min-width: 640px) { .dl .btn { justify-self: start; } }
/* breadcrumb separators trail the previous item, so a wrapped line never starts with a slash */
.bc li + li::before { content: none; margin: 0; }
.bc li:not(:last-child)::after { content: "/"; margin: 0 10px; color: var(--ink-2); }

.glossary dd { max-width: none; }
