:root {
    --paper: #eef1f3;
    --paper-raised: #ffffff;
    --paper-sunken: #e6ebee;
    --ink: #0c1a1f;
    --ink-2: #334a52;
    --ink-3: #64787f;
    --ink-4: #93a4aa;
    --hairline: rgba(12, 26, 31, 0.12);
    --hairline-strong: rgba(12, 26, 31, 0.22);
    --grid: rgba(12, 26, 31, 0.055);
    --brand: #0d6e78;
    --brand-deep: #0a545c;
    --brand-tint: rgba(13, 110, 120, 0.07);
    --brand-tint-2: rgba(13, 110, 120, 0.14);
    --p-plain: #b4443a;
    --p-dot: #5a52c4;
    --p-doh: #0d6e78;
    --p-doh3: #1f8fa8;
    --p-doq: #2c7a4b;
    --p-crypt: #a9691a;
    --p-odoh: #7a3f8f;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
        "Liberation Mono", "Courier New", monospace;
    --wrap: 1080px;
    --wrap-narrow: 820px;
    --radius: 3px;
    --header-h: 58px;
    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
    color: var(--ink-2);
    background-color: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 28px 28px;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

p {
    margin: 0;
}

a {
    color: var(--brand);
    text-decoration: none;
}

code,
kbd,
samp {
    font-family: var(--font-mono);
    font-size: 0.875em;
    padding: 0.1em 0.36em;
    border-radius: 2px;
    background: var(--brand-tint);
    color: var(--brand-deep);
    border: 1px solid var(--brand-tint-2);
}

p,
li {
    word-break: normal;
    overflow-wrap: anywhere;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.container {
    position: relative;
    width: 92%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: calc(var(--header-h) + 34px) 0 72px;
}

.dns-page.portal-page {
    padding-top: calc(var(--header-h) + 16px);
    padding-bottom: 20px;
}

.dns-page.portal-page .icp {
    margin-top: 18px;
}

.dns-page {
    max-width: var(--wrap);
}

.dns-page [id] {
    scroll-margin-top: calc(var(--header-h) + 26px);
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 clamp(16px, 4vw, 40px);
    background: rgba(238, 241, 243, 0.86);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border-bottom: 1px solid var(--hairline);
}

.nav-switch {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 7px 13px;
    border-radius: var(--radius);
    color: var(--ink-2);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.18s ease, color 0.18s ease;
}

.nav-link:hover {
    background: var(--brand-tint);
    color: var(--brand-deep);
}

.nav-link.active {
    color: var(--brand-deep);
    background: var(--brand-tint-2);
}

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    background: var(--paper-raised);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 500;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.login-btn:hover {
    border-color: var(--brand);
    background: var(--brand-tint);
    color: var(--brand-deep);
}

.icp {
    margin-top: 56px;
    padding-top: 20px;
    border-top: 1px solid var(--hairline);
    font-size: 0.84rem;
    color: var(--ink-3);
    text-align: center;
}

.icp a {
    color: var(--ink-2);
    border-bottom: 1px solid var(--hairline-strong);
}

.icp a:hover {
    color: var(--brand-deep);
    border-bottom-color: var(--brand);
}

.hero {
    position: relative;
    padding: 30px 0 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--hairline);
}

.hero-kicker {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-deep);
    background: var(--brand-tint);
    border: 1px solid var(--brand-tint-2);
    border-radius: 2px;
    padding: 4px 9px;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: clamp(1.6rem, 3.6vw, 2.15rem);
    font-weight: 650;
}

.hero-lead {
    margin-top: 14px;
    max-width: 62ch;
    font-size: 1.03rem;
    line-height: 1.85;
    color: var(--ink-2);
    text-wrap: pretty;
}

.quick-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 26px;
}

.quick-nav a {
    padding: 6px 12px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--paper-raised);
    color: var(--ink-2);
    font-size: 0.85rem;
    transition: all 0.18s ease;
}

