/* Theme tokens live in theme.css (central source of truth). */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  min-height: var(--app-vh);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.legal-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: calc(32px + var(--safe-top)) calc(20px + var(--safe-right)) calc(64px + var(--safe-bottom)) calc(20px + var(--safe-left));
}

.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.legal-back:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.legal-back::before {
  content: "\2190";
  font-size: 1rem;
  line-height: 1;
}

.legal-brand {
  font-size: 0.8rem;
  color: var(--text-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

h2 {
  margin: 24px 0 8px;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--text);
}

p { margin: 0 0 12px; color: var(--text); }
ul { margin: 0 0 12px; padding-left: 22px; }
li { margin-bottom: 4px; }

small {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--text-soft);
  font-size: 0.8rem;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.legal-footer {
  margin-top: 24px;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.legal-footer a { margin: 0 8px; }

a,
button,
[role="button"] {
  touch-action: manipulation;
}

@media (max-width: 600px) {
  .legal-wrap {
    padding: calc(20px + var(--safe-top)) calc(14px + var(--safe-right)) calc(48px + var(--safe-bottom)) calc(14px + var(--safe-left));
  }
  .card { padding: 22px; border-radius: 12px; }
  h1 { font-size: 1.35rem; }
}
