@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;500;600;700&display=swap');

:root{
  --paper:#ffffff;
  --mist:#f5f5f5;
  --ink:#1f1f1f;
  --line:#e2e2e2;
  --soft:#6d6d6d;
  --serif:"Noto Serif TC",Georgia,"Songti SC","SimSun",serif;
  --sans:"Noto Sans TC",-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
}

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

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

body{
  margin:0;
  background:var(--mist);
  color:var(--ink);
  font-family:var(--sans);
  font-size:17px;
  line-height:1.8;
  font-weight:400;
  -webkit-font-smoothing:antialiased;
}

a{color:inherit;text-decoration:none}
img{max-width:100%}
h1,h2,h3{font-family:var(--serif);line-height:1.32;margin:0}

/* ---------- 左侧固定竖排导航 ---------- */
.masthead{
  position:fixed;
  inset:0 auto 0 0;
  width:262px;
  z-index:30;
  display:flex;
  flex-direction:column;
  gap:22px;
  padding:30px 22px 26px;
  background:var(--paper);
  border-right:1px solid var(--line);
}

.brand{
  align-self:flex-start;
  padding:4px 0 10px;
  font-family:var(--serif);
  font-size:22px;
  font-weight:700;
  letter-spacing:.08em;
  border-bottom:2px solid var(--ink);
}

.pills{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.pill{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:8px 16px;
  font-size:16px;
  line-height:1.5;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--mist);
  transition:background .2s ease,color .2s ease,border-color .2s ease,transform .2s ease;
}

.pill:hover,.pill:focus-visible{
  background:var(--ink);
  color:var(--paper);
  border-color:var(--ink);
  transform:translateX(3px);
}

.cta{
  margin-top:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:10px 18px;
  font-size:16px;
  letter-spacing:.1em;
  color:var(--paper);
  background:var(--ink);
  border-radius:999px;
  transition:transform .2s ease,opacity .2s ease;
}

.cta:hover,.cta:focus-visible{transform:translateY(-2px);opacity:.88}

/* ---------- 版面 ---------- */
.stage{
  margin-left:262px;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* ---------- Hero ---------- */
.hero{
  position:relative;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  min-height:45vh;
  padding:40px 40px 46px;
  overflow:hidden;
  color:var(--paper);
  background-color:var(--ink);
  background-image:radial-gradient(rgba(255,255,255,.17) 1px,transparent 1px);
  background-size:22px 22px;
}

.hero-media{position:absolute;inset:0;margin:0}

.hero-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter:grayscale(.18);
}

.hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(100deg,rgba(31,31,31,.86),rgba(31,31,31,.34));
}

.hero-copy{
  position:relative;
  z-index:2;
  max-width:640px;
  text-align:right;
}

.hero h1{
  font-size:clamp(30px,4.4vw,50px);
  font-weight:600;
  letter-spacing:.02em;
}

.hero-lead{
  margin:14px 0 0;
  font-size:16px;
  line-height:1.78;
  color:rgba(255,255,255,.84);
}

/* ---------- 正文 ---------- */
main{
  flex:1;
  width:100%;
  max-width:1180px;
  margin:0 auto;
  padding:34px 34px 68px;
}

article{
  display:grid;
  grid-template-columns:214px minmax(0,1fr);
  gap:26px;
}

article > aside{
  grid-column:1;
  align-self:start;
  position:sticky;
  top:26px;
}

article > section{
  grid-column:2;
  background:var(--paper);
  border:1px solid var(--line);
  border-bottom:3px solid var(--ink);
  padding:30px 34px 36px;
  scroll-margin-top:24px;
  transition:transform .25s ease,box-shadow .25s ease;
}

article > section:hover{
  transform:scale(1.005);
  box-shadow:0 8px 20px rgba(0,0,0,.05);
}

article > section h2{
  font-size:clamp(21px,2.6vw,28px);
  font-weight:600;
  margin:0 0 16px;
}

article > section h2 > span{
  display:inline-block;
  padding-bottom:5px;
  border-bottom:3px solid var(--ink);
}

article > section h3{
  font-size:19px;
  font-weight:600;
  margin:26px 0 12px;
}

article > section h3 > span{
  display:inline-block;
  border-bottom:2px solid var(--line);
  padding-bottom:3px;
}

article > section p{margin:0 0 16px}
article > section p:last-child{margin-bottom:0}

article > section ul,
article > section ol{
  margin:0 0 18px;
  padding-left:1.25em;
}

article > section li{margin:0 0 8px}

article > section img{
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  margin:22px 0;
  border:1px solid var(--line);
}

article > section a{
  border-bottom:1px solid var(--ink);
}

