Files
WTO-Site/site/home.css
T
N0VAN0M4LY fa05f36584 feat(site): upgrade documentation reader with full-book handbooks and search
Compile unabridged bilingual Developer Handbook and Mod Authoring Handbook from repository Markdown with nested list and ordered-list continuation fixes, fix primary button text contrast inside doc sections, and add full-book search, expand-all Ctrl+F mode, active chapter sub-TOC, pushState history, and local file:// link fallback.
2026-12-03 11:26:11 +08:00

1731 lines
33 KiB
CSS

/* ============================================================
* WTOffline Project Homepage Styles & Motion Choreography
* ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
margin: 0;
font-family: var(--font-ui);
background: var(--page);
color: var(--text);
font-size: 15px;
line-height: 1.72;
-webkit-font-smoothing: antialiased;
overflow-x: hidden;
}
code {
font-family: var(--font-mono);
font-size: 0.88em;
padding: 1px 5px;
border-radius: var(--r-xs);
background: var(--glass-2);
border: 1px solid var(--border);
color: var(--text);
}
/* Language toggle visibility */
[data-lang='en'] .lang-zh { display: none !important; }
[data-lang='zh'] .lang-en { display: none !important; }
/* ---------------- Ambient Canvas, Military Backdrop & Technical Grid ---------------- */
.bg {
position: fixed;
inset: 0;
z-index: -3;
background: var(--canvas);
pointer-events: none;
}
.bg-stage {
position: fixed;
inset: 0;
z-index: -2;
pointer-events: none;
overflow: hidden;
opacity: 0.48;
transition: opacity 0.6s var(--ease);
}
:root[data-mode='light'] .bg-stage {
opacity: 0.24;
}
body[data-page='dev-docs'] .bg-stage,
body[data-page='mod-docs'] .bg-stage {
opacity: 0.26;
}
:root[data-mode='light'] body[data-page='dev-docs'] .bg-stage,
:root[data-mode='light'] body[data-page='mod-docs'] .bg-stage {
opacity: 0.14;
}
.bg-slide {
position: absolute;
inset: -3%;
background-size: cover;
background-position: center 45%;
opacity: 0;
transform: scale(1.06);
filter: saturate(0.78) contrast(1.06) brightness(0.95);
transition: opacity 2.2s ease-in-out, transform 13s ease-out;
will-change: opacity, transform;
}
:root[data-mode='light'] .bg-slide {
filter: saturate(0.50) contrast(1.04) brightness(1.04);
}
.bg-slide.active {
opacity: 1;
transform: scale(1.01);
}
.bg-stage::after {
content: '';
position: absolute;
inset: 0;
background:
linear-gradient(90deg, color-mix(in srgb, var(--page) 78%, transparent) 0%, color-mix(in srgb, var(--page) 34%, transparent) 52%, color-mix(in srgb, var(--page) 16%, transparent) 100%),
linear-gradient(180deg, color-mix(in srgb, var(--page) 18%, transparent) 0%, color-mix(in srgb, var(--page) 32%, transparent) 66%, var(--page) 100%);
}
.bg::before,
.bg::after {
content: '';
position: absolute;
border-radius: 50%;
filter: blur(96px);
opacity: 0.38;
will-change: transform;
}
.bg::before {
width: 44vw;
height: 44vw;
left: -10vw;
top: -14vw;
background: radial-gradient(circle, rgba(229, 57, 53, 0.50) 0%, transparent 72%);
animation: drift1 26s ease-in-out infinite alternate;
}
.bg::after {
width: 38vw;
height: 38vw;
right: -8vw;
bottom: -14vw;
background: radial-gradient(circle, rgba(49, 227, 238, 0.34) 0%, transparent 72%);
animation: drift2 32s ease-in-out infinite alternate;
}
:root[data-mode='light'] .bg::before { opacity: 0.22; }
:root[data-mode='light'] .bg::after { opacity: 0.18; }
@keyframes drift1 {
to { transform: translate3d(13vw, 8vh, 0) scale(1.16); }
}
@keyframes drift2 {
to { transform: translate3d(-11vw, -9vh, 0) scale(1.12); }
}
.grid {
position: fixed;
inset: 0;
z-index: -1;
pointer-events: none;
background-image:
linear-gradient(var(--grid-line) 1px, transparent 1px),
linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
background-size: 64px 64px;
-webkit-mask-image: radial-gradient(74% 62% at 50% 30%, #000 30%, transparent 80%);
mask-image: radial-gradient(74% 62% at 50% 30%, #000 30%, transparent 80%);
}
/* ---------------- Opening Shutter & Focus-In ---------------- */
#blink {
position: fixed;
inset: 0;
z-index: 200;
pointer-events: none;
background: var(--page);
animation: eyelid 0.95s var(--ease) forwards;
}
@keyframes eyelid {
0% { clip-path: inset(0 0 0 0); opacity: 1; }
45% { clip-path: inset(0 0 0 0); opacity: 1; }
100% { clip-path: inset(50% 0 50% 0); opacity: 0; }
}
.focus-in {
animation: focusIn 1.15s var(--ease) both;
}
@keyframes focusIn {
0% { filter: blur(22px); opacity: 0; transform: scale(1.045); }
58% { filter: blur(3px); opacity: 1; }
100% { filter: blur(0); opacity: 1; transform: none; }
}
.stagger > * {
animation: riseIn 0.8s var(--ease) both;
}
.stagger > *:nth-child(1) { animation-delay: 0.44s; }
.stagger > *:nth-child(2) { animation-delay: 0.56s; }
.stagger > *:nth-child(3) { animation-delay: 0.68s; }
.stagger > *:nth-child(4) { animation-delay: 0.80s; }
.stagger > *:nth-child(5) { animation-delay: 0.92s; }
@keyframes riseIn {
from { filter: blur(11px); opacity: 0; transform: translateY(16px); }
to { filter: blur(0); opacity: 1; transform: none; }
}
/* Scroll-triggered reveal */
.reveal {
filter: blur(12px);
opacity: 0;
transform: translateY(22px);
transition: filter 0.78s var(--ease), opacity 0.78s var(--ease), transform 0.78s var(--ease);
}
.reveal.in {
filter: blur(0);
opacity: 1;
transform: none;
}
/* Smooth page leave transition for internal navigation */
body.leaving {
animation: focusOut 0.3s var(--ease) forwards;
}
@keyframes focusOut {
to { filter: blur(16px); opacity: 0; transform: scale(0.985); }
}
@view-transition {
navigation: auto;
}
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
#blink, .focus-in, .stagger > *, body.leaving { animation: none !important; }
.reveal { filter: none; opacity: 1; transform: none; transition: none; }
.bg::before, .bg::after { animation: none; }
.bg-slide { transition: none; transform: none; }
@view-transition { navigation: none; }
}
/* ---------------- Sticky Header ---------------- */
.nav {
position: sticky;
top: 0;
z-index: 50;
display: flex;
align-items: center;
gap: var(--s3);
padding: 12px clamp(16px, 5vw, 44px);
background: color-mix(in srgb, var(--page) 68%, transparent);
-webkit-backdrop-filter: blur(18px) saturate(1.2);
backdrop-filter: blur(18px) saturate(1.2);
border-bottom: 1px solid transparent;
transition: border-color 0.28s var(--ease), background 0.28s var(--ease);
}
.nav.stuck {
border-bottom-color: var(--border);
background: color-mix(in srgb, var(--page) 84%, transparent);
}
.brand {
display: inline-flex;
align-items: center;
gap: 10px;
font-family: var(--font-display);
font-weight: 700;
font-size: 16px;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--text);
text-decoration: none;
}
.brand .logo {
width: 28px;
height: 28px;
display: block;
}
.brand-accent {
color: var(--accent);
}
.nav-links {
margin-left: auto;
display: flex;
align-items: center;
gap: 4px;
}
.nav-links a {
padding: 6px 11px;
border-radius: var(--r-sm);
color: var(--text-dim);
text-decoration: none;
font-size: 13.5px;
font-weight: 500;
transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-links a:hover,
.nav-links a.active {
color: var(--text);
background: var(--glass-2);
}
.nav-links a.active {
color: var(--accent);
}
.ui-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 5px;
height: 32px;
padding: 0 10px;
border-radius: var(--r-sm);
border: 1px solid var(--border);
background: var(--glass-2);
color: var(--text-dim);
font-family: var(--font-mono);
font-size: 12px;
cursor: pointer;
transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.ui-btn:hover {
color: var(--text);
border-color: var(--border-2);
background: var(--surface);
}
.ui-iconbtn {
width: 32px;
padding: 0;
}
.ui-iconbtn svg {
width: 15px;
height: 15px;
}
/* ---------------- Layout Container ---------------- */
.wrap {
max-width: 1040px;
margin: 0 auto;
padding: 0 clamp(18px, 5vw, 36px);
}
/* ---------------- Hero ---------------- */
.hero {
position: relative;
padding: clamp(56px, 11vh, 112px) 0 clamp(44px, 7vh, 76px);
display: flex;
flex-direction: column;
align-items: flex-start;
}
.badge {
display: inline-flex;
align-items: center;
gap: 9px;
padding: 5px 13px;
border-radius: 999px;
border: 1px solid var(--border);
background: var(--surface);
color: var(--text-dim);
font-size: 12.5px;
text-decoration: none;
-webkit-backdrop-filter: blur(12px);
backdrop-filter: blur(12px);
transition: border-color 0.24s var(--ease), color 0.24s var(--ease), transform 0.24s var(--ease);
}
.badge:hover {
border-color: var(--accent);
color: var(--text);
transform: translateY(-1px);
}
.dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--accent);
box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.55);
animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.55); }
70% { box-shadow: 0 0 0 8px rgba(229, 57, 53, 0); }
100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); }
}
.hero-logo {
margin: 28px 0 0;
line-height: 0;
}
.hero-wordmark {
height: clamp(112px, 15.5vw, 172px);
width: auto;
max-width: 100%;
display: block;
filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.36));
}
:root[data-mode='light'] .hero-wordmark {
filter: invert(0.88) contrast(1.08);
}
.hero .sub {
margin: 26px 0 0;
max-width: 650px;
font-size: clamp(15px, 1.55vw, 17px);
color: var(--text-dim);
line-height: 1.78;
}
.cta {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 30px;
}
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 11px 20px;
border-radius: var(--r-sm);
border: 1px solid var(--border-2);
font-size: 14px;
font-weight: 600;
text-decoration: none;
cursor: pointer;
white-space: nowrap;
transition: transform 0.24s var(--ease), border-color 0.24s var(--ease), background 0.24s var(--ease), box-shadow 0.24s var(--ease), color 0.24s var(--ease);
}
.btn svg {
width: 16px;
height: 16px;
flex-shrink: 0;
}
.btn-primary {
background: var(--accent);
border-color: var(--accent);
color: #ffffff;
box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
background: var(--accent-hover);
border-color: var(--accent-hover);
transform: translateY(-2px);
box-shadow: 0 14px 32px rgba(229, 57, 53, 0.36);
}
.btn-ghost {
background: var(--surface);
color: var(--text);
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
}
.btn-ghost:hover {
transform: translateY(-2px);
border-color: var(--accent);
color: var(--text);
box-shadow: var(--shadow-sm);
}
.btn:active {
transform: translateY(0) scale(0.985);
}
/* Hero key facts strip */
.facts {
display: flex;
flex-wrap: wrap;
gap: 10px 26px;
margin-top: 34px;
padding-top: 22px;
border-top: 1px solid var(--border);
width: 100%;
max-width: 720px;
font-size: 13px;
color: var(--text-faint);
}
.fact {
display: inline-flex;
align-items: center;
gap: 7px;
}
.fact strong {
font-family: var(--font-mono);
font-size: 12.5px;
color: var(--text);
font-weight: 600;
}
/* ---------------- Sections ---------------- */
section {
padding: clamp(44px, 7.5vh, 80px) 0;
}
.eyebrow {
display: inline-flex;
align-items: center;
gap: 8px;
margin-bottom: 10px;
font-family: var(--font-mono);
font-size: 11.5px;
letter-spacing: 0.18em;
text-transform: uppercase;
color: var(--accent);
}
.eyebrow::before {
content: '';
width: 16px;
height: 2px;
background: var(--accent);
}
h2.sec {
font-family: var(--font-display);
font-size: clamp(24px, 3.4vw, 34px);
letter-spacing: -0.015em;
font-weight: 700;
margin: 0 0 var(--s2);
line-height: 1.2;
}
p.lede {
color: var(--text-dim);
max-width: 680px;
margin: 0 0 var(--s5);
font-size: 15.5px;
}
/* ---------------- Feature Cards (with pointer spotlight) ---------------- */
.cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: var(--s3);
}
.card {
position: relative;
overflow: hidden;
padding: var(--s5);
border-radius: var(--r-lg);
border: 1px solid var(--border);
background: var(--card);
-webkit-backdrop-filter: blur(14px);
backdrop-filter: blur(14px);
transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.card:hover {
transform: translateY(-4px);
border-color: var(--border-2);
box-shadow: var(--shadow-md);
}
/* Pointer-following spotlight driven by --mx / --my */
.card::before {
content: '';
position: absolute;
inset: -1px;
border-radius: inherit;
pointer-events: none;
background: radial-gradient(
240px circle at var(--mx, 50%) var(--my, 0%),
rgba(229, 57, 53, 0.15),
transparent 64%
);
opacity: 0;
transition: opacity 0.35s var(--ease);
}
.card:hover::before {
opacity: 1;
}
/* Subtle top chamfer accent line on hover */
.card::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 48px;
height: 2px;
background: var(--accent);
opacity: 0.55;
transition: width 0.35s var(--ease), opacity 0.35s var(--ease);
}
.card:hover::after {
width: 96px;
opacity: 1;
}
.card .ico {
display: inline-grid;
place-items: center;
width: 38px;
height: 38px;
border-radius: var(--r-sm);
margin-bottom: var(--s3);
background: var(--accent-soft);
color: var(--accent);
}
.card .ico svg {
width: 19px;
height: 19px;
}
.card h3 {
font-size: 16px;
font-weight: 660;
margin: 0 0 8px;
}
.card p {
font-size: 13.5px;
color: var(--text-dim);
margin: 0;
line-height: 1.68;
}
/* ---------------- Architecture Parts ---------------- */
.parts {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: var(--s3);
}
.part {
position: relative;
overflow: hidden;
padding: var(--s4);
border-radius: var(--r-md);
border: 1px solid var(--border);
background: var(--surface);
-webkit-backdrop-filter: blur(12px);
backdrop-filter: blur(12px);
transition: transform 0.28s var(--ease), border-color 0.28s var(--ease);
}
.part:hover {
transform: translateY(-3px);
border-color: var(--border-2);
}
.part .n {
font-family: var(--font-mono);
font-size: 12px;
color: var(--accent);
font-weight: 700;
letter-spacing: 0.08em;
}
.part h4 {
margin: 6px 0 8px;
font-size: 16px;
font-weight: 660;
}
.part p {
margin: 0;
font-size: 13.5px;
color: var(--text-dim);
line-height: 1.66;
}
.part code {
font-family: var(--font-mono);
font-size: 0.88em;
padding: 1px 5px;
border-radius: var(--r-xs);
background: var(--glass-2);
border: 1px solid var(--border);
color: var(--text);
}
/* ---------------- Live Release Panel ---------------- */
.release {
border-radius: var(--r-lg);
border: 1px solid var(--border);
background: var(--elev);
-webkit-backdrop-filter: blur(16px);
backdrop-filter: blur(16px);
overflow: hidden;
box-shadow: var(--shadow-sm);
}
.release-head {
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
padding: var(--s3) var(--s5);
border-bottom: 1px solid var(--border);
background: var(--glass-2);
}
.release-tag {
font-family: var(--font-mono);
font-size: 19px;
font-weight: 700;
color: var(--accent);
}
.release-date {
font-family: var(--font-mono);
font-size: 12.5px;
color: var(--text-faint);
}
.release-chip {
font-family: var(--font-mono);
font-size: 11.5px;
padding: 2px 9px;
border-radius: 999px;
border: 1px solid var(--border);
color: var(--text-dim);
background: var(--surface);
}
.release-body {
padding: var(--s5);
}
.release-notes {
font-size: 14px;
color: var(--text-dim);
}
.release-notes h3,
.release-notes h4 {
font-size: 14.5px;
font-weight: 660;
color: var(--text);
margin: var(--s4) 0 6px;
}
.release-notes h3:first-child,
.release-notes h4:first-child {
margin-top: 0;
}
.release-notes ul {
margin: 0 0 var(--s3);
padding-left: 1.3em;
}
.release-notes li {
margin-bottom: 4px;
}
.release-notes p {
margin: 0 0 var(--s3);
}
.release-notes code {
font-family: var(--font-mono);
font-size: 0.88em;
padding: 1px 5px;
border-radius: var(--r-xs);
background: var(--glass-2);
border: 1px solid var(--border);
}
.release-loading {
color: var(--text-faint);
font-size: 14px;
margin: 0;
}
.release-dl {
display: flex;
gap: 10px;
flex-wrap: wrap;
margin-top: var(--s4);
}
.dl {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
border-radius: var(--r-sm);
border: 1px solid var(--border-2);
background: var(--card);
color: var(--text);
text-decoration: none;
font-size: 13.5px;
font-weight: 600;
transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease), background 0.22s var(--ease);
}
.dl.dl-main {
background: var(--accent);
border-color: var(--accent);
color: #ffffff;
}
.dl.dl-main:hover {
background: var(--accent-hover);
border-color: var(--accent-hover);
color: #ffffff;
}
.dl.dl-main .size {
color: rgba(255, 255, 255, 0.8);
}
.dl:hover {
border-color: var(--accent);
transform: translateY(-2px);
}
.dl .size {
font-family: var(--font-mono);
color: var(--text-faint);
font-size: 11.5px;
font-weight: 400;
}
.dl svg {
width: 15px;
height: 15px;
flex-shrink: 0;
}
.release-pack {
margin-top: var(--s4);
padding-top: var(--s3);
border-top: 1px solid var(--border);
font-size: 13px;
color: var(--text-dim);
display: flex;
flex-wrap: wrap;
gap: 8px 18px;
align-items: center;
}
.release-pack code {
font-family: var(--font-mono);
font-size: 12px;
color: var(--text);
}
.dl-note {
margin-top: var(--s3);
font-size: 13px;
color: var(--text-faint);
}
/* ---------------- All Releases Subpage ---------------- */
.page-head {
padding: clamp(36px, 6.5vh, 64px) 0 18px;
}
.back-link {
display: inline-flex;
align-items: center;
gap: 7px;
margin-bottom: 22px;
color: var(--text-dim);
text-decoration: none;
font-size: 13.5px;
transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.back-link svg {
width: 15px;
height: 15px;
}
.back-link:hover {
color: var(--accent);
transform: translateX(-2px);
}
.page-title {
margin: 0 0 var(--s2);
font-family: var(--font-display);
font-size: clamp(28px, 4.2vw, 44px);
font-weight: 700;
line-height: 1.15;
letter-spacing: -0.015em;
}
.filter-tabs {
display: inline-flex;
gap: 6px;
padding: 4px;
border-radius: var(--r-md);
border: 1px solid var(--border);
background: var(--surface);
-webkit-backdrop-filter: blur(12px);
backdrop-filter: blur(12px);
}
.tab {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 8px 18px;
border-radius: var(--r-sm);
border: 1px solid transparent;
background: transparent;
color: var(--text-dim);
font-family: var(--font-ui);
font-size: 13.5px;
font-weight: 600;
cursor: pointer;
transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tab-count {
font-family: var(--font-mono);
font-size: 11px;
opacity: 0.72;
}
.tab-count:empty {
display: none;
}
.tab:hover {
color: var(--text);
}
.tab.active {
background: var(--accent);
color: #ffffff;
}
.tab.active .tab-count {
opacity: 0.9;
}
.rel-section {
padding: 18px 0 clamp(32px, 5vh, 56px);
}
.rel-list {
display: flex;
flex-direction: column;
gap: var(--s4);
}
.rel-list.switching {
animation: tabSwitch 0.35s var(--ease) both;
}
@keyframes tabSwitch {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: none; }
}
.release-badge-latest {
font-family: var(--font-mono);
font-size: 11px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
padding: 2px 8px;
border-radius: 999px;
background: var(--accent-soft);
border: 1px solid rgba(229, 57, 53, 0.45);
color: var(--accent);
}
.release-badge-pack {
font-family: var(--font-mono);
font-size: 11px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
padding: 2px 8px;
border-radius: 999px;
background: rgba(49, 227, 238, 0.10);
border: 1px solid rgba(49, 227, 238, 0.35);
color: var(--accent-2);
}
.hash-list {
margin-top: var(--s4);
padding-top: var(--s3);
border-top: 1px solid var(--border);
display: flex;
flex-direction: column;
gap: 8px;
}
.hash-row {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px 12px;
font-size: 12px;
color: var(--text-faint);
}
.hash-file {
font-family: var(--font-mono);
color: var(--text-dim);
}
.hash-val {
font-family: var(--font-mono);
font-size: 11.5px;
word-break: break-all;
color: var(--text-faint);
}
.hash-copy {
padding: 2px 8px;
border-radius: var(--r-xs);
border: 1px solid var(--border);
background: var(--glass-2);
color: var(--text-dim);
font-family: var(--font-mono);
font-size: 11px;
cursor: pointer;
transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.hash-copy:hover {
color: var(--text);
border-color: var(--accent);
}
.rel-empty {
padding: var(--s5);
text-align: center;
color: var(--text-faint);
font-size: 14px;
}
/* ---------------- Documentation Subpages (/dev-docs, /mod-docs) ---------------- */
.wrap-doc {
max-width: 1180px;
}
.doc-layout {
display: grid;
grid-template-columns: 276px minmax(0, 1fr);
gap: clamp(24px, 3.8vw, 42px);
align-items: start;
padding: 10px 0 clamp(36px, 6vh, 64px);
}
.doc-toc {
position: sticky;
top: 74px;
max-height: calc(100vh - 92px);
overflow-y: auto;
padding: 15px;
border-radius: var(--r-md);
border: 1px solid var(--border);
background: var(--doc-card);
-webkit-backdrop-filter: blur(14px);
backdrop-filter: blur(14px);
display: flex;
flex-direction: column;
gap: 12px;
}
.doc-tools {
display: flex;
flex-direction: column;
gap: 8px;
}
.doc-search {
position: relative;
}
.doc-search-input {
width: 100%;
height: 34px;
padding: 0 11px;
border-radius: var(--r-sm);
border: 1px solid var(--border-2);
background: var(--glass-2);
color: var(--text);
font-family: var(--font-ui);
font-size: 13px;
outline: none;
transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.doc-search-input::placeholder {
color: var(--text-faint);
}
.doc-search-input:focus {
border-color: var(--accent);
background: var(--surface);
}
.doc-search-results {
display: none;
flex-direction: column;
gap: 4px;
margin-top: 6px;
max-height: 280px;
overflow-y: auto;
padding: 6px;
border-radius: var(--r-sm);
border: 1px solid var(--border-2);
background: var(--elev);
box-shadow: var(--shadow-md);
}
.doc-search-results.open {
display: flex;
}
.doc-search-item {
display: flex;
flex-direction: column;
gap: 2px;
padding: 7px 9px;
border-radius: var(--r-xs);
text-decoration: none;
color: var(--text);
border: 1px solid transparent;
transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.doc-search-item:hover {
background: var(--accent-soft);
border-color: rgba(229, 57, 53, 0.35);
}
.doc-search-item-head {
font-size: 12.5px;
font-weight: 600;
color: var(--text);
}
.doc-search-item-chap {
font-family: var(--font-mono);
font-size: 11px;
color: var(--accent);
}
.doc-search-item-snip {
font-size: 12px;
color: var(--text-faint);
line-height: 1.45;
}
.doc-search-empty {
padding: 8px 10px;
font-size: 12.5px;
color: var(--text-faint);
}
.doc-expand-btn {
width: 100%;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
padding: 6px 10px;
border-radius: var(--r-sm);
border: 1px solid var(--border);
background: var(--glass-2);
color: var(--text-dim);
font-family: var(--font-ui);
font-size: 12.5px;
font-weight: 500;
cursor: pointer;
transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.doc-expand-btn:hover {
color: var(--text);
border-color: var(--border-2);
}
.doc-expand-btn.active {
color: #ffffff;
background: var(--accent);
border-color: var(--accent);
}
.doc-toc-title {
margin: 0 0 6px;
font-family: var(--font-mono);
font-size: 11px;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--text-faint);
}
.doc-toc nav {
display: flex;
flex-direction: column;
gap: 2px;
}
.doc-toc nav > a {
padding: 6px 10px;
border-radius: var(--r-xs);
border-left: 2px solid transparent;
color: var(--text-dim);
text-decoration: none;
font-size: 13px;
line-height: 1.45;
transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.doc-toc nav > a:hover {
color: var(--text);
background: var(--glass-2);
}
.doc-toc nav > a.active {
color: var(--accent);
font-weight: 600;
border-left-color: var(--accent);
background: var(--accent-soft);
}
.doc-subtoc {
display: flex;
flex-direction: column;
gap: 1px;
margin: 2px 0 6px 10px;
padding-left: 8px;
border-left: 1px solid var(--border);
}
.doc-subtoc:empty {
display: none;
}
.doc-subtoc a {
padding: 4px 8px;
border-radius: var(--r-xs);
color: var(--text-faint);
text-decoration: none;
font-size: 12px;
line-height: 1.4;
transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.doc-subtoc a:hover {
color: var(--text);
background: var(--glass-2);
}
.doc-toc-card {
padding-top: 10px;
border-top: 1px solid var(--border);
font-size: 12px;
color: var(--text-faint);
line-height: 1.55;
}
.doc-toc-card a {
display: inline-flex;
align-items: center;
gap: 4px;
margin-top: 6px;
color: var(--accent);
font-weight: 600;
text-decoration: none;
}
.doc-toc-card a:hover {
text-decoration: underline;
}
.doc-body {
display: flex;
flex-direction: column;
gap: var(--s4);
min-width: 0;
}
.doc-section {
scroll-margin-top: 80px;
padding: clamp(22px, 3.2vw, 34px);
border-radius: var(--r-lg);
border: 1px solid var(--border);
background: var(--doc-card);
-webkit-backdrop-filter: blur(16px);
backdrop-filter: blur(16px);
box-shadow: var(--shadow-sm);
}
.doc-section h2 {
margin: 0 0 16px;
padding-bottom: 12px;
border-bottom: 1px solid var(--border);
font-family: var(--font-display);
font-size: clamp(22px, 2.6vw, 28px);
font-weight: 700;
letter-spacing: -0.01em;
line-height: 1.25;
color: var(--text);
}
.doc-section h3 {
scroll-margin-top: 84px;
margin: 30px 0 12px;
padding-left: 11px;
border-left: 3px solid var(--accent);
font-size: 18px;
font-weight: 700;
line-height: 1.35;
color: var(--text);
}
.doc-section h4 {
scroll-margin-top: 84px;
margin: 22px 0 8px;
font-size: 15.5px;
font-weight: 660;
line-height: 1.4;
color: var(--text);
}
.doc-section h5 {
scroll-margin-top: 84px;
margin: 18px 0 6px;
font-family: var(--font-mono);
font-size: 13.8px;
font-weight: 660;
line-height: 1.45;
color: var(--accent);
}
.doc-section p {
margin: 0 0 13px;
color: var(--text-dim);
font-size: 14.5px;
line-height: 1.78;
}
.doc-section p:last-child {
margin-bottom: 0;
}
.doc-section ul,
.doc-section ol {
margin: 0 0 15px;
padding-left: 1.45em;
color: var(--text-dim);
font-size: 14.3px;
}
.doc-section ul ul,
.doc-section ol ul,
.doc-section ul ol,
.doc-section ol ol {
margin: 6px 0 8px;
padding-left: 1.35em;
}
.doc-section li {
margin-bottom: 7px;
line-height: 1.72;
}
.doc-section li > .doc-pre,
.doc-section li > blockquote {
margin-top: 10px;
margin-bottom: 12px;
}
.doc-section li strong {
color: var(--text);
}
.doc-section a:not(.btn) {
color: var(--accent);
text-decoration: none;
}
.doc-section a:not(.btn):hover {
text-decoration: underline;
}
.doc-chapter {
display: none;
}
.doc-chapter.active,
body.doc-expand-all .doc-chapter {
display: block;
animation: tabSwitch 0.32s var(--ease) both;
}
body.doc-expand-all .doc-pager {
display: none;
}
.doc-pager {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 12px;
margin-top: 28px;
padding-top: 20px;
border-top: 1px solid var(--border);
}
.doc-pager-btn {
display: inline-flex;
flex-direction: column;
align-items: flex-start;
gap: 2px;
padding: 10px 16px;
border-radius: var(--r-sm);
border: 1px solid var(--border);
background: var(--surface);
color: var(--text);
text-decoration: none;
cursor: pointer;
min-width: 180px;
transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.doc-pager-btn.next {
margin-left: auto;
align-items: flex-end;
text-align: right;
}
.doc-pager-btn:hover {
border-color: var(--accent);
transform: translateY(-2px);
}
.doc-pager-label {
font-family: var(--font-mono);
font-size: 11px;
color: var(--text-faint);
letter-spacing: 0.08em;
text-transform: uppercase;
}
.doc-pager-title {
font-size: 13.5px;
font-weight: 600;
color: var(--text);
}
.doc-section blockquote {
margin: 15px 0;
padding: 13px 16px;
border-radius: var(--r-sm);
border: 1px solid color-mix(in srgb, var(--accent-2) 32%, transparent);
border-left: 3px solid var(--accent-2);
background: color-mix(in srgb, var(--accent-2) 8%, transparent);
color: var(--text);
font-size: 13.8px;
line-height: 1.72;
}
.doc-section blockquote p {
color: var(--text);
margin: 0 0 6px;
}
.doc-section blockquote p:last-child {
margin-bottom: 0;
}
.doc-section hr {
border: none;
border-top: 1px solid var(--border);
margin: 26px 0;
}
.doc-callout {
margin: 15px 0;
padding: 13px 16px;
border-radius: var(--r-sm);
border: 1px solid rgba(229, 57, 53, 0.34);
border-left: 3px solid var(--accent);
background: var(--accent-soft);
font-size: 13.8px;
color: var(--text);
line-height: 1.7;
}
.doc-callout.info {
border-color: color-mix(in srgb, var(--accent-2) 32%, transparent);
border-left-color: var(--accent-2);
background: color-mix(in srgb, var(--accent-2) 8%, transparent);
}
.doc-table-wrap {
width: 100%;
overflow-x: auto;
margin: 15px 0;
border-radius: var(--r-sm);
border: 1px solid var(--border);
}
.doc-table {
width: 100%;
border-collapse: collapse;
font-size: 13.5px;
line-height: 1.64;
}
.doc-table th,
.doc-table td {
text-align: left;
vertical-align: top;
padding: 10px 12px;
border-bottom: 1px solid var(--border);
}
.doc-table thead th {
background: var(--glass-2);
color: var(--text);
font-weight: 660;
font-size: 12.5px;
white-space: nowrap;
}
.doc-table tbody tr:last-child td {
border-bottom: none;
}
.doc-table td {
color: var(--text-dim);
}
.doc-table td strong {
color: var(--text);
}
.tag-do,
.tag-dont {
display: inline-block;
padding: 1px 6px;
border-radius: var(--r-xs);
font-family: var(--font-mono);
font-size: 11px;
font-weight: 700;
margin-right: 6px;
vertical-align: 1px;
}
.tag-do {
background: rgba(123, 216, 143, 0.14);
color: var(--ok);
border: 1px solid rgba(123, 216, 143, 0.35);
}
.tag-dont {
background: var(--accent-soft);
color: var(--accent);
border: 1px solid rgba(229, 57, 53, 0.38);
}
.doc-pre {
position: relative;
margin: 15px 0;
border-radius: var(--r-sm);
border: 1px solid var(--border);
background: rgba(7, 10, 12, 0.82);
overflow: hidden;
}
:root[data-mode='light'] .doc-pre {
background: #f4f6f9;
}
.doc-pre-head {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 12px;
border-bottom: 1px solid var(--border);
background: var(--glass-2);
font-family: var(--font-mono);
font-size: 11.5px;
color: var(--text-faint);
}
.doc-pre pre {
margin: 0;
padding: 14px 16px;
overflow-x: auto;
font-family: var(--font-mono);
font-size: 12.5px;
line-height: 1.64;
color: var(--text);
}
.doc-pre pre code {
padding: 0;
border: none;
background: transparent;
font-size: inherit;
}
.doc-links {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 18px;
}
@media (max-width: 900px) {
.doc-layout {
grid-template-columns: 1fr;
}
.doc-toc {
position: static;
max-height: none;
}
.doc-toc nav {
flex-direction: row;
flex-wrap: wrap;
gap: 6px;
}
.doc-toc nav > a {
border-left: none;
border: 1px solid var(--border);
padding: 5px 10px;
}
.doc-toc nav > a.active {
border-color: var(--accent);
}
.doc-subtoc {
display: none;
}
}
/* ---------------- Community CTA & Scope Banner ---------------- */
.community-card {
text-align: center;
padding: clamp(32px, 5.5vw, 54px) clamp(20px, 4vw, 44px);
}
.community-card p.lede {
margin: 0 auto var(--s4);
}
.community-actions {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
}
/* ---------------- Footer ---------------- */
footer {
margin-top: clamp(44px, 8vh, 84px);
border-top: 1px solid var(--border);
padding: var(--s5) 0 var(--s6);
}
.foot {
display: flex;
align-items: center;
gap: 14px var(--s4);
flex-wrap: wrap;
font-size: 13px;
color: var(--text-dim);
}
.foot a {
color: var(--text-dim);
text-decoration: none;
transition: color 0.2s var(--ease);
}
.foot a:hover {
color: var(--accent);
}
.foot .right {
margin-left: auto;
display: flex;
flex-wrap: wrap;
gap: 16px;
}
.foot-brand {
display: inline-flex;
align-items: center;
gap: 9px;
font-weight: 600;
color: var(--text);
}
.foot-brand img {
border-radius: 4px;
}
.disclaimer {
margin: 14px 0 0;
font-size: 12px;
color: var(--text-faint);
line-height: 1.65;
}
/* ---------------- Responsive ---------------- */
@media (max-width: 680px) {
.nav-links a.hide-sm { display: none; }
.grid { background-size: 44px 44px; }
.foot .right { margin-left: 0; }
}