/* Shared stylesheet for Zapla trust, legal, and informational pages (/about, /privacy, /terms) */

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-muted: #ece9e2;
  --border: #e5e2da;
  --border-strong: #d4d0c7;
  --text: #161618;
  --text-muted: #5c5c64;
  --accent: #0f766e;
  --accent-fg: #ffffff;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-text: #92400e;
}

:root[data-theme="dark"] {
  --bg: #111113;
  --surface: #1b1b20;
  --surface-muted: #24242b;
  --border: #2a2a31;
  --border-strong: #3a3a44;
  --text: #f4f4f6;
  --text-muted: #a1a1ad;
  --accent: #10b981;
  --accent-fg: #081c15;
  --warn-bg: #261e0d;
  --warn-border: #5c4314;
  --warn-text: #fcd34d;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  opacity: 0.84;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.page-header-inner {
  max-width: 820px;
  margin: 0 auto;
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.04em;
}

.ring-primary {
  stroke: var(--text);
}

.ring-secondary {
  stroke: var(--text);
  opacity: 0.42;
}

.page-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.page-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.page-nav a:hover,
.page-nav a[aria-current="page"] {
  color: var(--text);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.lang-switch-btn {
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
}

.lang-switch-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-fg);
}

.page-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.doc-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.doc-title {
  margin: 0 0 8px;
  font-size: clamp(1.65rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.doc-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.doc-lead {
  margin: 14px 0 0;
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.doc-section {
  margin: 28px 0;
}

.doc-section h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.doc-section h3 {
  margin: 18px 0 6px;
  font-size: 1rem;
  font-weight: 600;
}

.doc-section p {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.doc-section ul {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: 0.95rem;
}

.doc-section li {
  margin-bottom: 6px;
}

.callout {
  margin: 22px 0;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.92rem;
}

.callout-warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}

.callout-title {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 650;
}

.callout p:last-child {
  margin-bottom: 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.info-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.info-card h3 {
  margin: 0 0 6px;
  font-size: 0.96rem;
}

.info-card p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--text-muted);
}

.doc-table-wrap {
  margin: 16px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.doc-table th,
.doc-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.doc-table thead th {
  background: var(--surface-muted);
  font-weight: 600;
}

.doc-table tbody tr:last-child td {
  border-bottom: none;
}

.doc-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-muted);
}

.cta-bar {
  margin-top: 32px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-fg);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.cta-btn:hover {
  opacity: 0.9;
}

.page-footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.page-footer-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.page-footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

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

@media (max-width: 640px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .page-header-inner {
    height: auto;
    padding: 12px 16px;
  }
}
