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

:root {
  --mint: #b4fde1;
  --mint-2: #ddfef2;
  --sky: #add8e6;
  --sky-2: #e2f4fa;
  --ink: #172620;
  --ink-soft: #2f4a3e;
  --paper: #f3fbf7;
  --glass: rgba(255, 255, 255, 0.58);
  --shadow-out: 6px 7px 0 rgba(23, 38, 32, 0.18);
  --shadow-in: inset -3px -3px 9px rgba(23, 38, 32, 0.13);
  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  margin: 0;
  font-family: "Noto Sans Hebrew", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 520px at 92% -12%, var(--sky) 0%, rgba(173, 216, 230, 0) 62%),
    radial-gradient(820px 460px at -12% 14%, var(--mint) 0%, rgba(180, 253, 225, 0) 58%),
    radial-gradient(700px 500px at 50% 110%, var(--sky-2) 0%, rgba(226, 244, 250, 0) 60%);
  background-attachment: fixed;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

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

/* ---------- 顶栏 ---------- */
.top { padding: 14px 16px 0; }

.bar {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: linear-gradient(150deg, var(--mint) 0%, var(--mint-2) 60%, #ffffff 100%);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow-in), var(--shadow-out);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 16px;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 8px;
  background: var(--sky);
  border: 3px solid var(--ink);
  box-shadow: inset -2px -2px 0 rgba(23, 38, 32, 0.2), 2px 2px 0 rgba(23, 38, 32, 0.2);
}

.drawer { position: relative; }

.drawer-sum {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  font-size: 1rem;
  font-weight: 700;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--sky);
  box-shadow: inset -2px -2px 7px rgba(23, 38, 32, 0.16), 3px 4px 0 rgba(23, 38, 32, 0.2);
  transition: transform 0.2s var(--ease);
}

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

.drawer-sum::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--ink);
  transition: transform 0.2s ease-out;
}

.drawer[open] .drawer-sum { transform: translateY(2px); }
.drawer[open] .drawer-sum::after { transform: rotate(180deg); }

.drawer-list {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 60;
  width: min(80vw, 300px);
  margin: 0;
  padding: 10px;
  list-style: none;
  background: #ffffff;
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 9px 0 rgba(23, 38, 32, 0.16);
}

.drawer-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 1rem;
  transition: background 0.18s ease-out, transform 0.18s var(--ease);
}

.drawer-list a:hover,
.drawer-list a:focus-visible {
  background: var(--mint);
  transform: translateX(-2px);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sky);
  border: 2px solid var(--ink);
  flex: 0 0 auto;
}

/* ---------- 粘性锚点条 ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 40;
  margin-top: 14px;
  padding: 9px 0;
  background: rgba(243, 251, 247, 0.92);
  backdrop-filter: blur(10px);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

.rail-list {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  gap: 9px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.rail-list::-webkit-scrollbar { display: none; }

.rail-list a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 500;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: inset -2px -2px 6px rgba(23, 38, 32, 0.1);
  transition: background 0.18s ease-out, transform 0.18s var(--ease);
}

.rail-list a:hover,
.rail-list a.on {
  background: var(--mint);
  transform: translateY(-2px);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 54px 20px 80px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 34px;
  left: 6%;
  width: 132px;
  height: 132px;
  border-radius: 42% 58% 55% 45%;
  background: var(--sky);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-in), 5px 6px 0 rgba(23, 38, 32, 0.16);
  opacity: 0.9;
}

.hero::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -66px;
  height: 150px;
  background: linear-gradient(100deg, var(--mint) 0%, var(--sky) 100%);
  border-top: 3px solid var(--ink);
  transform: skewY(-4deg);
  z-index: 0;
}

.hero-in {
  position: relative;
  z-index: 1;
  max-width: 780px;
  text-align: right;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.05rem, 7.2vw, 4.3rem);
  line-height: 1.13;
  letter-spacing: -0.02em;
  text-shadow: 4px 4px 0 var(--sky);
}

.lead {
  margin: 0 0 26px;
  font-size: 1.04rem;
  line-height: 1.78;
  color: var(--ink-soft);
}

.jump {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 700;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--mint);
  box-shadow: inset -3px -3px 8px rgba(23, 38, 32, 0.14), 5px 5px 0 rgba(23, 38, 32, 0.22);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease-out;
}

.jump:hover { transform: translate(2px, 2px); box-shadow: inset -3px -3px 8px rgba(23, 38, 32, 0.14), 2px 2px 0 rgba(23, 38, 32, 0.22); }

/* ---------- 主体栅格 ---------- */
main { padding: 34px 16px 58px; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

aside.side {
  position: sticky;
  top: 78px;
  min-width: 0;
}

.side-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 3px solid var(--ink);
  border-radius: 4px;
  padding: 15px 15px 13px;
  box-shadow: inset -2px -2px 8px rgba(23, 38, 32, 0.07), 5px 5px 0 rgba(23, 38, 32, 0.15);
}

