
.x-btn[data-v="primary"][data-state="hover"] { background: var(--fill-primary-hover); }
.x-btn[data-v="secondary"][data-state="hover"] { background: var(--r-h); }
.x-btn[data-v="ghost"][data-state="hover"] { background: var(--fill-ghost-hover); color: var(--ink); }
.x-btn[data-v="accent"][data-state="hover"] { background: var(--fill-accent-hover); }
.x-btn[data-state="pressed"] { transform: translateY(1px); }
.x-btn__spin { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; opacity: 0; }
.x-btn[data-loading="true"] .x-btn__label { opacity: 0; }
.x-btn[data-loading="true"] .x-btn__spin { opacity: 1; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.x-seg button[aria-selected="true"] { color: var(--ink); transition: none; }
.x-cbl { width: 190px; }
.optcitem.is-hover .optcitem__bg { background-color: var(--state-mat-hover); }
.optcitem.is-hover .optcitem__cb { opacity: 1; }
.x-progress { width: min(260px, 100%); }
.x-progress__row { display: flex; justify-content: space-between; font: var(--t-ui); color: var(--ink2); margin-bottom: 8px; }
.x-progress__row b { color: var(--ink); font-weight: var(--w-label); }
.x-progress__bar { height: 6px; border-radius: 3px; background: var(--well); overflow: hidden; }
.x-progress__bar span { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.x-progress__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.x-ring { width: 36px; height: 36px; transform: rotate(-90deg); }
.x-ring circle { fill: none; stroke-width: 3; }
.x-ring .t { stroke: var(--well); }
.x-ring .f { stroke: var(--fill-accent); stroke-linecap: round; }
.x-lag__read { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font: var(--t-meta); color: var(--ink3); }
.x-lag__read b { color: var(--ink); font-weight: var(--w-label); }
.x-dockwrap { width: 100%; display: grid; place-items: center; }
.dock--mini { position: relative; left: auto; bottom: auto; transform: none; --ctl: 40px; --sp: 10px; width: min(460px, 100%); }
.dock--mini .seg { font-size: 12px; }
.plate__stage:has(> .x-sheet), .plate__stage:has(> .x-mfield), .plate__stage:has(> .x-sh) { padding: 12px; place-items: stretch; }
.x-sheet { position: relative; width: 100%; height: 100%; min-height: 360px; border-radius: var(--r); overflow: hidden; background: var(--paper); box-shadow: var(--ring); align-self: stretch; }
.x-sheet__page { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.x-sheet__page b { font: var(--t-ui); font-weight: var(--w-label); }
.x-sheet__item { display: flex; align-items: center; gap: 8px; }
.x-sheet__item i { width: 22px; height: 22px; border-radius: 6px; background: var(--well); flex: none; }
.x-sheet__item span, .x-sheet__body span { display: block; height: 7px; border-radius: 4px; background: var(--alpha-2); }
.x-sheet__page .x-btn { align-self: flex-start; margin-top: 6px; }
.x-sheet__back { position: absolute; inset: 0; background: var(--backdrop); opacity: 0; pointer-events: none; transition: opacity 200ms linear; }
.x-sheet[data-open="true"] .x-sheet__back { opacity: 1; pointer-events: auto; transition: opacity 1s cubic-bezier(.42, 0, 1, 1); }
.x-sheet__panel { position: absolute; inset: 22% 6px 0; border-radius: 12px 12px 0 0; background: var(--raised); box-shadow: var(--e3); overflow: auto; }
.x-sheet__bar { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 8px 0 14px; background: var(--raised); font: var(--t-ui); }
.x-sheet__bar b { font-weight: var(--w-label); }
.x-sheet__body { padding: 8px 14px 24px; display: flex; flex-direction: column; gap: 10px; }
.x-elev { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; width: 100%; max-width: 580px; }
.x-elev div { display: flex; flex-direction: column; gap: 2px; }
.x-elev span { height: 72px; border-radius: 12px; background: var(--raised); margin-bottom: 10px; }
.x-elev b { font: var(--t-meta); font-weight: var(--w-label); }
.x-elev em { font: var(--t-meta); font-style: normal; color: var(--ink3); }
.plate__stage:has(> .x-elev) { background: var(--mat); }
@container (max-width: 420px) {
  .x-elev { grid-template-columns: repeat(2, 1fr); }
}
@container (max-width: 470px) {
  .dock--mini .seg span { display: none; }
  .dock--mini { --ctl: 40px; width: 100%; }
}
@container (max-width: 420px) {
  .x-type-scale > div { grid-template-columns: minmax(0, 1fr) 64px; }
  .x-type-scale em.num { display: none; }
  .x-elev { grid-template-columns: repeat(2, 1fr); }
}
.plate__stage:has(> .nv) { padding: 12px; place-items: stretch; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.peek__stage:has(> .nv) { padding: 10px; place-items: stretch; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.stage:has(.nv) { padding: 24px; }
.stage:has(.nv) .stage__frame { height: 460px; place-items: stretch; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.stage__frame > .nv { width: 100%; }
.nv { container-type: inline-size; position: relative; width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; border-radius: 10px; background: var(--paper); box-shadow: var(--ring); overflow: hidden; text-align: left; }
.field__inner:has(> .nv) { place-items: stretch; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.nv__bar { position: relative; z-index: 4; flex: none; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 12px; background: var(--paper); box-shadow: inset 0 -.5px 0 var(--line2); transition: height var(--d-fold) var(--ease-lag), box-shadow 150ms; }
.nv__brand { display: grid; place-items: center; color: var(--ink); flex: none; }
.nv__brand svg { width: 30px; height: 16px; }
.nv__body { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.mg__hint { flex: 1; display: grid; place-items: center; font: var(--t-meta); color: var(--ink3); }
.nvq__hint { min-height: var(--area, 160px); display: grid; place-items: center; padding: 16px; font: var(--t-meta); color: var(--ink3); text-align: center; }
.nvq__sec { min-height: calc(var(--area, 160px) * .8); display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 24px 28px; border-top: var(--hair) solid var(--line2); }
.nvq__sec b { font: var(--t-title); letter-spacing: -0.022em; color: var(--ink); }
.nvq__sec span { font: var(--t-ui); color: var(--ink3); }
.nvq__sec:last-child { min-height: var(--area, 160px); }
.masonry .plate__stage { flex: none; }
@container (max-width: 480px) {
  .nv__bar > .x-btn { display: none; }
}
.x-pf { position: relative; align-self: stretch; justify-self: stretch; width: 100%; min-width: 0; }
.x-pf__status { position: absolute; left: 0; bottom: 0; z-index: 0; max-width: 100%; margin: 0; font: var(--t-meta); color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.x-cstatus { position: absolute; left: 16px; bottom: 12px; margin: 0; font: var(--t-meta); color: var(--ink3); white-space: nowrap; pointer-events: none; }
.x-cpad { padding-bottom: 28px; }
.plate__stage:has(> .x-contour), .plate__stage:has(> .x-pen) { padding: 0; place-items: stretch; }
.x-contour, .x-pen { position: relative; width: 100%; height: 100%; min-height: 180px; overflow: hidden; border-radius: inherit; }
.stage__frame > .x-contour, .stage__frame > .x-pen { width: calc(100% + 48px); max-width: none; height: 436px; margin: -48px -24px; }
.x-tf { width: 100%; max-width: 420px; }
.x-tf__in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.x-tf__row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px 16px; }
.x-tf__tools { display: flex; gap: 4px; }
.x-tf__sep { width: .5px; height: 20px; background: var(--line2); }
.x-tf__box { display: flex; align-items: center; width: 100%; max-width: 380px; height: 32px; padding: 0 10px; border-radius: var(--r-value); background: var(--raised); box-shadow: var(--lift); }
:root[data-theme="dark"] .x-tf__box:not([data-scheme="light"] *), [data-scheme="dark"][data-scheme] .x-tf__box { background: var(--gray-800); }
.x-tf__input { flex: 1 1 auto; width: 0; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: var(--t-ui); color: var(--ink); }
.x-tf__input::placeholder { color: var(--ink3); }
.x-tf :focus-visible { box-shadow: none; }
.x-tf .ibtn:focus-visible, .x-tf .x-seg button:focus-visible { border-radius: var(--r-press); }
.x-tf__ring { position: absolute; left: 0; top: 0; z-index: 2; width: 0; height: 0; pointer-events: none; box-shadow: var(--focus-shadow); opacity: 0; }
.x-tf__ring[data-on="true"] { opacity: 1; transition: opacity var(--d-op) linear; }
.x-tf__ring[data-on="false"] { transition: opacity 30ms linear; }
@container (max-width: 420px) {
  .x-tf__sep { display: none; }
}
.x-yield { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 520px; }
.x-yield__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.x-yield .x-btn:disabled { opacity: 1; }
.x-yield[data-running="true"] .x-btn { background: var(--fill-primary-hover); }
.x-yield__strip { position: relative; height: 88px; box-shadow: inset 0 -.5px 0 var(--line2); }
.x-yield__strip canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.x-yield__strip::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 0; border-top: .5px dashed var(--line2); }
.x-yield__ref { position: absolute; right: 0; top: calc(50% - 18px); font: var(--t-meta); color: var(--ink3); }
.x-yield__empty { position: absolute; left: 0; bottom: 8px; font: var(--t-meta); color: var(--ink3); }
.x-yield__strip[data-empty="false"] .x-yield__empty { display: none; }
.x-yield__type { display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 10px; border-radius: var(--r-value); background: var(--raised); box-shadow: var(--lift); }
:root[data-theme="dark"] .x-yield__type:not([data-scheme="light"] *), [data-scheme="dark"][data-scheme] .x-yield__type { background: var(--gray-800); }
.x-yield__type:focus-within { box-shadow: var(--focus-shadow); }
.x-yield__input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: var(--t-ui); color: var(--ink); }
.x-yield__input:focus-visible { box-shadow: none; }
.x-yield__input::placeholder { color: var(--ink3); }
.x-yield__key { font: var(--t-meta); color: var(--ink3); white-space: nowrap; }
.x-yield__key[data-bad="true"] { color: var(--b-danger-fg); }
.x-yield__tbl { width: 100%; border-collapse: collapse; font: var(--t-ui); }
.x-yield__tbl th, .x-yield__tbl td { height: 28px; padding: 0; border-bottom: .5px solid var(--line); text-align: right; font-weight: var(--w-ui); white-space: nowrap; }
.x-yield__tbl thead th { font: var(--t-meta); font-weight: var(--w-label); color: var(--ink3); border-bottom-color: var(--line2); }
.x-yield__tbl th[scope="row"], .x-yield__tbl thead th:first-child { text-align: left; color: var(--ink3); }
.x-yield__tbl td { color: var(--ink); width: 30%; }
.x-yield__tbl td[data-empty="true"] { color: var(--ink3); }
.x-yield__tbl td[data-bad="true"] { color: var(--b-danger-fg); }
.x-yield__tbl tbody tr:last-child > * { border-bottom: 0; }
.x-yield__work { margin: -8px 0 0; font: var(--t-meta); color: var(--ink3); min-height: 16px; }
@container (max-width: 300px) {
  .x-yield { gap: 12px; }
  .x-yield .x-btn, .x-yield__type, .x-yield__tbl, .x-yield__work, .x-yield__empty { display: none; }
  .x-yield__top { justify-content: flex-start; }
  .x-yield__strip { height: 88px; }
}
.pr-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pr-row--top { margin-bottom: 24px; }
.pr-stats, .pr-recipe, .pr-facts { display: flex; gap: 32px; flex-wrap: wrap; }
.pr-stats div, .pr-recipe div, .pr-facts > div { display: flex; flex-direction: column; }
.pr-stats b, .pr-recipe b, .pr-facts b { font: var(--t-head); font-variant-numeric: tabular-nums; font-weight: var(--w-head); letter-spacing: -0.012em; }
.pr-stats span, .pr-recipe span, .pr-facts span { font: var(--t-meta); color: var(--ink2); }
.pr-big { font: var(--t-title); font-variant-numeric: tabular-nums; font-weight: var(--w-head); letter-spacing: -0.022em; display: flex; }
.pr-ph__k { font: var(--t-meta); color: var(--ink2); }
.pr-chart { position: relative; width: 100%; height: 320px; touch-action: pan-y; }
.pr-chart:focus-visible { box-shadow: var(--focus-shadow); border-radius: var(--r); }
.pr-chart svg { display: block; overflow: visible; }
.pr-chart .grid { stroke: var(--line); stroke-width: 1; }
.pr-chart .tick { font: var(--t-meta); font-variant-numeric: tabular-nums; fill: var(--ink3); }
.pr-chart .tick--low, .pr-chart .tick--cp { fill: var(--ink2); }
.pr-chart .band { fill: var(--alpha-1); }
.pr-chart .ln { fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.pr-chart .ln--plan { stroke-dasharray: 4 4; }
.pr-chart .ln--ghost { stroke: var(--ink4); stroke-dasharray: 2 4; stroke-width: 1.5; }
.pr-chart .ln--warm { stroke: var(--chart-2); }
.pr-chart .ln--est { stroke: var(--text-accent); stroke-dasharray: 5 4; stroke-width: 1.5; }
.pr-chart .now, .pr-chart .stop { stroke: var(--ink4); stroke-width: 1; stroke-dasharray: 2 3; }
.pr-chart .low, .pr-chart .cp { stroke: var(--ink3); stroke-width: 1; stroke-dasharray: 1 3; }
.pr-chart .cross { stroke: var(--ink3); stroke-width: 1; }
.pr-chart .cross--low { stroke: var(--text-danger); stroke-dasharray: 2 3; }
.pr-chart .dot { fill: var(--raised); stroke: var(--ink); stroke-width: 1.5; }
.pr-chart .dot--est { stroke: var(--text-accent); }
.pr-chart .dot--low { fill: var(--text-danger); stroke: var(--raised); stroke-width: 2; }
.pr-chart .pt { fill: var(--ink); }
.pr-chart .pt--plan { fill: var(--raised); stroke: var(--ink); stroke-width: 1.25; }
.pr-chart .mark { fill: var(--text-accent); }
.pr-chart .lbl { font: var(--t-meta); font-variant-numeric: tabular-nums; font-weight: var(--w-label); fill: var(--ink); }
.pr-chart .lbl--low { fill: var(--text-danger); }
.pr-chart .tick--end { fill: var(--ink3); }
.pr-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font: var(--t-meta); color: var(--ink2); margin-top: 12px; }
.pr-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.pr-legend i { display: inline-block; width: 16px; height: 0; border-top: 1.75px solid var(--ink); }
.pr-legend .l-dash { border-top-style: dashed; }
.pr-legend .l-ghost { border-top: 1.5px dotted var(--ink4); }
.pr-legend .l-band { height: 8px; border: 0; border-radius: 2px; background: var(--alpha-1); }
.pr-legend .l-warm { border-top-color: var(--chart-2); }
.pr-legend .l-est { border-top: 1.5px dashed var(--text-accent); }
.z1 { fill: var(--blue-150); }
.z2 { fill: var(--blue-250); }
.z3 { fill: var(--blue-350); }
.z4 { fill: var(--blue-450); }
.z5 { fill: var(--blue-600); }
:root[data-theme="dark"] .z1:not([data-scheme="light"] *), [data-scheme="dark"][data-scheme] .z1 { fill: var(--blue-800); }
:root[data-theme="dark"] .z2:not([data-scheme="light"] *), [data-scheme="dark"][data-scheme] .z2 { fill: var(--blue-700); }
:root[data-theme="dark"] .z3:not([data-scheme="light"] *), [data-scheme="dark"][data-scheme] .z3 { fill: var(--blue-550); }
:root[data-theme="dark"] .z4:not([data-scheme="light"] *), [data-scheme="dark"][data-scheme] .z4 { fill: var(--blue-450); }
:root[data-theme="dark"] .z5:not([data-scheme="light"] *), [data-scheme="dark"][data-scheme] .z5 { fill: var(--blue-300); }
@media (max-width: 720px) {
  .pr-stats, .pr-recipe, .pr-facts { gap: 12px 24px; }
  .pr-stats b, .pr-recipe b, .pr-facts b { font-size: 15px; line-height: 24px; }
}
.x-prod { width: 100%; height: 100%; overflow: auto; }
.x-prod [data-compact] div.pr-chart { height: 200px; }
.x-prod .pr-row--top { margin-bottom: 16px; }
.x-prod .pr-ph__v b, .x-prod .pr-big { white-space: nowrap; }
.x-prod .pr-re__chart { min-height: 0; }
.x-prod .pr-tr, .x-prod .pr-fu, .x-prod .pr-ph, .x-prod .pr-me, .x-prod .pr-re { width: 100%; }
.dock__toggle, .dock__form { box-shadow: var(--ring-strong), 0 1px 2px lch(0 0 0 / .06), 0 6px 20px -4px lch(0 0 0 / .1); }
:root[data-theme="dark"] .dock__toggle:not([data-scheme="light"] *), [data-scheme="dark"][data-scheme] .dock__toggle, :root[data-theme="dark"] .dock__form:not([data-scheme="light"] *), [data-scheme="dark"][data-scheme] .dock__form { box-shadow: 0 0 0 .5px oklch(100% 0 0 / 14%), 0 1px 2px lch(0 0 0 / .5), 0 8px 24px -4px lch(0 0 0 / .5); }
#audit-host { position: fixed; left: -40000px; top: 0; pointer-events: none; contain: layout style; }
.plate[data-selected="true"] .plate__stage { box-shadow: 0 0 0 1.5px var(--fill-accent), 0 0 0 5px color-mix(in oklch, var(--fill-accent) 18%, transparent); }
.zoom { gap: 0; }
.stage:has(.stage__frame[data-split="true"]), .stage:has(.stage__half--one) { padding: 0; }
.motion { border-radius: var(--r-contain); background: var(--raised); box-shadow: var(--ring); padding: 18px 20px 14px; }
.check { display: grid; grid-template-columns: 14px 120px 150px minmax(0, 1fr); align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: var(--hair) solid var(--line); font: var(--t-ui); }
.check:last-child { border-bottom: 0; }
.check i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); align-self: center; }
.check[data-ok="false"] i { background: var(--b-danger-fg); }
.check b { font-weight: var(--w-label); color: var(--ink); }
.check span { color: var(--ink); }
.check[data-ok="false"] span { color: var(--b-danger-fg); }
.check em { font-style: normal; color: var(--ink3); }
@media (max-width: 720px) {
  .check { grid-template-columns: 14px 1fr auto; }
  .check em { grid-column: 2 / -1; }
}
.tokens { display: flex; flex-direction: column; gap: 12px; }
[data-scheme] { color: var(--ink); }
.spec { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.spec__surface { width: var(--w); height: var(--h); max-width: calc(100vw - 480px); flex: none; padding: 48px; }
.spec figcaption { display: flex; align-items: baseline; gap: 8px; font: var(--t-ui); }
.spec figcaption b { font-weight: var(--w-label); }
.spec figcaption span, .spec figcaption em { color: var(--ink3); font-style: normal; }
.spec figcaption em { margin-left: auto; }
@media (max-width: 1100px) {
  .spec__surface { max-width: calc(100vw - 380px); }
}
@media (max-width: 820px) {
  .spec__surface { width: min(var(--w), calc(100vw - 32px)); max-width: calc(100vw - 32px); height: auto; min-height: 240px; padding: 32px 20px; }
}
.pf { margin-bottom: 44px; }
.pf h2 { font: var(--t-head); letter-spacing: -0.012em; padding-bottom: 12px; border-bottom: var(--hair) solid var(--line2); }
.tools { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 14px); z-index: 45; display: flex; gap: 6px; transform: translateX(-50%); pointer-events: none; }
@keyframes tool-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } 10% { opacity: 1; } to { opacity: 1; transform: none; } }
@media (max-width: 720px) {
  .tools { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); }
}
:root[data-measuring="true"] .plate__stage *, :root[data-measuring="true"] .stage__frame *, :root[data-measuring="true"] .spec__surface * { cursor: crosshair; }
[data-lens="miss"] .plate__stage, .spec[data-lens="miss"] .spec__surface, .plate[data-lens="miss"] { opacity: .28; }
.tune { position: fixed; right: 16px; top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 4px); z-index: 90; width: 300px; padding: 6px 16px 12px; border-radius: var(--r-contain); background: var(--raised); box-shadow: var(--pop), var(--e2); transform-origin: top right; }
:root[data-theme="dark"] .tune:not([data-scheme="light"] *), [data-scheme="dark"][data-scheme] .tune { background: var(--surface-3); }
.tune[data-open="false"] { opacity: 0; visibility: hidden; transform: scale(.98); pointer-events: none; transition: opacity 30ms linear, visibility 0s linear 30ms; }
.tune[data-open="true"] { transition: opacity var(--d-op) linear, transform var(--d-lag) var(--ease-lag); }
.tune .x-seg button { padding: 0 9px; height: 26px; font-size: 12px; }
:root[data-corners="squircle"] :is(.plate__stage, .stage, .rail__box, .optmenu, .palette, .intro, .w, .x-card, .motion, .zoom__menu, .lpick, .tune, .perf, .x-palette, .optlistpop, .x-field__box, .filter__box, .spec__surface, .sheet__panel, .code, .x-textprop, .optselect) { corner-shape: squircle; }
