:root {
  --fg: #0f172a;
  --muted: #64748b;
  --soft: #94a3b8;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #ff5722;
  --accent-2: #ff9800;
  --accent-fg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
  --radius: 12px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #334155;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--fg);
  font-size: 18px;
}
.topbar .brand .logo-dot {
  width: 22px; height: 22px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 10px rgba(255, 87, 34, 0.35);
}
.top-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-fg);
  box-shadow: 0 8px 20px rgba(255, 87, 34, 0.35);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost {
  background: #fff;
  color: var(--fg);
  border-color: var(--border);
}
.btn.ghost:hover { background: var(--bg-soft); border-color: var(--border-strong); }
.btn.big { padding: 16px 30px; font-size: 16px; }
.btn.small { padding: 7px 14px; font-size: 13px; }

/* ---------- User chip ---------- */
[hidden] { display: none !important; }
.user-mini {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.user-mini img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eee;
  border: 1px solid var(--border);
  object-fit: cover;
}
.logout-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.logout-link:hover { color: var(--accent); text-decoration: underline; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}
.user-chip img {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #eee;
}
.user-chip span {
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Hero / generic page container ---------- */
.hero {
  flex: 1;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 72px 32px 96px;
}

h1 {
  font-size: clamp(48px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -2px;
  margin: 0 0 18px;
  background: linear-gradient(135deg, #0f172a 0%, #334155 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 { font-size: 24px; margin: 48px 0 14px; letter-spacing: -0.3px; }
.tag {
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 36px;
  max-width: 640px;
}

.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 56px; }

.hint { color: var(--muted); font-size: 14px; margin: 10px 0 0; }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 16px;
}
.feature-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  background: #fff;
}
.feature-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.15), rgba(255, 152, 0, 0.15));
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.feature-title { font-weight: 700; margin: 0 0 6px; font-size: 16px; }
.feature-desc { color: var(--muted); margin: 0; font-size: 14px; line-height: 1.5; }

/* ---------- Steps list ---------- */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 18px 14px 56px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 10px rgba(255, 87, 34, 0.3);
}

/* ---------- Auth page ---------- */
.hero.auth {
  max-width: 460px;
  padding-top: 80px;
}
.hero.auth h1 { font-size: 40px; }
.auth-card {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
  margin-top: 8px;
}
.hero.auth #googleBtn {
  width: 100%;
  background: #fff;
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: none;
}
.hero.auth #googleBtn:hover { background: var(--bg-soft); border-color: var(--border-strong); }

.account-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.account-card img {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #eee;
}
.account-name { font-weight: 600; }
.account-email { color: var(--muted); font-size: 14px; }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 24px;
  color: var(--soft);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

/* ---------- Toolbar preview on landing ---------- */
.toolbar-preview {
  margin: 32px auto 8px;
  max-width: 820px;
  padding: 0 8px;
}
.toolbar-preview svg {
  width: 100%;
  height: auto;
  display: block;
}
.toolbar-preview figcaption {
  margin-top: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
