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

:root{
  --navy:#1F2A44;
  --navy-d:#16203A;
  --red:#E0483C;
  --red-d:#C13A2F;
  --cream:#F5F1E8;
  --ink:#2A3550;
  --wrap:1180px;
  --pad:clamp(16px,4vw,40px);
}

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

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

body{
  margin:0;
  background:var(--cream);
  color:var(--navy);
  font-family:'Noto Sans Arabic','Noto Naskh Arabic',system-ui,-apple-system,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.75;
  letter-spacing:.01em;
  -webkit-font-smoothing:antialiased;
}

h1,h2,h3,h4{line-height:1.28;font-weight:700;letter-spacing:-.01em}
p{margin:0 0 1em}
a{color:var(--navy)}
img,svg{max-width:100%}
ul,ol{padding-left:1.2em}
hr{border:0;height:0;margin:0}
a:focus-visible{outline:3px solid var(--red);outline-offset:2px}

/* 顶部细条 */
.strip{background:var(--navy);color:var(--cream)}
.strip-inner{
  max-width:var(--wrap);
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 var(--pad);
}
.strip-brand{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:15px;
  font-weight:700;
  letter-spacing:.2em;
}
.strip-dot{width:6px;height:6px;background:var(--red);flex:none}
.strip-top{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 2px;
  color:var(--cream);
  font-size:15px;
  text-decoration:none;
  transition:color .16s ease;
}
.strip-top:hover{color:#F3B9B2}

/* 吸顶菜单条 */
.masthead{
  position:sticky;
  top:0;
  z-index:40;
  background:var(--cream);
  border-bottom:3px solid var(--navy);
}
.menu{
  max-width:var(--wrap);
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:10px;
  padding:8px var(--pad);
}
.menu-side{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:2px;
  list-style:none;
  margin:0;
  padding:0;
}
.menu-left{justify-content:flex-start}
.menu-right{justify-content:flex-end}
.menu-side a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:0 10px;
  font-size:16px;
  font-weight:500;
  text-decoration:none;
  border-bottom:3px solid transparent;
  transition:color .16s ease,border-color .16s ease;
}
.menu-side a::before{
  content:"";
  width:8px;
  height:8px;
  flex:none;
  background:var(--red);
  transition:transform .16s ease,background .16s ease;
}
.menu-side a:hover,
.menu-side a:focus-visible{color:var(--red-d);border-bottom-color:var(--red)}
.menu-side a:hover::before{transform:rotate(45deg);background:var(--navy)}

.brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:0 14px;
  border:2px solid var(--navy);
  border-radius:4px;
  font-size:19px;
  font-weight:700;
  letter-spacing:.1em;
  text-decoration:none;
  transition:background .18s ease,color .18s ease;
}
.brand-mark{width:12px;height:12px;flex:none;background:var(--red);border:2px solid var(--navy)}
.brand:hover{background:var(--navy);color:var(--cream)}

/* 主体双栏 */
.stage{
  display:grid;
  grid-template-columns:minmax(0,1fr) 264px;
  gap:clamp(20px,3.5vw,44px);
  max-width:var(--wrap);
  margin:0 auto;
  padding:clamp(22px,3.5vw,40px) var(--pad) clamp(44px,6vw,72px);
  align-items:start;
}

.hero{
  grid-column:1 / -1;
  grid-row:1;
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:clamp(20px,4vw,40px);
  align-items:center;
  min-height:70vh;
  padding:clamp(24px,5vh,56px) 0 clamp(26px,4vh,48px);
  border-bottom:3px solid var(--navy);
}
.hero h1{margin:0 0 16px;font-size:clamp(28px,4.6vw,50px)}
.hero hr{width:72px;height:7px;background:var(--red);margin:0 0 18px}
.hero-lead{margin:0;max-width:36em;color:var(--ink)}

.hero-art{
  margin:0;
  border:3px solid var(--navy);
  border-bottom-width:8px;
  border-bottom-color:var(--red);
  border-radius:4px;
  overflow:hidden;
  background:var(--navy);
}
.hero-art svg{display:block;width:100%;height:auto;transition:transform .18s ease}

