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

:root {
  --brand: #FF2E63;
  --ink: #111827;
  --accent: #FFD166;
  --paper: #FFF6EC;
  --sand: #FFE9CC;
  --white: #FFFFFF;
  --line: 3px;
  --r: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans Hebrew', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }

small { font-size: 16px; line-height: 1.6; }

h1, h2, h3 { line-height: 1.22; font-weight: 700; }

a { color: var(--brand); }

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

/* 顶部斜切细条 */
.stripe {
  background: var(--brand);
  color: var(--white);
  border-bottom: var(--line) solid var(--ink);
  padding: 9px 20px 22px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.24em;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 58%);
}

.stripe span { display: inline-block; }

/* 页头 + 锚点条 */
.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  background: var(--white);
  border-bottom: var(--line) solid var(--ink);
}

.mark {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent);
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  text-decoration: none;
}

.mark:hover { background: var(--brand); }

.jump {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.jump ol {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 2px;
  list-style: none;
  width: max-content;
}

.jump a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease;
}

.jump a:hover { background: var(--ink); color: var(--accent); }

.jump li:first-child a {
  background: var(--brand);
  color: var(--white);
}

.jump li:first-child a:hover { background: var(--ink); color: var(--accent); }

/* 首屏 */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 45vh;
  padding: 48px 20px 60px;
  background: var(--white);
  border-bottom: var(--line) solid var(--ink);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 660px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 6vw, 3.9rem);
  letter-spacing: -0.02em;
}

.hero h1::after {
  content: "";
  display: block;
  width: 96px;
  height: 12px;
  margin-top: 18px;
  background: var(--accent);
  border: 2px solid var(--ink);
}

.lede {
  margin: 0;
  max-width: 48ch;
  font-size: 18px;
  padding-left: 16px;
  border-left: 7px solid var(--brand);
}

.hero-art {
  position: absolute;
  right: -32px;
  top: 50%;
  width: 360px;
  height: 300px;
  margin: 0;
  transform: translateY(-50%);
  z-index: 1;
}

.hero-art .blk { position: absolute; display: block; }

.b1 {
  right: 130px;
  top: 8px;
  width: 118px;
  height: 118px;
  background: var(--brand);
  border: var(--line) solid var(--ink);
}

.b2 {
  right: 18px;
  top: 108px;
  width: 152px;
  height: 152px;
  background: var(--accent);
  border: var(--line) solid var(--ink);
  border-radius: 50%;
}

.b3 {
  right: 210px;
  top: 190px;
  width: 82px;
  height: 82px;
  background: var(--ink);
}

/* 主体：左侧栏 + 正文 */
.board {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  align-items: start;
  gap: 34px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 44px 20px 68px;
}

.rail {
  position: sticky;
  top: 88px;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  padding: 18px 16px;
}

.rail small {
  display: block;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.rail h2 {
  margin: 2px 0 14px;
  font-size: 26px;
}

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

.toc a {
  display: block;
  min-height: 40px;
  padding: 7px 10px;
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease;
}

.toc a:hover {
  border-color: var(--ink);
  background: var(--accent);
}

.rail-tag {
  display: inline-block;
  margin: 16px 0 0;
  padding: 3px 11px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--accent);
  font-weight: 700;
}

/* 正文片段 */
.prose { min-width: 0; }

.prose article {
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  padding: 26px 26px 30px;
  margin: 0 0 26px;
  scroll-margin-top: 96px;
}

.prose article:nth-child(even) { background: var(--sand); }

.prose article > small {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 10px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.prose h2 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 1.22rem;
  padding-left: 12px;
  border-left: 6px solid var(--brand);
}

.prose p { margin: 0 0 14px; max-width: 68ch; }

.prose ul,
.prose ol { margin: 0 0 16px; padding-left: 24px; }

.prose li { margin-bottom: 6px; }

.prose a {
  color: var(--brand);
  text-underline-offset: 3px;
}

.prose strong { font-weight: 700; }

.prose blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-left: 7px solid var(--brand);
  border-radius: var(--r);
  background: var(--paper);
}

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

.prose img {
  display: block;
  height: auto;
  border: 2px solid var(--ink);
  border-radius: var(--r);
}

/* 页脚 */
.foot {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 420px);
  grid-template-areas:
    "lead nav"
    "form nav"
    "copy copy";
  justify-content: center;
  gap: 18px 40px;
  padding: 38px 20px 22px;
  background: var(--ink);
  color: var(--paper);
  border-top: var(--line) solid var(--ink);
}

.foot-lead {
  grid-area: lead;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.foot-mark { display: flex; }

.foot-brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.foot-form { grid-area: form; margin: 0; }

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.signup input {
  flex: 1 1 180px;
  min-height: 48px;
  padding: 0 12px;
  border: 2px solid var(--paper);
  border-radius: var(--r);
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 16px;
}

.signup input::placeholder { color: #cfd3dd; }

.signup button {
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--accent);
  border-radius: var(--r);
  background: var(--accent);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.signup button:hover { background: var(--brand); border-color: var(--brand); color: var(--white); }

.foot-nav { grid-area: nav; margin: 0; }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 8px 8px 0;
  padding: 0 12px;
  border: 2px solid var(--paper);
  border-radius: var(--r);
  color: var(--paper);
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease;
}

.foot-nav a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

.foot-copy {
  grid-area: copy;
  display: block;
  padding-top: 12px;
  border-top: 2px solid var(--brand);
  color: var(--paper);
}

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

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

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

@media (max-width: 900px) {
  .board {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 28px 16px 44px;
  }

  .rail { position: static; }

  .hero-art { display: none; }

  .hero {
    min-height: 0;
    padding: 34px 16px 44px;
  }

  .stripe { padding: 8px 16px 20px; }

  .masthead { padding: 6px 12px; gap: 8px; }

  .prose article { padding: 20px 16px 24px; }

  .foot {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "lead"
      "form"
      "nav"
      "copy";
    gap: 16px;
    padding: 30px 16px 18px;
  }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .lede { font-size: 17px; padding-left: 12px; border-left-width: 5px; }
  .jump a { padding: 0 11px; }
}

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