.quick-nav a:hover {
    border-color: var(--brand);
    color: var(--brand-deep);
    background: var(--brand-tint);
}

.quick-nav a.active {
    border-color: var(--brand);
    background: var(--brand-tint-2);
    color: var(--brand-deep);
    font-weight: 550;
}

.tech-section {
    margin-top: 40px;
}

.tech-header {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--hairline);
}

.tech-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-top: 2px;
    border: 1px solid var(--hairline-strong);
    border-radius: 2px;
    background: var(--paper-raised);
    color: var(--brand);
}

.tech-icon .i {
    width: 17px;
    height: 17px;
}

.tech-header h2 {
    font-size: 1.14rem;
    margin-bottom: 5px;
}

.tech-header p {
    font-size: 0.92rem;
    color: var(--ink-3);
    line-height: 1.7;
}

.card-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card-grid.two-cols {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card-grid.three-cols {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.info-card {
    padding: 18px 19px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--paper-raised);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.info-card:hover {
    border-color: var(--hairline-strong);
    transform: translateY(-2px);
}

.info-card h3 {
    font-size: 1rem;
    margin-bottom: 9px;
}

.info-card p {
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--ink-2);
}

.info-card p+p {
    margin-top: 9px;
}

.accessible-note {
    margin: 0 0 16px;
    padding: 14px 18px;
    border-left: 3px solid var(--brand);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: linear-gradient(90deg, var(--brand-tint) 0%, transparent 100%);
    font-size: 0.94rem;
    line-height: 1.8;
    color: var(--ink-2);
}

.bullet-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.bullet-list li {
    position: relative;
    padding-left: 18px;
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--ink-2);
}

.bullet-list li+li {
    margin-top: 8px;
}

.bullet-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 9px;
    height: 1px;
    background: var(--ink-4);
}

.timeline {
    position: relative;
    display: grid;
    gap: 16px;
    padding-left: 26px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--hairline-strong);
}

.timeline-item {
    position: relative;
    padding: 15px 18px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--paper-raised);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 22px;
    width: 9px;
    height: 9px;
    border: 1px solid var(--brand);
    border-radius: 50%;
    background: var(--paper);
}

.timeline-item h3 {
    font-size: 0.97rem;
    margin-bottom: 6px;
}

.timeline-item p {
    font-size: 0.91rem;
    line-height: 1.75;
    color: var(--ink-2);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--paper-raised);
}

.comparison-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    line-height: 1.7;
    border-bottom: 1px solid var(--hairline);
}

.comparison-table thead th {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ink-3);
    background: var(--paper-sunken);
    white-space: nowrap;
}

.comparison-table tbody tr:last-child td {
    border-bottom: 0;
}

.comparison-table tbody tr:hover td {
    background: var(--brand-tint);
}

.comparison-table tbody td:first-child {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--brand-deep);
    white-space: nowrap;
}

.glossary-search {
    width: 100%;
    padding: 12px 15px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--paper-raised);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.glossary-search::placeholder {
    color: var(--ink-4);
}

.glossary-search:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint-2);
}

.faq-list {
    display: grid;
    gap: 8px;
}

.faq-list details {
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--paper-raised);
    transition: border-color 0.18s ease;
}

.faq-list details[open] {
    border-color: var(--hairline-strong);
}

