/* Shared interactions */
.seg {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 5px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.seg__item {
  min-height: 38px;
  padding: 8px 20px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--clear);
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.seg__item.is-active,.seg__item[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
[role="tabpanel"] { min-width: 0; }
.feat-head { margin-top: 56px; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.feat-title { margin: 0; font-size: var(--title-section); line-height: 1.2; }
.feat-text { margin: 14px 0 0; max-width: 660px; font-size: var(--text-base); line-height: 1.65; color: var(--text-muted); }
.feat-head .btn { flex-shrink: 0; }
.feature-canvas {
  position: relative;
  margin-top: 32px;
  min-height: 330px;
  padding: 32px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow-x: clip;
}
.feature-ui { max-width: 760px; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--bg-panel); color: var(--text); }
.feature-ui__bar { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.feature-ui__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; font-size: var(--text-sm); }
.feature-note { position: relative; width: min(390px,100%); margin: -36px 0 0 auto; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: 0 0 0 5px var(--halo),0 20px 40px -20px var(--shadow-accent); }
.feature-note p { margin: 8px 0 0; color: var(--text-muted); font-size: var(--text-sm); }
.toc {
  position: sticky;
  top: 16px;
  z-index: 15;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  margin-bottom: 40px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  box-shadow: var(--shadow-card);
}
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: var(--r-sm); text-decoration: none; font-size: var(--text-sm); }
.toc a:hover,.toc a[aria-current] { background: var(--bg-panel); color: var(--text); }
.faq-item { border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text); }
.faq-item summary { position: relative; min-height: 64px; padding: 20px 40px 20px 0; cursor: pointer; list-style: none; font-weight: var(--weight-medium); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 10px; top: 17px; font-size: var(--title-card); font-weight: var(--weight-normal); color: var(--text-muted); }
.faq-item[open] summary::after { content: "−"; }
.faq-item__body { padding-bottom: 24px; color: var(--text-muted); }
.faq-item__body p:last-child { margin-bottom: 0; }
.term-card { border-top: 3px solid var(--border-strong); }
.term-card__category { display: block; margin-bottom: 12px; font-size: var(--text-xs); color: var(--text-muted); }
.term-card h3 { margin-bottom: 12px; }
.term-card p { color: var(--text-muted); }
.client-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.client-card__head h3 { margin: 0; }
.client-card__meta { color: var(--text-muted); font-size: var(--text-sm); margin-block: 12px 24px; }
.client-card__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.client-card__minor { margin-top: 16px; font-size: var(--text-sm); color: var(--text-muted); }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  max-width: 100%;
  padding: 3px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--text-soft);
  font-size: var(--text-xs);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.badge--first { background: var(--bg-panel-2); color: var(--text); border-color: var(--border-strong); font-weight: var(--weight-medium); }
.badge--recommended { background: var(--bg); color: var(--text-soft); }
.badge--retired { border-style: dashed; background: var(--bg-panel); color: var(--text-muted); }
.badge__dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--success); }
.article-card { display: flex; flex-direction: column; }
.article-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; color: var(--text-muted); font-size: var(--text-xs); }
.article-card h3 { margin-bottom: 14px; }
.article-card h3 a { text-decoration: none; }
.article-card h3 a:hover { text-decoration: underline; }
.article-card p { color: var(--text-muted); }
.article-card__link { margin-top: auto; padding-top: 16px; font-size: var(--text-sm); }
.callout {
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--r-btn);
  background: var(--bg-panel-2);
  color: var(--text-soft);
}
.callout p:last-child { margin-bottom: 0; }
.callout__title { display: block; margin-bottom: 8px; color: var(--text); font-weight: var(--weight-medium); }
.callout--warning { border-left-color: var(--warn); background: var(--bg-panel); color: var(--text-soft); }
.callout--error { border-left-color: var(--error); background: var(--bg-panel); color: var(--text-soft); }
.table-scroll { overflow-x: auto; max-width: 100%; min-width: 0; -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain; border: 1px solid var(--border); border-radius: var(--r-btn); }
.data-table { width: 100%; border-collapse: collapse; background: var(--bg); color: var(--text); font-size: var(--text-sm); }
.data-table th,.data-table td,.prose table th,.prose table td,.article-body table th,.article-body table td {
  min-width: 7em;
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th,.prose table th,.article-body table th { font-weight: var(--weight-medium); background: var(--bg-panel); color: var(--text); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table,.article-body table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  background: var(--bg);
  color: var(--text);
}
.data-table code,.prose table code,.article-body table code { overflow-wrap: anywhere; }
.download-end { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 48px; background: var(--bg-panel-2); color: var(--text); }
.download-end h2 { font-size: var(--title-card); margin-bottom: 8px; }
.download-end p { color: var(--text-muted); margin-bottom: 0; }
.download-end .btn { flex-shrink: 0; }
.dl-fab {
  position: fixed;
  z-index: 25;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
  min-height: 64px;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 8px 30px var(--shadow-ink-2);
  text-decoration: none;
}
.dl-fab svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--text-soft); }
.dl-fab strong { display: block; font-size: var(--text-sm); font-weight: var(--weight-medium); }
.dl-fab small { display: block; color: var(--text-muted); font-size: var(--text-xs); }
.dl-fab:hover { border-color: var(--border-strong); box-shadow: 0 12px 34px var(--shadow-ink-2); }

