/* ────────────────────────────────────────────────────────────────
   SimQuota — shared base styles for subpages.
   Theme vars, reset, nav, mobile drawer, footer, common typography.
   Mirrors index.html inline styles so subpages match home exactly.
   If a value diverges, fix it here AND in index.html simultaneously.
   ──────────────────────────────────────────────────────────────── */

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

:root {
  --blue:   #2563eb;
  --amber:  #f59e0b;
  --dark:   #080f1e;
  --card:   rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.08);
  --text-p: #ffffff;
  --text-s: rgba(255,255,255,0.70);
  --text-t: rgba(255,255,255,0.42);
  --sp-1: 0.75rem;
  --sp-2: 1.25rem;
  --sp-3: 2.5rem;
  --sp-4: 5rem;
  --serif: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--dark); color: var(--text-p); line-height: 1.6; overflow-x: hidden; min-height: 100vh; }

/* ── Reveal animations ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 40px);
  background: rgba(8,15,30,0.72);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--border);
  transition: background .25s ease, padding .25s ease, border-color .25s ease;
}
nav.scrolled {
  background: rgba(8,15,30,0.92);
  padding-top: 10px; padding-bottom: 10px;
  border-bottom-color: rgba(255,255,255,.12);
}
.logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--serif); font-size: 22px; letter-spacing: -.3px;
  text-decoration: none; color: var(--text-p);
}
.logo-mark {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark-img { width: 100%; height: 100%; display: block; }
.logo:hover .logo-mark { transform: rotate(-4deg) scale(1.06); transition: transform .25s ease; }

.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-link {
  position: relative;
  font-size: 14px; font-weight: 500; color: var(--text-s);
  text-decoration: none; padding: 4px 0;
  transition: color .18s;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--blue);
  transform: scaleX(0); transform-origin: center;
  transition: transform .22s ease;
}
.nav-link:hover { color: var(--text-p); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--text-p); }
.nav-link.active::after { transform: scaleX(1); }

.btn-nav {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px 10px 20px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 13.5px; font-weight: 600; letter-spacing: -.1px;
  border-radius: 10px; text-decoration: none;
  box-shadow: 0 4px 14px rgba(37,99,235,.32), inset 0 1px 0 rgba(255,255,255,.16);
  transition: transform .15s ease, box-shadow .18s ease;
}
.btn-nav::after {
  content: '→'; display: inline-block;
  transition: transform .2s ease;
  font-family: var(--sans); font-weight: 500;
}
.btn-nav:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(37,99,235,.5), inset 0 1px 0 rgba(255,255,255,.16); }
.btn-nav:hover::after { transform: translateX(3px); }

/* ── Mobile nav ── */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 8px; color: var(--text-p);
}
.nav-toggle svg { width: 100%; height: 100%; }
.mobile-drawer {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(8,15,30,0.98); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  padding: 84px var(--sp-3) var(--sp-3); gap: 4px;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.mobile-drawer.open { opacity: 1; pointer-events: auto; }
.mobile-drawer a {
  display: block; padding: 18px 4px; font-size: 22px; font-weight: 500;
  color: var(--text-p); text-decoration: none; border-bottom: 1px solid var(--border);
  letter-spacing: -.3px;
}
.mobile-drawer a.cta {
  margin-top: var(--sp-2); padding: 16px 20px; text-align: center;
  background: var(--blue); border-radius: 12px; border: none; font-weight: 600; font-size: 16px;
}
body.drawer-open { overflow: hidden; }

@media (max-width: 768px) {
  .nav-right { display: none; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
}
@media (min-width: 769px) {
  .mobile-drawer { display: none !important; }
}

/* ── Typography helpers ── */
.section { padding: var(--sp-4) var(--sp-3); max-width: 1100px; margin: 0 auto; }
.section-label { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--blue); margin-bottom: var(--sp-1); text-align: center; }
.section-title { font-family: var(--serif); font-size: clamp(30px, 4vw, 46px); font-weight: 400; letter-spacing: -.4px; text-align: center; margin-bottom: var(--sp-1); color: var(--text-p); }
.section-title em { font-style: italic; color: var(--blue); }
.section-sub { font-size: 16px; color: var(--text-s); text-align: center; max-width: 540px; margin: 0 auto var(--sp-3); line-height: 1.65; }

/* Page hero (subpages — sits below fixed nav, smaller than home hero) */
.page-hero { padding: calc(var(--sp-4) + 60px) var(--sp-3) var(--sp-3); max-width: 980px; margin: 0 auto; text-align: center; }
.page-hero h1 { font-family: var(--serif); font-size: clamp(40px, 6vw, 64px); font-weight: 400; letter-spacing: -.6px; line-height: 1.05; color: var(--text-p); margin-bottom: var(--sp-2); }
.page-hero h1 em { font-style: italic; color: var(--blue); }
.page-hero .lede { font-size: 18px; color: var(--text-s); max-width: 600px; margin: 0 auto; line-height: 1.6; }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; background: var(--blue); color: #fff;
  font-size: 15px; font-weight: 600; border-radius: 12px; text-decoration: none;
  transition: transform .18s, box-shadow .18s;
  box-shadow: 0 6px 20px rgba(37,99,235,.32);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(37,99,235,.45); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; background: rgba(255,255,255,.06); color: var(--text-p);
  border: 1px solid var(--border); border-radius: 12px; font-size: 15px; font-weight: 500;
  text-decoration: none; transition: background .18s, border-color .18s;
}
.btn-secondary:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.2); }