.faq-list summary {
    padding: 13px 16px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 550;
    color: var(--ink);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::before {
    content: '+';
    flex: 0 0 auto;
    width: 16px;
    font-family: var(--font-mono);
    font-size: 1rem;
    line-height: 1;
    color: var(--brand);
    text-align: center;
}

.faq-list details[open] summary::before {
    content: '−';
}

.faq-list details>*:not(summary) {
    padding: 0 16px 14px 42px;
    font-size: 0.91rem;
    line-height: 1.78;
    color: var(--ink-2);
}

.faq-list details>p+p {
    padding-top: 0;
    margin-top: -6px;
}

.proto-plain {
    --pc: var(--p-plain);
}

.proto-dot {
    --pc: var(--p-dot);
}

.proto-doh {
    --pc: var(--p-doh);
}

.proto-doh3 {
    --pc: var(--p-doh3);
}

.proto-doq {
    --pc: var(--p-doq);
}

.proto-crypt {
    --pc: var(--p-crypt);
}

.proto-odoh {
    --pc: var(--p-odoh);
}

.rtt {
    display: grid;
    gap: 10px;
}

.rtt-row {
    display: grid;
    grid-template-columns: 108px 1fr;
    align-items: center;
    gap: 14px;
}

.rtt-name {
    font-family: var(--font-mono);
    font-size: 0.79rem;
    font-weight: 600;
    color: var(--pc, var(--brand-deep));
    text-align: right;
}

.rtt-track {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    flex-wrap: wrap;
}

.rtt-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    min-width: 66px;
    padding: 0 8px;
    border: 1px dashed color-mix(in srgb, var(--pc, var(--brand)) 45%, transparent);
    border-radius: 2px;
    background: color-mix(in srgb, var(--pc, var(--brand)) 5%, transparent);
    font-size: 0.69rem;
    font-family: var(--font-mono);
    color: var(--ink-3);
    white-space: nowrap;
}

.rtt-slot--query {
    border-style: solid;
    border-color: color-mix(in srgb, var(--pc, var(--brand)) 75%, transparent);
    background: color-mix(in srgb, var(--pc, var(--brand)) 16%, transparent);
    color: color-mix(in srgb, var(--pc, var(--brand)) 80%, var(--ink));
    font-weight: 600;
}

.rtt-count {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--ink-4);
    margin-left: 6px;
    white-space: nowrap;
}

.rtt-axis {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 122px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--ink-4);
}

.rtt-axis::after {
    content: '';
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--hairline-strong) 0 6px, transparent 6px 12px);
}

.peel {
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    background: var(--paper-raised);
    overflow: hidden;
}

.peel-stage {
    padding: 22px 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
}

.peel-variant {
    display: none;
}

.peel-variant.is-active {
    display: block;
}

.peel-shell {
    position: relative;
    padding: 30px 16px 16px;
    border: 1px solid color-mix(in srgb, var(--pc, var(--brand)) 55%, transparent);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--pc, var(--brand)) 5%, transparent);
    transition: border-color 0.3s ease, background 0.3s ease, opacity 0.3s ease;
}

.peel-tag {
    position: absolute;
    top: 8px;
    left: 12px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--pc, var(--brand)) 78%, var(--ink));
}

.peel-shell.is-stripped {
    border-style: dashed;
    border-color: var(--hairline);
    background: transparent;
}

.peel-shell.is-stripped>.peel-tag {
    color: var(--ink-4);
    font-weight: 400;
    text-decoration: line-through;
}

.peel-core {
    padding: 12px 14px;
    border: 1px solid var(--hairline-strong);
    border-radius: 2px;
    background: var(--paper-raised);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
    transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.peel-core.is-exposed {
    border-color: color-mix(in srgb, var(--p-plain) 60%, transparent);
    background: color-mix(in srgb, var(--p-plain) 12%, var(--paper-raised));
    color: var(--p-plain);
}

.peel-core.is-exposed::after {
    content: ' ← 明文可见、可被篡改';
    font-weight: 400;
    font-size: 0.95em;
}

.peel-bar,
.stepper-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    border-top: 1px solid var(--hairline);
    background: var(--paper);
}

.peel-bar button,
.stepper-bar button {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 5px 12px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    background: var(--paper-raised);
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.18s ease;
}

.peel-bar button:hover:not(:disabled),
.stepper-bar button:hover:not(:disabled) {
    border-color: var(--brand);
    color: var(--brand-deep);
}

.peel-bar button:disabled,
.stepper-bar button:disabled {
    opacity: 0.4;
    cursor: default;
}

