/* ==========================================================================
   MyTransit Live — 法务子页样式（Privacy / Terms）
   与主站 styles.css 共用同一套设计令牌：深色底 + 单一 accent
   ========================================================================== */

:root {
  /* ---- 背景 / 表面（与主站一致） ---- */
  --bg: #08090B;
  --bg-elevated: #0E1014;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.055);

  /* ---- 描边 ---- */
  --hairline: rgba(255, 255, 255, 0.07);
  --hairline-strong: rgba(255, 255, 255, 0.14);

  /* ---- 文本 ---- */
  --text: #F2F4F8;
  --muted: #8A92A6;
  --text-on-accent: #08090B;

  /* ---- 强调色（全站唯一 accent） ---- */
  --accent: #C8FA46;
  --accent-rgb: 200, 250, 70;
  --accent-ink: #08090B;

  /* ---- 字体（与主站一致：Inter + JetBrains Mono） ---- */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: rgba(var(--accent-rgb), 0.28); color: var(--text); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-150%);
  transition: transform .2s;
}
.skip-link:focus { transform: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---- 顶栏 ---- */
.legal-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(22px, 5vw, 76px);
  border-bottom: 1px solid var(--hairline);
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand > span:last-child > span { color: var(--accent); }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline-strong);
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}
.brand-mark i {
  position: absolute;
  width: 16px;
  height: 3px;
  background: var(--accent);
  border-radius: 5px;
  transform: rotate(55deg);
}
.brand-mark i:last-child { transform: rotate(-55deg); }
.header-links { display: flex; align-items: center; gap: 26px; font-size: 13px; font-weight: 500; }
.header-links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.header-links a:hover { color: var(--text); }
.header-links a[aria-current="page"] { color: var(--text); }

/* ---- Hero ---- */
.legal-hero {
  position: relative;
  overflow: hidden;
  padding: 78px clamp(22px, 7vw, 110px) 64px;
  border-bottom: 1px solid var(--hairline);
}
.legal-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -220px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.10), transparent 68%);
  pointer-events: none;
}
.eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 11px var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--accent);
}
h1 {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 20px 0 22px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.hero-note {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.65;
}
.effective {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  font: 500 10px var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.effective span {
  padding: 8px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

/* ---- 摘要三栏 ---- */
.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.summary article {
  min-height: 180px;
  padding: 30px clamp(22px, 4vw, 52px);
  background: var(--bg);
}
.summary b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent);
  font: 500 11px var(--font-mono);
}
.summary h2 { margin: 0 0 8px; font-size: 16px; letter-spacing: -0.02em; font-weight: 600; }
.summary p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* ---- 正文 + 目录 ---- */
.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 740px);
  justify-content: center;
  gap: clamp(50px, 8vw, 130px);
  padding: 76px clamp(22px, 7vw, 110px) 110px;
}
.toc { position: sticky; top: 96px; align-self: start; }
.toc-label {
  display: block;
  margin-bottom: 16px;
  color: var(--muted);
  font: 500 10px var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.toc ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hairline); }
.toc li { border-bottom: 1px solid var(--hairline); }
.toc a {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  line-height: 1.45;
  transition: color .2s, padding-left .2s;
}
.toc a:hover { padding-left: 5px; color: var(--text); }
.toc a span { color: var(--accent); font: 500 10px var(--font-mono); }

.legal-copy section {
  scroll-margin-top: 96px;
  padding: 0 0 52px;
  margin-bottom: 52px;
  border-bottom: 1px solid var(--hairline);
}
.legal-copy section:last-child { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }
.section-number {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font: 500 10px var(--font-mono);
  letter-spacing: .12em;
}
.legal-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-weight: 600;
}
.legal-copy h3 { margin: 28px 0 8px; font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.legal-copy p, .legal-copy li { color: var(--muted); font-size: 14.5px; line-height: 1.75; }
.legal-copy ul { padding-left: 20px; }
.legal-copy li { margin: 8px 0; padding-left: 4px; }
.legal-copy strong { color: var(--text); font-weight: 600; }
.legal-copy a { color: var(--accent); text-underline-offset: 3px; }

.callout {
  margin: 26px 0;
  padding: 22px 24px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--surface);
}
.callout p { margin: 0; }

.store-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 4px; }
.store-links a {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background .2s, border-color .2s, color .2s;
}
.store-links a:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---- 页尾 ---- */
.legal-footer {
  padding: 52px clamp(22px, 7vw, 110px) 28px;
  border-top: 1px solid var(--hairline);
  background: var(--bg-elevated);
}
.legal-footer-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
}
.legal-footer .brand { color: var(--text); }
.legal-footer .brand > span:last-child > span { color: var(--accent); }
.legal-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 24px; }
.legal-footer nav a { color: var(--muted); text-decoration: none; font-size: 13px; transition: color .2s; }
.legal-footer nav a:hover { color: var(--accent); }
.legal-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font: 10px var(--font-mono);
  letter-spacing: .08em;
}

/* ---- 响应式 ---- */
@media (max-width: 800px) {
  .legal-hero::after { right: -200px; opacity: .7; }
  .summary { grid-template-columns: 1fr; }
  .summary article { min-height: 0; }
  .legal-layout { grid-template-columns: 1fr; gap: 48px; padding-top: 56px; }
  .toc { position: static; }
  .toc ol { columns: 2; column-gap: 26px; }
  .toc li { break-inside: avoid; }
}

@media (max-width: 520px) {
  .legal-header { min-height: 64px; }
  .header-links a:first-child { display: none; }
  .legal-hero { padding-top: 60px; padding-bottom: 52px; }
  .toc ol { columns: 1; }
  .legal-copy section { padding-bottom: 38px; margin-bottom: 38px; }
  .legal-footer-top, .legal-footer-bottom { flex-direction: column; }
  .legal-footer nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
