.home-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.header-brand {
  position: absolute;
  top: 2rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  z-index: 10;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-name {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  color: var(--fg);
}

.header-nav {
  position: absolute;
  top: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 10;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-email {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-nav-btn, .logout-btn {
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  padding: 8px 16px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.12s ease;
}

.login-nav-btn:hover, .logout-btn:hover {
  background: var(--fg);
  color: var(--bg);
  transform: translate(-2px, -2px);
  box-shadow: var(--card-shadow);
}

.home-inner { 
  max-width: 640px; 
  width: 100%; 
  text-align: center; 
}

.badge {
  display: inline-block;
  border: 2px solid var(--border);
  padding: 4px 14px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 1rem;
}

.subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  font-weight: 400;
}

.premium-btn {
  display: inline-block;
  border: 2px solid var(--border);
  background: var(--fg);
  color: var(--bg);
  padding: 16px 24px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.12s ease;
  margin-bottom: 1rem;
}

.premium-btn:hover {
  background: var(--bg);
  color: var(--fg);
  transform: translate(-2px, -2px);
  box-shadow: var(--card-shadow);
}

.premium-active-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  color: var(--correct);
  border: 2px solid var(--correct);
  padding: 10px 20px;
  margin-bottom: 1rem;
  font-weight: 500;
}

.divider {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2rem 0;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  text-align: left;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.mode-btn {
  border: 2px solid var(--border);
  background: var(--bg);
  padding: 18px 12px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.12s ease;
  position: relative;
  overflow: hidden;
}

.mode-btn:hover {
  background: var(--fg);
  color: var(--bg);
  transform: translate(-2px, -2px);
  box-shadow: var(--card-shadow);
}

.mode-btn .num { 
  font-family: 'DM Mono', monospace; 
  font-size: 1.5rem; 
  font-weight: 500; 
  display: block; 
  margin-bottom: 4px; 
}

.mode-btn .lbl { 
  font-size: 0.75rem; 
  font-weight: 400; 
  color: inherit; 
  opacity: 0.7; 
}

.full-btn {
  width: 100%;
  border: 2px solid var(--border);
  background: var(--fg);
  color: var(--bg);
  padding: 16px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.12s;
}

.full-btn:hover { background: var(--bg); color: var(--fg); }

.stats-row {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  justify-content: center;
}

@media(max-width:520px) {
  .mode-grid { grid-template-columns: 1fr 1fr; }
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 2rem;
}

.cert-box {
  border: 2px solid var(--border);
  background: var(--bg);
  padding: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.cert-box:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--card-shadow);
}

.cert-box.paid {
  border-color: var(--correct, #10b981);
}

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cert-header h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.cert-q-count {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  background: var(--highlight);
  padding: 4px 8px;
  border-radius: 4px;
}

.cert-name {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 24px;
  flex-grow: 1;
}

.cert-action-btn {
  width: 100%;
  padding: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: all 0.12s ease;
}

.unlock-btn {
  background: var(--bg);
  color: var(--fg);
}

.unlock-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.continue-btn {
  background: var(--correct, #10b981);
  color: var(--bg);
  border-color: var(--correct, #10b981);
}

.continue-btn:hover {
  opacity: 0.9;
}

.back-btn {
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 2rem;
  text-align: left;
  width: 100%;
}

.back-btn:hover {
  color: var(--fg);
  text-decoration: underline;
}

@media(max-width: 768px) {
  .header-brand {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 1rem;
    justify-content: center;
    width: 100%;
  }

  .header-nav {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 2rem;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .home-screen {
    justify-content: flex-start;
    padding-top: 1.5rem;
  }
}

.guarantee-text {
  font-size: 1rem;
  color: var(--fg);
  background: var(--highlight);
  border: 2px solid var(--border);
  padding: 14px 18px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  font-weight: 500;
}

.guarantee-text strong {
  color: var(--correct, #10b981);
}

.value-proposition {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 2rem;
  padding: 16px 20px;
  border: 2px dashed var(--border);
  line-height: 1.6;
  font-style: italic;
}

.value-proposition strong {
  color: var(--fg);
  font-style: normal;
}

/* ── Testimonials Home Section ── */
.testimonials-home-section {
  margin-top: 3rem;
  text-align: center;
  width: 100%;
}

.testimonials-home-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 2rem;
}

.testimonials-marquee-wrapper {
  overflow: hidden;
  width: 100%;
  margin: 2rem 0;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 4%,
    #000 96%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 4%,
    #000 96%,
    transparent 100%
  );
}

.testimonials-marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: testimonial-scroll 40s linear infinite;
}

.testimonials-marquee-wrapper:hover .testimonials-marquee-track {
  animation-play-state: paused;
}

@keyframes testimonial-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.testimonial-marquee-card {
  flex-shrink: 0;
  width: 400px;
  border: 2px solid var(--border);
  background: var(--bg);
  padding: 20px 22px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}

.testimonial-marquee-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--card-shadow);
}

.testimonial-marquee-text {
  font-size: 0.9rem;
  line-height: 1.6;
  font-style: italic;
  color: var(--fg);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.testimonial-marquee-author {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
  margin-top: 12px;
  flex-shrink: 0;
}

/* ── Testimonial Modal ── */
.testimonial-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.testimonial-modal {
  background: var(--bg);
  border: 2px solid var(--border);
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: var(--card-shadow);
}

.testimonial-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
}

.testimonial-modal-close:hover {
  color: var(--fg);
}

.testimonial-modal-content {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.testimonial-modal-author {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
}

/* ── Testimonial Form (Home) ── */
.testimonial-home-submit {
  margin-top: 2rem;
  text-align: center;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.testimonial-login-prompt {
  text-align: center;
}

.testimonial-login-prompt p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.testimonial-success p {
  font-size: 1rem;
  color: var(--correct);
  font-weight: 500;
  margin-bottom: 1rem;
}

.testimonial-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.testimonial-form textarea {
  width: 100%;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  padding: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  resize: vertical;
  min-height: 100px;
}

.testimonial-form textarea:focus {
  border-color: var(--correct);
}

.testimonial-char-count {
  text-align: right;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
}

.testimonial-error {
  color: var(--wrong);
  font-size: 0.85rem;
  font-weight: 500;
}

@media(max-width: 600px) {
  .testimonial-marquee-card {
    width: 260px;
    min-height: 120px;
    padding: 16px 18px;
  }
}