.peel-status {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--ink-3);
}

.peel-log {
    list-style: none;
    margin: 0;
    padding: 12px 20px 16px;
    display: grid;
    gap: 7px;
}

.peel-log li {
    display: flex;
    gap: 10px;
    font-size: 0.86rem;
    line-height: 1.7;
    color: var(--ink-2);
}

.peel-log li::before {
    content: '剥掉';
    flex: 0 0 auto;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--p-plain);
    padding-top: 3px;
}

.peel-log .peel-log-layer {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--ink);
}

.peel-log:empty {
    display: none;
}

.anycast {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.ac-link {
    stroke: var(--hairline-strong);
    stroke-width: 1;
    fill: none;
}

.ac-path {
    stroke: var(--hairline-strong);
    stroke-width: 1;
    stroke-dasharray: 3 4;
    fill: none;
    transition: stroke 0.25s ease, stroke-width 0.25s ease;
}

.ac-path--active {
    stroke: var(--brand);
    stroke-width: 2;
    stroke-dasharray: 7 5;
    animation: ac-flow 1.1s linear infinite;
}

@keyframes ac-flow {
    to {
        stroke-dashoffset: -24;
    }
}

.ac-node rect {
    fill: var(--paper-raised);
    stroke: var(--hairline-strong);
    stroke-width: 1;
    transition: stroke 0.25s ease, fill 0.25s ease;
}

.ac-node--active rect {
    stroke: var(--brand);
    stroke-width: 1.6;
    fill: color-mix(in srgb, var(--brand) 8%, var(--paper-raised));
}

.ac-node text {
    font-family: var(--font-mono);
    font-size: 12px;
    fill: var(--ink-3);
    transition: fill 0.25s ease;
    text-anchor: middle;
}

.ac-node--active text {
    fill: var(--brand-deep);
    font-weight: 600;
}

.ac-label {
    font-family: var(--font-mono);
    font-size: 12px;
    fill: var(--ink-3);
}

.ac-label--strong {
    fill: var(--ink);
    font-weight: 600;
}

.ac-label--center {
    text-anchor: middle;
}

.ac-ip rect {
    fill: var(--brand-tint);
    stroke: var(--brand-tint-2);
    stroke-width: 1;
}

.ac-ip text {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    fill: var(--brand-deep);
    text-anchor: middle;
}

.ac-device rect {
    fill: var(--paper-raised);
    stroke: var(--ink-4);
    stroke-width: 1.2;
}

.ac-device text {
    font-family: var(--font-mono);
    font-size: 12px;
    fill: var(--ink);
    text-anchor: middle;
}

.ac-scenarios {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.ac-scenarios .ac-hint {
    font-size: 0.82rem;
    color: var(--ink-3);
    margin-right: 4px;
}

pre {
    margin: 0;
    padding: 13px 15px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--paper-sunken);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--ink);
    overflow-x: auto;
    tab-size: 4;
}

pre code {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: inherit;
}

.code-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--ink-4);
}

pre+pre {
    margin-top: 10px;
}

pre.cmd {
    border-left: 3px solid var(--brand);
    background: var(--paper-raised);
}

.stepper {
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    background: var(--paper-raised);
    overflow: hidden;
}

.stepper-stage {
    padding: 20px 18px 14px;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
}

.stepper-stage svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.seq-box rect {
    fill: var(--paper-raised);
    stroke: var(--hairline-strong);
    stroke-width: 1;
    transition: stroke 0.3s ease, fill 0.3s ease;
}

.seq-box text {
    font-family: var(--font-mono);
    font-size: 11.5px;
    fill: var(--ink-3);
    text-anchor: middle;
    transition: fill 0.3s ease;
}

.seq-box.is-active rect {
    stroke: var(--brand);
    stroke-width: 1.8;
    fill: color-mix(in srgb, var(--brand) 8%, var(--paper-raised));
}

