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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --pad: clamp(1rem, 4.5vw, 3.5rem);
  --max: 1200px;
  --ease: 220ms ease;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans Hebrew", "Helvetica Neue", Helvetica, Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; }

img { display: block; max-width: 100%; height: auto; }

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

article[id] { scroll-margin-top: 104px; }

/* ---------- 顶部细条 ---------- */
.strip {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid var(--ink);
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.strip-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.45rem var(--pad);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.strip .sep { margin: 0 0.6rem; opacity: 0.65; }

/* ---------- 顶栏 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.brand .mark { font-size: 1.1rem; }

.pills ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pills-a ul { justify-content: flex-start; }
.pills-b ul { justify-content: flex-end; }

.pills a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}

.pills a:hover,
.pills a:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  background: var(--ink);
  color: var(--paper);
}

.hero-in {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  min-height: calc(100svh - 104px);
  padding: clamp(1.5rem, 4vw, 3rem) var(--pad) clamp(2rem, 6vw, 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.badge {
  align-self: flex-end;
  margin: 0;
  padding: 0.3rem 1rem;
  border: 1px solid var(--paper);
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: 0.06em;
  transition: background var(--ease), color var(--ease);
}

.badge:hover {
  background: var(--paper);
  color: var(--ink);
}

.hero h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2.4rem, 8vw, 6.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  word-break: break-word;
}

/* ---------- 内容网格 ---------- */
.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.prose { min-width: 0; }

.prose > article {
  padding: 2.4rem 0;
  border-top: 1px solid var(--ink);
}

.prose > article:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 1.7rem 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.prose hr {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: 0 0 1.4rem;
}

.prose p {
  margin: 0 0 1.1rem;
  max-width: 68ch;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1rem;
  padding-left: 1.35rem;
  max-width: 68ch;
}

.prose li { margin-bottom: 0.45rem; }

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose a:hover { background: var(--ink); color: var(--paper); }

.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 4px solid var(--ink);
  font-weight: 500;
  max-width: 60ch;
}

.prose strong { font-weight: 700; }

.prose :where(figure, .card, .box) {
  margin: 1.4rem 0;
  border-radius: 10px;
  overflow: hidden;
}

.prose figcaption {
  font-size: 1rem;
  padding-top: 0.5rem;
}

/* ---------- 侧栏 ---------- */
.rail {
  position: sticky;
  top: 108px;
  align-self: start;
  border-top: 3px solid var(--ink);
  padding-top: 0.9rem;
}

.rail-h {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.4;
}

.rail hr {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 0 0 0.9rem;
}

.rail ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.1rem;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.15rem 0;
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  transition: border-color var(--ease), padding-left var(--ease);
}

.rail a:hover,
.rail a:focus-visible {
  border-bottom-color: var(--ink);
  padding-left: 0.35rem;
}

/* ---------- 页脚 ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  padding: 1.2rem var(--pad);
  border-top: 2px solid var(--ink);
  font-size: 1rem;
  line-height: 1.5;
}

.foot-brand a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.foot nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.95rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease);
}

.foot nav a:hover,
.foot nav a:focus-visible { border-bottom-color: var(--ink); }

.foot-legal { opacity: 0.7; }

/* ---------- 滚动出现 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms ease, transform 480ms ease;
}

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

/* ---------- 窄屏 ---------- */
@media (max-width: 860px) {
  :root { --pad: 1rem; }

  article[id] { scroll-margin-top: 24px; }

  .top {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.55rem 1rem 0.6rem;
  }

  .brand {
    order: -1;
    align-self: center;
    justify-self: auto;
  }

  .pills ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }

  .pills ul::-webkit-scrollbar { display: none; }

  .pills-a ul,
  .pills-b ul { justify-content: flex-start; }

  .pills a { min-height: 42px; }

  .hero-in {
    min-height: 0;
    padding: 1.6rem 1rem 2.4rem;
    justify-content: flex-start;
    gap: 1.3rem;
  }

  .hero h1 { order: 1; font-size: clamp(2.2rem, 10.5vw, 3.4rem); }

  .badge { order: 2; align-self: flex-start; }

  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.2rem;
    padding: 2rem 1rem 2.5rem;
  }

  .rail {
    position: static;
    top: auto;
  }

  .rail ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }

  .foot { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal,
  .js .reveal.in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .pills a,
  .rail a,
  .badge,
  .foot nav a { transition: none; }
}

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