/* Approved first-screen composition */
.hero { position: relative; overflow: hidden; padding: 30px 24px 24px; }
.hero::before,.hero::after { content: ""; position: absolute; pointer-events: none; z-index: 0; border-radius: var(--r-circle); }
.hero::before { left: -280px; top: 300px; width: 760px; height: 560px; background: radial-gradient(closest-side,var(--glow-violet),var(--clear)); }
.hero::after { right: -260px; top: 520px; width: 780px; height: 620px; background: radial-gradient(closest-side,var(--glow-blue),var(--clear)); }
.hero__copy { position: relative; z-index: 2; max-width: 920px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.eyebrow { margin: 0; min-height: 28px; display: inline-flex; align-items: center; gap: 8px; padding: 3px 13px 3px 11px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg); color: var(--text-muted); font-size: 12.5px; line-height: 20px; box-shadow: 0 1px 2px var(--shadow-ink); }
.eyebrow__dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.hero__title { margin: 18px 0 0; font-size: var(--title-display); font-weight: var(--weight-normal); line-height: 1.1; letter-spacing: var(--tracking-title); }
.hero__actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero__lead { margin: 18px 0 0; max-width: 780px; font-size: var(--text-base); line-height: 24px; color: var(--text-muted); }
.hero__lead strong { color: var(--text); font-weight: var(--weight-medium); }
.protos { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.protos li { min-height: 26px; padding: 3px 11px; display: inline-flex; align-items: center; border-radius: var(--r-pill); background: var(--bg-panel); border: 1px solid var(--border); font-family: var(--font-mono); font-size: var(--text-xs); line-height: 18px; color: var(--text-soft); letter-spacing: .01em; }
.platforms { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }
.platforms li { display: flex; }
.platforms a { min-height: 24px; display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; line-height: 24px; color: var(--text-muted); text-decoration: none; }
.platforms a:hover { color: var(--text); }
.platforms svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-soft); }
.device { position: relative; z-index: 1; width: min(1120px,100%); margin: 28px auto 0; overflow: visible; }
.wnd { height: 396px; display: flex; flex-direction: column; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-window); overflow: hidden; box-shadow: 0 1px 2px var(--shadow-ink),0 26px 60px -30px var(--shadow-accent),0 50px 100px -50px var(--shadow-ink-2); }
.wnd__chrome { height: 44px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding-inline: 20px; border-bottom: 1px solid var(--border); }
.wnd__icon { display: flex; }
.wnd__icon img { width: 18px; height: 18px; }
.wnd__title { font-size: 13px; font-weight: var(--weight-medium); letter-spacing: .005em; }
.wnd__ctrls { margin-left: auto; display: flex; gap: 20px; align-items: center; color: var(--text-faint); }
.wnd__ctrls svg { display: block; width: 12px; height: 12px; }
.wnd__menu { min-height: 38px; flex-shrink: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding-inline: 12px; border-bottom: 1px solid var(--border); }
.wnd__menu span { font-size: 13px; line-height: 18px; color: var(--text-muted); padding: 5px 11px; border-radius: var(--r-sm); }
.wnd__menu .is-open { background: var(--bg-panel-2); color: var(--text); }
.wnd__body { flex: 1; position: relative; overflow: hidden; background: linear-gradient(180deg,var(--bg),var(--bg-panel)); color: var(--text); }
.wnd__body::after { content: ""; position: absolute; right: -80px; top: -60px; width: 640px; height: 420px; border-radius: var(--r-circle); background: radial-gradient(closest-side,var(--wash),var(--clear)); pointer-events: none; }
.wnd__back { position: absolute; inset: 0; display: flex; filter: blur(2.4px); opacity: .9; }
.sk-side { width: 232px; flex-shrink: 0; padding: 18px 16px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.sk-side i { display: block; height: 28px; border-radius: var(--r-tool); background: var(--skeleton-soft); }
.sk-side i:first-child { height: 10px; width: 46%; margin: 2px 0 6px; border-radius: var(--r-line); background: var(--skeleton); }
.sk-side i:nth-child(2) { background: var(--bg-panel-2); }
.sk-side i:nth-child(4) { width: 86%; }
.sk-side i:nth-child(6) { width: 72%; }
.sk-main { flex: 1; min-width: 0; padding: 16px 22px; }
.sk-tool { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sk-tool i { display: block; height: 30px; border-radius: var(--r-tool); background: var(--skeleton-soft); border: 1px solid var(--border-soft); }
.sk-tool i:first-child { width: 260px; }
.sk-tool i:nth-child(2) { width: 30px; margin-left: auto; }
.sk-tool i:nth-child(3) { width: 30px; }
.sk-row { display: grid; grid-template-columns: 22px 2.4fr 1fr 1fr 1.4fr; gap: 20px; align-items: center; height: 34px; border-bottom: 1px solid var(--skeleton-soft); }
.sk-row i { display: block; height: 8px; width: 72%; border-radius: var(--r-skeleton); background: var(--skeleton); }
.sk-row i:first-child { width: 14px; height: 14px; background: var(--skeleton-soft); }
.sk-row--head i { height: 7px; width: 44%; background: var(--skeleton-strong); }
.sk-row:nth-child(3n) i:nth-child(2) { width: 54%; }
.sk-row:nth-child(3n + 1) i:nth-child(2) { width: 80%; }
.sk-row:nth-child(2n) i:nth-child(3) { width: 48%; }
.sk-row:nth-child(2n + 1) i:nth-child(4) { width: 58%; }
.sk-row:nth-child(3n + 2) i:nth-child(5) { width: 40%; }
.wnd__status { min-height: 36px; flex-shrink: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px; padding: 5px 20px; border-top: 1px solid var(--border); background: var(--bg); color: var(--text-muted); font-size: 12.5px; line-height: 24px; }
.st { display: inline-flex; align-items: center; gap: 6px; }
.st__v { min-height: 24px; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg); color: var(--text); }
.st__v svg { width: 12px; height: 12px; color: var(--text-faint); }
.setcard { position: absolute; z-index: 3; top: 104px; right: 56px; width: 404px; padding: 4px 0 8px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: inset 0 0 22px var(--halo-inner),0 0 0 5px var(--halo),0 0 0 6px var(--halo-line),0 1px 2px var(--shadow-ink),0 18px 38px -14px var(--shadow-accent),0 44px 80px -40px var(--shadow-ink-2); }
.setcard__head { height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 18px 0 20px; border-bottom: 1px solid var(--border); }
.setcard__head svg { width: 16px; height: 16px; display: block; }
.setcard__ico { display: flex; color: var(--text-muted); }
.setcard__title { margin: 0; font-size: 14.5px; font-weight: var(--weight-medium); letter-spacing: normal; }
.setcard__close { margin-left: auto; display: flex; color: var(--text-faint); }
.setcard__close svg { width: 12px; height: 12px; }
.setlist { list-style: none; margin: 0; padding: 4px 0 0; }
.setrow { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 20px; }
.setrow + .setrow { border-top: 1px solid var(--border-soft); }
.setrow__name { margin: 0; font-size: 13.5px; line-height: 18px; }
.setrow__hint { margin: 2px 0 0; font-size: var(--text-xs); line-height: 16px; color: var(--text-muted); }
.switch { position: relative; flex-shrink: 0; width: 38px; height: 22px; border-radius: var(--r-pill); background: var(--skeleton-strong); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: var(--r-circle); background: var(--bg); box-shadow: 0 1px 2px var(--shadow-ink-2); }
.switch.is-on { background: var(--grad-accent); box-shadow: 0 0 0 3px var(--halo-blue),0 4px 10px -4px var(--shadow-accent-strong); }
.switch.is-on::after { left: 19px; }
.field { flex-shrink: 0; min-height: 30px; min-width: 96px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--border); border-radius: var(--r-field); background: var(--bg-panel); color: var(--text); font-size: 13px; }
.field--mono { font-family: var(--font-mono); font-size: 12.5px; justify-content: flex-start; letter-spacing: .02em; }
.field svg { width: 12px; height: 12px; color: var(--text-faint); }
.ptr { position: absolute; z-index: 4; display: flex; align-items: flex-start; }
.ptr svg { width: 20px; height: 20px; flex-shrink: 0; display: block; filter: drop-shadow(0 2px 3px var(--shadow-ink-2)); }
.ptr svg path { fill: var(--text); stroke: var(--bg); stroke-width: 1.3; stroke-linejoin: round; }
.ptr__tag { margin-top: 16px; min-height: 24px; padding: 2px 10px; display: inline-flex; align-items: center; border-radius: var(--r-pill); font-size: var(--text-xs); line-height: 20px; font-weight: var(--weight-medium); letter-spacing: .01em; white-space: nowrap; }
.ptr--a { top: 176px; left: 568px; flex-direction: row-reverse; }
.ptr--a svg { transform: scaleX(-1); }
.ptr--a .ptr__tag { margin-right: -2px; background: var(--text); color: var(--on-accent); box-shadow: 0 6px 14px -6px var(--shadow-ink-2); }
.ptr--b { top: 248px; left: 1082px; }
.ptr--b .ptr__tag { margin-left: -2px; background: var(--bg); color: var(--text); border: 1px solid var(--border); box-shadow: 0 6px 14px -6px var(--shadow-ink-2); }
.hero__fade { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; z-index: 6; pointer-events: none; background: linear-gradient(180deg,var(--clear),var(--bg)); }

