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

:root {
  --primary: #E8606A;
  --primary-hover: #D44F59;
  --primary-bg: #FFF5F5;
  --text: #1E293B;
  --text-muted: #64748B;
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --border: #E2E8F0;
  --radius: 0.5rem;
  --max-w: 44rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header / Nav ── */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
}

.nav-brand img {
  border-radius: 6px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.15rem;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

.nav-links a[aria-current="page"] {
  color: var(--primary);
  font-weight: 500;
}

/* ── Focus ── */

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Main ── */

main {
  flex: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
}

.language-links {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

.language-links a {
  color: var(--text-muted);
}

/* ── Hero (index) ── */

.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero-logo {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* ── Link Cards (index) ── */

.link-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
  margin-bottom: 3rem;
}

.link-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.link-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(232, 96, 106, 0.1);
}

.link-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.link-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ── Support Section ── */

.support-section {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.support-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.support-section p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.support-email {
  color: var(--primary);
  font-weight: 500;
}

/* ── Article (legal content) ── */

article h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

article .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

article h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

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

article h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

article p {
  margin-bottom: 0.75rem;
}

article ul,
article ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}

article li {
  margin-bottom: 0.35rem;
}

article li ul {
  margin-top: 0.35rem;
}

article a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(232, 96, 106, 0.3);
  text-underline-offset: 2px;
}

article a:hover {
  text-decoration-color: var(--primary);
}

article hr {
  display: none;
}

/* ── Tables ── */

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  -webkit-overflow-scrolling: touch;
}

article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.5;
}

article th,
article td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
}

article th {
  background: var(--bg-alt);
  font-weight: 600;
}

/* ── TODO Markers ── */

.todo {
  background: #FEF3C7;
  border-left: 4px solid #F59E0B;
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0.75rem 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.todo strong {
  color: #92400E;
}

/* ── Address ── */

address {
  font-style: normal;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

/* ── Footer ── */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}

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

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── 404 ── */

.error-page {
  text-align: center;
  padding: 4rem 0;
}

.error-page h1 {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.error-page a {
  color: var(--primary);
  font-weight: 500;
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .site-nav {
    padding: 0.6rem 1rem;
  }

  .nav-links a {
    font-size: 0.78rem;
    padding: 0.25rem 0.4rem;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .hero-logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  .hero h1 {
    font-size: 1.3rem;
  }

  .link-cards {
    grid-template-columns: 1fr;
  }

  article h1 {
    font-size: 1.3rem;
  }

  article h2 {
    font-size: 1.05rem;
  }
}
