:root {
  --navy: #0b1f5c;
  --navy-soft: #1d3478;
  --teal: #2dd4bf;
  --violet: #8b5cf6;
  --violet-soft: #a78bfa;
  --bg: #f6f5ff;
  --text: #1b2340;
  --muted: #5a6280;
  --card: #ffffff;
  --border: #e1def5;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-soft); }

/* ---------- Home ---------- */
.home {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 32px 16px;
  text-align: center;
  background: radial-gradient(circle at 50% 35%, #fff 0%, var(--bg) 60%, #dcd6ff 100%);
}

.home .logo {
  width: min(520px, 88vw);
  height: auto;
  filter: drop-shadow(0 10px 24px rgba(11, 31, 92, 0.18));
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  border: 3px solid var(--navy);
  background: var(--teal);
  color: var(--navy);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--navy);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}
.btn:hover { background: var(--violet-soft); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--navy); }
.btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }

.apps { width: min(520px, 100%); }
.apps h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.app-card {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  gap: 16px;
  padding: 14px 18px 14px 14px;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 3px solid var(--navy);
  border-radius: 22px;
  box-shadow: 0 5px 0 var(--navy);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.app-card:last-child { margin-bottom: 0; }
.app-card:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--navy); }
.app-card:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--navy); }
.app-card:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }
.app-card img { width: 72px; height: 72px; border-radius: 18px; flex: none; }
.app-text { display: flex; flex-direction: column; line-height: 1.35; }
.app-text strong { color: var(--navy); font-size: 1.1rem; font-weight: 800; }
.app-text span { color: var(--muted); font-size: 0.95rem; }
.app-arrow { margin-left: auto; font-size: 1.5rem; font-weight: 800; color: var(--navy); }

.home footer { color: var(--muted); font-size: 0.9rem; }

/* ---------- Legal pages ---------- */
.legal-header {
  background: var(--navy);
  padding: 16px;
}
.legal-header .inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.legal-header img { height: 52px; width: auto; display: block; }
.legal-header nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  margin-left: 16px;
  font-size: 0.95rem;
}
.legal-header nav a:hover,
.legal-header nav a[aria-current="page"] { color: var(--teal); }

main.legal {
  max-width: 820px;
  margin: 32px auto 64px;
  padding: 32px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
}

main.legal h1 {
  color: var(--navy);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 4px;
}
main.legal .updated { color: var(--muted); margin: 0 0 24px; }
main.legal h2 {
  color: var(--navy);
  font-size: 1.3rem;
  margin: 36px 0 8px;
  padding-top: 8px;
  border-top: 2px dashed var(--border);
}
main.legal h3 { color: var(--navy-soft); font-size: 1.05rem; margin: 20px 0 4px; }
main.legal ul { padding-left: 22px; }
main.legal li { margin: 4px 0; }
main.legal .toc {
  background: #f0eeff;
  border-radius: 12px;
  padding: 16px 20px;
}
main.legal .toc ol { margin: 0; padding-left: 22px; }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0 16px 40px;
}

@media (max-width: 560px) {
  main.legal { margin: 16px; padding: 22px 18px; }
  .legal-header img { height: 40px; }
  .legal-header nav a { margin-left: 10px; font-size: 0.85rem; }
}

/* An app without its own page yet: same card, no link behaviour. */
div.app-card:hover,
div.app-card:active { transform: none; box-shadow: 0 5px 0 var(--navy); }
.app-badge {
  margin-left: auto;
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f0eeff;
  color: var(--navy-soft);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}
