.corridor {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--card-gap);
  margin-top: 36px;
  padding-bottom: 12px;
}
.protocol-card {
  --shell: var(--t3);
  --shell-hi: var(--t3-hi);
  --shell-lo: var(--t3-lo);
  position: relative;
  flex: 0 0 var(--card-w);
  height: var(--card-h);
  display: flex;
  flex-direction: column;
  padding: 0 14px 20px;
  border-radius: var(--r-card);
  color: var(--on-dark);
  background: linear-gradient(168deg,var(--shell-hi) 0%,var(--shell) 62%);
  box-shadow: inset 0 1px 0 var(--shell-highlight),inset 0 0 0 1px var(--shell-rim),inset 0 -6px 0 var(--shell-lo),0 30px 48px -30px var(--shadow-cobalt);
}
.t1 { --shell: var(--t1); --shell-hi: var(--t1-hi); --shell-lo: var(--t1-lo); }
.t2 { --shell: var(--t2); --shell-hi: var(--t2-hi); --shell-lo: var(--t2-lo); }
.t3 { --shell: var(--t3); --shell-hi: var(--t3-hi); --shell-lo: var(--t3-lo); }
.t4 { --shell: var(--t4); --shell-hi: var(--t4-hi); --shell-lo: var(--t4-lo); }
.t5 { --shell: var(--t5); --shell-hi: var(--t5-hi); --shell-lo: var(--t5-lo); }
.lift-1 { margin-top: var(--lift); }
.lift-2 { margin-top: calc(var(--lift) * 2); }
.card-head { display: flex; align-items: center; gap: 10px; min-height: 62px; padding-inline: 4px; }
.proto-ico { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--r-chip); background: var(--on-dark-fill-2); color: var(--on-dark); box-shadow: inset 0 0 0 1px var(--on-dark-line); }
.proto-ico svg { width: 18px; height: 18px; }
.proto-name { font-size: 17px; font-weight: var(--weight-medium); letter-spacing: -.01em; }
.vision-badge { margin-left: auto; display: inline-flex; align-items: center; min-height: 24px; padding: 3px 10px; border-radius: var(--r-pill); background: linear-gradient(90deg,var(--coral),var(--magenta)); color: var(--text); box-shadow: inset 0 1px 0 var(--shell-highlight); font-size: 11.5px; font-weight: var(--weight-medium); white-space: nowrap; }
.mock-page { flex: 1; display: flex; flex-direction: column; padding: 12px 14px 14px; border-radius: var(--r-page); background: var(--page); color: var(--text); min-height: 0; }
.page-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--border); font-size: var(--size-xs); line-height: 18px; color: var(--text-muted); }
.key { padding: 1px 8px; border-radius: var(--r-pill); background: var(--bg-panel-2); color: var(--accent-dark); font-family: var(--font-mono); font-size: 10.5px; line-height: 16px; }
.rows { display: flex; flex-direction: column; gap: 9px; }
.row { display: grid; grid-template-columns: 84px minmax(0,1fr); align-items: center; gap: 8px; }
.row dt { font-size: 12.5px; line-height: 1.4; color: var(--text-muted); }
.row dd { margin: 0; min-width: 0; }
.row-stack { grid-template-columns: minmax(0,1fr); gap: 5px; }
.field { position: relative; display: flex; align-items: center; min-height: 30px; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--r-field); background: var(--bg-panel); color: var(--text); font-family: var(--font-mono); font-size: var(--size-xs); line-height: 20px; overflow-wrap: anywhere; }
.field.sel { padding-right: 26px; color: var(--accent-dark); }
.field.sel::after { content: ""; position: absolute; right: 11px; top: 50%; width: 5px; height: 5px; border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted); transform: translateY(-70%) rotate(45deg); }
.switch { position: relative; display: block; width: 32px; height: 18px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-panel-2); color: var(--text); flex-shrink: 0; }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: var(--r-round); background: var(--bg); box-shadow: 0 0 0 1px var(--border); }
.switch.is-on { background: var(--accent); color: var(--on-dark); border-color: var(--accent); }
.switch.is-on::after { left: 16px; }

.tab-group { min-width: 0; }
.tab-list, [role="tablist"].platform-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tab-list [role="tab"], .platform-tabs [role="tab"] {
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-size: var(--size-sm);
}
.tab-list [role="tab"][aria-selected="true"], .platform-tabs [role="tab"][aria-selected="true"] { background: var(--accent-dark); color: var(--on-dark); border-color: var(--accent-dark); }
[role="tabpanel"] { min-width: 0; }
[role="tabpanel"]:focus-visible { outline-offset: 6px; border-radius: var(--r-page); }
.feature-panel { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 40px; padding: 40px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--bg-panel); color: var(--text); }
.feature-tabs { display: flex; flex-direction: column; gap: 10px; align-self: start; }
.feature-tabs [role="tab"] { position: relative; width: 100%; min-height: 52px; padding: 12px 20px; text-align: left; border: 0; border-radius: var(--r-chip); background: var(--clear); color: var(--text-muted); }
.feature-tabs [role="tab"][aria-selected="true"] { background: var(--bg); color: var(--accent-dark); }
.feature-tabs [role="tab"][aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: var(--r-pill); background: var(--accent); }
.feature-detail p { margin-top: 24px; max-width: 64ch; color: var(--text-muted); }
.settings-window { padding: 24px; border: 1px solid var(--border); border-radius: var(--r-page); background: var(--bg); color: var(--text); }
.settings-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--border); font-size: var(--size-sm); }
.settings-form { display: grid; grid-template-columns: 130px minmax(0,1fr); align-items: center; gap: 16px; font-size: var(--size-sm); }
.rule-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.rule-cell { padding: 14px; border: 1px solid var(--border); border-radius: var(--r-field); background: var(--bg-panel); color: var(--text); }
.rule-cell b { display: block; margin-bottom: 12px; color: var(--text-muted); font-size: var(--size-xs); font-weight: var(--weight-medium); }