/* ── Footer ── */
footer {
  position: relative;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(37,99,235,.025) 100%);
  padding: var(--sp-4) clamp(20px, 4vw, 40px) var(--sp-2);
  margin-top: var(--sp-4);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.footer-brand { max-width: 320px; }
.footer-brand .logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--serif); font-size: 22px; letter-spacing: -.3px;
  color: var(--text-p); text-decoration: none;
  margin-bottom: 14px;
}
.footer-brand .footer-brand .tagline {
  font-family: var(--serif); font-size: 17px; color: var(--text-p);
  letter-spacing: -.2px; line-height: 1.4; font-style: italic;
  margin-bottom: var(--sp-2);
}
.footer-brand .principles {
  display: flex; flex-direction: column; gap: 8px;
  font-size: 12.5px; color: var(--text-t); line-height: 1.5;
}
.footer-brand .principles span { display: flex; align-items: center; gap: 8px; }
.footer-brand .principles svg { width: 12px; height: 12px; color: #34d399; flex-shrink: 0; }

.footer-col h4 {
  font-size: 11px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--text-t);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col a {
  font-size: 14px; color: var(--text-s); text-decoration: none;
  transition: color .15s;
}
.footer-col a:hover { color: var(--text-p); }

.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  padding-top: var(--sp-2);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  font-size: 12.5px; color: var(--text-t);
}
.footer-bottom .meta a { color: var(--text-s); text-decoration: none; }
.footer-bottom .meta a:hover { color: var(--text-p); }
.footer-bottom .copyright { letter-spacing: .2px; }
.footer-bottom .built-with {
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: .2px;
}
.footer-bottom .built-with svg { width: 12px; height: 12px; color: #ef4444; }

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: var(--sp-3) var(--sp-2); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 500px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Long-form legal / policy pages (refunds, accessibility, privacy sections, terms) */
.prose {
  max-width: 720px; margin: 0 auto;
  padding: 0 var(--sp-3); color: var(--text-s);
  font-size: 15.5px; line-height: 1.75;
}
.prose h2 {
  font-family: var(--serif); font-size: 32px; font-weight: 400;
  color: var(--text-p); letter-spacing: -.3px;
  margin: var(--sp-4) 0 var(--sp-2);
  scroll-margin-top: 100px;
}
.prose h2 em { color: var(--blue); font-style: italic; }
.prose h3 {
  font-size: 17px; font-weight: 600; color: var(--text-p);
  margin: var(--sp-3) 0 10px;
}
.prose p { margin-bottom: 14px; }
.prose p strong { color: var(--text-p); font-weight: 600; }
.prose ul, .prose ol { margin: 10px 0 14px; padding-left: 0; list-style: none; }
.prose ul li, .prose ol li { padding: 4px 0 4px 22px; position: relative; }
.prose ul li::before { content: '•'; position: absolute; left: 6px; color: var(--blue); top: 4px; }
.prose ol { counter-reset: olnum; }
.prose ol li { counter-increment: olnum; }
.prose ol li::before { content: counter(olnum) '.'; position: absolute; left: 0; color: var(--blue); font-weight: 600; }
.prose a { color: var(--blue); text-decoration: none; border-bottom: 1px solid rgba(37,99,235,.3); }
.prose a:hover { border-bottom-color: var(--blue); }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px; padding: 2px 8px; border-radius: 5px;
  background: rgba(255,255,255,.06); color: var(--text-p);
}
.prose blockquote {
  border-left: 3px solid var(--blue);
  padding: 6px 20px; margin: var(--sp-2) 0;
  background: rgba(37,99,235,.04);
  border-radius: 0 12px 12px 0;
  font-style: italic; color: var(--text-p);
}
.prose .toc {
  margin: var(--sp-2) 0 var(--sp-3);
  padding: 18px 22px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 14px;
}
.prose .toc-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--text-t); margin-bottom: 10px;
}
.prose .toc ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 24px; }
.prose .toc ul li { padding: 4px 0; }
.prose .toc ul li::before { display: none; }
@media (max-width: 600px) { .prose .toc ul { columns: 1; } }
.prose .meta-stamp {
  font-size: 12.5px; color: var(--text-t);
  margin-bottom: var(--sp-3);
  letter-spacing: .3px;
}

