@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&display=swap');

:root{
  --green:#00ff80;
  --blue:#0000ff;
  --ink:#000000;
  --paper:#060606;
  --fg:#f3f3f3;
  --dim:#a6a6a6;
  --line:#232323;
  --rail:216px;
  --strip:34px;
}

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

html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  padding-top:var(--strip);
  background:var(--paper);
  color:var(--fg);
  font-family:"Source Serif 4",Georgia,"Songti SC","Noto Serif CJK SC",serif;
  font-size:17px;
  line-height:1.66;
  overflow-x:hidden;
}

img{max-width:100%}

::selection{background:var(--green);color:#000}

a:focus-visible,
button:focus-visible{outline:3px solid var(--blue);outline-offset:2px}

/* 顶部细条 */
.ticker{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:var(--strip);
  margin:0;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 14px;
  background:var(--green);
  color:#000;
  border-bottom:3px solid #000;
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:12px;
  letter-spacing:.28em;
  white-space:nowrap;
  overflow:hidden;
  z-index:60;
}
.tick-dot{color:var(--blue)}

/* 左侧固定竖排 */
.rail{
  position:fixed;
  top:var(--strip);
  left:0;
  bottom:0;
  width:var(--rail);
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:18px 16px 28px;
  background:#000;
  border-right:3px solid var(--green);
  overflow-y:auto;
  z-index:50;
}

.mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  background:var(--blue);
  color:var(--green);
  border:3px solid var(--green);
  font-family:"Playfair Display",Georgia,serif;
  font-weight:900;
  font-size:24px;
  line-height:1;
  text-decoration:none;
}
.mark img{width:100%;height:100%;object-fit:cover;display:block}
.mark:hover{background:var(--green);color:#000}

.railnav p{
  margin:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.railnav a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:8px 10px;
  color:var(--fg);
  text-decoration:none;
  font-family:"Playfair Display",Georgia,serif;
  font-size:19px;
  font-weight:700;
  letter-spacing:.01em;
  border-left:3px solid transparent;
  word-break:break-word;
}
.railnav a:hover,
.railnav a[aria-current]{
  background:var(--green);
  color:#000;
  border-left-color:var(--blue);
}

/* 主区 */
main{margin-left:var(--rail)}
.wrap{max-width:1200px;margin:0 auto}

.hero{
  position:relative;
  overflow:hidden;
  min-height:45vh;
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  background:#000;
  border-bottom:3px solid var(--green);
}

.hero-glyph{
  position:absolute;
  right:-.04em;
  bottom:-.3em;
  z-index:0;
  font-family:"Playfair Display",Georgia,serif;
  font-weight:900;
  font-size:clamp(140px,24vw,300px);
  line-height:.8;
  color:rgba(0,255,128,.07);
  -webkit-text-stroke:2px rgba(0,255,128,.3);
  pointer-events:none;
}

.hero-fig,
.hero-plate{
  margin:0;
  min-height:230px;
  border-right:3px solid var(--green);
  background:var(--blue);
  overflow:hidden;
}
.hero-fig .hero-img,
.hero-fig img{
  display:block;
  width:100%;
  height:100%;
  min-height:230px;
  object-fit:cover;
  filter:grayscale(1) contrast(1.15);
}
.hero-fig:hover img{filter:none}

.hero-text{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:16px;
  padding:clamp(22px,4vw,56px);
  text-align:right;
}

.hero-kicker{
  margin:0;
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:13px;
  letter-spacing:.32em;
  color:var(--green);
}

.hero h1{
  margin:0;
  font-family:"Playfair Display",Georgia,serif;
  font-weight:900;
  font-size:clamp(30px,4.6vw,58px);
  line-height:1.04;
  letter-spacing:-.01em;
  text-wrap:balance;
}
.hero h1 span{display:inline-block}

/* 正文骨架 */
.sheet{
  display:grid;
  grid-template-columns:188px minmax(0,1fr);
  align-items:start;
  border-bottom:3px solid var(--line);
}

.side{
  position:sticky;
  top:calc(var(--strip) + 14px);
  padding:26px 14px 40px;
  border-right:3px solid var(--line);
}

.side h2{
  margin:0 0 10px;
  padding-bottom:6px;
  border-bottom:2px solid var(--green);
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:13px;
  font-weight:500;
  letter-spacing:.26em;
  color:var(--green);
}
.side h2 span{display:inline-block}
.side h2 + p{margin-top:0}
.side h2:not(:first-child){margin-top:26px}
.side p{margin:0 0 4px}
.side a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:9px 8px;
  color:var(--fg);
  text-decoration:none;
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:15px;
  border-left:3px solid transparent;
  word-break:break-word;
}
.side a:hover{background:#101010;color:var(--green);border-left-color:var(--blue)}

.prose{
  min-width:0;
  max-width:820px;
  padding:clamp(20px,3vw,44px) clamp(16px,3vw,44px) 60px;
}

.prose > section{
  border-top:3px solid var(--line);
  margin-top:34px;
  padding-top:30px;
  scroll-margin-top:calc(var(--strip) + 20px);
}
.prose > section:first-child{border-top:0;margin-top:0;padding-top:0}

.prose h2{
  margin:0 0 .55em;
  padding-left:12px;
  border-left:7px solid var(--blue);
  font-family:"Playfair Display",Georgia,serif;
  font-weight:900;
  font-size:clamp(24px,3.4vw,40px);
  line-height:1.1;
  color:var(--green);
  letter-spacing:-.01em;
}
.prose h2 span{display:inline-block}

.prose h3{
  margin:1.6em 0 .5em;
  font-family:"Playfair Display",Georgia,serif;
  font-weight:700;
  font-size:clamp(19px,2.2vw,24px);
  line-height:1.2;
  color:var(--fg);
  border-bottom:2px solid var(--line);
  padding-bottom:.3em;
}
.prose h3 span{display:inline-block}

.prose p{margin:0 0 1em;max-width:68ch}
.prose ul,.prose ol{margin:0 0 1.1em;padding-left:1.35em;max-width:68ch}
.prose li{margin:0 0 .45em}
.prose li::marker{color:var(--green)}

.prose strong{color:var(--green);font-weight:600}

.prose a{
  color:var(--green);
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}
.prose a:hover{background:var(--green);color:#000}

.prose blockquote{
  margin:0 0 1.2em;
  padding:16px 18px;
  background:#0d0d0d;
  border-left:6px solid var(--green);
  border-radius:4px;
  box-shadow:0 10px 24px rgba(0,0,0,.55);
  font-style:italic;
  color:#e2e2e2;
}
.prose blockquote p:last-child{margin-bottom:0}

.prose figure{margin:0 0 1.3em}
.prose img,
.prose iframe{
  max-width:100%;
  height:auto;
  border:2px solid var(--line);
  border-radius:4px;
  box-shadow:0 10px 22px rgba(0,0,0,.5);
}
.prose figcaption{
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:13px;
  color:var(--dim);
  padding-top:6px;
}

.prose table{
  width:100%;
  border-collapse:collapse;
  margin:0 0 1.3em;
  font-size:16px;
}
.prose th,.prose td{
  border:2px solid var(--line);
  padding:9px 10px;
  text-align:left;
  vertical-align:top;
}
.prose th{background:#111;color:var(--green)}

.prose hr{
  border:0;
  border-top:3px solid var(--line);
  margin:2em 0;
}

.prose code,
.prose pre{
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:15px;
}
.prose pre{
  padding:14px;
  background:#0d0d0d;
  border:2px solid var(--line);
  overflow-x:auto;
}

/* 页脚 */
footer{
  margin-left:var(--rail);
  background:#000;
  border-top:3px solid var(--blue);
}

.foot-big{margin:0;border-bottom:2px solid var(--line)}
.foot-big a{
  display:block;
  padding:clamp(26px,5vw,58px) clamp(18px,4vw,48px);
  font-family:"Playfair Display",Georgia,serif;
  font-weight:900;
  font-size:clamp(32px,7vw,78px);
  line-height:1;
  letter-spacing:-.02em;
  color:var(--green);
  text-decoration:none;
}
.foot-big a:hover{background:var(--green);color:#000}

.foot-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:8px 18px;
  margin:0;
  padding:10px clamp(16px,4vw,48px);
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:15px;
  color:var(--dim);
}
.foot-row small{font-size:15px}
.foot-row a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  color:var(--fg);
  text-decoration:none;
}
.foot-row a:hover{color:var(--green);text-decoration:underline}

@media (max-width:880px){
  body{padding-top:0}
  .ticker{
    position:static;
    height:auto;
    padding:7px 14px;
    font-size:12px;
    letter-spacing:.2em;
  }
  .rail{
    position:static;
    width:auto;
    flex-direction:row;
    align-items:center;
    gap:12px;
    padding:10px 12px;
    border-right:0;
    border-bottom:3px solid var(--green);
    overflow:visible;
  }
  .mark{width:44px;height:44px;flex:0 0 auto}
  .railnav{flex:1 1 auto;min-width:0}
  .railnav p{
    flex-direction:row;
    gap:2px;
    overflow-x:auto;
    scrollbar-width:none;
  }
  .railnav p::-webkit-scrollbar{display:none}
  .railnav a{
    min-height:44px;
    padding:0 10px;
    font-size:17px;
    white-space:nowrap;
    border-left:0;
    border-bottom:3px solid transparent;
  }
  main,footer{margin-left:0}

  .hero{grid-template-columns:minmax(0,1fr);min-height:0}
  .hero-text{order:-1;padding:18px 16px 22px}
  .hero h1{font-size:clamp(28px,8vw,44px)}
  .hero-glyph{font-size:clamp(120px,42vw,200px);bottom:-.16em}
  .hero-fig,
  .hero-plate{
    border-right:0;
    border-top:3px solid var(--green);
    min-height:0;
    max-height:200px;
  }
  .hero-fig .hero-img,
  .hero-fig img{min-height:0;height:200px}

  .sheet{grid-template-columns:minmax(0,1fr)}
  .side{
    position:static;
    border-right:0;
    border-bottom:3px solid var(--line);
    padding:18px 16px 22px;
  }
  .side p{display:inline-block;margin:0 6px 6px 0}
  .side a{
    display:inline-flex;
    min-height:40px;
    padding:8px 10px;
    border:2px solid var(--line);
  }
  .prose{max-width:none;padding:20px 16px 46px}
  .prose > section{scroll-margin-top:16px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .hero-glyph{transform:none!important}
}

button[aria-expanded]{min-width:44px;min-height:44px}
