/* ============================================================
   wise-wallet.com — Static site styles
   Color palette:
     Deep Navy:       #0B1D3A  (dark backgrounds, primary text)
     Navy Blue:       #14213D  (secondary dark, cards)
     Accent Green:    #2ECC71  (CTAs, success, highlights)
     Accent Blue:     #3498DB  (links, secondary accents)
     Steel Blue:      #1A3A5C  (card backgrounds, nav)
     Slate Gray:      #94A3B8  (muted text, borders)
     Off-White:       #F0F4F8  (page background)
     White:           #FFFFFF  (card surfaces)
   ============================================================ */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0B1D3A;
  background: #F0F4F8;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* === Navigation === */
.navigation {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0B1D3A;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.navigation-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
}

.logo-accent { color: #2ECC71; }
.logo-dash { color: #94A3B8; }
.logo-primary { color: #fff; }

.nav-menu {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-item {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s;
}

.nav-item:hover { color: #2ECC71; }

/* Hamburger button */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s;
}

/* Mobile nav */
@media screen and (max-width: 767px) {
  .navigation-wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
  }

  .hamburger { display: flex; }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 12px;
  }

  .nav-menu.open { display: flex; }

  .nav-item {
    font-size: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    width: 100%;
  }

  .nav-item:last-child { border-bottom: none; }
  .logo-text { font-size: 18px; }
}

/* === Page Layout === */
.page-wrap {
  flex: 1;
  padding: 0;
}

.container-global {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.spacer { height: 32px; }

@media screen and (max-width: 479px) {
  .container-global { padding: 0 16px; }
  .spacer { height: 20px; }
}

/* === Hero Section (Index) === */
.hero-section {
  background: linear-gradient(135deg, #0B1D3A 0%, #1A3A5C 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(46,204,113,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-text h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 48px;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
}

.hero-text h1 .highlight { color: #2ECC71; }

.hero-tagline {
  font-size: 20px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  margin-bottom: 24px;
  line-height: 1.5;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: #2ECC71;
  color: #0B1D3A;
  font-weight: 700;
  font-size: 16px;
  border-radius: 8px;
  transition: all 0.2s;
}

.hero-cta:hover {
  background: #27AE60;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(46,204,113,0.3);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  width: 100%;
}

.hero-mini-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(8px);
  transition: transform 0.2s;
}

.hero-mini-card:hover { transform: translateX(4px); }

.hero-mini-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #2ECC71;
  margin-bottom: 4px;
}

.hero-mini-card p {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}

@media screen and (max-width: 991px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }
  .hero-text h1 { font-size: 36px; }
  .hero-tagline { font-size: 18px; }
  .hero-card-stack { margin: 0 auto; }
}

@media screen and (max-width: 479px) {
  .hero-section { padding: 48px 0 40px; }
  .hero-text h1 { font-size: 28px; }
  .hero-tagline { font-size: 16px; }
}

/* === Content Sections (Index) === */
.content-section {
  padding: 64px 0;
}

.content-section.alt-bg {
  background: #fff;
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 32px;
  color: #0B1D3A;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 16px;
  color: #64748B;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Two-column content block */
.content-block-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 48px;
}

.content-block-row.reversed { direction: rtl; }
.content-block-row.reversed > * { direction: ltr; }

.content-block-text h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #0B1D3A;
  margin-bottom: 16px;
}

.content-block-text p {
  font-size: 16px;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 14px;
}

.content-block-text ul {
  margin: 10px 0 14px 24px;
  list-style: disc;
}

.content-block-text li {
  font-size: 16px;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 8px;
}

@media screen and (max-width: 991px) {
  .content-block-row,
  .content-block-row.reversed {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 24px;
  }
}

/* === Topic Grid (Index + Topics Page) === */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 0 0 32px;
}

.topic-card {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #E2E8F0;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  text-decoration: none;
  color: inherit;
}

.topic-card:hover {
  box-shadow: 0 8px 32px rgba(11, 29, 58, 0.12);
  transform: translateY(-3px);
}

.topic-card-image {
  height: 180px;
  overflow: hidden;
  background: #E2E8F0;
}

.topic-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-card-body {
  padding: 20px;
}

.topic-card-body h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #0B1D3A;
}

.topic-card-body p {
  font-size: 14px;
  color: #64748B;
  margin-bottom: 16px;
  line-height: 1.5;
}

.topic-card-cta {
  font-size: 14px;
  font-weight: 700;
  color: #2ECC71;
  letter-spacing: 0.02em;
}

/* === Topic Detail Row (Topics page) === */
.topic-detail {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  padding: 24px;
  margin-bottom: 24px;
  transition: box-shadow 0.2s;
}

.topic-detail:hover {
  box-shadow: 0 4px 20px rgba(11,29,58,0.08);
}

