:root {
  color-scheme: dark;
  --bg: #0b1018;
  --surface: #111923;
  --raised: #15202a;
  --line: #27353f;
  --line-green: #345648;
  --text: #f2f5f4;
  --muted: #a7b3bd;
  --green: #a8f5bd;
  --green-dark: #10271d;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 6.25rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.68 var(--sans); }
h1, h2, h3, p, figure { margin: 0; }
a { color: var(--green); text-decoration: none; }
a:hover { color: #d2ffdb; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
::selection { background: var(--green); color: var(--bg); }
.shell { width: min(100% - 3rem, 72rem); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { position: fixed; z-index: 8; top: .5rem; left: .5rem; padding: .65rem 1rem; background: var(--green); color: var(--bg); }
.site-header { border-bottom: 1px solid var(--line); background: #0b1018; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.75rem; gap: 1.2rem; }
.brand { display: inline-flex; align-items: center; gap: .72rem; color: var(--text); font-size: 1rem; font-weight: 750; letter-spacing: .04em; line-height: 1.17; white-space: nowrap; }
.brand small { display: block; margin-top: .33rem; color: var(--muted); font: .65rem/1 var(--mono); letter-spacing: .11em; }
.brand-icon { position: relative; display: grid; place-items: center; width: 2.18rem; height: 2.18rem; border: 1px solid #6eb986; border-radius: .45rem; background: #1a3027; }
.brand-icon i { position: absolute; width: .8rem; height: .8rem; border: 1px solid var(--green); transform: rotate(45deg) scaleY(.72); }
.brand-icon i:first-child { top: .48rem; background: #1a3027; z-index: 1; }
.brand-icon i:last-child { top: .83rem; }
.header-inner > nav, .footer-inner nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(.85rem, 3vw, 2.35rem); }
.header-inner > nav a, .footer-inner nav a { color: var(--muted); font-size: .92rem; white-space: nowrap; }
.header-inner > nav a:hover, .footer-inner nav a:hover, .header-inner > nav a[aria-current] { color: var(--green); }
.header-tools { display: flex; align-items: center; justify-content: flex-end; gap: .8rem; }
.language-switch { display: inline-flex; align-items: center; padding: .15rem; gap: .1rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--surface); }
.language-switch a { display: grid; place-items: center; padding: .3rem .48rem; border-radius: .29rem; color: var(--muted); font-size: .875rem; font-weight: 650; line-height: 1.3; white-space: nowrap; }
.language-switch a:hover, .language-switch a[aria-current="page"] { color: var(--green); background: var(--green-dark); }
.header-search { display: inline-flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--muted); }
.icon-search { position: relative; display: inline-block; flex: 0 0 .86rem; width: .86rem; height: .86rem; border: 1.5px solid currentColor; border-radius: 50%; margin-right: .18rem; }
.icon-search::after { content: ""; position: absolute; width: .4rem; height: 1.5px; background: currentColor; left: .64rem; top: .68rem; transform: rotate(45deg); transform-origin: left center; }
.hero { overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 78% 35%, #102720 0%, transparent 48%), var(--bg); }
.hero-inner { min-height: 32rem; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 4vw, 4rem); align-items: center; padding-block: clamp(2.6rem, 6.3vw, 5.75rem); }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { color: var(--green); font: 700 .78rem/1.5 var(--mono); letter-spacing: .16em; }
.hero-label { display: inline-flex; align-items: center; gap: .6rem; padding: .38rem .72rem; border: 1px solid var(--line-green); border-radius: .3rem; background: var(--green-dark); font-family: var(--sans); font-size: .85rem; letter-spacing: .07em; }
.hero-label span, .art-label i { width: .43rem; height: .43rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 .75rem #6df49e9c; }
.hero h1 { margin-top: 1.12rem; font-size: clamp(3rem, 6.3vw, 5.7rem); line-height: 1.11; letter-spacing: -.065em; font-weight: 850; }
.hero h1 em { color: var(--green); font-style: normal; }
.lede { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.18rem); line-height: 1.8; }
.hero .lede { max-width: 27rem; margin-top: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.65rem; }
.button { min-height: 2.72rem; align-items: center; justify-content: center; display: inline-flex; padding: .55rem 1.1rem; border: 1px solid transparent; border-radius: .43rem; font-weight: 700; font-size: .93rem; }
.button-primary { background: var(--green); color: #0b2116; }
.button-primary:hover { background: #ceffda; color: #0b2116; }
.button-secondary { border-color: var(--line-green); background: #101c1c; color: var(--text); }
.button-secondary:hover { border-color: var(--green); color: var(--green); }
.hero-figure { min-width: 0; }
.art-frame {
  position: relative; isolation: isolate; min-height: 21rem; aspect-ratio: 1.35; overflow: hidden;
  border: 1px solid #315449; border-radius: .9rem;
  background-color: #0c191c;
  background-image: radial-gradient(ellipse at 60% 50%, #3060498b, transparent 71%), linear-gradient(#34584b45 1px, transparent 1px), linear-gradient(90deg, #34584b45 1px, transparent 1px);
  background-size: 100% 100%, 1.45rem 1.45rem, 1.45rem 1.45rem;
  box-shadow: 0 1.5rem 5rem #020c11a0, inset 0 0 4rem #071315aa;
}
.art-frame::before, .art-frame::after { position: absolute; content: ""; width: 1rem; height: 1rem; border: solid #91cd9e80; pointer-events: none; }
.art-frame::before { top: .88rem; right: .88rem; border-width: 1px 1px 0 0; }
.art-frame::after { bottom: .88rem; left: .88rem; border-width: 0 0 1px 1px; }
.art-label, .art-caption { position: absolute; display: flex; gap: .56rem; align-items: center; color: #b6dbc9; font-size: .84rem; letter-spacing: .05em; }
.art-label { inset: 1rem auto auto 1rem; }
.art-caption { inset: auto 1.05rem 1rem auto; }
.art-caption span { width: 1.4rem; border-top: 1px solid #a8f5bd; }
.art-lines { position: absolute; width: 63%; height: 23%; left: 17%; top: 42%; transform: rotate(-17deg); background: repeating-linear-gradient(180deg, #7af5a128 0 1px, transparent 1px 11px); border-top: 1px dashed #9cfcb2a0; border-bottom: 1px dashed #9cfcb282; box-shadow: 0 0 2.8rem #51d6862b; }
.block { --size: clamp(3.1rem, 8vw, 6.45rem); --face: #2b6348; --side: #153d31; --front: #1a4836; --edge: #87f4ab; position: absolute; width: var(--size); height: var(--size); transform: translate(-50%, -48%) rotateX(54deg) rotateZ(-37deg); transform-style: preserve-3d; }
.block i, .block b, .block span { display: block; position: absolute; inset: 0; border: 1px solid var(--edge); }
.block i { transform: translateZ(calc(var(--size) * .67)); background: repeating-linear-gradient(0deg, #a4ffc82e 0 1px, transparent 1px 13%), repeating-linear-gradient(90deg, #a4ffc82e 0 1px, transparent 1px 13%), var(--face); box-shadow: 0 0 1.8rem #80ffc446, inset 0 0 1.7rem #9afcba3b; }
.block i::before { content: ""; position: absolute; inset: 32%; border: 1px solid #d0ffe0; box-shadow: 0 0 .7rem #bdffd07b, inset 0 0 .6rem #a9ffcb45; }
.block b { top: auto; height: calc(var(--size) * .67); transform: rotateX(-90deg); transform-origin: bottom; background: repeating-linear-gradient(0deg, #61d89d3b 0 1px, transparent 1px 18%), var(--front); }
.block span { left: auto; width: calc(var(--size) * .67); transform: rotateY(90deg); transform-origin: right; background: repeating-linear-gradient(90deg, #61d89d2b 0 1px, transparent 1px 18%), var(--side); }
.block-a { top: 63%; left: 24%; --edge: #6fd19c; }
.block-b { top: 54%; left: 51%; --face: #397b53; --front: #245840; --edge: #c3ffd1; z-index: 1; }
.block-c { top: 45%; left: 77%; --face: #24523d; --front: #173d31; --edge: #6dbd8e; }
.content-section { padding-block: 3.7rem; }
.content-section + .content-section { border-top: 1px solid var(--line); }
.section-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.35rem; }
.section-title h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); line-height: 1.3; font-weight: 800; letter-spacing: -.035em; }
.section-title .eyebrow { margin-bottom: .45rem; }
.section-title h2 + p { color: var(--muted); margin-top: .48rem; }
.section-link { flex-shrink: 0; }
.filterbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .9rem; margin-bottom: 1.15rem; }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filters button, .post-actions button, .empty-state button { background: #111921; color: var(--muted); border: 1px solid var(--line); border-radius: .36rem; padding: .43rem .82rem; cursor: pointer; font-size: .91rem; }
.filters button:hover, .filters button[aria-pressed="true"], .post-actions button:hover, .empty-state button:hover { background: #172b25; border-color: #497158; color: var(--green); }
.search { display: flex; align-items: center; padding-inline: .75rem; gap: .62rem; width: min(100%, 17rem); min-height: 2.5rem; background: #111921; border: 1px solid var(--line); border-radius: .4rem; color: var(--muted); }
.search:focus-within { border-color: var(--green); }
.search input { background: transparent; color: var(--text); width: 100%; min-width: 0; padding: .38rem 0; border: 0; outline: 0; font-size: .92rem; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.lesson-grid, .creator-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .95rem; }
.lesson-card, .creator-card, .post-card, .term-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: .62rem; }
.lesson-card a { display: flex; flex-direction: column; min-height: 100%; padding: 1.15rem; color: var(--text); border-radius: inherit; transition: background .17s, box-shadow .17s; }
.lesson-card a:hover { background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-green); }
.lesson-meta { display: flex; align-items: center; justify-content: space-between; gap: .6rem; color: var(--muted); font-size: .85rem; }
.meta-dot { color: #7d9c91; padding-inline: .12rem; }
.chapter-icon { display: grid; place-items: center; width: 2.45rem; height: 2.45rem; background: #1a3027; border: 1px solid #335742; color: var(--green); font: 1.45rem/1 var(--mono); border-radius: .42rem; }
.chapter-icon.large { width: 3.1rem; height: 3.1rem; font-size: 1.78rem; }
.lesson-card :is(h2, h3) { margin-top: .75rem; font-size: 1.19rem; line-height: 1.45; }
.lesson-card p { margin-top: .45rem; color: var(--muted); line-height: 1.67; }
.lesson-tags { display: flex; flex-wrap: wrap; margin-top: auto; gap: .4rem; padding-top: 1rem; }
.lesson-tags span, .topic { color: #b9d6c9; background: #1a292a; border-radius: .3rem; padding: .15rem .48rem; font-size: .8rem; }
.creator-card, .post-card, .term-card { padding: 1.1rem 1.2rem; }
.creator-heading { display: flex; align-items: center; gap: .75rem; }
.creator-heading h3 { font-size: 1.04rem; overflow-wrap: anywhere; }
.creator-heading p { color: var(--muted); font: .8rem/1.55 var(--mono); overflow-wrap: anywhere; }
.avatar { flex: 0 0 2.48rem; height: 2.48rem; display: grid; place-items: center; border-radius: .5rem; font: 700 .98rem/1 var(--mono); color: #baf7cf; background: #263e34; }
.avatar-violet { color: #e0cfff; background: #3a2b51; }
.avatar-blue { color: #bcdeff; background: #233951; }
.avatar-amber { color: #ffdeb2; background: #493425; }
.creator-copy { margin-top: .8rem; color: var(--muted); }
.creator-meta, .post-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; margin-top: .95rem; font-size: .9rem; }
.creator-meta a:hover, .term-card a:hover, .post-actions a:hover, .article-copy a:hover { text-decoration: underline; text-underline-offset: .22rem; }
.watch-preview { padding-bottom: 3.1rem; }
.glossary-preview { display: grid; grid-template-columns: 1fr 1.1fr; gap: 1.6rem; padding: 1.7rem 1.8rem; margin-block: .5rem 3.4rem; border: 1px solid var(--line-green); border-radius: .72rem; background: #111f20; }
.glossary-preview .button { margin-top: 1.1rem; }
.term-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; align-content: center; }
.term-links a { display: grid; padding: .42rem .65rem; background: #172a2a; border: 1px solid #2d4942; border-radius: .32rem; }
.term-links a:hover { border-color: var(--green); }
.term-links b { font-size: .92rem; }
.term-links span { color: var(--muted); font: .78rem/1.6 var(--mono); }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 5.8rem; padding-block: 1rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-inner p { color: var(--muted); font-size: .89rem; }
.reading, .subpage { padding-block: 1.5rem 4.3rem; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .62rem; color: var(--muted); font-size: .87rem; }
.reading-header { padding-block: clamp(2rem, 5vw, 3.7rem); border-bottom: 1px solid var(--line); }
.reading-header .chapter-icon { margin-bottom: 1.1rem; }
.reading-header h1 { font-size: clamp(2rem, 6vw, 4.3rem); line-height: 1.17; letter-spacing: -.057em; margin-block: .55rem .9rem; }
.reading-header .lede { max-width: 45rem; }
.article-grid { display: grid; grid-template-columns: minmax(0, 43rem) minmax(12rem, 1fr); gap: clamp(1.8rem, 6vw, 5rem); padding-top: 2.3rem; }
.article-copy section + section { margin-top: 2rem; }
.article-copy h2 { font-size: clamp(1.22rem, 3vw, 1.65rem); margin-bottom: .6rem; line-height: 1.45; }
.article-copy p, .article-copy li { color: #c3cdd3; line-height: 1.86; }
.article-copy p + p { margin-top: .75rem; }
.article-copy ul { padding-left: 1.45rem; }
.article-copy li + li { margin-top: .38rem; }
.article-copy .sources { border-top: 1px solid var(--line); padding-top: 1.15rem; }
.next-lesson { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 2rem; }
.next-lesson .button-primary { color: #0b2116; }
.reading-outline nav { position: sticky; top: 1rem; display: grid; gap: .65rem; padding: 1rem 1.1rem; border: 1px solid var(--line); background: var(--surface); border-radius: .55rem; }
.reading-outline h2 { font-size: .97rem; }
.reading-outline a { font-size: .91rem; color: var(--muted); }
.reading-outline a:hover { color: var(--green); }
.watch-section { padding-top: 2rem; }
.watch-section .section-title { margin-bottom: 1rem; }
.post-grid, .term-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .95rem; align-items: start; }
.post-byline { display: flex; flex-wrap: wrap; gap: .37rem; color: var(--muted); font-size: .87rem; }
.post-byline span:first-child { color: var(--green); }
.post-card h3 { margin-top: .45rem; font-size: 1.12rem; }
.post-card h3 + p { margin-top: .45rem; color: var(--muted); }
.post-embed:empty { display: none; }
.post-embed { margin-top: .6rem; color: var(--muted); overflow-wrap: anywhere; }
.glossary-search { margin-block: 1.35rem; }
.term-grid { margin-top: 1.15rem; align-items: stretch; }
.term-card { display: flex; flex-direction: column; }
.term-card:target { border-color: var(--green); }
.term-card h2 { margin-block: .3rem; line-height: 1.35; font-size: 1.22rem; }
.term-card h2 + p { padding-bottom: .55rem; color: var(--muted); }
.term-card a { margin-top: auto; font-size: .91rem; }
.term-card h2 a { font-size: inherit; }
.empty-state { border: 1px dashed var(--line-green); text-align: center; color: var(--muted); padding: 1.5rem; border-radius: .45rem; }
.empty-state button { margin-top: .6rem; }
@media (max-width: 54rem) {
  .lesson-grid, .creator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { gap: 1.6rem; min-height: auto; }
  .hero h1 { font-size: clamp(2.6rem, 6.7vw, 4.6rem); }
  .art-frame { min-height: 17rem; }
}
@media (max-width: 41rem) {
  .shell { width: min(100% - 1.7rem, 72rem); }
  .header-inner { display: grid; grid-template-columns: 1fr auto; padding-block: .72rem; gap: .7rem; }
  .header-inner > nav { grid-area: 2 / 1 / 3 / -1; gap: .65rem 1.2rem; }
  .header-tools { gap: .65rem; }
  .header-search { justify-content: center; min-width: 1.9rem; min-height: 2rem; }
  .header-search > span:not(.icon-search) { display: none; }
  .hero-inner { grid-template-columns: 1fr; gap: 1.65rem; }
  .hero h1 { font-size: clamp(2.7rem, 10vw, 4.35rem); }
  .art-frame { min-height: 13.9rem; aspect-ratio: 1.62; }
  .block { --size: clamp(2.65rem, 12vw, 5rem); }
  .content-section { padding-block: 2.55rem; }
  .section-header { align-items: start; flex-direction: column; }
  .glossary-preview, .article-grid { grid-template-columns: 1fr; }
  .glossary-preview { padding: 1.1rem; margin-bottom: 2.55rem; }
  .reading-outline { grid-row: 1; }
  .reading-outline nav { position: static; }
}
@media (max-width: 31rem) {
  .lesson-grid, .creator-grid, .post-grid, .term-grid { grid-template-columns: 1fr; }
  .footer-inner { align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
