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

:root{
  --ink:#000000;
  --blue:#3bb1ff;
  --red:#ff5252;
  --paper:#fffdf3;
  --card:#ffffff;
  --edge:3px solid #000000;
  --shadow:6px 6px 0 #000000;
  --head:150px;
}

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

html{
  scroll-behavior:smooth;
  scroll-padding-top:var(--head);
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Figtree','Noto Sans','PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,sans-serif;
  font-size:17px;
  line-height:1.75;
  font-weight:500;
}

a{color:var(--ink);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}

:focus-visible{outline:3px solid var(--red);outline-offset:2px}

.is-hidden{display:none!important}

/* ---------- 头部：品牌独占一行，菜单行在下 ---------- */

.masthead{
  position:sticky;
  top:0;
  z-index:40;
  background:var(--paper);
  border-bottom:var(--edge);
}

.masthead__brand{
  display:flex;
  align-items:center;
  padding:10px 18px 8px;
}

.brandmark{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  text-decoration:none;
  background:none;
}
.brandmark:hover{background:none}

.brandmark__pic{
  display:block;
  width:38px;
  height:38px;
  object-fit:cover;
  border:var(--edge);
  border-radius:6px;
  background:var(--blue);
}

.brandmark__name{
  display:inline-block;
  padding:2px 10px;
  border:var(--edge);
  border-radius:6px;
  background:var(--card);
  box-shadow:4px 4px 0 #000000;
  font-size:clamp(1.2rem,3.4vw,1.55rem);
  font-weight:700;
  letter-spacing:.04em;
  line-height:1.5;
}
.brandmark:hover .brandmark__name{background:var(--blue)}

.masthead__bar{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:0 18px 10px;
}

.drawer{position:relative;flex:1 1 auto}

.drawer__toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:44px;
  padding:0 14px;
  border:var(--edge);
  border-radius:6px;
  background:var(--blue);
  color:var(--ink);
  font-weight:700;
  font-size:1rem;
  letter-spacing:.14em;
  box-shadow:4px 4px 0 #000000;
  cursor:pointer;
  list-style:none;
}
.drawer__toggle::-webkit-details-marker{display:none}
.drawer__toggle::after{content:"＋";font-size:1.1rem;line-height:1;letter-spacing:0}
.drawer[open] .drawer__toggle::after{content:"－"}

.drawer__menu{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 12px);
  margin:0;
  padding:10px;
  list-style:none;
  counter-reset:mn;
  display:grid;
  gap:6px;
  max-height:64vh;
  overflow:auto;
  border:var(--edge);
  border-radius:10px;
  background:rgba(255,255,255,.78);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  box-shadow:8px 8px 0 #000000;
}

