:root {
  color-scheme: light;
  --bg: #f5f0e8;
  --panel: #fffdf8;
  --panel-soft: #f8f3ea;
  --text: #2f2924;
  --muted: #74685e;
  --accent: #8b4b2f;
  --accent-dark: #66351f;
  --line: #dfd2c3;
  --success-bg: #edf7ef;
  --success-line: #a9cdb1;
  --shadow: 0 18px 48px rgba(72, 48, 31, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 10% 0, rgba(169, 117, 72, .13), transparent 30rem), var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}
a { color: var(--accent-dark); }
a:hover { color: var(--accent); }
.legal-header { border-bottom: 1px solid var(--line); background: rgba(255, 253, 248, .94); }
.legal-header-inner, .legal-main, .legal-footer-inner { width: min(calc(100% - 32px), 920px); margin-inline: auto; }
.legal-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 76px; }
.legal-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-weight: 850; text-decoration: none; }
.legal-brand img { display: block; width: 72px; height: auto; }
.legal-back { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-weight: 750; text-decoration: none; }
.legal-main { padding: 42px 0 64px; }
.legal-document { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: var(--shadow); }
.legal-hero { padding: 38px 44px 30px; border-bottom: 1px solid var(--line); background: linear-gradient(145deg, #fffdf8, #f4e9dc); }
.legal-eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 13px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.legal-hero h1 { margin: 0; color: var(--accent-dark); font-size: clamp(30px, 5vw, 46px); line-height: 1.15; }
.legal-summary { max-width: 700px; margin: 15px 0 0; color: var(--muted); font-size: 17px; }
.legal-updated { margin: 16px 0 0; font-size: 14px; font-weight: 700; }
.legal-content { padding: 34px 44px 44px; }
.legal-notice { margin: 0 0 30px; padding: 16px 18px; border: 1px solid var(--success-line); border-radius: 14px; background: var(--success-bg); }
.legal-content section + section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.legal-content h2 { margin: 0 0 12px; color: var(--accent-dark); font-size: 23px; line-height: 1.3; }
.legal-content h3 { margin: 22px 0 7px; font-size: 17px; }
.legal-content p { margin: 10px 0; }
.legal-content ul { margin: 10px 0; padding-left: 22px; }
.legal-content li + li { margin-top: 8px; }
.legal-content code { padding: 2px 6px; border-radius: 6px; background: var(--panel-soft); font-size: .92em; }
.source-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.source-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 8px 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--accent-dark); font-weight: 800; text-decoration: none; }
.source-button-primary { border-color: var(--accent-dark); background: var(--accent-dark); color: #fff; }
.source-button-primary:hover { color: #fff; background: var(--accent); }
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.source-card { padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); }
.source-card h3 { margin-top: 0; color: var(--accent-dark); }
.source-card p { margin-bottom: 0; }
.legal-table-wrap { overflow-x: auto; margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; }
.legal-table { width: 100%; min-width: 640px; border-collapse: collapse; background: #fff; }
.legal-table th, .legal-table td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table th { background: var(--panel-soft); color: var(--accent-dark); }
.legal-contact { padding: 18px; border-radius: 14px; background: var(--panel-soft); }
.legal-footer { border-top: 1px solid var(--line); background: #2c2723; color: #eee4da; }
.legal-footer-inner { display: flex; justify-content: space-between; gap: 20px; padding-block: 22px; }
.legal-footer p { margin: 0; }
.legal-footer a { color: #f4d2b9; }
@media (max-width: 640px) {
  .legal-header-inner { min-height: 68px; }
  .legal-brand img { width: 58px; }
  .legal-brand span { font-size: 14px; }
  .legal-back { min-height: 36px; padding-inline: 10px; font-size: 13px; }
  .legal-main { padding-block: 22px 42px; }
  .legal-document { border-radius: 18px; }
  .legal-hero { padding: 28px 22px 24px; }
  .legal-content { padding: 26px 22px 34px; }
  .legal-content h2 { font-size: 21px; }
  .source-actions, .source-grid { display: grid; grid-template-columns: 1fr; }
  .source-button { width: 100%; }
  .legal-footer-inner { flex-direction: column; }
}
@media print {
  body { background: #fff; }
  .legal-header, .legal-footer { display: none; }
  .legal-main { width: 100%; padding: 0; }
  .legal-document { border: 0; box-shadow: none; }
}