.topic-detail.reversed {
  grid-template-columns: 1fr 300px;
}

.topic-detail-image {
  border-radius: 8px;
  overflow: hidden;
  height: 200px;
}

.topic-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-detail-text h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #0B1D3A;
  margin-bottom: 8px;
}

.topic-detail-text p {
  font-size: 15px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: #2ECC71;
  color: #0B1D3A;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #27AE60;
  box-shadow: 0 4px 12px rgba(46,204,113,0.3);
}

@media screen and (max-width: 767px) {
  .topic-detail,
  .topic-detail.reversed {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .topic-detail-image { height: 160px; }
}

/* === Welcome Page === */
.welcome-hero {
  background: linear-gradient(135deg, #0B1D3A 0%, #1A3A5C 100%);
  padding: 48px 0;
}

.welcome-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 40px;
  align-items: center;
}

.welcome-hero-image {
  border-radius: 12px;
  overflow: hidden;
}

.welcome-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.welcome-hero-text h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 32px;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 16px;
}

@media screen and (max-width: 991px) {
  .welcome-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .welcome-hero-image { max-width: 320px; margin: 0 auto; }
  .welcome-hero-text h1 { font-size: 26px; }
}

.welcome-body {
  max-width: 840px;
  margin: 0 auto;
  padding: 48px 24px;
}

.welcome-content {
  font-size: 16px;
  line-height: 1.7;
  color: #334155;
}

.welcome-content h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: #0B1D3A;
}

.welcome-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 10px;
  color: #0B1D3A;
}

.welcome-content p { margin-bottom: 14px; }

.welcome-content ul {
  margin: 10px 0 14px 24px;
  list-style: disc;
}

.welcome-content li { margin-bottom: 8px; }

.cta-block {
  text-align: center;
  padding: 32px 0;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 400px;
}

/* === Shared Button Style === */
.q-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border: none;
  border-radius: 10px;
  background: #0B1D3A;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.q-button:hover {
  background: #2ECC71;
  color: #0B1D3A;
  box-shadow: 0 4px 16px rgba(46,204,113,0.25);
  transform: translateY(-1px);
}

@media screen and (max-width: 479px) {
  .q-button {
    font-size: 16px;
    padding: 14px 18px;
    border-radius: 8px;
  }
}

/* === Quiz / Combo Page === */
.big-block {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding: 24px;
}

.quiz-shell {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow-y: auto;
  padding: 5px;
  gap: 12px;
  overflow-x: hidden;
}

@media screen and (max-width: 479px) {
  .big-block { padding: 12px; }
  .quiz-shell { padding: 4px; }
}

#quiz-wrapper * { box-sizing: border-box; }

/* Animations */
.fade-in { animation: fadeIn 0.6s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Combo container */
.combo-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.qz-combo {
  display: grid !important;
  grid-template-columns: 38% 62%;
  grid-template-areas:
    "progress progress"
    "image content";
  column-gap: 28px;
  row-gap: 18px;
  align-items: stretch;
  background: #fff;
  border-radius: 16px;
  padding: 16px 32px 16px 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 12px rgba(11,29,58,0.06);
}

.progress-row { grid-area: progress; }
.qz-img { grid-area: image; height: 100%; }
.qz-content { grid-area: content; min-width: 0; }

@media screen and (max-width: 991px) {
  .qz-combo {
    grid-template-columns: 1fr;
    grid-template-areas:
      "progress"
      "image"
      "content";
    padding: 12px;
  }
}

/* Progress bar */
.progress-rail {
  width: 100%;
  height: 12px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2ECC71, #27AE60);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Image styling */
.qz-img,
.quiz-image-container {
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #E2E8F0;
}

.quiz-image-container img {
  width: 100% !important;
  display: block;
  border-radius: 12px !important;
}

@media screen and (min-width: 992px) {
  .qz-combo { padding-top: 10px; }
  .options-block { margin-bottom: 8px; }
  .quiz-image-container { height: 100%; }
  .quiz-image-container img {
    height: 100% !important;
    object-fit: cover !important;
  }
}

@media screen and (min-width: 428px) and (max-width: 991px) {
  .quiz-image-container {
    height: 280px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }
  .quiz-image-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
}

@media screen and (max-width: 427px) {
  .quiz-image-container img {
    height: auto !important;
    max-height: 320px !important;
    object-fit: contain !important;
  }
}

/* Quiz typography */
.quiz-qnum {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.2;
  color: #0B1D3A;
}

.quiz-divider {
  height: 2px;
  background: linear-gradient(90deg, #2ECC71, #3498DB);
  margin: 10px 0 18px;
  width: 100%;
  border-radius: 2px;
}

.quiz-leadin {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 10px;
  line-height: 1.6;
}

.quiz-leadin p { margin-bottom: 8px; }

.question-main-text {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  line-height: 1.45;
  color: #0B1D3A;
  font-weight: 600;
}

@media screen and (max-width: 480px) {
  .quiz-leadin { font-size: 13px; margin-bottom: 8px; }
  .question-main-text { font-size: 16px; line-height: 1.35; }
}

/* Answer options grid */
.options-block {
  display: grid;
  width: 100%;
  margin-top: 20px;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  align-items: stretch;
}

@media screen and (max-width: 991px) {
  .options-block { grid-template-columns: 1fr; }
}

/* Quiz buttons */
#quiz-wrapper .q-button {
  width: 100%;
  height: 100%;
  min-height: 100px;
  background: #F0F4F8;
  color: #0B1D3A;
  border: 2px solid #E2E8F0;
  font-size: 16px;
}

#quiz-wrapper .q-button:hover {
  background: #2ECC71;
  color: #0B1D3A;
  border-color: #2ECC71;
}

/* Scrollbar */
.quiz-scroll {
  scrollbar-width: thin;
  scrollbar-color: #3498DB transparent;
}
.quiz-scroll::-webkit-scrollbar { width: 8px; }
.quiz-scroll::-webkit-scrollbar-thumb { background: #3498DB; border-radius: 8px; }
.quiz-scroll::-webkit-scrollbar-track { background: transparent; }

/* === Static Pages (About, Privacy) === */
.static-hero {
  background: linear-gradient(135deg, #0B1D3A 0%, #1A3A5C 100%);
  padding: 48px 0;
  text-align: center;
}

.static-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 36px;
  color: #fff;
  margin-bottom: 8px;
}

.static-hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.7);
}

