:root {
  color-scheme: light;
  --bg: #f4f6f3;
  --surface: #ffffff;
  --text: #111411;
  --muted: #596159;
  --line: #d9ded8;
  --accent: #35ef00;
  --on-accent: #071000;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.55;
}

/* Legacy in-document return links are retained only because the signed
   consent contract hashes cover the exact HTML files. The shared navigation
   above and below each document is the single visible Back control. */
.back-link,
.back {
  display: none !important;
}

main {
  width: min(920px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

header,
.legal-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-top: 8px solid var(--accent);
}

header img { width: 58px; height: 58px; border-radius: 16px; }
h1 { margin: 0; font-size: clamp(25px, 5vw, 38px); line-height: 1.08; }
.updated { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.legal-nav { display: flex; margin: 16px 2px; }
.legal-nav.is-bottom { margin-top: 18px; margin-bottom: 0; }
.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 65%, var(--line));
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  text-decoration: none;
}
.legal-card { padding: clamp(18px, 4vw, 34px); }
h2 { margin: 28px 0 10px; font-size: 20px; }
h2:first-child { margin-top: 0; }
p, li { font-size: 15px; }
li + li { margin-top: 6px; }
a { color: inherit; font-weight: 750; }
.summary { padding: 14px; border-left: 5px solid var(--accent); border-radius: 12px; background: #efffec; }
.operator { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fafcf9; }
.scroll-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #efffec; }
.important { font-weight: 800; }

html[data-theme="dark"] {
  color-scheme: dark; --bg: #070907; --surface: #111411; --text: #f4f7f3; --muted: #abb4aa; --line: #30372f; --on-accent: #071000;
}
html[data-theme="dark"] .summary { background: #10200d; }
html[data-theme="dark"] .operator { background: #0c0f0c; }
html[data-theme="dark"] th { background: #10200d; }

.legal-version-notice,
.legal-dynamic-notice {
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.legal-version-notice,
.legal-dynamic-notice.is-warning {
  border-left-color: #d98a00;
}

.legal-table-wrap {
  max-width: 100%;
  margin: 16px 0;
  overflow-x: auto;
}

.legal-table-wrap table {
  min-width: 640px;
}
