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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: rgba(0, 0, 0, 0.16);
  --line-hard: #000000;
  --mute: #575757;
  --glass: rgba(255, 255, 255, 0.62);
  --edge: clamp(16px, 4.2vw, 56px);
  --u: 8px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: clip;
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(to right, rgba(0, 0, 0, 0.055) 0 1px, transparent 1px 8.3333%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Noto Sans Hebrew', 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.68;
  font-weight: 400;
  letter-spacing: 0.005em;
}

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

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

::selection { background: #000; color: #fff; }

/* ---------- 顶部细条 + 页头 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line-hard);
}

.ticker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--u);
  padding: 5px var(--edge);
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.18em;
}

.tick-l { font-weight: 700; white-space: nowrap; }

.tick-r {
  min-width: 0;
  color: var(--mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brandrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px var(--edge) 4px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: clamp(1.5rem, 4.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  padding: 4px 0;
}

.brand .mark {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 4px;
}

.menubar { padding: 0; }

.menu {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 0 var(--edge);
  list-style: none;
}

.menu li { display: flex; }

.menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-left: 1px solid var(--line);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.menu li:first-child a { border-left: 0; padding-left: 0; }
.menu a:hover,
.menu a[aria-current] { background: var(--ink); color: var(--paper); }
.menu li:first-child a:hover,
.menu li:first-child a[aria-current] { padding-left: 12px; }

/* ---------- 网格骨架 ---------- */

.frame {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: calc(var(--u) * 2);
  padding: 0 var(--edge);
}

/* ---------- 首屏 ---------- */

.hero {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: calc(var(--u) * 3);
  min-height: 45vh;
  padding: calc(var(--u) * 3) 0 calc(var(--u) * 2);
  border-bottom: 1px solid var(--line-hard);
  scroll-margin-top: 150px;
}

.hero h1 {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(2.3rem, 7.6vw, 6.2rem);
  line-height: 0.93;
  letter-spacing: -0.038em;
  font-weight: 700;
}

.herofig {
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.04);
}

.herofig:empty { min-height: clamp(140px, 22vh, 220px); }

.heroimg {
  display: block;
  width: 100%;
  height: clamp(180px, 32vh, 340px);
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  transform: scale(1.06);
  will-change: transform;
}

/* ---------- 左侧索引 ---------- */

.rail {
  grid-column: 1 / 4;
  align-self: start;
  position: sticky;
  top: 152px;
  padding: calc(var(--u) * 2) 0 calc(var(--u) * 3);
}

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

.rail a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 2px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--mute);
  transition: color 0.15s ease, letter-spacing 0.15s ease;
}

.rail li:last-child a { border-bottom: 1px solid var(--line); }
.rail a:hover,
.rail a[aria-current] { color: var(--ink); font-weight: 700; letter-spacing: 0.02em; }

/* ---------- 正文流 ---------- */

.flow {
  grid-column: 4 / -1;
  min-width: 0;
  padding: calc(var(--u) * 2) 0 calc(var(--u) * 8);
  counter-reset: sec;
  overflow-wrap: break-word;
}

.flow div {
  counter-increment: sec;
  position: relative;
  margin: 0 0 calc(var(--u) * 3);
  padding: clamp(16px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  scroll-margin-top: 152px;
}

.flow div:last-child { margin-bottom: 0; }

.flow small {
  display: block;
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--mute);
}

.flow small::before {
  content: counter(sec, decimal-leading-zero) " ";
  color: var(--ink);
  font-weight: 700;
}

.flow h2 {
  margin: 0 0 0.55em;
  font-size: clamp(1.5rem, 3.1vw, 2.15rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.flow h3 {
  margin: 1.5em 0 0.4em;
  font-size: 1.14rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.flow p { margin: 0 0 1em; max-width: 68ch; }
.flow p:last-child { margin-bottom: 0; }

.flow ul,
.flow ol { margin: 0 0 1em; padding-left: 1.3em; }
.flow li { margin: 0.3em 0; }

.flow figure {
  margin: 0 0 1em;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.flow img,
.flow figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  filter: grayscale(1);
}

.flow blockquote {
  margin: 0 0 1em;
  padding: 12px 18px;
  border-left: 3px solid var(--ink);
  border-radius: 0 4px 4px 0;
  background: rgba(0, 0, 0, 0.045);
}

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

.flow table {
  width: 100%;
  margin: 0 0 1em;
  border-collapse: collapse;
  font-size: 16px;
}

.flow th,
.flow td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.flow th { border-bottom-color: var(--line-hard); font-weight: 700; }

.flow hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }

.flow time {
  display: inline-block;
  margin-right: 0.6em;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.flow aside {
  margin: 0 0 1em;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 4px;
}

.flow code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 4px;
  border-radius: 3px;
}

/* ---------- 页脚 ---------- */

.foot {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--u) * 2);
  align-items: end;
  padding: calc(var(--u) * 4) var(--edge) calc(var(--u) * 5);
  border-top: 1px solid var(--line-hard);
  background: rgba(255, 255, 255, 0.7);
}

.f-brand { grid-column: 1 / 3; }

.f-brand span {
  display: block;
  font-size: clamp(1.9rem, 6.2vw, 4.6rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.f-nav { grid-column: 3 / 4; }
.f-nav ul { margin: 0; padding: 0; list-style: none; }

.f-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.03em;
  color: var(--mute);
}

.f-nav li:last-child a { border-bottom: 1px solid var(--line); }
.f-nav a:hover { color: var(--ink); font-weight: 700; }

.f-legal {
  grid-column: 4 / 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  font-size: 16px;
}

.f-legal .totop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.f-legal .totop:hover { background: var(--ink); color: var(--paper); }

.f-legal .cr {
  color: var(--mute);
  letter-spacing: 0.06em;
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .frame { display: block; }

  .hero { min-height: 42vh; }

  .rail {
    position: static;
    top: auto;
    padding: 16px 0 4px;
  }

  .rail ul { display: flex; flex-wrap: wrap; gap: 8px; }

  .rail a {
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    font-size: 16px;
  }

  .rail li:last-child a { border-bottom: 1px solid var(--line); }

  .flow { padding: 16px 0 56px; }

  .foot { grid-template-columns: 1fr 1fr; }

  .f-brand { grid-column: 1 / -1; }
  .f-nav { grid-column: 1 / 2; }
  .f-legal { grid-column: 2 / 3; align-items: flex-end; text-align: right; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }

  .tick-r { letter-spacing: 0.1em; }

  .menu a { padding: 10px 11px; font-size: 16px; }

  .hero h1 { font-size: clamp(2rem, 9.2vw, 2.9rem); }

  .foot { grid-template-columns: 1fr; }

  .f-nav { grid-column: 1 / -1; }
  .f-legal { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .heroimg { transform: none !important; }
}

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