/* Legal pages (apps/website/legal/). Same palette and font as style.css, set for long reading on a phone. */
:root {
  --paper: #f8f7f2;
  --card: #fffefa;
  --ink: #22332a;
  --text: #29372f;
  --muted: #697168;
  --soft: #8a918b;
  --accent: #4b6b58;
  --sage: #e8ede3;
  --line: #e2e6dd;
  --warn-bg: #f6ecd9;
  --warn: #8a5a1c;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.75; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 clamp(18px, 5vw, 32px); }

.top { display: flex; align-items: center; gap: 12px; height: 60px; }
.top img { height: 26px; width: auto; display: block; }
.top .tag { position: relative; padding-left: 12px; font-size: 13px; font-weight: 500; color: var(--accent); white-space: nowrap; }
.top .tag::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 12px; margin-top: -6px; background: #cfd5cc; }
.top .back { margin-left: auto; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }

.draft {
  margin: 4px 0 0; padding: 10px 14px; border-radius: 12px;
  background: var(--warn-bg); color: var(--warn); font-size: 14px; font-weight: 600;
}
h1 { margin: 22px 0 4px; font-size: 26px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.date { margin: 0; font-size: 13px; color: var(--soft); }
.intro { margin: 18px 0 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.intro p { margin: 0; }
.intro p + p { margin-top: 8px; }
h2 { margin: 32px 0 8px; font-size: 18px; line-height: 1.45; font-weight: 650; color: var(--ink); }
h3 { margin: 20px 0 6px; font-size: 15.5px; font-weight: 650; color: var(--ink); }
p { margin: 8px 0; }
ul, ol { margin: 8px 0; padding-left: 1.3em; }
li { margin: 4px 0; }
b, strong { color: var(--ink); font-weight: 650; }
.tbd { color: var(--warn); background: var(--warn-bg); border-radius: 4px; padding: 0 3px; font-weight: 500; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Tables scroll sideways on a narrow phone instead of squashing. */
.table { margin: 12px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13.5px; line-height: 1.6; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-weight: 600; color: var(--muted); background: #f3f4ee; white-space: nowrap; }
td:first-child { font-weight: 600; color: var(--ink); }

/* On a phone, wide tables become one card per row: the first cell is the card title,
   the others are labelled by their column header (data-label). */
@media (max-width: 640px) {
  .table.stack { overflow: visible; border: 0; background: none; }
  .table.stack table, .table.stack tbody, .table.stack tr, .table.stack td { display: block; min-width: 0; }
  .table.stack thead { display: none; }
  .table.stack tr { margin-bottom: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px 8px; }
  .table.stack td { padding: 5px 0; border: 0; }
  .table.stack td:first-child { padding: 6px 0 4px; font-size: 15px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  .table.stack td + td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--soft); }
  .table.stack td:empty { display: none; }
}

/* Index list */
.list { margin: 20px 0 0; padding: 0; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.list li { margin: 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.list a span { font-weight: 600; }
.list a small { display: block; font-size: 12.5px; color: var(--soft); font-weight: 400; }
.list a::after { content: "›"; margin-left: auto; font-size: 20px; color: var(--soft); }

.foot { margin-top: 48px; padding: 20px 0 calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.8; color: var(--soft); }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; }

@media (max-width: 480px) {
  body { font-size: 14.5px; }
  h1 { font-size: 23px; }
  .top .tag { display: none; }
}
