:root {
  --bg: #0a0a12;
  --bg-soft: #12111c;
  --ink: #f3f1f9;
  --slate: #c9c4d6;
  --grey: #8c87a0;
  --purple-deep: #4b2972;
  --purple: #7d21cd;
  --accent: #a855f7;
  --accent-2: #c084fc;
  --border: rgba(168, 85, 247, 0.22);
  --card: rgba(255, 255, 255, 0.035);
  --card-border: rgba(255, 255, 255, 0.09);
  --callout: rgba(168, 85, 247, 0.09);
  --green: #4ade80;
  --green-bg: rgba(74, 222, 128, 0.12);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.12);
  --gradient: linear-gradient(135deg, #7d21cd 0%, #a855f7 60%, #c084fc 100%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(125, 33, 205, 0.35), transparent 60%),
    radial-gradient(50rem 30rem at -10% 10%, rgba(168, 85, 247, 0.18), transparent 55%),
    var(--bg);
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
main.wrap { padding-top: 2.25rem; padding-bottom: 4rem; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--card-border);
  background: rgba(10, 10, 18, 0.75);
  backdrop-filter: blur(10px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; height: 3.75rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.02rem; letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 9px;
  background: var(--gradient);
  box-shadow: 0 2px 12px rgba(125, 33, 205, 0.55);
}
.header-user { display: flex; align-items: center; gap: 0.9rem; }

.site-footer { border-top: 1px solid var(--card-border); padding: 1.25rem 0; }

h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 2.1rem; font-weight: 800; margin: 0 0 0.6rem; }
h2 { font-size: 1.25rem; font-weight: 700; margin: 0; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.35rem; }
.lede { color: var(--slate); font-size: 1.05rem; max-width: 42rem; }
.muted { color: var(--grey); font-size: 0.88rem; }
a { color: var(--accent-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.25rem 0.75rem; border-radius: 999px; margin-bottom: 1rem;
  background: var(--callout); border: 1px solid var(--border);
  color: var(--accent-2); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
}
.accent-text {
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero { padding: 1.5rem 0 2.25rem; }
.hero.compact { padding: 0.25rem 0 1.75rem; }

.badge {
  display: inline-block; padding: 0.1rem 0.65rem; border-radius: 999px;
  background: var(--callout); border: 1px solid var(--border);
  color: var(--accent-2); font-size: 0.8rem; font-weight: 500;
}
.badge.ok { background: var(--green-bg); color: var(--green); border-color: rgba(74,222,128,0.3); }
.badge.bad { background: var(--red-bg); color: var(--red); border-color: rgba(248,113,113,0.3); }

.card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 14px; padding: 1.25rem 1.4rem; margin: 1.25rem 0;
}

.facts { display: grid; grid-template-columns: 9rem 1fr; gap: 0.6rem 1rem; margin: 0; }
.facts dt { color: var(--grey); font-size: 0.9rem; }
.facts dd { margin: 0; }

.callout {
  background: var(--callout); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 10px;
  padding: 0.8rem 1.1rem; margin: 1.25rem 0; color: var(--slate); font-size: 0.92rem;
}
.callout.warn { font-weight: 500; color: var(--accent-2); }
.callout.bad { background: var(--red-bg); border-color: rgba(248,113,113,0.3); border-left-color: var(--red); color: var(--red); }

.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.3rem; border-radius: 10px; border: 0;
  background: var(--gradient); color: #ffffff; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(125, 33, 205, 0.35);
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(125, 33, 205, 0.5); }
.button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.button.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--card-border); box-shadow: none; }
.button.secondary:hover { background: rgba(255,255,255,0.06); }
.button.ghost { background: transparent; color: var(--slate); border: 1px solid var(--card-border); box-shadow: none; }
.button.ghost:hover { background: rgba(255,255,255,0.05); color: var(--ink); }
.button.small { padding: 0.4rem 0.85rem; font-size: 0.85rem; }
.button.google { background: #ffffff; color: #1f1f1f; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.button.google:hover { background: #f3f3f3; }

.auth-card { max-width: 26rem; }
.fine-print { max-width: 30rem; margin-top: 1.25rem; }

label { display: block; margin: 0.75rem 0 0.3rem; font-size: 0.88rem; color: var(--slate); font-weight: 500; }
input, textarea {
  width: 100%; padding: 0.6rem 0.75rem; font: inherit; color: var(--ink);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border); border-radius: 9px; margin-bottom: 0.5rem;
  resize: vertical;
}
input::placeholder, textarea::placeholder { color: var(--grey); }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(168,85,247,0.18); }
form .button { margin-top: 0.6rem; }

/* ---- app launcher ---- */
.app-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem; margin-bottom: 2.25rem;
}
.app-tile {
  display: flex; flex-direction: column; gap: 0.75rem;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 16px;
  padding: 1.25rem; text-decoration: none; color: var(--ink);
  transition: border-color 0.15s ease, transform 0.08s ease, background 0.15s ease;
}
.app-tile:hover { border-color: var(--border); background: rgba(255,255,255,0.055); transform: translateY(-2px); }
.app-tile-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 10px;
  background: var(--gradient); color: #fff; font-weight: 700; font-size: 0.9rem;
}
.app-tile-body { display: flex; flex-direction: column; gap: 0.2rem; }
.app-tile-name { font-weight: 700; font-size: 1rem; }
.app-tile-desc { color: var(--slate); font-size: 0.88rem; }
.app-tile-note { color: var(--grey); font-size: 0.76rem; margin-top: auto; }

/* ---- dashboard columns ---- */
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; align-items: start; }
.column { min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.25rem; }

.update-card .update-body { color: var(--slate); margin: 0.3rem 0 0.5rem; white-space: pre-wrap; }

.idea-card { display: flex; gap: 1rem; align-items: flex-start; }
.idea-main { flex: 1; min-width: 0; }
.idea-vote { flex-shrink: 0; }
.vote-button {
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
  min-width: 4rem; padding: 0.6rem 0.75rem; border-radius: 12px;
  border: 1px solid var(--card-border); background: rgba(255,255,255,0.03);
  color: var(--ink); font: inherit; cursor: pointer;
}
.vote-button:hover:not(:disabled) { border-color: var(--accent); background: var(--callout); }
.vote-button .vote-count { font-size: 1.2rem; font-weight: 800; color: var(--accent-2); }
.vote-button .vote-label { font-size: 0.72rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.03em; }
.vote-button.voted { border-color: var(--accent); background: var(--callout); cursor: default; }
.vote-button.voted .vote-label { color: var(--accent-2); }
.vote-button:disabled { opacity: 0.85; }

@media (max-width: 56rem) {
  .columns { grid-template-columns: 1fr; }
}

@media (max-width: 34rem) {
  .facts { grid-template-columns: 1fr; gap: 0.1rem; }
  .facts dd { margin-bottom: 0.75rem; }
  h1 { font-size: 1.6rem; }
  .header-row { height: auto; padding: 0.75rem 0; flex-wrap: wrap; }
}
