/* ═══════════════════════════════════════════════════════════════
   AppTriage — Legal Pages Standalone CSS
   Lightweight, self-contained styles for public legal pages.
   No dependency on Tabler, Bootstrap, or brand.css.
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --legal-accent: #0054a6;
  --legal-text: #1e293b;
  --legal-muted: #64748b;
  --legal-border: #e2e8f0;
  --legal-surface: #f8f9fa;
  --legal-bg: #f1f5f9;
  --legal-radius: 12px;
  --legal-max-w: 720px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; color-scheme: light; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--legal-text);
  background: var(--legal-bg);
  line-height: 1.6;
  min-height: 100vh;
  padding: 1.5rem 1rem;
}

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

strong { font-weight: 600; }

/* ── Card ── */
.legal-card {
  max-width: var(--legal-max-w);
  margin: 0 auto;
  background: #fff;
  border-radius: var(--legal-radius);
  border: 1px solid var(--legal-border);
}

.legal-accent-bar {
  height: 4px;
  background: var(--legal-accent);
  border-radius: var(--legal-radius) var(--legal-radius) 0 0;
}

.legal-body {
  padding: 2rem 2.5rem;
}

@media (max-width: 640px) {
  .legal-body { padding: 1.5rem 1.25rem; }
}

/* ── App Identity ── */
.legal-app {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.legal-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
  object-fit: cover;
}

.legal-app-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--legal-accent);
  background: color-mix(in srgb, var(--legal-accent) 12%, transparent);
}

.legal-app-name { font-weight: 600; font-size: 0.95rem; }
.legal-app-dev { color: var(--legal-muted); font-size: 0.8125rem; }

/* ── Content Typography ── */
.legal-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.legal-content h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.legal-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

.legal-content p {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.legal-content ul, .legal-content ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
}

.legal-content a {
  color: var(--legal-accent);
}

/* ── Content template utility classes ── */
.legal-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

/* ── Footer ── */
.legal-footer {
  max-width: var(--legal-max-w);
  margin: 0.75rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--legal-border);
  color: var(--legal-muted);
  font-size: 0.8125rem;
}

.legal-footer a {
  color: var(--legal-muted);
}

.legal-footer a:hover {
  color: var(--legal-text);
}

.legal-powered-by {
  text-align: center;
  color: var(--legal-muted);
  font-size: 0.75rem;
  margin-top: 1rem;
  padding-bottom: 1rem;
}

.legal-powered-by a { color: var(--legal-muted); }

/* ── Store link ── */
.legal-store-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
  color: var(--legal-muted);
  font-size: 0.8125rem;
}

.legal-store-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Theme: Professional ── */
.theme-professional .legal-accent-bar { display: none; }
.theme-professional .legal-card {
  border-radius: 4px;
  border-left: 4px solid var(--legal-accent);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.theme-professional .legal-content h1 { font-size: 1.6rem; }
.theme-professional .legal-content h2 {
  font-size: 1.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--legal-border);
}

/* ── Theme: Minimal ── */
.theme-minimal .legal-accent-bar { display: none; }
.theme-minimal .legal-card {
  border: none;
  box-shadow: none;
  border-radius: 0;
  max-width: 640px;
  background: transparent;
}
.theme-minimal .legal-body { padding: 1rem 0; }
.theme-minimal .legal-content h1 { font-size: 1.4rem; }
.theme-minimal .legal-content h2 {
  font-size: 1.05rem;
  position: relative;
  padding-bottom: 0.35rem;
}
.theme-minimal .legal-content h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 24%; height: 2px;
  background: var(--legal-accent);
}

/* ── Print ── */
@media print {
  body { background: #fff; padding: 0; }
  .legal-card { border: none; box-shadow: none; max-width: 100%; }
  .legal-accent-bar, .legal-powered-by, .legal-store-link { display: none; }
  .legal-content { font-size: 11pt; }
  .legal-content h1 { font-size: 16pt; }
  .legal-content h2 { font-size: 13pt; }
}

/* Force light mode regardless of system preference */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: light;
  }
}
