:root {
  color-scheme: light;
  --ink: #182230;
  --text: #344054;
  --muted: #667085;
  --line: #e4e7ec;
  --soft: #f5f8fc;
  --soft-2: #eef4fb;
  --brand: #3974c3;
  --brand-ink: #244f8a;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 420px at 10% -10%, #eef5ff 0%, transparent 55%),
    radial-gradient(900px 360px at 100% 0%, #f7fafc 0%, transparent 50%),
    #fff;
  color: var(--ink);
  font: 15px/1.85 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.page {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 36px 22px 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--soft);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.brand span { font-size: 16px; letter-spacing: 0.01em; }

h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.35;
  font-weight: 760;
  letter-spacing: -0.02em;
}

h2 {
  margin: 36px 0 12px;
  padding-top: 8px;
  border-top: 1px solid transparent;
  font-size: 18.5px;
  line-height: 1.45;
  font-weight: 720;
  color: var(--ink);
}

h2:not(:first-of-type) {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

h3 {
  margin: 22px 0 10px;
  font-size: 15.5px;
  line-height: 1.5;
  font-weight: 680;
  color: var(--brand-ink);
}

p {
  margin: 0 0 14px;
  color: var(--text);
}

li { color: var(--text); }

.meta {
  display: block;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.notice {
  margin: 22px 0 26px;
  padding: 16px 18px;
  border: 1px solid #d9e6f7;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(180deg, #f7fbff 0%, var(--soft) 100%);
  color: var(--text);
  box-shadow: var(--shadow);
}

.notice strong { color: var(--ink); }

.danger { color: var(--danger); }

.notice .danger,
.notice strong.danger {
  color: var(--danger);
}

ul, ol {
  margin: 0 0 16px;
  padding-left: 1.35em;
}

li + li { margin-top: 6px; }

a {
  color: var(--brand);
  text-decoration: none;
  text-underline-offset: 2px;
}

a:hover { text-decoration: underline; color: var(--brand-ink); }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 22px 0 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

/* Tables: readable on desktop, card-like scroll on mobile */
.table-wrap,
table {
  width: 100%;
}

table {
  margin: 16px 0 22px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  line-height: 1.65;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  word-break: break-word;
  overflow-wrap: anywhere;
}

th:last-child,
td:last-child { border-right: 0; }

tr:last-child td { border-bottom: 0; }

th {
  background: var(--soft-2);
  color: var(--ink);
  font-weight: 680;
  white-space: nowrap;
}

td { color: var(--text); background: #fff; }

tbody tr:nth-child(even) td { background: #fcfdff; }

.sdk-card {
  margin: 16px 0;
  padding: 18px 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.sdk-card h2 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-size: 17px;
}

.sdk-card p { margin: 6px 0; }

.policy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4a86d4, var(--brand));
  color: #fff !important;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none !important;
  box-shadow: 0 6px 16px rgba(57, 116, 195, 0.25);
}

.policy-button:hover { filter: brightness(1.03); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-ink);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.actions a:hover {
  background: var(--soft);
  border-color: #c7d7ef;
  color: var(--brand);
  text-decoration: none;
}

footer {
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

/* Long legal content comfort */
strong { font-weight: 700; color: var(--ink); }

@media (max-width: 720px) {
  .page { padding: 22px 16px 64px; }

  .brand { margin-bottom: 20px; }

  h1 { font-size: 24px; }

  h2 {
    margin-top: 28px;
    padding-top: 18px;
    font-size: 17px;
  }

  .notice {
    padding: 14px 14px;
    border-radius: 0 10px 10px 0;
  }

  /* Keep table usable: horizontal scroll instead of crushing columns */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: normal;
  }

  th, td {
    min-width: 118px;
    padding: 11px 12px;
    font-size: 13.5px;
  }

  th:first-child,
  td:first-child { min-width: 96px; }

  .actions { gap: 8px; }

  .actions a {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    text-align: center;
  }

  .policy-button {
    display: flex;
    width: 100%;
  }

  .sdk-card { padding: 15px; }
}

@media (max-width: 420px) {
  .actions a {
    flex: 1 1 100%;
  }

  th, td { min-width: 108px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .actions a { transition: none; }
}

@media print {
  body { background: #fff; }
  .page { width: 100%; padding: 0; }
  .actions, .brand { display: none; }
  .notice, table, .sdk-card { box-shadow: none; }
  a { color: inherit; text-decoration: none; }
}