article > section blockquote{
  margin:22px 0;
  padding:14px 20px;
  background:var(--mist);
  border-left:3px solid var(--ink);
  font-family:var(--serif);
}

article > section blockquote p:last-child{margin-bottom:0}

/* ---------- 侧栏 ---------- */
.rail{
  background:var(--paper);
  border:1px solid var(--line);
  border-top:3px solid var(--ink);
  padding:20px 18px 16px;
}

.rail-title{
  font-size:16px;
  font-weight:600;
  letter-spacing:.16em;
  margin-bottom:12px;
  padding-bottom:10px;
  border-bottom:1px solid var(--line);
}

.rail-nav{display:flex;flex-direction:column}

.rail-nav a{
  display:block;
  padding:10px 0;
  font-size:16px;
  line-height:1.5;
  border-bottom:1px dashed var(--line);
  transition:padding .2s ease,font-weight .2s ease;
}

.rail-nav a:last-child{border-bottom:0}

.rail-nav a:hover,
.rail-nav a.on{padding-left:6px;font-weight:700}

/* ---------- 页脚 ---------- */
.foot{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:space-between;
  gap:26px 34px;
  padding:30px 34px 34px;
  background:var(--paper);
  border-top:3px solid var(--ink);
}

.foot-mark{
  display:inline-block;
  padding:6px 0;
  font-family:var(--serif);
  font-size:18px;
  font-weight:600;
  letter-spacing:.08em;
  border-bottom:2px solid var(--ink);
}

.foot-host{
  margin:10px 0 0;
  font-size:16px;
  color:var(--soft);
  word-break:break-all;
}

.foot-nav dl{
  margin:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.foot-nav dt{margin:0}

.foot-nav dt a{
  display:inline-block;
  padding:10px 0;
  min-height:42px;
  font-size:16px;
  line-height:1.5;
}

.foot-nav dt a:hover{font-weight:700}

.foot-nav dd{
  margin:0;
  width:66%;
  height:1px;
  background:var(--line);
}

.foot-form{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.foot-form input{
  font:inherit;
  font-size:16px;
  min-height:44px;
  width:158px;
  padding:9px 14px;
  color:var(--ink);
  background:var(--mist);
  border:1px solid var(--line);
  border-radius:0;
}

.foot-form input:focus-visible{
  outline:2px solid var(--ink);
  outline-offset:1px;
}

.foot-form button{
  font:inherit;
  font-size:16px;
  letter-spacing:.12em;
  min-height:44px;
  padding:0 20px;
  color:var(--paper);
  background:var(--ink);
  border:0;
  border-radius:999px;
  cursor:pointer;
  transition:opacity .2s ease;
}

.foot-form button:hover{opacity:.85}

.foot-copy{
  flex:1 1 140px;
  text-align:center;
  align-self:center;
}

.foot-copy p{
  margin:0;
  font-size:16px;
  color:var(--soft);
}

/* ---------- 回到顶部 ---------- */
.to-top{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:40;
  min-height:44px;
  padding:0 16px;
  font:inherit;
  font-size:16px;
  color:var(--ink);
  background:var(--paper);
  border:1px solid var(--ink);
  border-radius:999px;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(0,0,0,.09);
}

.to-top:hover{background:var(--ink);color:var(--paper)}

/* ---------- 窄屏 ---------- */
@media (max-width:900px){
  .masthead{
    position:static;
    inset:auto;
    width:auto;
    gap:12px;
    padding:16px 18px 16px;
    border-right:0;
    border-bottom:1px solid var(--line);
  }

  .brand{
    align-self:stretch;
    font-size:19px;
    padding-bottom:10px;
  }

  .pills{
    flex-direction:row;
    flex-wrap:wrap;
    gap:8px;
  }

  .pill{
    min-height:42px;
    padding:8px 14px;
    font-size:16px;
  }

  .pill:hover,.pill:focus-visible{transform:none}

  .cta{display:none}

  .stage{margin-left:0}

  .hero{
    min-height:34vh;
    padding:24px 18px 28px;
  }

  .hero-copy{max-width:none}

  main{padding:20px 16px 52px}

  article{grid-template-columns:minmax(0,1fr);gap:18px}
  article > aside{grid-column:1;position:static}
  article > section{grid-column:1;padding:22px 18px 26px}
  article > section:hover{transform:none;box-shadow:none}

  .rail-nav{flex-direction:row;flex-wrap:wrap;gap:0 14px}
  .rail-nav a{border-bottom:0;padding:8px 0;min-height:40px}

  .foot{
    flex-direction:column;
    gap:20px;
    padding:24px 18px 30px;
  }

  .foot-copy{text-align:left;align-self:flex-start}
  .foot-form input{flex:1 1 120px;width:auto}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{transition:none!important;animation:none!important}
}

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