.seq-box.is-active text {
    fill: var(--brand-deep);
    font-weight: 600;
}

.seq-link {
    stroke: var(--hairline-strong);
    stroke-width: 1.2;
    fill: none;
    transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.seq-link.is-active {
    stroke: var(--brand);
    stroke-width: 2;
    stroke-dasharray: 6 5;
    animation: seq-flow 1s linear infinite;
}

@keyframes seq-flow {
    to {
        stroke-dashoffset: -22;
    }
}

.seq-note {
    font-family: var(--font-mono);
    font-size: 10.5px;
    fill: var(--ink-4);
}

.seq-note.is-active {
    fill: var(--brand-deep);
    font-weight: 600;
}

.stepper-body {
    padding: 0;
}

.stepper-panel {
    display: none;
    padding: 16px 20px 18px;
}

.stepper-panel.is-active {
    display: block;
}

.stepper-panel h3 {
    margin: 0 0 7px;
    font-size: 0.95rem;
    color: var(--ink);
}

.stepper-panel p {
    font-size: 0.91rem;
    line-height: 1.8;
    color: var(--ink-2);
}

.stepper-panel p+p {
    margin-top: 8px;
}

.stepper-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    border-top: 1px solid var(--hairline);
    background: var(--paper);
}

.stepper-bar button {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 5px 12px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    background: var(--paper-raised);
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.18s ease;
}

.stepper-bar button:hover:not(:disabled) {
    border-color: var(--brand);
    color: var(--brand-deep);
}

.stepper-bar button:disabled {
    opacity: 0.4;
    cursor: default;
}

.stepper-dots {
    display: flex;
    gap: 5px;
    margin-left: 4px;
}

.stepper-dots button {
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
    font-size: 0.7rem;
}

.stepper-dots button[aria-current="true"] {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 16%, transparent);
    color: var(--brand-deep);
    font-weight: 600;
}

.stepper-progress {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--ink-4);
}

.stepper.is-static .stepper-bar {
    display: none;
}

.stepper.is-static .stepper-panel {
    display: block;
    border-top: 1px solid var(--hairline);
}

.stepper.is-static .stepper-panel:first-child {
    border-top: 0;
}

.verdict-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.verdict-table th,
.verdict-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--hairline);
    line-height: 1.65;
}

.verdict-table thead th {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    color: var(--ink-3);
    background: var(--paper-sunken);
    white-space: nowrap;
}

.verdict-table tbody td:first-child {
    font-weight: 600;
    color: var(--ink);
    border-left: 3px solid var(--hairline-strong);
}

.verdict-table tbody tr:last-child td {
    border-bottom: 0;
}

.verdict-table tbody tr:hover td {
    background: var(--brand-tint);
}

.verdict {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.verdict-mark {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.verdict--yes {
    color: var(--p-doq);
}

.verdict--yes .verdict-mark {
    background: color-mix(in srgb, var(--p-doq) 13%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--p-doq) 45%, transparent);
}

.verdict--no {
    color: var(--p-plain);
}

.verdict--no .verdict-mark {
    background: color-mix(in srgb, var(--p-plain) 13%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--p-plain) 45%, transparent);
}

.verdict--part {
    color: var(--p-crypt);
}

.verdict--part .verdict-mark {
    background: color-mix(in srgb, var(--p-crypt) 13%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--p-crypt) 45%, transparent);
}

.verdict-note {
    display: block;
    margin-top: 3px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    line-height: 1.55;
    color: var(--ink-4);
}

.where-diagram {
    display: block;
    width: 100%;
    height: auto;
    max-width: 760px;
    margin: 0 auto;
}

.funnel-row {
    opacity: 0.3;
    transition: opacity 0.35s ease;
}

.funnel-row.is-active {
    opacity: 1;
}

.funnel-row .fl-chip rect {
    fill: var(--paper-raised);
    stroke: var(--hairline-strong);
    stroke-width: 1;
    transition: stroke 0.35s ease, fill 0.35s ease;
}