/* 正文区块 */
.stage > div[id]{
  grid-column:1;
  padding-bottom:clamp(22px,3.5vw,38px);
  margin-bottom:clamp(22px,3.5vw,38px);
  border-bottom:2px solid rgba(31,42,68,.18);
  scroll-margin-top:96px;
}
.stage > div[id] h2{
  font-size:clamp(22px,2.6vw,30px);
  margin:0 0 10px;
}
.stage > div[id] h2 + hr{
  width:56px;
  height:6px;
  background:var(--red);
  margin:0 0 18px;
}
.stage > div[id] h3{
  font-size:19px;
  margin:1.6em 0 .5em;
  color:var(--navy-d);
}
.stage > div[id] h3 + hr{
  width:40px;
  height:4px;
  background:var(--navy);
  margin:0 0 12px;
}
.stage > div[id] a{
  color:var(--red-d);
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}
.stage > div[id] a:hover{color:var(--navy)}
.stage > div[id] ul,
.stage > div[id] ol{margin:0 0 1.1em}
.stage > div[id] li{margin:0 0 .4em}
.stage > div[id] figure{
  margin:1.2em 0;
  padding:0 0 6px;
  border-bottom:6px solid var(--red);
  border-radius:4px;
  overflow:hidden;
}
.stage > div[id] img{
  display:block;
  width:100%;
  height:auto;
  border:2px solid var(--navy);
  border-radius:4px;
}
.stage > div[id] blockquote{
  margin:1.2em 0;
  padding:12px 16px;
  border-left:6px solid var(--red);
  background:rgba(31,42,68,.06);
}
.stage > div[id] table{
  width:100%;
  border-collapse:collapse;
  margin:0 0 1.2em;
}
.stage > div[id] td,
.stage > div[id] th{
  border:2px solid var(--navy);
  padding:8px 10px;
  text-align:left;
}
.stage > div[id] code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.94em;
  border-bottom:2px solid var(--red);
}

/* 右侧栏 */
.rail{grid-column:2;grid-row:2 / span 40}
.rail-box{
  border:2px solid var(--navy);
  border-bottom-width:8px;
  border-bottom-color:var(--red);
  border-radius:4px;
  padding:14px 16px 16px;
}
.rail-box h2{
  margin:0 0 8px;
  font-size:16px;
  letter-spacing:.18em;
}
.rail-box h2 + hr{
  width:100%;
  height:2px;
  background:var(--navy);
  margin:0 0 10px;
}
.rail-list{list-style:none;margin:0 0 8px;padding:0}
.rail-list a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:2px 0;
  font-size:16px;
  text-decoration:none;
  border-bottom:1px solid rgba(31,42,68,.16);
  transition:color .16s ease;
}
.rail-list a:hover{color:var(--red-d)}
.rail-top{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:15px;
  font-weight:700;
  text-decoration:none;
  color:var(--red-d);
}

/* 页脚 */
.foot{
  background:var(--navy);
  color:var(--cream);
  border-top:8px solid var(--red);
  padding:clamp(26px,4vw,48px) var(--pad) 18px;
}
.foot-inner{
  max-width:var(--wrap);
  margin:0 auto;
  display:grid;
  grid-template-columns:1.5fr 1fr 1fr;
  gap:clamp(20px,4vw,40px);
}
.foot dl{margin:0}
.foot dt{
  margin:0 0 10px;
  padding-bottom:8px;
  font-size:15px;
  font-weight:700;
  letter-spacing:.2em;
  color:var(--cream);
  border-bottom:2px solid var(--red);
}
.foot dd{margin:0 0 6px;font-size:16px;color:#DBD5C8}
.foot-name{font-size:19px;font-weight:700;letter-spacing:.08em;color:var(--cream)}
.foot-desc{max-width:26em;line-height:1.7}
.foot ul{list-style:none;margin:0;padding:0}
.foot a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 2px;
  font-size:16px;
  color:var(--cream);
  text-decoration:none;
  transition:color .16s ease;
}
.foot a:hover{color:#F3B9B2}
.foot-base{
  max-width:var(--wrap);
  margin:clamp(18px,3vw,30px) auto 0;
  padding-top:14px;
  border-top:1px solid rgba(245,241,232,.24);
  text-align:center;
  font-size:15px;
  color:#C7C1B4;
}
.foot-base p{margin:0}

@media(max-width:880px){
  .masthead{position:static}
  .menu{grid-template-columns:minmax(0,1fr);justify-items:center;gap:4px;padding:10px var(--pad)}
  .menu-left,.menu-right{justify-content:center}
  .menu-side a{padding:0 8px;font-size:16px}
  .stage{grid-template-columns:minmax(0,1fr);padding-top:0}
  .hero{grid-template-columns:minmax(0,1fr);min-height:0;padding-top:20px}
  .hero h1{font-size:clamp(26px,8vw,36px)}
  .stage > div[id]{scroll-margin-top:20px}
  .rail{grid-column:1;grid-row:auto;position:static}
  .foot-inner{grid-template-columns:minmax(0,1fr)}
}

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

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