@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{
  --brand:#6514ff;
  --hot:#bf00ff;
  --ink:#1c1726;
  --paper:#f6f1ff;
  --card:#ffffff;
  --tint:#ece2ff;
  --muted:#574d68;
  --line:rgba(28,23,38,.14);
  --r:10px;
  --max:1160px;
  --ease:220ms cubic-bezier(.2,.7,.3,1);
  --sans:'Noto Sans Arabic',-apple-system,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,sans-serif;
  --naskh:'Noto Naskh Arabic','Noto Sans Arabic',-apple-system,'PingFang SC','Microsoft YaHei',system-ui,sans-serif;
}

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

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

body{
  margin:0;
  min-height:100vh;
  font-family:var(--sans);
  font-size:17px;
  line-height:1.75;
  color:var(--ink);
  background:var(--paper);
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:-40px;
  z-index:0;
  pointer-events:none;
  background-image:
    repeating-linear-gradient(135deg,rgba(101,20,255,.07) 0 2px,transparent 2px 26px),
    radial-gradient(circle at 82% 8%,rgba(191,0,255,.14),transparent 46%);
  animation:drift 22s linear infinite;
}

img{max-width:100%;height:auto;display:block}
a{color:var(--brand);text-decoration:none;transition:color var(--ease),background var(--ease),border-color var(--ease)}
a:hover{color:var(--hot)}
p{margin:0 0 15px}
:focus-visible{outline:3px solid var(--hot);outline-offset:3px}

@keyframes drift{
  from{background-position:0 0,0 0}
  to{background-position:52px 52px,0 0}
}
@keyframes pop{
  0%,100%{transform:translateY(0) rotate(0)}
  50%{transform:translateY(-7px) rotate(-1.5deg)}
}

/* ---------- 头部：两行，品牌独占上行 ---------- */
.top{
  position:sticky;
  top:0;
  z-index:60;
  background:rgba(246,241,255,.94);
  backdrop-filter:blur(10px);
  border-bottom:2px solid var(--ink);
}

.bar{
  max-width:var(--max);
  margin:0 auto;
  padding:12px 20px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  min-height:44px;
  font-family:var(--naskh);
  font-weight:700;
  font-size:22px;
  letter-spacing:.02em;
  color:var(--ink);
}
.brand:hover{color:var(--brand)}
.mark{
  width:24px;
  height:24px;
  border-radius:6px;
  background:linear-gradient(135deg,var(--brand),var(--hot));
  box-shadow:4px 4px 0 var(--ink);
  transform:rotate(45deg);
  flex:none;
}

