:root {
  --green: #1F6F5C;
  --green-d: #14332A;
  --amber: #F2B705;
  --paper: #F5F1E8;
  --card: #FBFAF5;
  --ink: #14261F;
  --body-ink: #26362E;
  --muted: #54655C;
  --line: #DDD3BF;
  --sans: 'Noto Sans Arabic', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --serif: 'Noto Naskh Arabic', 'Songti SC', 'Noto Serif SC', Georgia, serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--body-ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
}

img { max-width: 100%; display: block; }
p { margin: 0 0 1em; }
a { color: var(--green); }

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.28;
  margin: 0 0 0.55em;
  color: var(--ink);
}

h1 { font-size: clamp(31px, 7.4vw, 56px); }
h2 { font-size: clamp(23px, 3.6vw, 32px); }
h3 { font-size: 21px; color: var(--green); }

small {
  display: inline-block;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
  padding: 4px 11px;
  border-radius: 4px;
  background: #E7DFCC;
  color: var(--green-d);
}

[hidden] { display: none !important; }
section[id] { scroll-margin-top: 26px; }

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

/* 顶部大图 */
.hero {
  position: relative;
  min-height: 68vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-color: var(--green-d);
  background-image: radial-gradient(var(--green) 1.6px, transparent 1.7px);
  background-size: 20px 20px;
  border-bottom: 6px solid var(--amber);
}

.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-mask { position: absolute; inset: 0; background: rgba(20, 38, 31, 0.56); }

.hero-in {
  position: relative;
  z-index: 2;
  max-width: 880px;
  padding: 28px 20px;
  text-align: center;
}

.hero-tag {
  background: var(--amber);
  color: var(--ink);
}

.hero-in h1 {
  margin: 16px 0 0;
  color: #FAF7EF;
}

/* 版面骨架 */
.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 30px 0 34px;
}

@media (min-width: 940px) {
  .cols {
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 34px;
    padding: 40px 0 44px;
  }
}

/* 左侧栏 */
.rail {
  background: var(--green);
  color: var(--paper);
  border-radius: 28px;
  padding: 20px 18px;
}

.rail small {
  background: var(--amber);
  color: var(--ink);
}

.rail-h {
  font-size: 22px;
  color: #F8F5EC;
  margin: 0.45em 0 0.7em;
}

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

.rail-list li + li { border-top: 1px solid rgba(245, 241, 232, 0.22); }

.rail-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 2px;
  font-size: 16px;
  color: #F1ECE0;
  text-decoration: none;
  transition: color 160ms ease;
}

.rail-list a::before {
  counter-increment: rail;
  content: counter(rail, decimal-leading-zero);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  color: rgba(242, 183, 5, 0.9);
}

.rail-list a:hover { color: var(--amber); }

.rail-top { margin: 18px 0 0; }

.rail-top a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 4px;
  background: var(--amber);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease;
}

.rail-top a:hover { background: #FFD24A; }

@media (min-width: 940px) {
  .rail {
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc(100vh - 140px);
    overflow: auto;
  }
}

/* 正文 */
.prose {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 14px 30px -26px rgba(31, 111, 92, 0.85);
}

@media (min-width: 720px) {
  .prose { padding: 34px 38px; }
}

.prose > section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.prose > section:first-child { border-top: 0; padding-top: 0; }
.prose > section:last-child { padding-bottom: 0; }

.prose h2 {
  border-left: 8px solid var(--amber);
  padding-left: 14px;
  margin-top: 0;
}

.prose h2 + p { margin-top: 0.9em; }
.prose p { color: var(--body-ink); }
.prose strong { color: var(--green); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.4em 0; }
.prose img { border-radius: 20px; margin: 1em 0; }
.prose a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

.prose blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  background: #EDE7D8;
  border-left: 6px solid var(--green);
  border-radius: 0 14px 14px 0;
}

.prose blockquote p:last-child { margin: 0; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
}

.prose th { background: #EDE7D8; }

.prose hr {
  border: 0;
  border-top: 2px dashed var(--line);
  margin: 1.8em 0;
}

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 22px;
  margin: 0 0 30px;
  padding: 16px 20px;
  border-radius: 28px;
  background: var(--green-d);
  color: var(--paper);
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.foot-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 4px;
  background: var(--amber);
  color: var(--ink);
}

.foot-nav { min-width: 0; }

.foot-nav dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  margin: 0;
}

.foot-nav dt {
  font-size: 16px;
  font-weight: 700;
  color: var(--amber);
}

.foot-nav dt::after {
  content: "·";
  margin-left: 6px;
  color: rgba(245, 241, 232, 0.6);
}

.foot-nav dd { margin: 0; }

.foot-nav dd a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 4px;
  color: #F1ECE0;
  font-size: 16px;
  text-decoration: none;
  transition: color 160ms ease;
}

.foot-nav dd a:hover { color: var(--amber); }

.foot-copy {
  margin: 0;
  font-size: 16px;
  color: rgba(245, 241, 232, 0.8);
}

/* 底部固定导航 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: var(--green-d);
  border-top: 3px solid var(--amber);
}

.dock-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: var(--amber);
  color: var(--ink);
}

.dock-scroll {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dock-scroll::-webkit-scrollbar { display: none; }

.dock-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 4px;
  color: #EFEAE0;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease;
}

.dock-link:hover { background: rgba(245, 241, 232, 0.14); }

.dock-link.is-contact {
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
}

.dock-btn {
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid rgba(245, 241, 232, 0.5);
  border-radius: 4px;
  background: transparent;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease;
}

.dock-btn:hover { background: rgba(245, 241, 232, 0.16); }

/* 菜单面板 */
.dock-panel {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(74px + env(safe-area-inset-bottom));
  z-index: 59;
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  padding: 18px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 16px;
}

.grp small {
  display: block;
  padding: 0;
  background: none;
  color: var(--green);
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.grp ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.grp a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  transition: background 160ms ease;
}

.grp a:hover { background: #E7DFCC; }

/* 动效 */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 380ms ease, transform 380ms ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.rail-list li a { transition: color 160ms ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 1ms !important; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .prose { padding: 18px 16px; border-radius: 22px; }
  .hero { min-height: 62vh; }
  .foot { border-radius: 22px; }
}

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