:root{
  --paper:#fdfbf7;
  --wash:#f5f5f5;
  --ink:#1a1a1a;
  --rule:#e0e0e0;
  --mute:#56524b;
  --ghost:#eceae4;
  --serif:"Noto Serif JP","Songti SC","Hiragino Mincho ProN",Georgia,serif;
  --sans:"Noto Sans JP","Hiragino Sans","PingFang SC",system-ui,sans-serif;
}

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

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--serif);
  font-size:17px;
  line-height:1.9;
  letter-spacing:.012em;
  overflow-x:hidden;
  transition:none;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:5;
  pointer-events:none;
  opacity:.055;
  mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='.55'/></svg>");
  background-size:160px 160px;
}

img{
  max-width:100%;
  height:auto;
}

a{ color:var(--ink); }

p{ margin:0 0 1.15rem; }

/* ---------- 顶部两行：品牌行 / 菜单行 ---------- */

.top{
  position:sticky;
  top:0;
  z-index:30;
  background:var(--paper);
  border-bottom:1px solid var(--rule);
}

.brandline{
  margin:0;
  text-align:center;
  border-bottom:1px solid var(--rule);
  padding:.15rem 1rem;
}

.brand{
  display:inline-block;
  padding:.7rem .3rem;
  min-height:44px;
  font-family:var(--serif);
  font-size:1.05rem;
  font-weight:600;
  letter-spacing:.34em;
  text-indent:.34em;
  text-decoration:none;
  color:var(--ink);
}

.brand:hover{
  background:var(--wash);
}

.drawer > summary{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  min-height:46px;
  padding:.7rem 1rem;
  list-style:none;
  cursor:pointer;
  font-family:var(--sans);
  font-size:.9rem;
  font-weight:500;
  letter-spacing:.4em;
  text-indent:.4em;
  color:var(--ink);
}

.drawer > summary::-webkit-details-marker{ display:none; }

.drawer > summary::after{
  content:"＋";
  font-size:.85rem;
  letter-spacing:0;
  text-indent:0;
  color:var(--mute);
}

.drawer[open] > summary{
  background:var(--wash);
}

.drawer[open] > summary::after{
  content:"－";
}

.drawer > menu{
  margin:0;
  padding:0;
  list-style:none;
  border-top:1px solid var(--rule);
  background:var(--paper);
  max-height:min(62vh,430px);
  overflow-y:auto;
}

.drawer > menu li{
  border-bottom:1px solid var(--rule);
}

.drawer > menu a{
  display:flex;
  align-items:center;
  min-height:46px;
  padding:.6rem 1.15rem;
  font-family:var(--sans);
  font-size:.95rem;
  letter-spacing:.06em;
  text-decoration:none;
  color:var(--ink);
}

.drawer > menu a:hover,
.drawer > menu a:focus-visible{
  background:var(--wash);
}

/* ---------- 版心 ---------- */

main{
  max-width:1120px;
  margin:0 auto;
  padding:0 1.25rem 2rem;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:2.5rem;
}

article{ min-width:0; }

/* ---------- 首屏 ---------- */

.hero{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  min-height:70vh;
  padding:3.5rem 0 3rem;
  overflow:hidden;
}

.hero-mark{
  position:absolute;
  z-index:0;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  font-family:var(--serif);
  font-weight:700;
  font-size:clamp(9rem,26vw,19rem);
  line-height:.8;
  letter-spacing:-.05em;
  color:var(--ghost);
  user-select:none;
  pointer-events:none;
}

.hero h1{
  position:relative;
  z-index:1;
  margin:0 0 1.2rem;
  font-size:clamp(1.95rem,6.4vw,3.5rem);
  line-height:1.28;
  font-weight:600;
  letter-spacing:.015em;
  max-width:22em;
}

.hero .lead{
  position:relative;
  z-index:1;
  margin:0;
  max-width:32em;
  color:var(--mute);
  font-size:1rem;
  line-height:1.85;
}

.hero--tight{
  min-height:auto;
  padding:3rem 0 2rem;
  align-items:flex-start;
  text-align:left;
}

/* ---------- 正文 ---------- */

article > div{
  scroll-margin-top:118px;
}

article > div:not(.hero):not(.body){
  max-width:40rem;
  padding:2.4rem 0 2.6rem;
  border-top:1px solid var(--rule);
}

article > .body{
  max-width:40rem;
  padding-bottom:2rem;
}

article h2{
  margin:0 0 .45rem;
  font-size:clamp(1.28rem,3.2vw,1.62rem);
  line-height:1.45;
  font-weight:600;
  letter-spacing:.01em;
}

article h3{
  margin:2rem 0 .5rem;
  font-size:1.1rem;
  line-height:1.6;
  font-weight:600;
}

.subtitle,
article h2 + p{
  margin:0 0 1.4rem;
  font-family:var(--sans);
  font-size:.92rem;
  font-weight:400;
  letter-spacing:.04em;
  color:var(--mute);
}

article p{
  margin:0 0 1.2rem;
}

article ul,
article ol{
  margin:0 0 1.3rem;
  padding-left:1.4rem;
}

article li{ margin:.35rem 0; }

article a{
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:.22em;
}

article a:hover{
  background:var(--wash);
  text-decoration-thickness:2px;
}

