/* Legal Pages (Terms & Privacy) Stylesheet */
:root {
  --bg: #ffffff;
  --bg-subtle: #f9fafb;
  --bg-muted: #f3f4f6;
  --border-subtle: #e5e7eb;
  --border-strong: #d1d5db;
  --border-dark: #111827;

  --text-main: #111827;
  --text-muted: #6b7280;
  --text-dim: #9ca3af;
  --link-color: #2563eb;
}

[data-ui-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f19;
  --bg-subtle: #111827;
  --bg-muted: #1e293b;
  --border-subtle: #1e293b;
  --border-strong: #334155;
  --border-dark: #e2e8f0;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --link-color: #60a5fa;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-ui-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0f19;
    --bg-subtle: #111827;
    --bg-muted: #1e293b;
    --border-subtle: #1e293b;
    --border-strong: #334155;
    --border-dark: #e2e8f0;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --link-color: #60a5fa;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: var(--text-main);
  background-color: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-header {
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.legal-header-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg);
  transition: all 0.15s ease;
}

.btn-back:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.legal-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 44px 24px 64px 24px;
  flex: 1;
  width: 100%;
}

.legal-title {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--text-main);
}

.legal-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.legal-summary-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--text-main);
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 36px;
}

.legal-summary-card h3 {
  font-size: 0.925rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.legal-summary-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 0;
}

.legal-section {
  margin-bottom: 36px;
}

.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-main);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-section p {
  font-size: 0.96rem;
  color: var(--text-main);
  margin-bottom: 14px;
  line-height: 1.7;
}

.legal-section ul,
.legal-section ol {
  margin-left: 24px;
  margin-bottom: 16px;
}

.legal-section li {
  font-size: 0.96rem;
  line-height: 1.65;
  margin-bottom: 8px;
  color: var(--text-main);
}

.legal-section a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 24px;
  background-color: var(--bg-subtle);
}

.legal-footer-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.legal-footer-inner a {
  color: var(--text-muted);
  text-decoration: none;
}

.legal-footer-inner a:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.legal-footer-inner .footer-dot {
  color: var(--border-strong);
  user-select: none;
}

@media (max-width: 640px) {
  .legal-container {
    padding: 28px 18px 48px 18px;
  }
  .legal-title {
    font-size: 1.75rem;
  }
}
