/* Privacy policy / terms pages — same palette as style.css, tuned for long-form reading. */
:root {
  color-scheme: light;
  --bg: #FFF4E3;
  --panel: #FFFFFF;
  --panel-2: #F5F1E8;
  --ink: #16171C;
  --text-dim: #5B5C63;
  --pink: #FF5C8A;
  --yellow: #FFD23F;
  --bw: 3px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

a { color: #1F5FD1; overflow-wrap: anywhere; }

.legal-top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: var(--bw) solid var(--ink);
}

.brand { font-weight: 800; color: var(--ink); text-decoration: none; font-size: 17px; }

.lang { display: flex; gap: 6px; }
.lang button {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--ink);
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--yellow); }

.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

article {
  background: var(--panel);
  border: var(--bw) solid var(--ink);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 28px clamp(16px, 4vw, 40px);
}

/* Only one language shows once legal.js runs; with JS off both stay visible, one after the other. */
.js [data-lang-block] { display: none; }
.js [data-lang-block].active { display: block; }
article + article { margin-top: 28px; }

h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.25; margin: 0 0 6px; }
h2 { font-size: 20px; line-height: 1.35; margin: 32px 0 8px; scroll-margin-top: 72px; }
h3 { font-size: 17px; margin: 22px 0 6px; }
p, li { overflow-wrap: break-word; }
ul { padding-left: 1.3em; }
li { margin: 4px 0; }

.meta { color: var(--text-dim); font-size: 14px; margin: 0 0 18px; }

.summary {
  background: #FFF8D6;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 4px 18px 8px;
  margin: 18px 0 8px;
}
.summary h2 { margin-top: 12px; font-size: 18px; }

/* Wide screens: a real table. Narrow screens: each row becomes a card with its own labels. */
.table-wrap { margin: 12px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
th, td { border: 2px solid var(--ink); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--panel-2); font-weight: 800; }
td:first-child { font-weight: 700; }

@media (max-width: 720px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr {
    border: 2px solid var(--ink);
    border-radius: 12px;
    margin: 0 0 12px;
    overflow: hidden;
    background: var(--panel);
  }
  td { border: 0; border-top: 1px dashed #C9C3B6; padding: 8px 12px; }
  td:first-child { border-top: 0; background: var(--panel-2); font-size: 15.5px; }
  td:not(:first-child)::before {
    content: attr(data-h);
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.02em;
  }
  article { box-shadow: 3px 3px 0 var(--ink); }
}

@media print {
  .legal-top { display: none; }
  .js [data-lang-block] { display: block; }
  article { box-shadow: none; border: 0; }
}