article strong{ font-weight:600; }

article blockquote{
  margin:1.6rem 0;
  padding:1rem 1.2rem;
  background:var(--wash);
  border-left:3px solid var(--ink);
  border-radius:4px;
}

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

article figure{ margin:1.6rem 0; }

article figcaption{
  margin-top:.5rem;
  font-family:var(--sans);
  font-size:.82rem;
  color:var(--mute);
}

article img{
  display:block;
  border:1px solid var(--rule);
  border-radius:4px;
}

article table{
  width:100%;
  border-collapse:collapse;
  margin:1.4rem 0;
  font-size:.95rem;
}

article th,
article td{
  border-bottom:1px solid var(--rule);
  padding:.6rem .5rem;
  text-align:left;
  vertical-align:top;
}

article th{
  font-family:var(--sans);
  font-weight:600;
  font-size:.88rem;
  letter-spacing:.05em;
}

article code,
article pre{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:.88em;
}

article pre{
  overflow-x:auto;
  padding:1rem;
  background:var(--wash);
  border-radius:4px;
  line-height:1.7;
}

article hr{
  border:0;
  border-top:1px solid var(--rule);
  margin:2rem 0;
}

/* ---------- 侧栏 ---------- */

.rail{
  border-top:1px solid var(--rule);
  padding-top:1.6rem;
}

.rail h2{
  margin:0 0 .3rem;
  font-family:var(--sans);
  font-size:.86rem;
  font-weight:600;
  letter-spacing:.36em;
  text-indent:.36em;
}

.rail .subtitle{
  margin:0 0 1rem;
  font-size:.78rem;
  letter-spacing:.12em;
}

.rail-list{
  list-style:none;
  margin:0;
  padding:0;
  counter-reset:rail;
}

.rail-list li{
  counter-increment:rail;
  border-bottom:1px solid var(--rule);
}

.rail-list a{
  display:flex;
  align-items:baseline;
  gap:.65rem;
  min-height:44px;
  padding:.65rem 0;
  font-family:var(--sans);
  font-size:.9rem;
  line-height:1.6;
  text-decoration:none;
  color:var(--ink);
}

.rail-list a::before{
  content:counter(rail,decimal-leading-zero);
  font-size:.72rem;
  letter-spacing:.08em;
  color:var(--mute);
  flex:0 0 auto;
}

.rail-list a:hover{
  background:var(--wash);
}

/* ---------- 页脚 ---------- */

.foot{
  margin-top:2.5rem;
  padding:3.2rem 1.25rem 2.6rem;
  border-top:1px solid var(--ink);
  background:var(--wash);
  text-align:center;
}

.foot-mark{
  margin:0 0 1.5rem;
}

.foot-mark a{
  display:inline-block;
  padding:.35rem .5rem;
  font-size:clamp(1.5rem,7vw,2.5rem);
  font-weight:600;
  letter-spacing:.3em;
  text-indent:.3em;
  text-decoration:none;
  color:var(--ink);
}

.foot-mark a:hover{
  background:var(--paper);
}

.foot-line{
  margin:.2rem 0;
  color:var(--mute);
  font-size:.85rem;
}

.foot-line small{
  display:inline-block;
  font-size:.85rem;
  letter-spacing:.08em;
}

.foot-line a{
  display:inline-block;
  min-height:44px;
  padding:.7rem .5rem;
  color:var(--mute);
  text-decoration:none;
  border-bottom:1px solid var(--rule);
}

.foot-line a:hover{
  color:var(--ink);
  border-bottom-color:var(--ink);
}

/* ---------- 滚动显现 ---------- */

html.js article > div:not(.hero){
  opacity:0;
  transform:translateY(14px);
}

html.js article > div.seen{
  opacity:1;
  transform:none;
}

/* ---------- 断点 ---------- */

@media (min-width:640px){
  .drawer > menu{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 0;
  }
  .drawer > menu li:nth-child(odd){
    border-right:1px solid var(--rule);
  }
  .drawer > menu a{
    padding-left:1.6rem;
  }
}

@media (min-width:900px){
  main{
    grid-template-columns:minmax(0,1fr) 250px;
    gap:3.5rem;
    padding-top:0;
  }

  .rail{
    order:0;
    align-self:start;
    position:sticky;
    top:132px;
    border-top:0;
    border-left:1px solid var(--rule);
    padding:2.4rem 0 2rem 1.5rem;
    max-height:calc(100vh - 160px);
    overflow-y:auto;
  }

  article > div:not(.hero):not(.body){
    padding:3rem 0 3.2rem;
  }

  .hero{
    min-height:72vh;
  }

  .drawer > menu{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }

  .drawer > menu li:nth-child(odd){
    border-right:0;
  }

  .drawer > menu li{
    border-right:1px solid var(--rule);
  }

  .drawer > menu li:last-child{
    border-right:0;
  }
}

@media (min-width:1040px){
  body{ font-size:17.5px; }
}

@media (max-width:420px){
  .hero-mark{ font-size:8.5rem; }
  .hero{ min-height:66vh; }
  main{ padding:0 1rem 1.5rem; }
  .foot{ padding:2.6rem 1rem 2rem; }
}

@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  html.js article > div:not(.hero){
    opacity:1;
    transform:none;
  }
}

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