:root { color-scheme: light; --bg: #ffffff; --fg: #1e2226; --muted: #5d6670; --line: #dde2e6; --soft: #f4f6f7;
        --accent: #00877a; --accent-fg: #ffffff; --link: #00776b; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
:root[data-theme="dark"] { color-scheme: dark; --bg: #15181b; --fg: #f1f3f5; --muted: #a3acb5; --line: #2d3338; --soft: #1c2024;
        --accent: #1fa595; --accent-fg: #0d1112; --link: #4cc2b3; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --bg: #15181b; --fg: #f1f3f5; --muted: #a3acb5; --line: #2d3338;
        --soft: #1c2024; --accent: #1fa595; --accent-fg: #0d1112; --link: #4cc2b3; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
header.top { border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; }
.logo { height: 44px; width: auto; display: block; }
header nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; }
header nav a { color: var(--fg); text-decoration: none; }
header nav a:hover { color: var(--link); }
h1 { font-size: 2.1rem; line-height: 1.2; letter-spacing: -0.01em; margin: 40px 0 14px; }
h2 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 48px 0 14px;
     padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.lead { font-size: 1.12rem; max-width: 760px; }
.mono { font-family: var(--mono); font-size: 0.95em; }
.crumbs { margin: 24px 0 0; font-size: 14px; color: var(--muted); }
.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 26px 0; border: 1px solid var(--line); }
.spec div { padding: 14px 16px; border-right: 1px solid var(--line); }
.spec div:last-child { border-right: 0; }
.spec dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.spec dd { margin: 4px 0 0; font-weight: 600; font-size: 1.05rem; }
.spec dd span { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
table.grid { width: 100%; border-collapse: collapse; font-size: 15px; }
table.grid th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
                padding: 8px 10px; border-bottom: 2px solid var(--fg); }
table.grid td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tr:hover td { background: var(--soft); }
.btn { display: inline-block; background: var(--accent); color: var(--accent-fg); text-decoration: none; font-weight: 600;
       padding: 10px 18px; border-radius: 3px; }
.btn.small { padding: 5px 12px; font-size: 14px; }
.nw { white-space: nowrap; }
td .btn { text-align: center; }
.note { font-size: 14px; color: var(--muted); }
ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; border: 1px solid var(--line); }
ol.steps li { counter-increment: s; padding: 16px; border-right: 1px solid var(--line); }
ol.steps li:last-child { border-right: 0; }
ol.steps li::before { content: "0" counter(s); font-family: var(--mono); color: var(--accent); font-weight: 700; display: block; margin-bottom: 6px; }
ol.steps strong { display: block; margin-bottom: 4px; }
ol.steps span { font-size: 14px; color: var(--muted); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
ul.ticks { padding-left: 0; list-style: none; }
ul.ticks li { padding: 6px 0 6px 22px; position: relative; border-bottom: 1px dotted var(--line); }
ul.ticks li::before { content: "›"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }
dl.faq dt { font-weight: 600; margin-top: 16px; }
dl.faq dd { margin: 4px 0 0; color: var(--muted); }
main { padding-bottom: 40px; }
footer.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 18px 0 28px; }
footer.foot a { color: var(--muted); }
.tag { font-size: 1.25rem; font-weight: 700; color: var(--accent); margin: 0 0 12px; }
@media (max-width: 700px) {
  h1 { font-size: 1.6rem; }
  .cols { grid-template-columns: 1fr; gap: 0; }
  .spec div, ol.steps li { border-right: 0; border-bottom: 1px solid var(--line); }
  header nav { gap: 6px 14px; }
  table.grid th:nth-child(3), table.grid td:nth-child(3) { display: none; }
}

