:root {
  --page-bg: #ffffff;
  --card-bg: #ffffff;
  --gate-bg: #f4f6f9;
  --text: #1f2933;
  --muted: #5f6b7a;
  --border: #dde3ea;
  --brand: #1a56db;
  --btn-bg: #ffffff;
  --btn-border: #c7cfd9;
  --glow-a: rgba(59, 130, 246, .10);
  --glow-b: rgba(245, 158, 11, .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #121417;
    --card-bg: #1b1f24;
    --gate-bg: #121417;
    --text: #e6e9ee;
    --muted: #9aa5b1;
    --border: #2c333b;
    --brand: #7aa2ff;
    --btn-bg: #242a31;
    --btn-border: #3a424c;
    --glow-a: rgba(59, 130, 246, .14);
    --glow-b: rgba(245, 158, 11, .06);
  }
}
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--page-bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
#app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--gate-bg);
  z-index: 10;
  overflow-y: auto;
  box-sizing: border-box;
}
.gate[hidden] { display: none; }
.gate-layout { display: flex; align-items: center; justify-content: center; gap: 56px; width: 100%; max-width: 1180px; margin: auto; }
.gate-card {
  width: 100%;
  max-width: 380px;
  flex: 0 0 auto;
  box-sizing: border-box;
  padding: 32px 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(23, 32, 51, .10);
}
.gate-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}
.gate-brand img { display: block; }
.wordmark { font-size: 22px; font-weight: 800; font-style: italic; letter-spacing: -.01em; color: var(--text); }
.wordmark span { color: #f59e0b; }

/* Sign-in page: what the tool does, beside the card. Hidden while loading (small splash only). */
.showcase { display: none; flex: 1 1 auto; min-width: 0; max-width: 640px; }
.gate.gate-signin { align-items: flex-start; padding: 40px 24px; background: var(--gate-bg) linear-gradient(135deg, var(--glow-a) 0%, transparent 45%, var(--glow-b) 100%); }
.gate.gate-signin .showcase { display: block; }
.gate.gate-signin .gate-card .gate-brand { display: none; }
.showcase-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.showcase-logo { display: block; border-radius: 14px; box-shadow: 0 10px 24px rgba(55, 48, 163, .28); }
.showcase .wordmark { font-size: 28px; line-height: 1.1; }
.tagline { color: var(--muted); font-size: 13px; margin-top: 3px; }
.showcase-title { font-size: 30px; line-height: 1.2; margin: 0 0 10px; letter-spacing: -.01em; }
.showcase-lead { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.features { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.features li { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.features strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.feature-icon { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.feature-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature-icon.blue { background: #e0ebff; color: #1d4ed8; }
.feature-icon.green { background: #dcfce7; color: #15803d; }
.feature-icon.amber { background: #fef3c7; color: #b45309; }
.feature-icon.violet { background: #ede9fe; color: #6d28d9; }
.feature-icon.teal { background: #ccfbf1; color: #0f766e; }
.trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 13px; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { width: 16px; height: 16px; fill: none; stroke: #16a34a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gate.gate-signin .gate-card { position: sticky; top: 40px; margin-top: 96px; }
@media (max-width: 960px) {
  .gate-layout { flex-direction: column-reverse; gap: 28px; }
  .gate.gate-signin .gate-card { position: static; margin-top: 0; }
  .gate.gate-signin .gate-card .gate-brand { display: flex; }
  .showcase { max-width: 640px; }
  .showcase-title { font-size: 24px; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .gate.gate-signin { padding: 20px 16px; }
}
.gate h1 {
  font-size: 18px;
  margin: 0 0 6px;
}
.gate p { margin: 0 0 18px; }
.gate-muted { color: var(--muted); font-size: 13px; }
.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  margin-bottom: 18px;
  background: var(--btn-bg);
  color: var(--text);
  border: 1px solid var(--btn-border);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.google-btn:hover { border-color: var(--brand); }
.gate-link {
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-color-scheme: dark) {
  .feature-icon.blue { background: rgba(59, 130, 246, .18); color: #93c5fd; }
  .feature-icon.green { background: rgba(34, 197, 94, .16); color: #86efac; }
  .feature-icon.amber { background: rgba(245, 158, 11, .16); color: #fcd34d; }
  .feature-icon.violet { background: rgba(139, 92, 246, .18); color: #c4b5fd; }
  .feature-icon.teal { background: rgba(20, 184, 166, .16); color: #5eead4; }
  .showcase-logo { box-shadow: 0 10px 24px rgba(0, 0, 0, .4); }
}