/* Static specimen tools */
.specimen { margin-top: 80px; }
.specimen h2 { margin-bottom: 28px; }
.swatches { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.swatch { border: 1px solid var(--border); border-radius: var(--r-btn); padding: 12px; min-width: 0; background: var(--bg); color: var(--text); font-size: var(--text-xs); }
.swatch i { display: block; height: 48px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: var(--r-sm); }
.swatch code { font-size: var(--text-xs); }
.paint-bg { background: var(--bg); }
.paint-panel { background: var(--bg-panel); }
.paint-panel2 { background: var(--bg-panel-2); }
.paint-border { background: var(--border); }
.paint-border-soft { background: var(--border-soft); }
.paint-border-strong { background: var(--border-strong); }
.paint-accent { background: var(--accent); }
.paint-accent2 { background: var(--accent-2); }
.paint-accent-dark { background: var(--accent-dark); }
.paint-text { background: var(--text); }
.paint-soft { background: var(--text-soft); }
.paint-muted { background: var(--text-muted); }
.paint-faint { background: var(--text-faint); }
.paint-success { background: var(--success); }
.paint-success-soft { background: var(--success-soft); }
.paint-warn { background: var(--warn); }
.paint-error { background: var(--error); }
.paint-on-accent { background: var(--on-accent); }
.paint-skeleton { background: var(--skeleton); }
.paint-skeleton-soft { background: var(--skeleton-soft); }
.paint-skeleton-strong { background: var(--skeleton-strong); }
.paint-clear { background: var(--clear); }
.paint-glow-blue { background: var(--glow-blue); }
.paint-glow-violet { background: var(--glow-violet); }
.paint-halo { background: var(--halo); }
.paint-halo-line { background: var(--halo-line); }
.paint-halo-blue { background: var(--halo-blue); }
.paint-halo-inner { background: var(--halo-inner); }
.paint-wash { background: var(--wash); }
.paint-sheen { background: var(--sheen); }
.paint-shadow { background: var(--shadow-ink); }
.paint-shadow2 { background: var(--shadow-ink-2); }
.paint-shadow-accent { background: var(--shadow-accent); }
.paint-shadow-strong { background: var(--shadow-accent-strong); }
.paint-veil { background: var(--veil); }
.paint-gradient { background: var(--grad-accent); }
.type-display { font-family: var(--font-display); font-size: var(--title-display); line-height: 1.1; font-weight: var(--weight-normal); letter-spacing: var(--tracking-title); }
.type-lead { font-size: var(--text-lead); color: var(--text-muted); }
.specimen-fab { position: static; width: fit-content; margin-top: 24px; }
@media (max-width: 1180px) {
  .setcard { right: 32px; }
  .ptr--a { left: auto; right: 452px; }
  .ptr--b { left: auto; right: -40px; }
}
@media (max-width: 960px) {
  .sk-side { width: 180px; }
}
@media (max-width: 820px) {
  .hero { padding: 28px 16px 24px; }
  .platforms { gap: 14px 20px; }
  .wnd { height: 300px; }
  .sk-side { display: none; }
  .wnd__status { gap: 6px 12px; padding-inline: 14px; }
  .setcard { position: relative; top: auto; right: auto; width: auto; margin: 20px 14px 0; }
  .ptr { display: none; }
  .feat-head { flex-direction: column; align-items: flex-start; gap: 24px; }
  .seg { width: auto; border-radius: var(--r-card); }
}
@media (max-width: 640px) {
  .seg__item { padding-inline: 12px; }
  .feature-canvas { padding: 20px; }
  .feature-ui { padding: 16px; }
  .feature-note { margin-top: 20px; }
  .setrow { padding-inline: 14px; gap: 10px; }
  .setcard__head { padding-inline: 14px; }
  .setrow__name { font-size: var(--text-xs); }
  .field { min-width: 74px; }
  .swatches { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .toc { position: static; }
  .download-end { flex-direction: column; align-items: flex-start; }
  .dl-fab { right: 16px; bottom: 16px; padding: 10px 14px; }
}
@media print {
  .dl-fab { display: none; }
}