.funnel-row.is-active .fl-chip rect {
    stroke: color-mix(in srgb, var(--brand) 55%, transparent);
    fill: color-mix(in srgb, var(--brand) 6%, var(--paper-raised));
}

.funnel-row .fl-chip text {
    font-family: var(--font-mono);
    font-size: 11.5px;
    fill: var(--ink-3);
    text-anchor: middle;
    transition: fill 0.35s ease;
}

.funnel-row.is-active .fl-chip text {
    fill: var(--brand-deep);
    font-weight: 600;
}

.fl-label {
    font-family: var(--font-mono);
    font-size: 11px;
    fill: var(--ink-4);
    transition: fill 0.35s ease;
}

.funnel-row.is-active .fl-label {
    fill: var(--brand-deep);
    font-weight: 600;
}

.fl-count {
    font-family: var(--font-mono);
    font-size: 11px;
    fill: var(--ink-4);
}

.portal {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
    padding: clamp(6px, 1.6vh, 22px) 0 0;
}

.portal-visual {
    order: 1;
}

.portal-panel {
    order: 2;
}

.portal-visual {
    display: grid;
    gap: 11px;
    align-content: start;
}

.portal-stage {
    position: relative;
    padding: 20px 20px 18px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    background: var(--paper-raised);
}

.journey {
    position: relative;
}

.jn-dot {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 1;
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
    background: var(--pc, var(--brand));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc, var(--brand)) 18%, transparent);
    animation: jn-travel 2.6s linear infinite;
    pointer-events: none;
}

@keyframes jn-travel {
    0% {
        left: 2%;
        opacity: 0;
    }

    8% {
        opacity: 1;
    }

    92% {
        opacity: 1;
    }

    100% {
        left: 98%;
        opacity: 0;
    }
}

@keyframes jn-travel-y {
    0% {
        top: 2%;
        opacity: 0;
    }

    8% {
        opacity: 1;
    }

    92% {
        opacity: 1;
    }

    100% {
        top: 98%;
        opacity: 0;
    }
}

.seen-cipher {
    animation: cipher-pulse 2.6s ease-in-out infinite;
}

@keyframes cipher-pulse {

    0%,
    100% {
        opacity: 0.72;
    }

    50% {
        opacity: 1;
    }
}

.portal-verdict {
    margin: 0;
    padding-top: 12px;
    border-top: 1px dashed var(--hairline-strong);
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--ink-2);
    min-height: 4.4em;
}

.portal-verdict.is-swap {
    animation: verdict-in 0.34s ease-out;
}

@keyframes verdict-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portal-tick {
    height: 2px;
    margin-top: 14px;
    background: var(--hairline);
    border-radius: 2px;
    overflow: hidden;
}

.portal-tick span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--pc, var(--brand));
    border-radius: 2px;
}

.portal-tick.is-running span {
    animation: tick-fill var(--tick-ms, 3600ms) linear;
}

@keyframes tick-fill {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

.portal-stage:hover .portal-tick.is-running span,
.portal-stage:focus-within .portal-tick.is-running span {
    animation-play-state: paused;
}

.portal-panel {
    display: grid;
    gap: 14px;
    align-content: start;
}

.portal-title {
    margin: 0;
    font-size: clamp(1.5rem, 2.6vw, 1.95rem);
    font-weight: 650;
    line-height: 1.3;
}

.portal-lead {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.8;
    color: var(--ink-2);
    max-width: 44ch;
}

.portal-start {
    margin: 0;
    padding: 11px 15px;
    border: 1px solid var(--brand-tint-2);
    border-left: 3px solid var(--brand);
    border-radius: var(--radius);
    background: var(--brand-tint);
}

.portal-start-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--brand-deep);
    margin-bottom: 6px;
}

.portal-start a {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--brand-deep);
    border-bottom: 1px solid var(--brand-tint-2);
}

.portal-start a:hover {
    border-bottom-color: var(--brand);
}