:root { --s-copied: #eb6834; --s-fitted: #008a7b; --band: #e6ecee; --accent: #007a6e; }
:root[data-theme="dark"] { --s-copied: #d95926; --s-fitted: #1fa595; --band: #262d32; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --s-copied: #d95926; --s-fitted: #1fa595; --band: #262d32; }
}

h2 .num { font-family: var(--mono); color: var(--accent); margin-right: 12px; letter-spacing: 0; }
h3 { font-size: 1rem; margin: 28px 0 8px; }
.body { max-width: 780px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.person { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: start; }
.person img { width: 180px; height: 180px; object-fit: cover; display: block; border: 1px solid var(--line); }
.person p { margin: 0 0 12px; max-width: 720px; }
.pname { font-weight: 700; font-size: 1.15rem; }
.pname span { font-weight: 400; font-size: 14px; color: var(--muted); margin-left: 8px; }
dl.facts { margin: 14px 0 0; border-top: 1px solid var(--line); }
dl.facts div, dl.rows div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
dl.facts dt, dl.rows dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding-top: 3px; }
dl.facts dd, dl.rows dd { margin: 0; }
dl.rows { margin: 0 0 8px; border-top: 2px solid var(--fg); }

table.refs td, table.map td { vertical-align: top; font-size: 14px; }
table.map td:first-child { white-space: nowrap; }
table.num td, table.num th { text-align: right; font-family: var(--mono); font-size: 13px; padding: 5px 8px; }
.spec { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.figresult { margin: 0 0 10px; font-weight: 600; color: var(--fg); }
.fig { margin: 18px 0 22px; border: 1px solid var(--line); padding: 14px 16px 10px; }
.fig svg { width: 100%; height: auto; display: block; }
.fig .grid line { stroke: var(--line); stroke-width: 1; }
.fig .grid line.minor { opacity: 0.45; }
.fig .grid .frame { fill: none; stroke: var(--line); stroke-width: 1; }
.fig text { fill: var(--muted); font: 13px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.fig text.axis { fill: var(--fg); font-weight: 600; }
.fig text.lbl { fill: var(--fg); }
.fig .band { fill: var(--band); }
.fig .ref { fill: none; stroke: var(--fg); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fig circle.copied { fill: var(--s-copied); stroke: var(--bg); stroke-width: 2; }
.fig circle.fitted { fill: var(--s-fitted); stroke: var(--bg); stroke-width: 2; }
.fig .leader { stroke: var(--muted); stroke-width: 1; }
.fig .hit rect { fill: transparent; }
.fig .hit line { stroke: var(--muted); stroke-width: 1; opacity: 0; }
.fig .hit:hover line { opacity: 0.7; }
.fig figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 820px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.legend i { display: inline-block; vertical-align: middle; margin-right: 7px; }
.k-line { width: 20px; height: 2px; background: var(--fg); }
.k-dot { width: 10px; height: 10px; border-radius: 50%; }
.k-dot.copied { background: var(--s-copied); }
.k-dot.fitted { background: var(--s-fitted); }
.k-band { width: 16px; height: 10px; background: var(--band); border: 1px solid var(--line); }
details.data summary { cursor: pointer; font-size: 14px; color: var(--link); margin-top: 10px; }
details.data, .tscroll { overflow-x: auto; }

.samples { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.samples figure { margin: 0; }
.samples img { width: 100%; height: auto; aspect-ratio: 240 / 340; display: block; border: 1px solid var(--line); background: var(--soft); }
.samples figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }

dl.hero-rows { margin: 18px 0 20px; max-width: 860px; border-top: 1px solid var(--line); }
.m-only { display: none; }
.spec dd span.plain { font-family: inherit; }
.actions { margin: 4px 0 12px; }
.byline { font-size: 14px; margin: 6px 0 16px; max-width: 820px; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin: 0 0 8px; }
.quotes figure { margin: 0; padding-left: 14px; border-left: 3px solid var(--accent); }
.quotes blockquote { margin: 0 0 8px; }
.quotes figcaption { font-size: 14px; color: var(--muted); }
p.sub { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 14px 0 0; }
.btn.ghost { background: transparent; color: var(--link); border: 1px solid var(--accent); }
footer.foot p { margin: 4px 0; }

@media (max-width: 700px) {

  .fig .figscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fig svg { min-width: 720px; }
  .fig text { font-size: 16px; }
  .spec div.wide { grid-column: 1 / -1; }
  .m-only { display: block; font-family: var(--sans, inherit); font-size: 12px; color: var(--muted); }
  a .m-only { display: inline; color: inherit; font-size: inherit; }
  .d-only { display: none; }
  .person { grid-template-columns: 1fr; }
  .person img { width: 140px; height: 140px; }
  dl.facts div, dl.rows div { grid-template-columns: 1fr; gap: 2px; }
  .nowrap { white-space: normal; }
  table.grid td, table.grid th { padding-left: 6px; padding-right: 6px; }
  .btn.small { padding: 5px 8px; }
  table.refs th:nth-child(3), table.refs td:nth-child(3) { display: none; }
  table.num th:nth-child(3), table.num td:nth-child(3), table.styles th:nth-child(3), table.styles td:nth-child(3),
  table.files th:nth-child(3), table.files td:nth-child(3),
  table.cmp th:nth-child(3), table.cmp td:nth-child(3) { display: table-cell; }

  table.map thead { display: none; }
  table.map, table.map tbody, table.map tr, table.map td:nth-child(n) { display: block; width: 100%; }
  table.map tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.map td:nth-child(n) { border: 0; padding: 2px 0; white-space: normal; }
  table.map td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
  table.map td.conv { color: var(--accent); }
  .fig { padding: 10px 8px 8px; }
}

article.art { max-width: 820px; }
article.art .tscroll { margin: 6px 0 18px; }
table.art td { vertical-align: top; font-size: 14px; }
ul.arts { list-style: none; padding: 0; margin: 0 0 40px; border-top: 1px solid var(--line); max-width: 820px; }
ul.arts li { padding: 14px 0; border-bottom: 1px solid var(--line); }
ul.arts a { font-weight: 600; display: block; margin-bottom: 4px; }
ul.arts span { font-size: 14px; color: var(--muted); }
@media (max-width: 700px) {
  table.art th:nth-child(3), table.art td:nth-child(3) { display: table-cell; }
}

.soon { display: inline-block; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); padding: 6px 12px;
        margin: 0 0 14px; max-width: 780px; }
.soon-tag { display: block; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 12px;
            font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-top: 2px; }

:root { --error: #b3261e; }
:root[data-theme="dark"] { --error: #ff8a80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --error: #ff8a80; } }
.h1-sub { display: block; font-size: 1rem; font-weight: 400; color: var(--muted); margin-top: 6px; letter-spacing: 0; }
.muted { color: var(--muted); font-size: 14px; max-width: 780px; }
.callout { border-left: 3px solid var(--accent); background: var(--soft); padding: 10px 14px; margin: 16px 0; max-width: 780px; }
.error { color: var(--error); }
p.error, div.error { border: 1px solid var(--error); border-left-width: 3px; padding: 10px 14px; max-width: 780px; }
div.error ul { margin: 0; padding-left: 18px; }
ol.flow { list-style: none; display: flex; flex-wrap: wrap; padding: 0; margin: 24px 0 0; border: 1px solid var(--line);
          font-size: 13px; }
ol.flow li { flex: 1 1 0; padding: 8px 12px; color: var(--muted); border-right: 1px solid var(--line); }
ol.flow li:last-child { border-right: 0; }
ol.flow li span { font-family: var(--mono); font-weight: 700; margin-right: 6px; color: var(--accent); }
ol.flow li.done { color: var(--fg); }
ol.flow li.now { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
ol.flow li.now span { color: var(--accent-fg); }
.cols .box { margin: 0; }
.box { border: 1px solid var(--line); padding: 2px 18px 12px; margin: 18px 0; }
.box.important { border-top: 3px solid var(--accent); }
.box h2 { margin: 14px 0 8px; font-size: 1rem; }
form.stack { max-width: 640px; margin: 8px 0 16px; }
form.stack fieldset { border: 1px solid var(--line); padding: 4px 18px 12px; margin: 0 0 18px; min-width: 0; }
form.stack legend { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0 6px; }
.field { margin: 12px 0; display: flex; flex-direction: column; gap: 4px; }
.field label { font-weight: 600; font-size: 15px; }
.field.check { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 4px 10px; }
.field.check input { margin: 4px 0 0; width: 18px; height: 18px; accent-color: var(--accent); }
.field.check label { flex: 1; font-weight: 400; }
.field small { color: var(--muted); font-size: 13px; width: 100%; }
.field small.error { color: var(--error); }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=number],
.field input[type=file], .field select, .field textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 2px; background: var(--bg); color: var(--fg);
  font: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); }
button { font: inherit; cursor: pointer; background: var(--accent); color: var(--accent-fg); border: 0; padding: 10px 18px;
         border-radius: 3px; font-weight: 600; }
button.secondary { background: transparent; color: var(--link); border: 1px solid var(--accent); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { display: inline-block; padding: 4px 12px; border: 1px solid var(--accent); color: var(--accent); font-weight: 600;
          font-size: 14px; margin: 0 0 12px; }
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 12px; max-width: 820px; }
dl.details dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding-top: 3px; }
dl.details dd { margin: 0; overflow-wrap: anywhere; }
p.link { overflow-wrap: anywhere; font-family: var(--mono); font-size: 14px; }
pre.comments { white-space: pre-wrap; background: var(--soft); border: 1px solid var(--line); padding: 12px; font-size: 14px;
               overflow-wrap: anywhere; max-width: 820px; }
ul.terms { max-width: 800px; padding-left: 20px; }
ul.terms li { margin: 8px 0; }
@media (max-width: 700px) {
  ol.flow li { display: none; }
  ol.flow li.now { display: block; border-right: 0; }
  ol.flow li.now span::after { content: " of 5"; }
  ol.flow.complete { display: none; }
  dl.details { grid-template-columns: 1fr; gap: 2px; }
  dl.details dd { margin-bottom: 8px; }
  .cols .box { margin-bottom: 16px; }
}

.inline-po { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 18px; max-width: 780px; }
.inline-po label { flex-basis: 100%; font-size: 14px; color: var(--muted); }
.inline-po input { flex: 1 1 220px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 2px;
  background: var(--bg); color: var(--fg); font: inherit; }
.inline-po input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
img.v { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