.static-body {
  max-width: 840px;
  margin: 0 auto;
  padding: 48px 24px;
}

.static-body h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #0B1D3A;
  margin: 32px 0 12px;
}

.static-body h3 {
  font-size: 20px;
  font-weight: 700;
  color: #0B1D3A;
  margin: 24px 0 10px;
}

.static-body p {
  font-size: 16px;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 14px;
}

.static-body ul {
  margin: 10px 0 14px 24px;
  list-style: disc;
}

.static-body li {
  font-size: 16px;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 8px;
}

.static-body strong { color: #0B1D3A; }

.static-body a {
  color: #3498DB;
  text-decoration: underline;
}

.static-body a:hover { color: #2ECC71; }

/* === Footer === */
.footer {
  background: #0B1D3A;
  padding: 40px 0 24px;
  margin-top: auto;
}

.footer .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .footer-logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 20px;
}

.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin-top: 8px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-link {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s;
}

.footer-link:hover { color: #2ECC71; }

.footer-bottom {
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

@media screen and (max-width: 767px) {
  .footer-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-links { justify-content: center; }
}

/* === Auth Popup === */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: authFadeIn 0.3s ease;
}
.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11,29,58,0.5);
}
.auth-modal {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 24px;
  width: 90%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(11,29,58,0.2);
  animation: authSlideUp 0.3s ease;
}
.auth-modal-x {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #94A3B8;
  cursor: pointer;
  line-height: 1;
}
.auth-modal-x:hover { color: #475569; }
.auth-modal-icon {
  margin-bottom: 12px;
}
.auth-modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #0B1D3A;
  margin: 0 0 8px;
}
.auth-modal-desc {
  font-size: 14px;
  color: #64748B;
  line-height: 1.5;
  margin: 0 0 20px;
}
.auth-modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
}
.auth-input:focus { border-color: #2ECC71; box-shadow: 0 0 0 3px rgba(46,204,113,0.12); }
.auth-btn {
  width: 100%;
  padding: 14px 20px;
  background: #2ECC71;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.auth-btn:hover { background: #27AE60; }
.auth-btn:disabled { background: #94A3B8; cursor: not-allowed; }
.auth-skip {
  display: inline-block;
  margin-top: 16px;
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 14px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.auth-skip:hover { color: #475569; }
#auth-msg:empty { display: none; }
.auth-msg-err { font-size: 13px; color: #E74C3C; margin-top: 8px; }
.auth-msg-ok { font-size: 13px; color: #2ECC71; margin-top: 8px; }

@keyframes authFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes authSlideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile: bottom sheet */
@media (max-width: 600px) {
  .auth-overlay { align-items: flex-end; }
  .auth-modal {
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 28px 24px calc(24px + env(safe-area-inset-bottom));
    animation: authSheetUp 0.3s ease;
  }
  @keyframes authSheetUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* Signed-in inline bar */
.auth-bar {
  max-width: 1280px;
  margin: 0 auto 12px;
  padding: 10px 20px;
  background: rgba(46,204,113,0.05);
  border: 1px solid rgba(46,204,113,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.auth-status { color: #475569; }
.auth-link {
  background: none;
  border: none;
  color: #3498DB;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.auth-link:hover { color: #2980B9; }

/* Score saved / result prompt */
.auth-saved {
  text-align: center;
  padding: 12px;
  background: rgba(46,204,113,0.06);
  border: 1px solid rgba(46,204,113,0.15);
  border-radius: 8px;
  font-size: 13px;
  color: #27AE60;
  font-weight: 500;
}
.auth-result-prompt {
  text-align: center;
  padding: 20px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
}
.auth-result-prompt .auth-modal-form {
  max-width: 320px;
  margin: 0 auto;
}
.auth-result-prompt-text {
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 14px;
}

/* === Profile page === */
.profile-page { padding: 40px 24px 80px; min-height: 60vh; }
.profile-inner { max-width: 1100px; margin: 0 auto; }
.profile-loading { text-align: center; color: #94A3B8; font-size: 15px; padding: 40px 0; }
.profile-signed-out { display: flex; justify-content: center; padding: 40px 0; }
.profile-signin-card {
  max-width: 420px;
  width: 100%;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(11,29,58,0.04);
}
.profile-signin-card h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #0B1D3A;
  margin: 0 0 8px;
}
.profile-signin-card p {
  font-size: 14px;
  color: #64748B;
  margin: 0 0 20px;
}
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}
.profile-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #0B1D3A;
  margin: 0 0 4px;
}
.profile-email {
  font-size: 15px;
  font-weight: 600;
  color: #475569;
  margin: 0 0 2px;
}
.profile-meta {
  font-size: 13px;
  color: #94A3B8;
  margin: 0;
}
.profile-logout {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}
.profile-logout:hover { background: #F8FAFC; }
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.stat-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
}
.stat-num {
  font-family: 'Poppins', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #0B1D3A;
  margin-bottom: 4px;
  line-height: 1.1;
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.profile-section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0B1D3A;
  margin: 0 0 14px;
}
.profile-history-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
}
.profile-history-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 12px 16px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}
.profile-history-table td {
  font-size: 14px;
  color: #0B1D3A;
  padding: 12px 16px;
  border-bottom: 1px solid #F1F5F9;
}
.profile-history-table tbody tr:last-child td { border-bottom: none; }
.profile-history-table .pct-good { color: #2ECC71; font-weight: 600; }
.profile-history-table .pct-mid { color: #F39C12; font-weight: 600; }
.profile-history-table .pct-low { color: #E74C3C; font-weight: 600; }
.profile-empty { text-align: center; padding: 40px 20px; color: #94A3B8; }
.profile-empty a { color: #2ECC71; font-weight: 600; }

@media (max-width: 720px) {
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-header { flex-direction: column; }
  .profile-history-table th:nth-child(3),
  .profile-history-table td:nth-child(3) { display: none; }
  .stat-num { font-size: 22px; }
}

/* === Blurred score reveal === */
.score-revealable {
  transition: filter 0.4s ease;
}
.score-blurred {
  filter: blur(7px);
  pointer-events: none;
  user-select: none;
}
.score-reveal-overlay {
  position: relative;
  margin-top: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.score-reveal-card {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px 16px;
  box-shadow: 0 12px 32px rgba(11,29,58,0.18);
  text-align: center;
  border: 1px solid #E2E8F0;
}
.score-reveal-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: #2ECC71;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.score-reveal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0B1D3A;
  margin-bottom: 14px;
  line-height: 1.3;
}
.score-reveal-card .auth-modal-form { gap: 8px; }
.score-reveal-card .auth-input { padding: 12px 14px; font-size: 15px; }
.score-reveal-card .auth-btn { padding: 12px 16px; font-size: 15px; }

/* === Inline sign-in CTA (homepage etc.) === */
.auth-inline-card {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px 20px;
  align-items: center;
  box-shadow: 0 4px 16px rgba(11,29,58,0.04);
}
.auth-inline-icon {
  width: 48px;
  height: 48px;
  background: rgba(46,204,113,0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-inline-text { min-width: 0; }
.auth-inline-title {
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #0B1D3A;
  margin-bottom: 2px;
}
.auth-inline-sub {
  font-size: 14px;
  color: #64748B;
  line-height: 1.4;
}
.auth-inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.auth-inline-form .auth-input {
  width: 200px;
  padding: 11px 14px;
  font-size: 14px;
}
.auth-inline-form .auth-btn {
  width: auto;
  padding: 11px 18px;
  font-size: 14px;
  white-space: nowrap;
}
.auth-inline-signedin {
  grid-template-columns: auto 1fr;
}
@media (max-width: 720px) {
  .auth-inline-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .auth-inline-form {
    width: 100%;
    flex-direction: column;
  }
  .auth-inline-form .auth-input {
    width: 100%;
  }
  .auth-inline-form .auth-btn {
    width: 100%;
  }
  .auth-inline-signedin { grid-template-columns: 1fr; }
}