.call{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 18px;
  border:2px solid var(--ink);
  border-radius:999px;
  background:var(--card);
  color:var(--ink);
  font-weight:700;
  font-size:16px;
}
.call:hover{background:var(--hot);border-color:var(--hot);color:#fff}

.menurow{background:var(--ink)}

.menu{
  max-width:var(--max);
  margin:0 auto;
  padding:0 20px;
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:2px 6px;
}

.menu .solo,
.menu summary{
  display:inline-flex;
  align-items:center;
  min-height:46px;
  padding:0 14px;
  border:0;
  background:none;
  color:#fff;
  font-family:inherit;
  font-size:16px;
  font-weight:600;
  cursor:pointer;
  transition:background var(--ease),color var(--ease);
}
.menu .solo:hover,
.menu summary:hover,
.menu details[open] > summary{background:var(--brand);color:#fff}

.grp{position:relative}
.grp summary{list-style:none}
.grp summary::-webkit-details-marker{display:none}
.menu summary::after{content:"+";margin-left:9px;color:var(--hot);font-weight:700}
.menu details[open] summary::after{content:"–"}

.panel{
  position:absolute;
  top:100%;
  left:0;
  min-width:186px;
  padding:8px;
  display:grid;
  gap:2px;
  background:var(--card);
  border:2px solid var(--ink);
  border-bottom:6px solid var(--hot);
  border-radius:var(--r);
  box-shadow:9px 9px 0 rgba(28,23,38,.16);
  z-index:70;
}
.panel a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 12px;
  border-radius:8px;
  color:var(--ink);
  font-weight:600;
  font-size:16px;
}
.panel a:hover{background:var(--tint);color:var(--brand)}

/* ---------- 主视觉：纯文字超大标题 ---------- */
.hero{
  position:relative;
  overflow:hidden;
  min-height:45vh;
  display:grid;
  place-items:center;
  padding:40px 20px 48px;
  text-align:center;
  background:linear-gradient(160deg,#ffffff 12%,var(--tint));
  border-bottom:2px solid var(--ink);
}

.hero-inner{position:relative;z-index:3;max-width:900px}

.tags{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin:0 0 20px;
  padding:0;
}
.tag{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 15px;
  border:2px solid var(--ink);
  border-radius:999px;
  background:var(--card);
  color:var(--ink);
  font-weight:600;
  font-size:16px;
  box-shadow:3px 3px 0 var(--hot);
}
.tag:hover{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:3px 3px 0 var(--ink)}

.hero h1{
  font-family:var(--naskh);
  font-size:clamp(2.1rem,6.4vw,4.4rem);
  line-height:1.14;
  letter-spacing:-.01em;
  margin:0 auto 8px;
  max-width:18ch;
}
.hero h1::after{
  content:"";
  display:block;
  width:88px;
  height:9px;
  margin:18px auto 16px;
  border-radius:5px;
  background:linear-gradient(90deg,var(--brand),var(--hot));
}
.lede{
  max-width:60ch;
  margin:0 auto;
  color:var(--muted);
  font-size:16px;
}

.flare{position:absolute;inset:0;z-index:1;will-change:transform}
.flare i{position:absolute;display:block;border-radius:16px;opacity:.9}
.flare i:nth-child(1){width:150px;height:150px;top:-42px;left:-38px;background:var(--brand);transform:rotate(16deg)}
.flare i:nth-child(2){width:96px;height:96px;top:22%;right:-28px;background:var(--hot);transform:rotate(-12deg)}
.flare i:nth-child(3){width:66px;height:66px;bottom:12%;left:8%;background:var(--ink);transform:rotate(24deg);opacity:.85}
.flare i:nth-child(4){width:38px;height:38px;bottom:24%;right:16%;background:linear-gradient(135deg,var(--brand),var(--hot));transform:rotate(45deg)}

/* ---------- 版心：左栏 + 马赛克 + 正文 ---------- */
.board{
  position:relative;
  z-index:2;
  max-width:var(--max);
  margin:0 auto;
  padding:48px 20px 56px;
  display:grid;
  grid-template-columns:266px minmax(0,1fr);
  gap:48px;
}

.rail{
  grid-row:1 / span 2;
  align-self:start;
  position:sticky;
  top:118px;
  padding:20px 18px 22px;
  background:var(--card);
  border-radius:var(--r);
  border-bottom:5px solid var(--brand);
  box-shadow:0 20px 44px -30px rgba(28,23,38,.75);
}
.rail h2{
  font-family:var(--naskh);
  font-size:20px;
  line-height:1.4;
  margin:0 0 4px;
}
.subtitle{
  margin:0 0 14px;
  padding-bottom:12px;
  border-bottom:1px dashed var(--line);
  color:var(--muted);
  font-size:16px;
  line-height:1.6;
}
.rail-links{display:grid;gap:2px}
.rail-links a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:0 10px;
  border-left:3px solid transparent;
  border-radius:8px;
  color:var(--ink);
  font-weight:600;
  font-size:16px;
}
.rail-links a:hover{background:var(--tint);border-left-color:var(--hot);color:var(--brand)}

.mosaic{grid-column:2;margin:0;display:grid;gap:10px}
.mosaic-art{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;height:112px}
.mosaic-art span{border-radius:var(--r);background:var(--brand);animation:pop 7s ease-in-out infinite}
.mosaic-art span:nth-child(2){background:var(--hot);animation-delay:.6s}
.mosaic-art span:nth-child(3){background:var(--ink);animation-delay:1.2s}
.mosaic-art span:nth-child(4){background:linear-gradient(160deg,var(--hot),var(--brand));animation-delay:1.8s}
.mosaic figcaption{
  font-size:16px;
  letter-spacing:.16em;
  color:var(--muted);
}

.sheet{grid-column:2;min-width:0;font-size:17px}
.sheet > *{max-width:100%}
.sheet article,
.sheet > article{
  padding:34px 0 12px;
  border-top:3px solid var(--line);
  scroll-margin-top:126px;
}
.sheet > article:first-child{border-top:0;padding-top:4px}

.sheet h2{
  position:relative;
  font-family:var(--naskh);
  font-size:clamp(1.5rem,3.3vw,2.05rem);
  line-height:1.32;
  margin:0 0 14px;
  padding-left:18px;
  scroll-margin-top:126px;
}
.sheet h2::before{
  content:"";
  position:absolute;
  left:0;
  top:.34em;
  width:9px;
  height:1.05em;
  border-radius:4px;
  background:var(--hot);
}
.sheet h3{
  font-family:var(--naskh);
  font-size:1.22rem;
  line-height:1.4;
  margin:26px 0 8px;
}
.sheet p{max-width:70ch}
.sheet ul,
.sheet ol{max-width:70ch;margin:0 0 16px;padding-left:1.35em}
.sheet li{margin:0 0 9px}
.sheet li::marker{color:var(--hot)}
.sheet strong{color:var(--brand)}
.sheet a{border-bottom:2px solid rgba(101,20,255,.3)}
.sheet a:hover{border-bottom-color:var(--hot)}
.sheet blockquote{
  margin:20px 0;
  padding:14px 20px;
  background:var(--card);
  border-left:6px solid var(--brand);
  border-radius:var(--r);
  color:var(--muted);
}
.sheet blockquote p:last-child{margin-bottom:0}
.sheet table{width:100%;border-collapse:collapse;margin:18px 0;font-size:16px}
.sheet th,
.sheet td{border:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top}
.sheet th{background:var(--tint);font-weight:700}
.sheet code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:15px;
  background:var(--tint);
  padding:2px 6px;
  border-radius:6px;
}
.sheet figure{margin:20px 0}
.sheet figure img{border-radius:var(--r)}