/* Status indicator badges */
.status-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 100px;
  font-size: 13px; font-weight: 600;
}
.status-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.status-badge.ok    { background: rgba(52,211,153,.10); border: 1px solid rgba(52,211,153,.25); color: #34d399; }
.status-badge.warn  { background: rgba(245,158,11,.10); border: 1px solid rgba(245,158,11,.28); color: #f59e0b; }
.status-badge.down  { background: rgba(239,68,68,.10);  border: 1px solid rgba(239,68,68,.30);  color: #ef4444; }
.status-badge.unknown { background: rgba(255,255,255,.04); border: 1px solid var(--border); color: var(--text-t); }
.status-badge .dot.unknown-dot { animation: pulse-dim 1.6s ease-in-out infinite; }
@keyframes pulse-dim { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }

/* Auth flow / utility pages (verify, reset, unsubscribe, family/join, refer) */
.auth-wrap {
  min-height: calc(100vh - 200px);
  display: flex; align-items: center; justify-content: center;
  padding: 120px var(--sp-3) var(--sp-3);
}
.auth-card {
  max-width: 460px; width: 100%;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 24px; padding: var(--sp-4) var(--sp-3);
  text-align: center;
}
.auth-card .auth-icon {
  width: 64px; height: 64px; border-radius: 50%;
  margin: 0 auto var(--sp-2);
  display: flex; align-items: center; justify-content: center;
  background: rgba(37,99,235,.10); border: 1px solid rgba(37,99,235,.22);
}
.auth-card .auth-icon svg { width: 30px; height: 30px; color: var(--blue); }
.auth-card .auth-icon.success { background: rgba(52,211,153,.10); border-color: rgba(52,211,153,.22); }
.auth-card .auth-icon.success svg { color: #34d399; }
.auth-card .auth-icon.error { background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.25); }
.auth-card .auth-icon.error svg { color: #ef4444; }
.auth-card h1 {
  font-family: var(--serif); font-size: 32px; font-weight: 400;
  letter-spacing: -.3px; color: var(--text-p);
  margin-bottom: 10px; line-height: 1.2;
}
.auth-card h1 em { color: var(--blue); font-style: italic; }
.auth-card .auth-lede {
  font-size: 15px; color: var(--text-s); line-height: 1.65;
  margin-bottom: var(--sp-2);
}
.auth-card .auth-actions {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: var(--sp-2);
}
.auth-card form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.auth-card label {
  font-size: 13px; color: var(--text-s); margin-bottom: 4px;
}
.auth-card input {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid var(--border); border-radius: 10px;
  color: var(--text-p); font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-card input:focus { border-color: rgba(37,99,235,.7); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.auth-card input.error-field { border-color: rgba(239,68,68,.55); }
.auth-card .err-msg {
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5; padding: 10px 14px; border-radius: 8px;
  font-size: 13px; text-align: left;
  display: none;
}
.auth-card .err-msg.show { display: block; }
.auth-spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--text-p); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  nav { padding: 14px var(--sp-2); }
  .section { padding: var(--sp-3) var(--sp-2); }
  .page-hero { padding: 140px var(--sp-2) var(--sp-2); }
  .auth-wrap { padding: 100px var(--sp-2) var(--sp-2); }
  .auth-card { padding: var(--sp-3) var(--sp-2); }
  footer { padding: var(--sp-2); }
  footer .links { gap: 14px; }
}
