/* Ankietka.eu redesign (2026-10): ink navy + highlighter lime, Bricolage Grotesque display type.
   Loaded after styles.css and overrides it; tokens live in styles.css :root. */

/* ---------- Base ---------- */
body {
  background: var(--paper);
  color: var(--ink);
}

h1, h2, h3,
.page-title,
.section-title,
.auth-title,
.stat-value,
.progress-title,
.leaderboard-rank {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { min-height: 40px; padding: 0.5rem 1rem; }
.btn-lg { min-height: 52px; padding: 0.85rem 1.6rem; font-size: 1rem; }

.btn-primary { background: var(--ink); color: #fff; border: 1.5px solid var(--ink); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }

.btn-secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }

.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--track); color: var(--ink); }

.btn-hl { background: var(--hl); color: var(--ink); border: 1.5px solid var(--hl); }
.btn-hl:hover { background: var(--hl-dark); border-color: var(--hl-dark); color: var(--ink); }

/* ---------- Small building blocks ---------- */
.ds-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--track);
  color: var(--text-secondary);
  white-space: nowrap;
}
.ds-badge-ok { background: var(--ok-bg); color: var(--ok-fg); }
.ds-badge-hl { background: var(--hl); color: var(--ink); }

.ds-tag {
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--text-secondary);
}
.ds-tag-blue { background: var(--blue-soft); color: #2742B8; }
.ds-tag-ok { background: var(--ok-bg); color: var(--ok-fg); }

.ds-points {
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--hl);
  color: var(--ink);
  white-space: nowrap;
}

.ds-track {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}
.ds-track > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}
.ds-track-dark { background: var(--ink-3); }
.ds-track-dark > span { background: var(--hl); }

/* ---------- Header ---------- */
.header {
  background: rgba(243, 245, 248, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: 68px; gap: 1rem; }
.logo { color: var(--ink); gap: 0.6rem; }
.logo:hover { color: var(--ink); }
.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--hl);
}
.logo-text,
.lp-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo-text span,
.lp-logo-text span { color: var(--blue); }
.nav { gap: 1.25rem; }
.nav-link { color: var(--ink); font-weight: 500; padding: 0.6rem 0.25rem; }
.nav-link:hover { color: var(--blue); }
.nav-auth, .nav-user { display: flex; align-items: center; gap: 0.5rem; }
.nav-user { gap: 0.75rem; }
.user-points { background: var(--hl); color: var(--ink); font-weight: 700; }

