:root {
  color-scheme: light;
  --ink: #14152f;
  --muted: #626b8b;
  --purple: #5a43f1;
  --purple-dark: #34256f;
  --orange: #ff9869;
  --surface: rgba(255, 255, 255, 0.88);
  --line: #dde2ef;
  --green: #16a66b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 5%, rgba(90, 67, 241, 0.12), transparent 28rem),
    radial-gradient(circle at 7% 70%, rgba(255, 152, 105, 0.12), transparent 24rem),
    #f7f8fc;
  line-height: 1.6;
}

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

.shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(221, 226, 239, 0.8);
  background: rgba(247, 248, 252, 0.84);
  backdrop-filter: blur(18px);
}

.nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 800; }
.brand img { width: 44px; height: 44px; }
.brand small { display: block; color: var(--muted); font-weight: 500; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 650; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--purple); }

.hero { padding: 92px 0 72px; display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 48px; align-items: center; }
.eyebrow { margin: 0 0 14px; color: var(--purple); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 850; }
h1, h2, h3 { margin-top: 0; line-height: 1.12; letter-spacing: -.035em; }
h1 { max-width: 800px; margin-bottom: 20px; font-size: clamp(2.7rem, 6vw, 5.4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.65rem); }
.lead { max-width: 720px; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: white; text-decoration: none; font-weight: 800; }
.button.primary { border-color: transparent; color: white; background: linear-gradient(135deg, var(--purple), #743df2); box-shadow: 0 12px 30px rgba(90, 67, 241, .24); }

.local-card { padding: 28px; border: 1px solid rgba(90,67,241,.16); border-radius: 28px; background: linear-gradient(145deg, #211946, #4a3688); color: white; box-shadow: 0 28px 70px rgba(28, 25, 66, .2); }
.local-card .status { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 42px; color: #dcd6ff; font-weight: 700; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #40d69b; box-shadow: 0 0 0 7px rgba(64,214,155,.14); }
.local-card strong { display: block; font-size: 1.35rem; }
.local-card p { color: #d8d5ec; }
.address { display: inline-block; padding: 10px 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; background: rgba(255,255,255,.08); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.section { padding: 68px 0; }
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head p { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 15px 40px rgba(33, 36, 72, .055); }
.icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 14px; color: var(--purple); background: #efedff; font-size: 1.35rem; font-weight: 900; }
.card p { margin-bottom: 0; color: var(--muted); }

.privacy-banner { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 34px; border: 1px solid #d7d2ff; border-radius: 25px; background: linear-gradient(120deg, #f1efff, #fff); }
.privacy-banner p { margin: 7px 0 0; color: var(--muted); }

.page { padding: 64px 0 90px; }
.page article { max-width: 850px; padding: clamp(24px, 5vw, 52px); border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: 0 18px 50px rgba(33,36,72,.06); }
.page h1 { font-size: clamp(2.4rem, 5vw, 4.25rem); }
.page h2 { margin-top: 42px; font-size: 1.55rem; }
.page p, .page li { color: #4f5878; }
.notice { padding: 18px 20px; border-left: 4px solid var(--purple); border-radius: 0 14px 14px 0; background: #f1efff; }

.footer { padding: 34px 0 44px; border-top: 1px solid var(--line); }
.footer-row { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer p { margin: 0; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }

.oauth-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.oauth-card { width: min(560px, 100%); padding: 36px; text-align: center; border: 1px solid var(--line); border-radius: 26px; background: white; box-shadow: 0 25px 70px rgba(33,36,72,.12); }
.spinner { width: 40px; height: 40px; margin: 0 auto 22px; border: 4px solid #e4e1ff; border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; }
.oauth-card[data-state="error"] .spinner { border: 0; animation: none; }
.oauth-card[data-state="error"] .spinner::after { content: "!"; display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: white; background: #d84343; font-weight: 900; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 62px; }
  .grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .privacy-banner, .footer-row { align-items: flex-start; flex-direction: column; }
}