.side-card h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

hr {
  border: 0;
  border-top: 3px solid var(--ink);
  margin: 10px 0 12px;
  opacity: 0.8;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 15.5px;
  transition: background 0.18s ease-out;
}

.side-list a:hover { background: var(--mint-2); }

.num {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 1px 6px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--sky);
}

.stage { min-width: 0; }

.stage > div {
  background: rgba(255, 255, 255, 0.74);
  border: 3px solid var(--ink);
  border-radius: 22px;
  padding: 24px 22px 30px;
  box-shadow: inset -3px -3px 12px rgba(23, 38, 32, 0.05), 7px 8px 0 rgba(23, 38, 32, 0.15);
}

/* ---------- 正文 ---------- */
.prose section[id] {
  padding: 26px 0;
  border-bottom: 3px dashed rgba(23, 38, 32, 0.22);
  scroll-margin-top: 92px;
}

.prose section[id]:first-child { padding-top: 4px; }
.prose section[id]:last-child { border-bottom: 0; padding-bottom: 4px; }

.prose h2 {
  margin: 0 0 6px;
  padding: 12px 16px;
  font-size: clamp(1.32rem, 3.4vw, 1.78rem);
  line-height: 1.3;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: linear-gradient(158deg, var(--mint) 0%, var(--mint-2) 100%);
  box-shadow: inset -2px -2px 9px rgba(23, 38, 32, 0.1), 4px 4px 0 rgba(23, 38, 32, 0.16);
}

.prose h2 + hr { margin: 0 0 16px; border-top: 4px solid var(--ink); }

.prose h3 {
  margin: 22px 0 6px;
  font-size: 1.16rem;
  line-height: 1.4;
}

.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }

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

.prose blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 3px solid var(--ink);
  border-left-width: 10px;
  border-radius: 14px;
  background: var(--sky-2);
}

.prose strong { font-weight: 700; }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 24px;
  padding: 26px 16px 30px;
  border-top: 4px solid var(--ink);
  background: linear-gradient(178deg, var(--mint-2) 0%, #d5f7f2 62%, var(--sky-2) 100%);
}

.foot-in {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: clamp(1.6rem, 5.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 3px 3px 0 var(--sky);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  font-size: 15px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  transition: background 0.18s ease-out;
}

.foot-nav a:hover { background: var(--mint); }

.copy {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 15px;
  opacity: 0.82;
}

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  .prose section[id] {
    animation: pop 0.5s var(--ease) both;
  }
  .prose section[id]:nth-child(2) { animation-delay: 0.05s; }
  .prose section[id]:nth-child(3) { animation-delay: 0.1s; }
  .prose section[id]:nth-child(4) { animation-delay: 0.15s; }
  .prose section[id]:nth-child(5) { animation-delay: 0.2s; }
  .prose section[id]:nth-child(6) { animation-delay: 0.25s; }
  .prose section[id]:nth-child(n+7) { animation-delay: 0.3s; }

  .hero-in { animation: rise 0.72s var(--ease) both; }

  .hero::before { animation: bob 6s ease-in-out infinite; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(16px) scale(0.986); }
  to { opacity: 1; transform: none; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(6deg); }
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  aside.side { position: static; }
  .side-card { padding: 13px; }
  .side-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; }
}

@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .top { padding: 12px 12px 0; }
  .bar { padding: 8px 10px; border-radius: 20px; }
  .brand { padding: 0 8px; }
  main { padding: 26px 12px 44px; }
  .hero { padding: 40px 14px 74px; }
  .hero::before { width: 92px; height: 92px; top: 20px; left: 4%; }
  .hero h1 { text-shadow: 3px 3px 0 var(--sky); }
  .stage > div { padding: 18px 15px 24px; border-radius: 18px; }
  .prose h2 { padding: 10px 13px; }
  .foot { padding: 22px 12px 26px; }
  .side-list { grid-template-columns: minmax(0, 1fr); }
}

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