.drawer__menu li{
  counter-increment:mn;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 10px;
  border:var(--edge);
  border-radius:6px;
  background:var(--paper);
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.drawer__menu li::before{
  content:counter(mn,decimal-leading-zero);
  flex:0 0 auto;
  padding:1px 6px;
  border:2px solid #000000;
  border-radius:4px;
  background:var(--red);
  color:#ffffff;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
}
.drawer__menu li:hover{transform:translate(-2px,-2px);box-shadow:3px 3px 0 #000000;background:var(--card)}
.drawer__menu a{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  min-height:44px;
  text-decoration:none;
  font-weight:600;
}
.drawer__menu a:hover{background:none}

.finder{flex:0 0 210px}
.finder__input{
  width:100%;
  min-height:44px;
  padding:0 12px;
  border:var(--edge);
  border-radius:6px;
  background:var(--card);
  color:var(--ink);
  font:inherit;
  box-shadow:4px 4px 0 #000000;
  -webkit-appearance:none;
  appearance:none;
}

/* ---------- 主区：左侧栏 + 右侧正文 ---------- */

.sheet{
  display:grid;
  grid-template-columns:232px minmax(0,1fr);
  align-items:start;
  max-width:1240px;
  margin:0 auto;
}

.hero{
  grid-column:1 / -1;
  min-height:70vh;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  text-align:right;
  padding:56px clamp(22px,6vw,80px);
  border-bottom:var(--edge);
}

.hero__title{
  margin:0;
  max-width:15em;
  font-size:clamp(2.05rem,7.6vw,4.6rem);
  line-height:1.06;
  font-weight:700;
  letter-spacing:-.03em;
}

.hero__sub{
  margin:24px 0 0;
  max-width:42ch;
  font-size:clamp(1rem,2.1vw,1.12rem);
  line-height:1.65;
  font-weight:500;
}

.rail{
  grid-column:1;
  grid-row:2 / -1;
  align-self:start;
  position:sticky;
  top:calc(var(--head) + 12px);
  padding:26px 16px 40px 20px;
}

.rail__title{
  margin:0 0 14px;
  font-size:.9rem;
  font-weight:700;
  letter-spacing:.22em;
}
.rail__title > span{
  display:inline-block;
  padding:2px 10px;
  border:var(--edge);
  border-radius:6px;
  background:var(--red);
  color:#ffffff;
  box-shadow:3px 3px 0 #000000;
}

.rail__menu{
  list-style:none;
  margin:0 0 18px;
  padding:0;
  display:grid;
  gap:6px;
}
.rail__menu a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:6px 10px;
  border:var(--edge);
  border-radius:6px;
  background:var(--card);
  box-shadow:3px 3px 0 #000000;
  font-size:.94rem;
  font-weight:600;
  text-decoration:none;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.rail__menu a:hover{transform:translate(-2px,-2px);box-shadow:5px 5px 0 #000000;background:var(--blue)}

.rail__up{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 12px;
  border:var(--edge);
  border-radius:6px;
  background:var(--blue);
  box-shadow:3px 3px 0 #000000;
  font-weight:700;
  font-size:.9rem;
  text-decoration:none;
}
.rail__up:hover{background:var(--card)}

.sheet > section[id]{
  grid-column:2;
  min-width:0;
  padding:36px clamp(20px,3.2vw,40px) 44px;
  border-top:var(--edge);
  scroll-margin-top:var(--head);
}
.sheet > section[id]:first-of-type{border-top:0}

.sheet h2{
  margin:0 0 18px;
  font-size:clamp(1.32rem,3.2vw,1.85rem);
  line-height:1.3;
  font-weight:700;
  letter-spacing:-.01em;
}
.sheet h2 > span{
  display:inline-block;
  padding:3px 12px;
  border:var(--edge);
  border-radius:8px;
  background:var(--blue);
  box-shadow:4px 4px 0 #000000;
}

.sheet h3{
  margin:28px 0 10px;
  font-size:1.1rem;
  line-height:1.4;
  font-weight:700;
}
.sheet h3 > span{
  display:inline-block;
  padding-bottom:1px;
  border-bottom:3px solid var(--red);
}

.sheet p{margin:0 0 16px}
.sheet ul,.sheet ol{margin:0 0 18px;padding-left:1.25em}
.sheet li{margin:6px 0}
.sheet strong{font-weight:700;background:#ffeeb0;box-shadow:0 2px 0 #000000}
.sheet img{max-width:100%;height:auto;border:var(--edge);border-radius:8px}
.sheet blockquote{
  margin:22px 0;
  padding:16px 18px;
  border:var(--edge);
  border-left-width:12px;
  border-radius:10px;
  background:rgba(255,255,255,.72);
  -webkit-backdrop-filter:blur(4px);
  backdrop-filter:blur(4px);
  box-shadow:5px 5px 0 #000000;
}
.sheet blockquote p:last-child{margin-bottom:0}

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

.colophon{
  border-top:var(--edge);
  background:#000000;
  color:#ffffff;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:4px 28px;
  padding:20px 18px 28px;
  text-align:center;
}
.colophon section{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:6px 18px;
  min-height:40px;
}
.colophon__copy{font-size:.9rem;letter-spacing:.08em}
.colophon a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 6px;
  color:#ffffff;
  font-size:.9rem;
  font-weight:700;
  text-decoration:none;
}
.colophon a:hover{background:var(--blue);color:#000000}

/* ---------- 窄屏 ---------- */

@media (max-width:840px){
  :root{--head:0px}
  .masthead{position:static}
  .masthead__bar{flex-wrap:wrap;padding-bottom:12px}
  .finder{flex:1 1 100%}
  .sheet{grid-template-columns:minmax(0,1fr)}
  .hero{padding:44px 20px}
  .hero__title{max-width:none;font-size:clamp(1.95rem,8.4vw,2.9rem)}
  .rail{
    grid-column:1;
    grid-row:auto;
    position:static;
    padding:24px 20px 20px;
    border-bottom:var(--edge);
  }
  .rail__menu{grid-template-columns:1fr 1fr;display:grid}
  .sheet > section[id]{grid-column:1;padding:30px 20px 36px}
}

@media (max-width:420px){
  .rail__menu{grid-template-columns:minmax(0,1fr)}
}

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

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