:root {
    color-scheme: light;
    --ink: #172139;
    --muted: #4d5b72;
    --navy: #111a2c;
    --paper: #f8f9fd;
    --line: #dce2ef;
    --accent: #d6caff;
    font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .25em; }
:focus-visible { outline: 3px solid #8361e5; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 页首与深色首屏，使用 CSS 网格和光晕衬托可以切换的产品预览。 */
.site-header { color: #f5f4fc; background: var(--navy); border-bottom: 1px solid #303a50; }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.header-inner nav, .footer div { display: flex; flex-wrap: wrap; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 760; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #332859; }
.header-inner nav, .header-action { color: #dbe1f6; font-size: .88rem; }
.header-action { padding: 6px 12px; border: 1px solid #586580; border-radius: 9px; }
.hero {
    color: #f8f7ff;
    background: radial-gradient(ellipse at 77% 70%, #392757 0%, transparent 52%), var(--navy);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr); align-items: center; gap: clamp(30px, 7vw, 100px); padding-block: clamp(55px, 8vw, 105px); }
.eyebrow { font-size: .82rem; font-weight: 760; letter-spacing: .16em; color: #6542aa; }
.hero .eyebrow { color: #cbb7ff; }
h1 { font-size: clamp(2.7rem, 6.3vw, 5.6rem); font-weight: 820; line-height: 1.09; letter-spacing: -.06em; margin-block: 18px 23px; }
h1 em { color: var(--accent); font-style: normal; }
.hero-copy > p:last-of-type { max-width: 29em; color: #d3dbef; font-size: 1.04rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 16px; border-radius: 10px; font-weight: 720; border: 1px solid transparent; }
.light { background: #ede7ff; color: #251b44; }
.outline { border-color: #72779a; color: #f6f2ff; }

/* 选择项与预览处于同一 fieldset，单选框的焦点在对应标签上可见。 */
.demo { background: #f8f9ff; color: var(--ink); border: 1px solid #e2dbfb; border-radius: 19px; overflow: hidden; box-shadow: 0 25px 65px #090d20a0; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; background: #e9eafa; color: #454b6a; font-size: .76rem; font-weight: 700; }
.dots { color: #7863a7; letter-spacing: .15em; }
.demo fieldset { margin: 0; border: 0; min-width: 0; padding: 16px; }
.demo-tabs { display: flex; gap: 5px; padding: 5px; border-radius: 12px; background: #e9edf7; }
.demo-tabs label { flex: 1; text-align: center; padding: 8px 4px; border-radius: 8px; font-size: .85rem; font-weight: 690; color: #465471; cursor: pointer; white-space: nowrap; }
#demo-notes:checked ~ .demo-tabs label[for=demo-notes],
#demo-lock:checked ~ .demo-tabs label[for=demo-lock],
#demo-clip:checked ~ .demo-tabs label[for=demo-clip] { color: #482b82; background: white; box-shadow: 0 2px 4px #202a521c; }
#demo-notes:focus-visible ~ .demo-tabs label[for=demo-notes],
#demo-lock:focus-visible ~ .demo-tabs label[for=demo-lock],
#demo-clip:focus-visible ~ .demo-tabs label[for=demo-clip] { outline: 2px solid #7954c9; outline-offset: -2px; }
.demo-content { min-height: 210px; padding-top: 14px; }
.demo-panel { display: none; gap: 9px; }
#demo-notes:checked ~ .demo-content .notes-panel,
#demo-lock:checked ~ .demo-content .lock-panel,
#demo-clip:checked ~ .demo-content .clip-panel { display: grid; }
.preview-search, .demo-panel article, .sample-cipher { border: 1px solid var(--line); border-radius: 10px; background: white; padding: 9px 11px; }
.preview-search, .demo-panel small, .demo-panel time, .demo-panel p { color: var(--muted); font-size: .82rem; }
.demo-panel article, .preview-heading { display: flex; align-items: center; gap: 10px; }
.demo-panel article div { min-width: 0; flex: 1; }
.demo-panel small { display: block; overflow-wrap: anywhere; }
.demo-panel strong { font-size: .91rem; }
.sample-cipher { color: #7051a5; letter-spacing: .2em; }
.sample-icon { display: inline-grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; font-size: 1.22rem; flex: none; }
.lavender { background: #eee8ff; color: #563393; }
.mint { background: #e1f7ee; color: #14664f; }
.sky { background: #e3eeff; color: #285881; }

/* 功能卡片可独立展开，结构图的阅读顺序在小屏幕上保持一致。 */
.section { padding-block: clamp(48px, 7vw, 85px); }
.section-heading { margin-bottom: 30px; }
h2 { margin-block: 7px 8px; font-size: clamp(1.8rem, 3.55vw, 3rem); letter-spacing: -.045em; line-height: 1.2; }
.section-heading > p:last-child, .card p, .flow p { color: var(--muted); }
.card-grid, .flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; padding: 21px; background: white; border: 1px solid var(--line); border-radius: 15px; }
.card h3 { margin-block: 10px 5px; font-size: 1.13rem; }
.card > p { margin-bottom: 13px; }
.card details { margin-top: auto; border-top: 1px solid var(--line); padding-top: 9px; font-size: .91rem; }
.card details p { margin-top: 7px; }
summary { color: #5e3a9c; font-weight: 700; cursor: pointer; }
.architecture { background: #edf0fa; border-block: 1px solid var(--line); }
.flow { list-style: none; padding: 0; margin: 0; }
.flow li { padding: 17px 19px; background: white; border: 1px solid var(--line); border-radius: 13px; }
.flow li span { color: #6542aa; font-size: .83rem; font-weight: 740; }
.flow h3 { margin-block: 5px; }
.relay { margin-top: 16px; background: #172139; color: #f4f3ff; padding: 16px 20px; border-radius: 13px; }
.footer { display: flex; justify-content: space-between; gap: 12px; padding-block: 26px; color: var(--muted); font-size: .9rem; }

@media (max-width: 820px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
    .demo { max-width: 600px; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
    .wrap { width: calc(100% - 32px); }
    .header-inner nav { display: none; }
    .header-inner, .footer { flex-wrap: wrap; }
    .card-grid, .flow { grid-template-columns: minmax(0, 1fr); }
    .demo fieldset { padding: 11px; }
}