/* ---------- 页脚 ---------- */
.foot{
  position:relative;
  z-index:2;
  margin-top:40px;
  padding:44px 20px 28px;
  background:var(--ink);
  color:#efe9ff;
  border-top:6px solid var(--hot);
}
.foot-brand{
  max-width:var(--max);
  margin:0 auto 30px;
  text-align:center;
  font-family:var(--naskh);
  font-weight:700;
  font-size:clamp(2.5rem,11vw,6.2rem);
  line-height:1;
  letter-spacing:-.02em;
  color:var(--hot);
  text-shadow:4px 4px 0 rgba(101,20,255,.5);
}
.foot-cols{
  max-width:var(--max);
  margin:0 auto 26px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:28px;
}
.foot dl{margin:0}
.foot dt{
  margin:0 0 10px;
  font-size:16px;
  font-weight:700;
  letter-spacing:.16em;
  color:var(--hot);
}
.foot dd{margin:0;color:#c9c0e2;font-size:16px;word-break:break-all}
.foot dd a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  color:#efe9ff;
  font-size:16px;
}
.foot dd a:hover{color:var(--hot);text-decoration:underline}
.copy{
  max-width:var(--max);
  margin:0 auto;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,.18);
  text-align:center;
  font-size:16px;
  color:#a99fc4;
}

.totop{
  position:fixed;
  right:14px;
  bottom:16px;
  z-index:80;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 15px;
  border-radius:999px;
  background:var(--ink);
  color:#fff;
  font-size:16px;
  font-weight:700;
  box-shadow:0 12px 26px -14px #000;
}
.totop:hover{background:var(--hot);color:#fff}

/* ---------- 窄屏 ---------- */
@media (max-width:880px){
  .top{position:static}
  .menu{padding:6px 14px 10px;gap:2px 4px}
  .menu .solo,
  .menu summary{min-height:44px;padding:0 11px}
  .grp{position:static}
  .panel{position:static;margin:6px 0 10px;box-shadow:none}

  .board{
    grid-template-columns:1fr;
    gap:30px;
    padding:32px 18px 44px;
  }
  .rail{grid-row:auto;position:static}
  .mosaic,
  .sheet{grid-column:1}
  .mosaic-art{height:92px}
  .sheet > article{padding-top:28px}
  .foot-cols{grid-template-columns:1fr;gap:16px}
  .foot-brand{margin-bottom:22px}
}

@media (max-width:420px){
  .brand{font-size:20px}
  .hero{padding:34px 16px 40px}
  .tag{box-shadow:2px 2px 0 var(--hot)}
  .rail{padding:16px 14px 18px}
  .totop{right:10px;bottom:12px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  body::before,
  .mosaic-art span{animation:none}
  *{transition-duration:1ms}
}

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