.portal-start span {
    display: block;
    margin-top: 4px;
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--ink-3);
}

.portal-groups {
    display: grid;
    gap: 9px;
    margin: 0;
}

.portal-group {
    display: grid;
    grid-template-columns: 4.6em 1fr;
    gap: 10px;
    align-items: baseline;
}

.portal-group dt {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-4);
    white-space: nowrap;
}

.portal-group dd {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.75;
}

.portal-group dd a {
    color: var(--brand-deep);
    border-bottom: 1px solid transparent;
}

.portal-group dd a:hover {
    border-bottom-color: var(--brand);
}

.portal-sep {
    color: var(--ink-4);
    margin: 0 4px;
}

.portal-note {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--ink-4);
}

.portal-note a {
    color: var(--ink-3);
    border-bottom: 1px solid var(--hairline-strong);
}

@media (max-width: 900px),
(orientation: portrait) and (max-width: 1200px) {
    .portal {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .portal-panel {
        order: 1;
    }

    .portal-visual {
        order: 2;
    }

    .portal-lead {
        max-width: none;
    }
}

.spec-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.spec-table th,
.spec-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--hairline);
    line-height: 1.65;
}

.spec-table thead th {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-3);
    background: var(--paper-sunken);
    white-space: nowrap;
}

.spec-table tbody tr:last-child td {
    border-bottom: 0;
}

.spec-table .pname {
    font-family: var(--font-mono);
    font-weight: 600;
    white-space: nowrap;
    color: var(--pc, var(--brand-deep));
}

.spec-table .port {
    font-family: var(--font-mono);
    white-space: nowrap;
}

.badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    padding: 1px 6px;
    border-radius: 2px;
    white-space: nowrap;
}

.badge--std {
    color: var(--p-doq);
    background: color-mix(in srgb, var(--p-doq) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--p-doq) 30%, transparent);
}

.badge--exp {
    color: var(--p-crypt);
    background: color-mix(in srgb, var(--p-crypt) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--p-crypt) 30%, transparent);
}

.badge--nonstd {
    color: var(--p-plain);
    background: color-mix(in srgb, var(--p-plain) 9%, transparent);
    border: 1px solid color-mix(in srgb, var(--p-plain) 28%, transparent);
}

.proto-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 2px 8px;
    border-radius: 2px;
    color: var(--pc, var(--brand-deep));
    background: color-mix(in srgb, var(--pc, var(--brand)) 9%, transparent);
    border: 1px solid color-mix(in srgb, var(--pc, var(--brand)) 26%, transparent);
}

.fig {
    position: relative;
    margin: 0;
    padding: 22px 22px 18px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    background: var(--paper-raised);
}

.fig::before,
.fig::after {
    content: '';
    position: absolute;
    width: 11px;
    height: 11px;
    pointer-events: none;
}

.fig::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--brand);
    border-left: 2px solid var(--brand);
}

.fig::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid var(--brand);
    border-right: 2px solid var(--brand);
}

.fig-caption {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--hairline-strong);
    font-size: 0.84rem;
    line-height: 1.7;
    color: var(--ink-3);
}

.journey {
    display: grid;
    grid-template-columns: 1fr auto 1.3fr auto 1fr;
    align-items: stretch;
    gap: 0;
}

.jn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 14px 12px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    background: var(--paper);
    text-align: center;
}

.jn--mid {
    border-color: color-mix(in srgb, var(--pc, var(--brand)) 55%, transparent);
    background: color-mix(in srgb, var(--pc, var(--brand)) 8%, var(--paper-raised));
}

.jn-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-4);
}

.jn-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
}

.jn-note {
    font-size: 0.78rem;
    color: var(--ink-3);
}

.jn-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    color: var(--ink-4);
}

.observe {
    margin-top: 16px;
    padding: 15px 17px;
    border: 1px dashed color-mix(in srgb, var(--pc, var(--brand)) 45%, transparent);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--pc, var(--brand)) 6%, var(--paper-raised));
}