.toc { position: sticky; top: 16px; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; overflow-x: visible; padding: 10px; margin-block: 28px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg); color: var(--text); }
.toc a { flex-shrink: 0; display: inline-flex; align-items: center; max-width: 100%; min-height: 44px; padding: 10px 18px; border-radius: var(--r-pill); color: var(--text-muted); font-size: var(--size-sm); white-space: normal; overflow-wrap: anywhere; }
.toc a:hover, .toc a[aria-current] { background: var(--bg-panel); color: var(--accent-dark); }
.toc.is-static { position: static; }
.faq-item { border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text); }
.faq-item summary { position: relative; cursor: pointer; list-style: none; padding: 24px 40px 24px 0; font-size: var(--size-lead); line-height: 1.6; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 24px; color: var(--accent-dark); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 24px; color: var(--text-muted); max-width: 76ch; }
.term-card, .client-card, .article-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); min-width: 0; }
.term-card h3, .client-card h3, .article-card h3 { margin-top: 14px; }
.term-card p, .client-card p, .article-card p { color: var(--text-muted); margin-top: 16px; }
.term-en { font-family: var(--font-mono); font-size: var(--size-xs); color: var(--accent-dark); overflow-wrap: anywhere; }
.tag, .badge { display: inline-flex; align-items: center; max-width: 100%; padding: 4px 10px; border-radius: var(--r-pill); background: var(--bg-panel-2); color: var(--accent-dark); font-size: var(--size-xs); font-weight: var(--weight-medium); overflow-wrap: anywhere; vertical-align: middle; }
.badge-first { background: var(--accent-dark); color: var(--on-dark); }
.badge-recommended { background: var(--hero-4); color: var(--accent-dark); }
.badge-retired { background: var(--bg-panel-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge-warning { background: var(--warn); color: var(--text); }
.client-header { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.client-header h3 { margin: 0; }
.app-logo { width: 56px; height: 56px; flex-shrink: 0; }
.client-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.client-meta, .article-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 18px; font-size: var(--size-xs); color: var(--text-muted); }
.article-card { display: flex; flex-direction: column; }
.article-card h3 { font-size: 22px; line-height: 1.5; }
.article-card h3 a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.article-card .article-link { margin-top: auto; padding-top: 24px; color: var(--accent-dark); font-size: var(--size-sm); }
.callout { margin: 28px 0; padding: 24px 28px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-page); background: var(--bg-panel); color: var(--text); }
.callout p { margin-top: 8px; color: var(--text-muted); }
.callout-warning { border-left-color: var(--warn); }
.callout-error { border-left-color: var(--error); }
.table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--border); border-radius: var(--r-page); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; background: var(--bg); color: var(--text); font-size: var(--size-sm); }
.data-table th, .data-table td, .prose table th, .prose table td { min-width: 7em; padding: 16px 20px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; overflow-wrap: normal; word-break: normal; }
.data-table th, .prose table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-medium); }
.data-table tr:last-child td { border-bottom: 0; }
.prose 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); }
.prose table code, .data-table code { overflow-wrap: anywhere; white-space: normal; }
.download-endcap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 56px; padding: 32px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--bg-panel); color: var(--text); }
.download-endcap h2 { font-size: var(--size-h3); }
.download-endcap p { margin-top: 10px; color: var(--text-muted); }
.dl-fab { position: fixed; z-index: 30; right: max(18px,env(safe-area-inset-right)); bottom: max(18px,env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 12px; max-width: calc(100% - 36px); padding: 14px 22px; border: 1px solid var(--accent-dark); border-radius: var(--r-pill); background: var(--accent-dark); color: var(--on-dark); font-size: var(--size-sm); }
.dl-fab svg { width: 22px; height: 22px; flex-shrink: 0; }
.dl-fab:hover { background: var(--hero-0); color: var(--on-dark); }
.has-dl-fab .site-footer { padding-bottom: 110px; }

.swatch-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 16px; }
.swatch { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-page); background: var(--bg); color: var(--text); }
.swatch-color { display: block; height: 56px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--r-chip); background: var(--sample); color: var(--text); }
.swatch code { font-size: 11px; }
.s-bg { --sample: var(--bg); }
.s-panel { --sample: var(--bg-panel); }
.s-panel2 { --sample: var(--bg-panel-2); }
.s-border { --sample: var(--border); }
.s-accent { --sample: var(--accent); }
.s-dark { --sample: var(--accent-dark); }
.s-bright { --sample: var(--accent-bright); }
.s-text { --sample: var(--text); }
.s-muted { --sample: var(--text-muted); }
.s-success { --sample: var(--success); }
.s-success-ring { --sample: var(--success-ring); }
.s-warn { --sample: var(--warn); }
.s-error { --sample: var(--error); }
.s-coral { --sample: var(--coral); }
.s-magenta { --sample: var(--magenta); }
.s-h0 { --sample: var(--hero-0); }
.s-h1 { --sample: var(--hero-1); }
.s-h2 { --sample: var(--hero-2); }
.s-h3 { --sample: var(--hero-3); }
.s-h4 { --sample: var(--hero-4); }
.s-glow { --sample: var(--glow); }
.s-glow-clear { --sample: var(--glow-clear); }
.s-white { --sample: var(--on-dark); }
.s-soft { --sample: var(--on-dark-soft); }
.s-ghost { --sample: var(--on-dark-muted); }
.s-line { --sample: var(--on-dark-line); }
.s-fill { --sample: var(--on-dark-fill); }
.s-fill2 { --sample: var(--on-dark-fill-2); }
.s-btn { --sample: var(--btn-ghost-fill); }
.s-btn-hover { --sample: var(--btn-ghost-fill-hover); }
.s-hl { --sample: var(--hl); }
.s-page { --sample: var(--page); }
.s-highlight { --sample: var(--shell-highlight); }
.s-rim { --sample: var(--shell-rim); }
.s-shadow { --sample: var(--shadow-cobalt); }
.s-veil { --sample: var(--veil); }
.s-clear { --sample: var(--clear); }
.s-t1 { --sample: var(--t1); }
.s-t1hi { --sample: var(--t1-hi); }
.s-t1lo { --sample: var(--t1-lo); }
.s-t2 { --sample: var(--t2); }
.s-t2hi { --sample: var(--t2-hi); }
.s-t2lo { --sample: var(--t2-lo); }
.s-t3 { --sample: var(--t3); }
.s-t3hi { --sample: var(--t3-hi); }
.s-t3lo { --sample: var(--t3-lo); }
.s-t4 { --sample: var(--t4); }
.s-t4hi { --sample: var(--t4-hi); }
.s-t4lo { --sample: var(--t4-lo); }
.s-t5 { --sample: var(--t5); }
.s-t5hi { --sample: var(--t5-hi); }
.s-t5lo { --sample: var(--t5-lo); }
.swatch-grid .s-soft .swatch-color, .swatch-grid .s-ghost .swatch-color, .swatch-grid .s-line .swatch-color, .swatch-grid .s-fill .swatch-color, .swatch-grid .s-fill2 .swatch-color, .swatch-grid .s-highlight .swatch-color, .swatch-grid .s-rim .swatch-color { background: linear-gradient(var(--sample),var(--sample)),var(--hero-0); color: var(--on-dark); }
.preview-type { display: block; font-family: var(--font-display); font-size: var(--size-h1); font-weight: var(--weight-normal); line-height: var(--line-heading); }
.preview-ghost-panel { background: var(--hero-1); color: var(--on-dark); }

