:root {
  --ink: #13261e;
  --muted: #52645b;
  --paper: #f5f8f3;
  --card: #ffffff;
  --line: rgba(19, 38, 30, 0.13);
  --green: #15794f;
  --green-soft: #e7f5eb;
  --lime: #b9e74a;
  --navy: #153f39;
  --shadow: 0 20px 56px rgba(25, 68, 53, 0.12);
}

* { box-sizing: border-box; }

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.75;
}

a { color: var(--green); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.skip-link {
  position: fixed;
  z-index: 10;
  top: 10px;
  left: 10px;
  padding: 9px 14px;
  border-radius: 9px;
  color: #fff;
  background: var(--navy);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.legal-header,
.legal-main,
.legal-footer {
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
}

.legal-header {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.legal-brand img { width: 42px; height: 42px; border-radius: 12px; }
.legal-brand span,
.legal-main,
.policy-card,
.legal-panel { min-width: 0; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 14px; font-weight: 700; }

.legal-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  padding: clamp(34px, 7vw, 70px);
  border-radius: 30px;
  color: #fff;
  background: var(--navy);
  box-shadow: var(--shadow);
}
.legal-hero::after {
  position: absolute;
  width: 320px;
  height: 320px;
  top: -170px;
  right: -80px;
  border-radius: 50%;
  background: rgba(185, 231, 74, 0.22);
  content: "";
}
.legal-hero > * { position: relative; z-index: 1; }
.legal-kicker { margin: 0 0 8px; color: var(--lime); font-weight: 800; letter-spacing: .12em; }
.legal-hero h1 { max-width: 760px; margin: 0; font-size: clamp(32px, 6vw, 56px); line-height: 1.18; }
.legal-hero p:last-child { max-width: 760px; margin: 18px 0 0; color: rgba(255,255,255,.78); }

.channel-policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0;
}
.policy-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 10px 30px rgba(25, 68, 53, .06);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.policy-card:hover,
.policy-card:focus-visible {
  border-color: rgba(21,121,79,.5);
  outline: none;
  box-shadow: 0 18px 40px rgba(25,68,53,.12);
  transform: translateY(-3px);
}
.policy-card strong { display: block; font-size: 22px; }
.policy-card p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.policy-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.policy-status { padding: 5px 9px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 12px; font-weight: 800; }
.policy-action { color: var(--green); font-weight: 800; }

.legal-panel {
  margin: 24px 0;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 12px 34px rgba(25,68,53,.06);
}
.legal-panel h2 { margin: 30px 0 10px; line-height: 1.35; }
.legal-panel h2:first-child { margin-top: 0; }
.legal-panel p,
.legal-panel li { overflow-wrap: anywhere; }
.legal-notice,
code { overflow-wrap: anywhere; word-break: break-word; }
.legal-notice { padding: 14px 16px; border-left: 4px solid var(--green); border-radius: 8px; background: var(--green-soft); }
.legal-warning { border-left-color: #e38a23; background: #fff5df; }
.legal-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 14px 0; }
th, td { min-width: 140px; padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #edf5ef; }

.legal-footer { display: flex; justify-content: space-between; gap: 18px; padding-block: 18px 38px; color: var(--muted); font-size: 13px; }

@media (max-width: 820px) {
  .channel-policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 580px) {
  .legal-header { align-items: flex-start; flex-direction: column; padding-block: 16px; }
  .legal-main, .legal-header, .legal-footer { width: min(calc(100% - 28px), 1080px); }
  .legal-hero { padding: 30px 22px; border-radius: 22px; }
  .channel-policy-grid { grid-template-columns: 1fr; }
  .policy-card { min-height: 0; }
  .legal-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