/* ---------- Landing ---------- */
.lp-hero-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 3.5rem;
  align-items: center;
  padding-top: 4.5rem;
  padding-bottom: 3.5rem;
}
.lp-hero-copy { flex: 1 1 520px; min-width: 0; }
.lp-pill {
  display: inline-flex;
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
}
.lp-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.lp-mark { background: linear-gradient(transparent 58%, var(--hl) 58%); padding: 0 0.05em; }
.lp-lead {
  margin: 1.5rem 0 0;
  max-width: 34rem;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.lp-paths {
  margin-top: 2.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
  max-width: 36rem;
}
.lp-path {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.4rem;
  border-radius: 18px;
  background: #fff;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.lp-path:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 33, 61, 0.12); }
.lp-path-primary { background: var(--ink); color: #fff; }
.lp-path-primary:hover { color: #fff; }
.lp-path-kicker { font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); }
.lp-path-primary .lp-path-kicker { color: var(--hl); }
.lp-path-label { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.lp-note { margin: 1.1rem 0 0; font-size: 0.875rem; color: var(--text-secondary); }

.lp-hero-visual { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.lp-demo-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.6rem;
  box-shadow: 0 18px 40px rgba(20, 33, 61, 0.08);
}
.lp-demo-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.lp-demo-label { font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); }
.lp-demo-title { margin: 0.6rem 0 1.1rem; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1.25; }
.lp-demo-count { display: flex; align-items: baseline; gap: 0.5rem; margin: 0 0 0.75rem; }
.lp-demo-count strong { font-family: var(--font-display); font-size: 2.75rem; font-weight: 800; letter-spacing: -0.03em; }
.lp-demo-count span { color: var(--text-secondary); }
.lp-demo-foot { margin: 0.75rem 0 0; font-size: 0.8125rem; color: var(--text-secondary); }
.lp-demo-pair { display: flex; flex-wrap: wrap; gap: 1rem; }
.lp-demo-chip { flex: 1 1 180px; border-radius: 18px; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.3rem; }
.lp-demo-chip span { font-size: 0.8125rem; font-weight: 600; }
.lp-demo-chip strong { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; }
.lp-demo-chip-hl { background: var(--hl); color: var(--ink); }
.lp-demo-chip-ink { background: var(--ink); color: #fff; }
.lp-demo-chip-ink span { color: var(--ink-muted); }

.lp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  margin-bottom: 4.5rem;
  padding: 0;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.lp-stat { background: #fff; padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.lp-stat strong { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; }
.lp-stat span { font-size: 0.875rem; color: var(--text-secondary); }

.lp-band { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lp-section { padding-top: 5rem; padding-bottom: 5rem; }
.lp-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 46rem;
}
.lp-sub { margin: 0.75rem 0 0; font-size: 1.05rem; line-height: 1.6; color: var(--text-secondary); max-width: 40rem; }
.lp-eyebrow { margin: 0 0 0.75rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.lp-link { font-weight: 600; padding: 0.6rem 0; white-space: nowrap; }

.lp-steps { margin-top: 3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.lp-step { background: var(--paper); border-radius: 20px; padding: 1.75rem; display: flex; flex-direction: column; gap: 0.9rem; }
.lp-step h3 { margin: 0; font-size: 1.45rem; font-weight: 700; }
.lp-step p { margin: 0; line-height: 1.6; color: var(--text-secondary); }
.lp-step-num {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--ink); color: var(--hl);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem;
}
.lp-meter {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: 20px;
  border: 1.5px dashed #B9C2D3;
  display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center;
}
.lp-meter p { margin: 0; font-weight: 600; flex: 1 1 260px; }
.lp-meter-cells { flex: 2 1 340px; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.lp-meter-cells span { height: 18px; border-radius: 5px; background: var(--border); }
.lp-meter-cells span.on { background: var(--hl); }

.lp-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.lp-survey-grid { margin-top: 2.25rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.25rem; }
.lp-survey {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.85rem;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.lp-survey:hover { color: var(--ink); border-color: var(--ink); box-shadow: 0 10px 24px rgba(20, 33, 61, 0.08); }
.lp-survey-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lp-survey-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.lp-survey-target { font-size: 0.875rem; color: var(--text-secondary); }
.lp-survey-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; font-size: 0.875rem; color: var(--text-secondary); margin-top: auto; }
.lp-survey .ds-track { height: 8px; }
.lp-survey-empty { grid-column: 1 / -1; padding: 2rem; border-radius: 20px; border: 1.5px dashed #B9C2D3; text-align: center; color: var(--text-secondary); }

.lp-dark { background: var(--ink); color: #fff; }
.lp-dark .lp-h2 { color: #fff; }
.lp-dark .lp-sub { color: var(--ink-muted); }
.lp-split { display: flex; flex-wrap: wrap; gap: 3rem; }
.lp-split-intro { flex: 1 1 340px; }
.lp-guides, .lp-faq { flex: 2 1 480px; display: flex; flex-direction: column; gap: 0.75rem; }
.lp-guide { border: 1px solid var(--ink-3); border-radius: 16px; padding: 1.15rem 1.35rem; }
.lp-guide summary, .lp-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.lp-guide summary::-webkit-details-marker, .lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-guide summary::after, .lp-faq-item summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--hl); flex-shrink: 0; }
.lp-faq-item summary::after { color: var(--blue); }
.lp-guide[open] summary::after, .lp-faq-item[open] summary::after { content: '−'; }
.lp-guide p { margin: 0.85rem 0 0; line-height: 1.65; color: var(--ink-muted); }
.lp-faq-item { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 1.1rem 1.35rem; }
.lp-faq-item p { margin: 0.75rem 0 0; line-height: 1.6; color: var(--text-secondary); }

.lp-campus {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  display: flex; flex-wrap: wrap; gap: 2.5rem; align-items: center;
}
.lp-campus-copy { flex: 1 1 360px; }
.lp-campus-copy .btn { margin-top: 1.6rem; }
.lp-campus-rank { flex: 1 1 360px; }
.lp-rank-title { margin: 0 0 0.75rem; font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); }
.lp-rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.lp-rank-list li { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1rem; border-radius: 14px; background: var(--paper); }
.lp-rank-pos { width: 1.75rem; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.lp-rank-name { flex: 1; font-weight: 600; min-width: 0; }
.lp-rank-points { font-size: 0.875rem; color: var(--text-secondary); white-space: nowrap; }
.lp-rank-list li.lp-rank-empty { color: var(--text-secondary); }

.lp-cta {
  background: var(--ink);
  color: #fff;
  border-radius: 28px;
  padding: clamp(2rem, 6vw, 4rem);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
}
.lp-cta .lp-h2 { color: #fff; }
.lp-cta p { margin: 0 0 0.75rem; color: var(--ink-muted); font-size: 1.1rem; }

.lp-footer { background: #fff; color: var(--text-secondary); border-top: 1px solid var(--border); padding: 2.5rem 0 1.5rem; }
.lp-footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; }
.lp-footer-brand { flex: 1 1 260px; }
.lp-footer-brand p { margin: 0.5rem 0 0; font-size: 0.875rem; }
.lp-footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; }
.lp-footer-bottom { margin-top: 2rem; font-size: 0.8125rem; }

/* ---------- Auth & welcome ---------- */
.auth-page { background: var(--paper); align-items: flex-start; padding-top: 3.5rem; }
.auth-card, .welcome-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(20, 33, 61, 0.06);
  width: 100%;
  max-width: 440px;
  padding: 2rem;
}
.welcome-card { max-width: 560px; }
.auth-title { font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; text-align: left; margin-bottom: 0.5rem; }
.auth-subtitle { text-align: left; color: var(--text-secondary); margin-bottom: 1.5rem; }
.auth-submit { width: 100%; }
.auth-referral {
  display: flex; gap: 0.75rem; align-items: center;
  background: var(--ink); color: #fff;
  border-radius: 16px; padding: 0.9rem 1rem; margin-bottom: 1.5rem;
}
.auth-referral p { margin: 0; font-size: 0.875rem; line-height: 1.45; }
.auth-referral-badge {
  width: 36px; height: 36px; flex: none;
  border-radius: 10px; background: var(--hl); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
}
.auth-code { margin-bottom: 1rem; }
.auth-code summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--blue); padding: 0.4rem 0; }
.auth-code .form-group { margin-top: 0.75rem; }

.form-input, .form-select, .form-textarea {
  min-height: 48px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(51, 85, 224, 0.15);
  outline: none;
}
.form-label { font-weight: 600; color: var(--ink); }
.form-checkbox input { accent-color: var(--ink); width: 20px; height: 20px; }
.code-input { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.08em; }

.welcome-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.welcome-points { font-size: 0.875rem; color: var(--text-secondary); }
.welcome-paths { display: grid; gap: 1rem; }
.welcome-path {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1.4rem;
  border-radius: 20px;
  border: 1.5px solid var(--ink);
  background: #fff; color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.welcome-path:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 33, 61, 0.1); }
.welcome-path-primary { background: var(--ink); color: #fff; }
.welcome-path-primary:hover { color: #fff; }
.welcome-path.is-suggested { box-shadow: 0 0 0 4px var(--hl); }
.welcome-path-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-soft); color: var(--blue);
}
.welcome-path-primary .welcome-path-icon { background: var(--hl); color: var(--ink); }
.welcome-path-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.welcome-path-text { font-size: 0.9rem; line-height: 1.5; color: var(--text-secondary); }
.welcome-path-primary .welcome-path-text { color: var(--ink-muted); }
.welcome-profile {
  margin-top: 1.25rem;
  display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: var(--paper);
}
.welcome-profile-title { margin: 0; font-weight: 700; font-size: 0.9rem; }
.welcome-profile-text { margin: 0.25rem 0 0; font-size: 0.8125rem; line-height: 1.4; color: var(--text-secondary); }

/* ---------- Public survey page ---------- */
.share-page { background: var(--paper); min-height: 100vh; }
.share-hero { background: var(--ink); color: #fff; padding: 3rem 0 4.5rem; }
.share-hero-inner { max-width: 760px; display: flex; flex-direction: column; gap: 1rem; }
.share-owner { margin: 0; color: var(--ink-muted); font-size: 0.95rem; }
.share-title { margin: 0; color: #fff; font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 800; line-height: 1.1; }
.share-desc { margin: 0; color: var(--ink-muted); line-height: 1.6; }
.share-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.share-chip { font-size: 0.8125rem; font-weight: 600; background: var(--ink-2); color: #fff; padding: 0.4rem 0.8rem; border-radius: 999px; }
.share-progress p { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--ink-muted); }
.share-loading { color: var(--ink-muted); }
.share-error { background: #FDECEC; color: #9B1C1C; border-radius: 12px; padding: 0.75rem 1rem; }
.share-body {
  max-width: 1120px;
  margin-top: -2.5rem;
  padding-bottom: 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}
.share-window {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(20, 33, 61, 0.10);
}
.share-window-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
}
.share-window-brand { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.875rem; font-weight: 600; }
.share-window-logo {
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--hl); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.share-window-open { color: var(--hl); font-weight: 600; font-size: 0.875rem; padding: 0.5rem 0; }
.share-window-open:hover { color: #fff; }
.share-window-frame { display: block; width: 100%; height: min(82vh, 960px); min-height: 560px; border: 0; background: #fff; }
.share-window-foot {
  margin: 0;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: var(--paper);
}
.share-hero-inner { max-width: 1120px; }
.share-join { position: sticky; top: 88px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.share-join-title { margin: 0; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.share-join-text { margin: 0 0 0.4rem; color: var(--text-secondary); line-height: 1.5; }
.share-login { text-align: center; font-weight: 600; padding: 0.5rem; }
.share-foot { margin: 0; text-align: center; font-size: 0.8125rem; color: var(--text-secondary); }

/* ---------- App shell ---------- */
.dashboard-layout { background: var(--paper); }
.sidebar {
  background: var(--ink);
  border-right: 0;
  padding: 1.5rem 1rem;
}
.sidebar-nav a { color: var(--ink-muted); border-radius: 10px; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: var(--ink-2); color: #fff; }
.sidebar-nav a .ui-icon-inline { background: transparent; color: var(--ink-muted); box-shadow: none; }
.sidebar-nav a.active .ui-icon-inline,
.sidebar-nav a:hover .ui-icon-inline { background: transparent; color: var(--hl); }
.main-content { background: var(--paper); padding: 2rem clamp(1rem, 3vw, 2.5rem); }
.page-title { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
.page-title .ui-icon-inline,
.section-title-sm .ui-icon-inline { background: var(--blue-soft); color: var(--blue); }
.mobile-nav { background: var(--ink); border-top: 0; }
.mobile-nav-link { color: var(--ink-muted); }
.mobile-nav-link.active, .mobile-nav-link:hover { color: var(--hl); background: transparent; }

.stat-card, .progress-card, .survey-card, .matched-survey-card, .metrics-card, .referral-card,
.leaderboard-section, .notification-item, .admin-stat-card, .reward-card {
  border: 1px solid var(--border);
  box-shadow: none;
  border-radius: 20px;
}
.survey-featured { border-color: var(--ink); box-shadow: 0 0 0 3px var(--hl); }
.progress-bar.blue, .progress-bar { background: var(--blue); }
.progress-bar.green { background: var(--ok-fg); }

/* ---------- Dashboard ---------- */
.db-header { flex-wrap: wrap; gap: 1rem; margin-bottom: 1.75rem; }
.db-greeting { margin: 0; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; }
.db-subline { margin: 0.35rem 0 0; color: var(--text-secondary); }
.db-h2 { margin: 0; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.db-hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }
.db-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.db-card-ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.db-card-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.db-card-label { margin: 0; font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); }
.db-card-ink .db-card-label { color: var(--ink-muted); }
.db-balance { margin: 0; font-family: var(--font-display); font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; color: var(--hl); line-height: 1; }
.db-card-text { margin: 0; font-size: 0.95rem; line-height: 1.5; color: var(--ink-muted); }
.db-card-text strong { color: #fff; }
.db-card-text-muted { color: var(--text-secondary); }
.db-card-cta { align-self: flex-start; margin-top: auto; }
.db-survey-title { margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.db-count { margin: 0; display: flex; align-items: baseline; gap: 0.5rem; }
.db-count strong { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; }
.db-count span { color: var(--text-secondary); }
.db-goal-cells { display: grid; gap: 8px; }
.db-goal-cells span { height: 12px; border-radius: 999px; background: var(--track); }
.db-goal-cells span.on { background: var(--hl); }

.db-list { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 0.5rem 0; margin-bottom: 1.5rem; }
.db-list-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 1rem 1.5rem; }
.db-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--track);
}
.db-row-main { flex: 1 1 260px; min-width: 0; }
.db-row-title { margin: 0; font-weight: 600; }
.db-row-meta { margin: 0.25rem 0 0; font-size: 0.875rem; color: var(--text-secondary); }
.db-row-time { font-size: 0.875rem; color: var(--text-secondary); }
.db-row-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.db-empty { padding: 1rem 1.5rem 1.25rem; color: var(--text-secondary); border-top: 1px solid var(--track); }

#dashboard-progress, #dashboard-referral, #dashboard-gamification, #dashboard-leaderboard { margin-bottom: 1.5rem; }
#dashboard-progress:empty, #dashboard-referral:empty, #dashboard-gamification:empty, #dashboard-leaderboard:empty { display: none; }

/* ---------- Completion code guide ---------- */
.modal-content.code-guide {
  max-width: 960px;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 2rem;
  display: flex; flex-wrap: wrap; gap: 2rem;
  border-radius: 24px;
}
.code-guide-close { position: absolute; top: 0.75rem; right: 0.75rem; width: 44px; height: 44px; }
.code-guide-main { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.code-guide-step { margin: 0; font-size: 0.875rem; font-weight: 700; color: var(--blue); }
.code-guide-title { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.1; }
.code-guide-lead { margin: 0; color: var(--text-secondary); line-height: 1.6; }
.code-guide-code {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  padding: 1.25rem;
  border: 1.5px dashed var(--ink);
  border-radius: 18px;
}
.code-guide-code span { flex: 1 1 180px; font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; letter-spacing: 0.1em; }
.code-guide-label { margin: 0; font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); }
.code-guide-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.code-guide-tool {
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff; color: var(--ink);
  font: inherit; font-size: 0.875rem; font-weight: 600;
  cursor: pointer;
}
.code-guide-tool[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.code-guide-howto { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.code-guide-howto li { display: flex; gap: 0.85rem; align-items: flex-start; line-height: 1.5; }
.code-guide-howto li span {
  width: 28px; height: 28px; flex: none;
  border-radius: 999px; background: var(--hl);
  font-size: 0.8125rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.code-guide-actions { padding-top: 0.25rem; }
.code-guide-preview { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.code-guide-form { background: #fff; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: 0 18px 40px rgba(20, 33, 61, 0.08); }
.code-guide-form-bar { height: 10px; background: var(--blue); }
.code-guide-form-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.code-guide-form-title { margin: 0; font-size: 1.3rem; font-weight: 600; }
.code-guide-form-text { margin: 0; color: var(--text-secondary); }
.code-guide-form-code { margin: 0; padding: 0.85rem 1rem; border-radius: 12px; background: var(--paper); line-height: 1.5; }
.code-guide-note { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--text-secondary); }

/* ---------- Celebration ---------- */
.celebration-icon { background: var(--ink); color: var(--hl); font-family: var(--font-display); font-weight: 800; }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
  .share-body { grid-template-columns: 1fr; }
  .share-join { position: static; }
}
@media (max-width: 768px) {
  .share-window-frame { height: 78vh; min-height: 520px; }
  .lp-hero-inner { padding-top: 2.5rem; gap: 2.5rem; }
  .lp-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .auth-page { padding-top: 1.5rem; }
  .auth-card, .welcome-card { padding: 1.5rem; }
  .welcome-profile { flex-direction: column; align-items: flex-start; }
  .modal-content.code-guide { padding: 1.5rem; }
  .sidebar { display: none; }
  .db-row-actions { width: 100%; }
  .db-row-actions .btn { flex: 1; }
}

/* ---------- Older dashboard sections in the new palette ---------- */
.onboarding-wow-card { background: #fff; border: 1px solid var(--border); border-radius: 22px; box-shadow: none; }
.onboarding-wow-step,
.onboarding-wow-step.done,
.onboarding-wow-step.next,
.onboarding-wow-step.locked { background: var(--paper); border: 1px solid var(--border); box-shadow: none; }
.onboarding-wow-step.next { border-color: var(--ink); }
.onboarding-wow-step.done .onboarding-wow-reward { color: var(--ok-fg); }
.onboarding-wow-pill { background: var(--hl); color: var(--ink); }
.dopamine-hero-card,
.dopamine-streak-card,
.dopamine-goal-card,
.dopamine-quest-card { background: var(--ink); color: #fff; box-shadow: none; }
.dopamine-kicker, .dopamine-subline { color: var(--ink-muted); }
.dopamine-value { font-family: var(--font-display); color: var(--hl); }
.dopamine-progress-track { background: var(--ink-3); }
.dopamine-progress-bar { background: var(--hl); }
.dopamine-badges-panel { border: 1px solid var(--border); box-shadow: none; }

.code-guide-code span { white-space: nowrap; }
@media (max-width: 768px) {
  .code-guide-code span { font-size: 1.6rem; letter-spacing: 0.06em; }
  .code-guide-code .btn { width: 100%; }
}
@media (max-width: 640px) {
  .onboarding-wow-grid { grid-template-columns: 1fr; }
  .main-content { padding-bottom: 6rem; }
}

/* ---------- Rewards ---------- */
.rw-theme-slate { background: #E9EDF3; }
.rw-theme-violet, .rw-theme-sky { background: #E7ECFD; }
.rw-theme-emerald { background: #E6F6EC; }
.rw-theme-amber { background: #FFF4CC; }
.rw-theme-rose { background: #FDE8E6; }
.rw-compare { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--track); font-weight: 600; }
.rw-compare strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; white-space: nowrap; }
.rw-earn { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; font-size: 0.95rem; }
.rw-earn .ds-points { font-size: 0.8125rem; padding: 0.15rem 0.6rem; }
.rw-catalog { margin-bottom: 1.5rem; }
.rw-catalog-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 1.1rem; }
.rw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.rw-card { background: #fff; border: 1px solid var(--border); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
.rw-tile { height: 132px; padding: 1.1rem 1.25rem; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; }
.rw-tier { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.rw-value { font-family: var(--font-display); font-size: 2.3rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--ink); overflow-wrap: anywhere; }
.rw-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.rw-type { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); }
.rw-name { margin: 0; font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.rw-desc { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--text-secondary); }
.rw-foot { margin-top: auto; padding-top: 0.4rem; display: flex; flex-direction: column; gap: 0.5rem; }
.rw-foot .ds-track { height: 8px; }
.rw-cost-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.875rem; }
.rw-cost-row span { color: var(--text-secondary); }
.rw-action { width: 100%; margin-top: 0.25rem; }
.rw-state { margin-top: 0.25rem; min-height: 44px; border-radius: var(--radius); background: var(--paper); color: var(--text-secondary); font-weight: 600; font-size: 0.875rem; display: flex; align-items: center; justify-content: center; }
.rw-state-wait, .rw-badge-wait { background: #FFF4CC; color: #7A5A00; }
.rw-code { letter-spacing: 0.06em; color: var(--ink); }

.modal-content.reward-modal { max-width: 420px; width: calc(100% - 2rem); max-height: calc(100vh - 2rem); overflow-y: auto; padding: 0; border-radius: 24px; }
.reward-modal-close { position: absolute; top: 0.6rem; right: 0.6rem; width: 44px; height: 44px; }
.reward-modal-tile { height: 120px; padding: 1.1rem 1.25rem; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; }
.reward-modal-tile span { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding-right: 2.5rem; }
.reward-modal-tile strong { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.reward-modal-body { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.reward-modal-title { margin: 0; font-size: 1.4rem; font-weight: 700; }
.reward-modal-desc { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--text-secondary); }
.reward-modal-desc:empty { display: none; }
.reward-modal-sum { margin: 0.25rem 0 0; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; gap: 0.6rem; }
.reward-modal-sum div { display: flex; justify-content: space-between; }
.reward-modal-sum dt { color: var(--text-secondary); }
.reward-modal-sum dd { margin: 0; font-weight: 700; }
.reward-modal-sum-total { padding-top: 0.6rem; border-top: 1px solid var(--track); }
.reward-modal-sum-total dt { color: var(--ink); font-weight: 600; }
.reward-modal-warning { margin: 0.75rem 0; padding: 0.75rem 0.9rem; border-radius: 14px; background: #FFF4CC; font-size: 0.875rem; line-height: 1.5; }
.reward-modal-cta { width: 100%; margin-top: 0.4rem; }
.reward-steps { list-style: none; margin: 0.25rem 0 0.5rem; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; gap: 0.85rem; }
.reward-steps li { display: flex; gap: 0.75rem; align-items: center; color: var(--text-secondary); }
.reward-steps li > span { width: 28px; height: 28px; flex: none; border-radius: 999px; background: var(--track); font-size: 0.8125rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.reward-steps li.done, .reward-steps li.current { color: var(--ink); }
.reward-steps li.done > span { background: var(--hl); }
.reward-steps li.current > span { background: var(--ink); color: #fff; }
.reward-steps small { display: block; font-size: 0.8125rem; color: var(--text-secondary); }

/* ---------- Guide pages ---------- */
.article-page { background: var(--paper); }
.article-header { flex-wrap: wrap; }
.article-wrap { max-width: 760px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.article-crumbs { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1.25rem; }
.article-crumbs a { color: var(--text-secondary); text-decoration: underline; }
.article { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: clamp(1.5rem, 5vw, 3rem); color: var(--ink); }
.article h1 { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
.article-meta { margin: 0.75rem 0 1.5rem; font-size: 0.875rem; color: var(--text-secondary); }
.article-lead { font-size: 1.15rem; line-height: 1.65; color: var(--ink); margin: 0 0 1.5rem; }
.article h2 { margin: 2.25rem 0 0.75rem; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.article h3 { margin: 1.5rem 0 0.4rem; font-size: 1.1rem; font-weight: 700; }
.article p, .article li { font-size: 1.05rem; line-height: 1.7; color: #26324A; }
.article p { margin: 0 0 1rem; }
.article ul, .article ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.article li { margin-bottom: 0.5rem; }
.article a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.article blockquote { margin: 1rem 0 1.25rem; padding: 1rem 1.25rem; border-radius: 14px; background: var(--paper); border: 1px solid var(--border); font-size: 1rem; line-height: 1.65; color: var(--ink); }
.article-cta { margin-top: 1.5rem; background: var(--ink); color: #fff; border-radius: 24px; padding: 1.75rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.article-cta p { margin: 0; color: var(--ink-muted); line-height: 1.6; }
.article-cta .article-cta-title { color: #fff; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.article-related { margin-top: 1.5rem; }
.article-related-title { margin: 0 0 0.5rem; font-weight: 700; }
.article-related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.article-related a { display: block; padding: 0.9rem 1.1rem; border-radius: 14px; background: #fff; border: 1px solid var(--border); font-weight: 600; color: var(--ink); }
.article-related a:hover { border-color: var(--ink); }
.lp-guide p a.lp-guide-more { color: var(--hl); font-weight: 600; white-space: nowrap; }
