/* Sparvo PWA — youthful, brand-forward (not generic purple AI) */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@500;700;800&family=Figtree:wght@400;600;700&display=swap");

:root {
  --sv-accent: #005278;
  --sv-accent-2: #0a7ea6;
  --sv-good: #027a48;
  --sv-warn: #b42318;
  --sv-bg: #eef6fb;
  --sv-ink: #0b1f2a;
  --sv-muted: #5b7180;
  --sv-card: #ffffff;
  --sv-radius: 18px;
  --sv-touch: 48px;
  --sv-font: "Figtree", system-ui, sans-serif;
  --sv-display: "Outfit", system-ui, sans-serif;
  --sv-shadow: 0 12px 40px rgba(0, 82, 120, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.sv-body {
  min-height: 100vh;
  font-family: var(--sv-font);
  color: var(--sv-ink);
  background:
    radial-gradient(900px 420px at 0% -10%, #b9e4ff 0%, transparent 55%),
    radial-gradient(800px 380px at 100% 0%, #c8f0dd 0%, transparent 50%),
    linear-gradient(180deg, #f7fcff 0%, var(--sv-bg) 40%, #e8f3ea 100%);
}

.sv-wrap {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 1rem 1rem 5.5rem;
}

.sv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.sv-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  max-width: min(62vw, 200px);
}
.sv-brand img.lockup {
  width: auto;
  height: 42px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  display: block;
}
.sv-lang a {
  color: var(--sv-accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

.sv-hero {
  text-align: center;
  padding: 1.25rem 0 0.5rem;
}
.sv-hero .lockup {
  width: min(100%, 340px);
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}
.sv-hero h1 {
  font-family: var(--sv-display);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
}
.sv-hero p.lead {
  color: var(--sv-muted);
  font-size: 1.05rem;
  margin: 0 auto 1.25rem;
  max-width: 28rem;
}

.sv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin: 1rem 0 1.5rem;
}
.sv-btn {
  min-height: var(--sv-touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.sv-btn-primary {
  background: linear-gradient(135deg, var(--sv-accent), var(--sv-accent-2));
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 82, 120, 0.28);
}
.sv-btn-secondary {
  background: #fff;
  color: var(--sv-accent);
  border: 2px solid rgba(0, 82, 120, 0.18);
}
.sv-btn-good {
  background: var(--sv-good);
  color: #fff;
}

.sv-card {
  background: var(--sv-card);
  border-radius: var(--sv-radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--sv-shadow);
  margin-bottom: 0.9rem;
}
.sv-card h2 {
  font-family: var(--sv-display);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.sv-card p { margin: 0.35rem 0; color: var(--sv-muted); line-height: 1.45; }
.sv-muted { color: var(--sv-muted); }
.sv-good { color: var(--sv-good); font-weight: 700; }
.sv-warn { color: var(--sv-warn); font-weight: 700; }

.sv-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.sv-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  align-items: start;
}
.sv-steps li::before {
  content: counter(step);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--sv-accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-family: var(--sv-display);
}

.sv-form label {
  display: block;
  font-weight: 700;
  margin: 0.75rem 0 0.3rem;
  font-size: 0.9rem;
}
.sv-form input[type="email"],
.sv-form input[type="password"],
.sv-form input[type="text"],
.sv-form input[type="number"] {
  width: 100%;
  min-height: var(--sv-touch);
  border-radius: 12px;
  border: 1.5px solid #c9d8e2;
  padding: 0.65rem 0.85rem;
  font: inherit;
  background: #fff;
}
.sv-error {
  background: #fef3f2;
  color: var(--sv-warn);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.sv-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 82, 120, 0.1);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
  z-index: 40;
}
.sv-nav a {
  text-align: center;
  text-decoration: none;
  color: var(--sv-muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.35rem 0.15rem;
  border-radius: 10px;
}
.sv-nav a.active { color: var(--sv-accent); background: rgba(0, 82, 120, 0.08); }
.sv-nav .ico { display: block; font-size: 1.15rem; margin-bottom: 0.1rem; }

.sv-timeline { display: grid; gap: 0.65rem; }
.sv-item {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3faf7, #fff);
  border: 1px solid rgba(2, 122, 72, 0.12);
}
.sv-item time {
  font-family: var(--sv-display);
  font-weight: 800;
  color: var(--sv-accent);
  font-size: 0.95rem;
}
.sv-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sv-chip {
  border: 2px solid rgba(0, 82, 120, 0.15);
  background: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.sv-chip.on {
  background: rgba(0, 82, 120, 0.1);
  border-color: var(--sv-accent);
  color: var(--sv-accent);
}

.sv-day-nav {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}
.sv-day-btn {
  appearance: none;
  border: 1px solid rgba(0, 82, 120, 0.18);
  background: #fff;
  color: var(--sv-accent);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--sv-shadow);
}
.sv-day-btn:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}
.sv-day-label-wrap {
  text-align: center;
  min-width: 0;
}
.sv-day-label {
  display: block;
  font-family: var(--sv-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--sv-ink);
}
.sv-day-date {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.1rem;
}
.sv-day-chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.95rem;
  padding: 0.15rem 0.1rem 0.35rem;
  scrollbar-width: thin;
}
.sv-day-chip {
  appearance: none;
  border: 1px solid rgba(0, 82, 120, 0.14);
  background: #fff;
  border-radius: 12px;
  padding: 0.45rem 0.65rem;
  min-width: 5.2rem;
  text-align: left;
  cursor: pointer;
  flex: 0 0 auto;
  color: var(--sv-ink);
}
.sv-day-chip-label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
}
.sv-day-chip-avg {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.75rem;
  color: var(--sv-muted);
}
.sv-day-chip.is-active {
  border-color: var(--sv-accent);
  background: rgba(0, 82, 120, 0.08);
  box-shadow: inset 0 0 0 1px var(--sv-accent);
}
.sv-price-summary {
  margin-top: 0.15rem;
}
.sv-price-summary-stats,
.sv-price-summary-focus {
  margin: 0;
  min-height: 1.55rem;
  line-height: 1.45;
}
.sv-price-summary-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--sv-ink);
}
.sv-price-summary-focus[hidden] {
  display: none !important;
}
.sv-price-focus-main {
  flex: 1;
  min-width: 0;
}
.sv-price-focus-clear {
  appearance: none;
  border: 0;
  background: rgba(0, 82, 120, 0.1);
  color: var(--sv-accent);
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.sv-price-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}
.sv-price-hint[hidden] {
  display: none !important;
}
.sv-price-bars {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 2px;
  align-items: end;
  height: 120px;
  margin-top: 0.55rem;
  touch-action: pan-y;
}
.sv-price-bar {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 4px 4px 0 0;
  background: var(--sv-accent);
  min-height: 4px;
  align-self: end;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 0 0 0 transparent;
  transition: box-shadow 0.12s ease, transform 0.12s ease, filter 0.12s ease;
}
.sv-price-bar.cheap { background: var(--sv-good); }
.sv-price-bar.dear { background: var(--sv-warn); }
.sv-price-bar.empty {
  background: #d5e2ea;
  cursor: default;
  pointer-events: none;
}
.sv-price-bar.is-active {
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--sv-accent);
  filter: brightness(1.05);
  transform: translateY(-2px);
}
.sv-price-bar:focus-visible {
  outline: 2px solid var(--sv-accent);
  outline-offset: 2px;
}

.sv-install {
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: 14px;
  background: #fff8e8;
  border: 1px solid #f5d78e;
  display: none;
}
.sv-install.show { display: block; }

.sv-footer {
  text-align: center;
  color: var(--sv-muted);
  font-size: 0.8rem;
  margin: 1.5rem 0 0.5rem;
}
.sv-footer a { color: var(--sv-accent); }

@media (min-width: 720px) {
  .sv-wrap { padding-bottom: 2rem; }
  .sv-nav {
    position: static;
    border: none;
    background: transparent;
    backdrop-filter: none;
    margin: 0 0 1rem;
    padding: 0;
    gap: 0.35rem;
  }
  .sv-nav a { font-size: 0.85rem; padding: 0.55rem; }
  body.sv-authed .sv-wrap { padding-bottom: 2rem; }
}
