/* ============================================================
   FindMeAnal — data-intelligence dashboard (parody)
   Palette: clean analytics light + cheeky pink accent
   ============================================================ */
:root {
  color-scheme: light; /* opt out of browser auto-dark-mode; this is a light design */
  --bg: #f5f6fb;
  --bg-2: #ffffff;
  --ink: #161a2b;
  --ink-soft: #5a6478;
  --line: #e6e8f2;
  --pink: #ff5d8f;
  --pink-deep: #d6346b;
  --violet: #6b5bd2;
  --pink-soft: #ffe3ee;
  --good: #18a558;
  --shadow: 0 10px 30px -12px rgba(40, 30, 70, 0.22);
  --shadow-lg: 0 30px 60px -20px rgba(40, 30, 70, 0.32);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* beat author display rules (e.g. .egg-overlay flex, .analysis-result grid) */
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); line-height: 1.55;
  background:
    radial-gradient(1100px 500px at 85% -8%, var(--pink-soft), transparent 60%),
    radial-gradient(900px 500px at -5% 5%, #ece9fb, transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: var(--pink-deep); text-decoration: none; }
code { font-family: var(--mono); background: var(--pink-soft); padding: 0.1em 0.4em; border-radius: 6px; font-size: 0.9em; color: var(--pink-deep); }
.muted { color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; font: inherit; font-weight: 700; cursor: pointer; padding: 0.8em 1.4em; border-radius: 999px; border: 2px solid transparent; transition: transform 0.12s ease, box-shadow 0.2s ease; text-decoration: none; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: linear-gradient(135deg, var(--pink), var(--violet)); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-lg { padding: 1.05em 2em; font-size: 1.1rem; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem clamp(1rem, 4vw, 2.5rem); background: rgba(255,255,255,0.75); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.brand-mark { font-size: 1.3em; }
.brand-accent { color: var(--pink-deep); }
.nav-links { display: flex; align-items: center; gap: clamp(0.6rem, 2vw, 1.4rem); }
.nav-links a { color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { background: var(--ink); color: #fff !important; padding: 0.5em 0.95em; border-radius: 999px; }
.nav-cta:hover { background: var(--pink-deep); }
@media (max-width: 660px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ---------- Dash hero ---------- */
.dash-hero { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem) 1rem; }
.dash-hero-inner { max-width: 760px; }
.status-pill { display: inline-flex; align-items: center; gap: 0.5rem; background: #fff; border: 1px solid var(--line); color: var(--good); font-weight: 700; font-size: 0.82rem; padding: 0.4em 0.9em; border-radius: 999px; box-shadow: var(--shadow); }
.status-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(24,165,88,0.5); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(24,165,88,0.5); } 70% { box-shadow: 0 0 0 8px rgba(24,165,88,0); } 100% { box-shadow: 0 0 0 0 rgba(24,165,88,0); } }
.dash-hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 900; margin-top: 1.1rem; background: linear-gradient(120deg, var(--ink), var(--pink-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dash-sub { color: var(--ink-soft); font-size: clamp(1rem, 2.2vw, 1.2rem); margin-top: 1rem; max-width: 56ch; }

/* ---------- Sections ---------- */
.dash-section { max-width: var(--maxw); margin: 0 auto; padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2.5rem); }
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.dash-head h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 900; }

/* ---------- KPI grid ---------- */
.kpi-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kpi { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -20px; bottom: -20px; width: 80px; height: 80px; border-radius: 50%; background: var(--pink-soft); opacity: 0.5; }
.kpi-label { color: var(--ink-soft); font-size: 0.85rem; font-weight: 600; position: relative; }
.kpi-value { font-size: 1.9rem; font-weight: 900; font-variant-numeric: tabular-nums; margin-top: 0.3rem; position: relative; }
.kpi-delta { font-size: 0.8rem; font-weight: 800; position: relative; }
.kpi-delta.up { color: var(--good); }
.kpi-delta.down { color: var(--pink-deep); }

/* ---------- Panels ---------- */
.panel-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.panel-wide { width: 100%; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.8rem; }
.panel-head h3 { font-size: 1.2rem; }
.tag { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--pink-deep); background: var(--pink-soft); padding: 0.3em 0.7em; border-radius: 999px; white-space: nowrap; }
.panel-lead { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1rem; }
.panel-foot { color: var(--ink-soft); font-size: 0.82rem; margin-top: 1rem; }

/* ---------- Progress + analysis ---------- */
.progress { margin-top: 1rem; height: 12px; background: var(--bg); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--pink), var(--violet)); transition: width 0.2s ease; }
.analysis-result { margin-top: 1rem; display: grid; gap: 0.6rem; animation: pop 0.3s ease; }
.metric-row { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0.8rem; background: var(--bg); border-radius: 10px; }
.metric-row span:first-child { color: var(--ink-soft); font-size: 0.9rem; }
.metric-row strong { font-variant-numeric: tabular-nums; }
@keyframes pop { from { transform: scale(0.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Gauges ---------- */
.gauge-row { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-around; }
.gauge { text-align: center; }
.gauge svg { transform: rotate(-90deg); }
.gauge-track { stroke: var(--line); }
.gauge-fill { stroke: url(#gaugeGrad); stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.gauge-label { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; margin-top: 0.4rem; }
.gauge-num { font-size: 1.1rem; font-weight: 900; }

/* ---------- Age breakdown ---------- */
.age-breakdown { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: 1.5rem; align-items: center; }
@media (max-width: 620px) { .age-breakdown { grid-template-columns: 1fr; } }
.age-headline { text-align: center; background: var(--bg); border-radius: var(--radius); padding: 1.4rem; }
.age-big { font-size: 3.4rem; font-weight: 900; line-height: 1; background: linear-gradient(120deg, var(--pink), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.age-unit { display: block; color: var(--ink-soft); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.age-verdict { color: var(--ink-soft); margin-top: 0.6rem; font-size: 0.92rem; }
.age-bars { display: grid; gap: 0.8rem; }
.factor { }
.factor-top { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 0.3rem; }
.factor-top span:last-child { font-weight: 800; }
.factor-track { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.factor-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), var(--violet)); border-radius: 999px; transition: width 1s ease; }

/* ---------- Leaderboard ---------- */
.leaderboard { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.leaderboard li { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0.8rem; background: var(--bg); border-radius: 10px; }
.lb-rank { font-weight: 900; color: var(--pink-deep); width: 1.6rem; }
.lb-name { font-weight: 700; flex: 1; }
.lb-score { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- Bar chart ---------- */
.barchart { display: grid; gap: 0.7rem; }
.bar-row { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 0.6rem; font-size: 0.9rem; }
.bar-label { color: var(--ink-soft); }
.bar-track { height: 14px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--violet), var(--pink)); border-radius: 999px; transition: width 1s ease; }
.bar-val { font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Powered by ---------- */
.powered { background: linear-gradient(160deg, #fff, #fbf7ff); }
.chips-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.stack-chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0.5em 0.9em; font-weight: 700; font-size: 0.9rem; box-shadow: var(--shadow); }

/* ---------- Footer (shared with toilet site) ---------- */
.footer { background: #11121e; color: #c5c9da; padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 2.5rem) 2rem; margin-top: 2rem; }
.footer-grid { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr; }
@media (max-width: 620px) { .footer-grid { grid-template-columns: 1fr; } }
.brand-footer { color: #fff; }
.brand-footer .brand-accent { color: var(--pink); }
.footer-tag { color: #8086a0; margin-top: 0.5rem; }
.footer-links { margin-top: 0.8rem; }
.footer-links a { color: var(--pink); font-weight: 700; }
.footer-business h4 { color: #fff; margin-bottom: 0.6rem; }
.footer-business ul { margin: 0; padding-left: 1.1rem; color: #8086a0; }
.footer-business li { margin-bottom: 0.3rem; }
.disclaimer { max-width: var(--maxw); margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.86rem; color: #8086a0; line-height: 1.6; }
.disclaimer strong { color: #c5c9da; }
.copyright { max-width: var(--maxw); margin: 1rem auto 0; font-size: 0.8rem; color: #5a5f78; }
.egg-hint { max-width: var(--maxw); margin: 0.6rem auto 0; font-size: 0.75rem; color: #3c4058; font-style: italic; cursor: help; }

/* ---------- Easter egg ---------- */
.egg-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(12,10,22,0.7); backdrop-filter: blur(6px); animation: pop 0.25s ease; }
.egg-modal { position: relative; background: #fff; color: var(--ink); border-radius: 24px; padding: clamp(1.8rem, 5vw, 3rem); max-width: 540px; box-shadow: var(--shadow-lg); }
.egg-close { position: absolute; top: 1rem; right: 1rem; border: none; background: var(--bg); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.egg-content h3 { font-size: 1.6rem; margin-bottom: 0.8rem; }
.egg-content p { color: var(--ink-soft); margin-bottom: 0.7rem; }
.egg-content .signoff { font-weight: 800; color: var(--pink-deep); }

@media (prefers-reduced-motion: reduce) {
  .status-pill .dot { animation: none; }
}