.observe-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--pc, var(--brand)) 80%, var(--ink));
    margin-bottom: 9px;
}

.observe-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--ink-2);
}

.observe-row+.observe-row {
    margin-top: 6px;
}

.observe-key {
    flex: 0 0 auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-4);
    min-width: 88px;
}

.seen-plain {
    font-family: var(--font-mono);
    color: var(--p-plain);
    font-weight: 600;
}

.seen-cipher {
    font-family: var(--font-mono);
    color: var(--p-doq);
    letter-spacing: 0.06em;
}

.envelope {
    display: grid;
    gap: 14px;
}

.env-row {
    display: grid;
    grid-template-columns: 86px 1fr;
    align-items: start;
    gap: 14px;
}

.env-name {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pc, var(--brand-deep));
    text-align: right;
    padding-top: 10px;
}

.env-box {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid color-mix(in srgb, var(--pc, var(--brand)) 55%, transparent);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--pc, var(--brand)) 5%, transparent);
}

.env-box-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.env-layer {
    font-family: var(--font-mono);
    font-size: 0.79rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--pc, var(--brand)) 75%, var(--ink));
}

.env-port {
    font-family: var(--font-mono);
    font-size: 0.73rem;
    color: var(--ink-4);
}

.env-box .env-box {
    background: color-mix(in srgb, var(--pc, var(--brand)) 10%, transparent);
    border-style: dashed;
}

.env-payload {
    align-self: flex-start;
    padding: 4px 9px;
    border: 1px solid var(--hairline-strong);
    border-radius: 2px;
    background: var(--paper-raised);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink);
}

.proto-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.proto-switch button {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 7px 13px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    background: var(--paper-raised);
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.18s ease;
}

.proto-switch button:hover {
    border-color: var(--pc, var(--brand));
    color: var(--pc, var(--brand));
}

.proto-switch button[aria-pressed="true"] {
    border-color: var(--pc, var(--brand));
    background: color-mix(in srgb, var(--pc, var(--brand)) 12%, transparent);
    color: var(--pc, var(--brand));
}

.proto-block {
    display: none;
}

.proto-block.is-active {
    display: block;
}

.i {
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.14em;
}

.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.text-link {
    color: var(--brand);
    font-weight: 550;
    border-bottom: 1px solid var(--brand-tint-2);
    transition: border-color 0.18s ease, color 0.18s ease;
}

.text-link:hover {
    color: var(--brand-deep);
    border-bottom-color: var(--brand);
}

.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 40;
    padding: 9px 14px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    color: var(--ink-2);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(8px);
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    border-color: var(--brand);
    color: var(--brand-deep);
}

@media (max-width: 860px) {
    .hero {
        padding-top: 22px;
    }

    .card-grid,
    .card-grid.two-cols,
    .card-grid.three-cols {
        grid-template-columns: 1fr;
    }

    .env-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .env-name {
        text-align: left;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline-item::before {
        left: -19px;
    }

    .rtt-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .rtt-name {
        text-align: left;
    }

    .rtt-axis {
        padding-left: 0;
    }

    .peel-shell {
        padding: 24px 10px 10px;
    }

    .peel-tag {
        left: 8px;
        font-size: 0.7rem;
    }

    .peel-stage {
        padding: 16px 12px;
    }
}

@media (max-width: 640px) {
    .journey {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .jn-arrow {
        padding: 6px 0;
        transform: rotate(90deg);
    }

    .jn-dot {
        top: 0;
        left: 50%;
        z-index: 1;
        margin-top: 0;
        margin-left: -3.5px;
        animation-name: jn-travel-y;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .info-card:hover {
        transform: none;
    }

    .jn-dot,
    .portal-tick {
        display: none;
    }

    .seen-cipher,
    .portal-verdict.is-swap {
        animation: none;
        opacity: 1;
    }
}