@media (max-width: 900px) {
  .feature-panel { grid-template-columns: 180px minmax(0,1fr); gap: 24px; padding: 28px; }
  .swatch-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .corridor { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; padding: 0 20px 20px; gap: 14px; margin-top: 30px; scrollbar-width: none; }
  .corridor::-webkit-scrollbar { display: none; }
  .protocol-card { flex-basis: min(78vw,300px); height: auto; min-height: var(--card-h); scroll-snap-align: start; }
  .lift-1, .lift-2 { margin-top: 0; }
  .feature-panel { grid-template-columns: minmax(0,1fr); }
  .feature-tabs { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .feature-tabs [role="tab"] { width: auto; flex: 1 1 130px; }
  .feature-tabs [role="tab"][aria-selected="true"]::before { top: auto; left: 20px; right: 20px; bottom: 4px; width: auto; height: 3px; }
}
@media (max-width: 640px) {
  .feature-panel { padding: 20px; gap: 24px; }
  .settings-window { padding: 18px; }
  .settings-form { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .rule-grid { grid-template-columns: minmax(0,1fr); }
  .term-card, .client-card, .article-card { padding: 22px; }
  .swatch-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .callout { padding: 20px; }
  .download-endcap { padding: 24px; }
  .dl-fab { padding: 12px 18px; }
  .row { grid-template-columns: 76px minmax(0,1fr); gap: 6px; }
  .row-stack { grid-template-columns: minmax(0,1fr); }
  .protocol-card .field { font-size: 11px; }
  .protocol-card .card-head { gap: 7px; flex-wrap: wrap; align-content: center; padding-block: 10px; }
  .vision-badge { font-size: 10px; padding-inline: 7px; }
}