:root {
  --bg: #f3f6fc; --ink: #0e1530; --muted: #5b6685; --blue: #1f7aff; --navy-1: #0f1633; --navy-2: #1d2f68;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--ink);
  background: radial-gradient(1100px 520px at 50% -120px, #dbe8ff 0%, rgba(219,232,255,0) 70%), var(--bg);
}
a { color: var(--blue); }

.topbar { display: flex; justify-content: flex-end; padding: 16px 20px; min-height: 76px; }
.auth { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.auth-note { margin: 0; font-size: 14px; }
.auth-note.error { color: #b3261e; }
.muted { color: var(--muted); }
.who { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.btn-quiet { font: inherit; font-size: 14px; border: 1px solid #c9d3ea; background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.btn-quiet:hover { border-color: var(--blue); color: var(--blue); }

.hub { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 0 20px 48px; text-align: center; }
.logo { width: min(240px, 52vw); height: auto; display: block; margin: 0 auto 8px; }
.hub h1 { margin: 0; font-size: clamp(34px, 6vw, 52px); letter-spacing: .02em; }
.lead { margin: 6px 0 36px; color: var(--muted); font-size: 18px; }

.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; text-align: left; }
.app {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 14px; min-height: 230px; padding: 28px;
  border-radius: 28px; color: #fff; text-decoration: none; overflow: hidden;
  background: linear-gradient(145deg, var(--navy-1), var(--navy-2));
  box-shadow: 0 10px 30px rgba(15, 22, 51, .22); transition: transform .15s ease, box-shadow .15s ease;
}
.app::after { content: ""; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%; border: 18px solid rgba(31, 122, 255, .2); pointer-events: none; }
.app:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(31, 122, 255, .35); }
.app:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.app-icon { width: 64px; height: 64px; border-radius: 18px; background: rgba(255,255,255,.1); display: grid; place-items: center; color: #8ec1ff; }
.app-icon svg { width: 40px; height: 40px; }
.app-text { display: flex; flex-direction: column; gap: 6px; align-self: start; }
.app-name { font-size: 28px; font-weight: 700; }
.app-tag { color: #c4d3f5; font-size: 15px; line-height: 1.4; }
.app-go { font-weight: 600; color: #8ec1ff; }

.foot { padding: 20px; text-align: center; font-size: 14px; color: var(--muted); display: flex; gap: 10px; justify-content: center; }
.foot a { color: var(--muted); }

/* privacy + terms pages */
.legal-head { padding: 18px 20px; max-width: 760px; margin: 0 auto; width: 100%; }
.legal-home { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 20px; }
.legal-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 20px 40px; line-height: 1.6; }
.legal-main h1 { font-size: 34px; margin: 12px 0 4px; }
.legal-main h2 { font-size: 20px; margin: 28px 0 6px; }
.legal-main ul { padding-left: 22px; }
.legal-main li { margin: 8px 0; }
.legal-main code { background: #e6ecfa; border-radius: 4px; padding: 1px 5px; }

@media (max-width: 520px) {
  .apps { grid-template-columns: 1fr; }
  .app { min-height: 200px; padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { .app { transition: none; } .app:hover { transform: none; } }
