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

:root {
  --text: #1a1a1a;
  --muted: #555;
  --border: #e0e0e0;
  --accent: #0066cc;
  --bg: #ffffff;
  --bg-subtle: #f7f7f7;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  margin: 0;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header ── */
header {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

/* ── Language switcher ── */
.lang-switcher {
  display: flex;
  gap: 0.25rem;
}

.lang-switcher a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--muted);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.lang-switcher a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.lang-switcher a.active {
  color: var(--accent);
  border-color: var(--accent);
  background: #e8f0fc;
}

/* ── Main content ── */
main {
  padding: 2.5rem 0 3rem;
}

/* ── Legal document headings ── */
h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.last-updated {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
  display: block;
}

h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

h2:first-of-type { border-top: none; padding-top: 0; }

p, ul, ol { margin-bottom: 1rem; }

ul, ol { padding-left: 1.5rem; }

li { margin-bottom: 0.25rem; }

a { color: var(--accent); }

strong { font-weight: 600; }

/* ── Home / index pages ── */
.app-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.app-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.app-list li:last-child { border-bottom: none; }

.app-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.doc-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.doc-links a {
  font-size: 0.875rem;
  text-decoration: none;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  transition: all 0.15s;
}

.doc-links a:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--bg-subtle);
}

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