@import url('https://calc.urbangrade.ru/css/fonts_google.css');

/* ========================================
   Factor A Font
   ======================================== */
@font-face {
  font-family: 'Factor A';
  src: url('https://calc.urbangrade.ru/fonts/trial_factor_a/TRIAL_FactorA-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Factor A';
  src: url('https://calc.urbangrade.ru/fonts/trial_factor_a/TRIAL_FactorA-Medium.otf') format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Factor A';
  src: url('https://calc.urbangrade.ru/fonts/trial_factor_a/TRIAL_FactorA-Extrabold.woff2') format('woff2'),
       url('https://calc.urbangrade.ru/fonts/trial_factor_a/TRIAL_FactorA-Extrabold.otf') format('opentype');
  font-weight: 800; font-style: normal; font-display: swap;
}

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

body {
  font-family: 'Factor A', 'Arial', sans-serif;
  background: #222546;
  color: #222546;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  background: rgba(34,37,70,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(231,167,72,0.3);
  padding: 14px 0;
}
.navbar-content {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 0 24px; gap: 28px; position: relative;
}
.navbar-logo { width: 44px; height: 44px; border-radius: 10px; }
.navbar-menu { display: flex; gap: 12px; list-style: none; }
.navbar-menu a {
  color: #fff; text-decoration: none; font-weight: 700;
  font-size: 14px; padding: 8px 20px; border-radius: 30px;
  background: #E7A748; border: 2px solid #E7A748;
  transition: all 0.25s; font-family: 'Factor A', sans-serif;
}
.navbar-menu a:hover { background: #222546; border-color: #E7A748; }

.burger-menu { display: none; flex-direction: column; cursor: pointer; gap: 5px; position: absolute; right: 20px; }
.burger-line { width: 28px; height: 3px; background: #E7A748; border-radius: 2px; transition: all 0.3s; }

.mobile-menu {
  display: none; position: fixed; top: 0; left: 0;
  width: 100%; height: 100vh; background: #222546;
  z-index: 1000; padding: 90px 40px 40px;
}
.mobile-menu.active { display: block; }
.mobile-menu-close {
  position: absolute; top: 20px; right: 20px;
  font-size: 38px; color: #E7A748; cursor: pointer;
  background: none; border: none; font-weight: bold;
}
.mobile-navbar-logo {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 54px; border-radius: 10px;
}
.mobile-menu-items { list-style: none; }
.mobile-menu-items li { margin-bottom: 28px; }
.mobile-menu-items a { color: #fff; text-decoration: none; font-size: 22px; font-weight: 700; }

/* ========================================
   Screen Container
   ======================================== */
#app { padding-top: 72px; min-height: 100vh; }

/* ========================================
   START SCREEN
   ======================================== */
.start-screen {
  max-width: 680px; margin: 0 auto;
  padding: 48px 24px 80px;
}

.start-hero {
  text-align: center; margin-bottom: 40px;
}
.start-hero .hero-logo {
  width: 120px; height: 120px; border-radius: 20px;
  margin: 0 auto 24px;
  box-shadow: 0 12px 48px rgba(231,167,72,0.4);
  animation: float 4s ease-in-out infinite;
}
.start-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800;
  color: #fff; margin-bottom: 12px; line-height: 1.15;
}
.start-hero p { font-size: 1.1rem; color: rgba(255,255,255,0.75); font-weight: 400; }
.start-hero strong { color: #E7A748; font-weight: 800; }

.start-card {
  background: #fff; border-radius: 24px;
  border: 2px solid rgba(231,167,72,0.25);
  padding: 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.start-card h2 {
  font-size: 1.4rem; font-weight: 800;
  color: #222546; margin-bottom: 28px;
  padding-bottom: 16px; border-bottom: 2px solid rgba(231,167,72,0.2);
}

.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 24px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.8rem; font-weight: 800; color: #666;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.form-input {
  padding: 12px 16px;
  border: 2px solid rgba(34,37,70,0.15);
  border-radius: 12px; font-size: 0.95rem;
  font-family: 'Factor A', sans-serif; font-weight: 500;
  color: #222546; background: #f8f9fa;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: #E7A748;
  box-shadow: 0 0 0 3px rgba(231,167,72,0.15);
  background: #fff;
}
.form-input::placeholder { color: #bbb; font-weight: 400; }

.class-selector-label {
  font-size: 0.8rem; font-weight: 800; color: #666;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.class-selector {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  margin-bottom: 24px;
}
.class-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 12px 16px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid #e0e0e0; background: #fff;
  transition: all 0.22s; gap: 5px;
  position: relative; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.class-btn::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: 14px 14px 0 0;
  transition: height 0.22s;
}
.class-btn.comfort::before  { background: linear-gradient(90deg,#27ae60,#2ecc71); }
.class-btn.business::before { background: linear-gradient(90deg,#2980b9,#3498db); }
.class-btn.premium::before  { background: linear-gradient(90deg,#8e44ad,#9b59b6); }

.class-btn:hover { transform: translateY(-2px); border-color: #ccc; box-shadow: 0 6px 18px rgba(0,0,0,0.1); }
.class-btn:hover::before { height: 4px; }

.class-tier {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em;
  font-family: 'Factor A', serif;
  opacity: 0.35; margin-bottom: 2px;
}
.class-btn.comfort  .class-tier { color: #27ae60; }
.class-btn.business .class-tier { color: #3498db; }
.class-btn.premium  .class-tier { color: #9b59b6; }

.class-name { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #222546; }
.class-sub  { font-size: 0.62rem; font-weight: 500; color: #999; letter-spacing: 0.02em; }

.class-btn.comfort.selected  {
  border-color: #27ae60; background: rgba(39,174,96,0.06);
  box-shadow: 0 0 0 3px rgba(39,174,96,0.18);
}
.class-btn.business.selected {
  border-color: #3498db; background: rgba(52,152,219,0.06);
  box-shadow: 0 0 0 3px rgba(52,152,219,0.18);
}
.class-btn.premium.selected  {
  border-color: #9b59b6; background: rgba(155,89,182,0.06);
  box-shadow: 0 0 0 3px rgba(155,89,182,0.18);
}
.class-btn.comfort.selected  .class-tier,
.class-btn.business.selected .class-tier,
.class-btn.premium.selected  .class-tier { opacity: 0.8; }

.api-details {
  margin-bottom: 20px;
  border: 1px solid rgba(231,167,72,0.2); border-radius: 12px;
  background: #fafafa; overflow: hidden;
}
.api-details summary {
  padding: 10px 16px; cursor: pointer;
  font-size: 0.8rem; color: #888; font-weight: 700;
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.api-details summary::-webkit-details-marker { display: none; }
.api-details-inner { padding: 0 16px 14px; }

.btn-primary {
  display: block; width: 100%;
  padding: 16px 24px; border-radius: 14px;
  background: linear-gradient(135deg, #E7A748 0%, #d4933a 100%);
  color: #fff; font-size: 1.1rem; font-weight: 800;
  font-family: 'Factor A', sans-serif;
  border: none; cursor: pointer;
  box-shadow: 0 8px 30px rgba(231,167,72,0.4);
  transition: all 0.25s; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(231,167,72,0.55); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ========================================
   QUIZ SCREEN
   ======================================== */
.quiz-screen { min-height: calc(100vh - 72px); display: flex; flex-direction: column; }

.quiz-top-bar {
  background: rgba(34,37,70,0.97); backdrop-filter: blur(10px);
  padding: 12px 24px;
  border-bottom: 1px solid rgba(231,167,72,0.15);
  position: sticky; top: 72px; z-index: 100;
}
.quiz-top-inner {
  max-width: 1140px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px;
}
.quiz-top-meta {
  display: flex; justify-content: space-between; align-items: center;
}
.quiz-counter { font-size: 0.75rem; font-weight: 800; color: rgba(255,255,255,0.6); }
.quiz-block-label {
  font-size: 0.75rem; font-weight: 800; color: #E7A748;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.progress-thin {
  height: 4px; background: rgba(255,255,255,0.1); border-radius: 4px;
  overflow: hidden;
}
.progress-thin-fill {
  height: 100%;
  background: linear-gradient(90deg, #E7A748, #d4933a);
  border-radius: 4px; transition: width 0.4s ease;
}

/* Two-column quiz layout */
.quiz-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
  padding: 28px 24px 80px;
  align-items: start;
}
.quiz-left { min-width: 0; }
.quiz-right {
  position: sticky;
  top: 130px;
}

/* AI History Panel */
.ai-history-panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(231,167,72,0.15);
  border-radius: 20px;
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(231,167,72,0.3) transparent;
}
.ai-history-panel::-webkit-scrollbar { width: 4px; }
.ai-history-panel::-webkit-scrollbar-track { background: transparent; }
.ai-history-panel::-webkit-scrollbar-thumb { background: rgba(231,167,72,0.3); border-radius: 4px; }

.ai-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(231,167,72,0.1);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 1;
  background: rgba(30,32,60,0.98);
  border-radius: 20px 20px 0 0;
  backdrop-filter: blur(8px);
}
.ai-panel-title {
  font-size: 0.72rem; font-weight: 800; color: #E7A748;
  text-transform: uppercase; letter-spacing: 0.1em;
  display: flex; align-items: center; gap: 6px;
}
.ai-panel-count {
  font-size: 0.68rem; font-weight: 800;
  color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px; border-radius: 10px;
}

.ai-panel-empty {
  padding: 32px 20px; text-align: center;
}
.ai-panel-empty-icon { font-size: 2.2rem; margin-bottom: 10px; opacity: 0.7; }
.ai-panel-empty p {
  font-size: 0.8rem; color: rgba(255,255,255,0.3);
  line-height: 1.65; font-weight: 400;
}

.ai-panel-items { padding: 8px; }

.ai-panel-item {
  padding: 11px 13px; border-radius: 10px; margin-bottom: 6px;
  border-left: 3px solid transparent;
  background: rgba(255,255,255,0.04);
  animation: fadeIn 0.4s ease;
}
.ai-panel-item:last-child { margin-bottom: 0; }
.ai-panel-item.ok      { border-left-color: #27ae60; background: rgba(39,174,96,0.07); }
.ai-panel-item.warning { border-left-color: #f39c12; background: rgba(243,156,18,0.07); }
.ai-panel-item.stop    { border-left-color: #e74c3c; background: rgba(231,76,60,0.07); }

.ai-panel-num {
  font-size: 0.65rem; font-weight: 800;
  color: rgba(255,255,255,0.3); margin-bottom: 3px;
}
.ai-panel-text {
  font-size: 0.8rem; color: rgba(255,255,255,0.72);
  font-weight: 400; line-height: 1.55;
}

.ai-panel-loading {
  padding: 12px 16px; display: flex; align-items: center; gap: 8px;
}
.ai-panel-loading-text {
  font-size: 0.75rem; color: rgba(255,255,255,0.35);
  font-weight: 500;
}
.ai-panel-dots { display: flex; gap: 4px; }
.ai-panel-dots span {
  width: 5px; height: 5px; border-radius: 50%; background: #E7A748;
  animation: dot-bounce 1.2s ease-in-out infinite;
}
.ai-panel-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-panel-dots span:nth-child(3) { animation-delay: 0.4s; }

.question-card {
  width: 100%; max-width: 720px;
  background: #fff; border-radius: 24px;
  border: 2px solid rgba(231,167,72,0.2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: hidden;
  animation: slideUp 0.35s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.question-card-header {
  padding: 24px 28px 0;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.key-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(231,167,72,0.15); color: #c17d2a;
  border: 1px solid rgba(231,167,72,0.4);
  font-size: 0.7rem; font-weight: 800;
  padding: 3px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.question-num {
  font-size: 0.7rem; font-weight: 800; color: #bbb;
  letter-spacing: 0.06em;
}

.question-title {
  padding: 16px 28px 20px;
  font-size: 1.15rem; font-weight: 800; color: #222546; line-height: 1.4;
}

.multi-hint {
  margin: -12px 28px 16px;
  font-size: 0.78rem; color: #888; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
.multi-hint::before { content: '☑'; font-size: 0.9rem; color: #E7A748; }

/* Options */
.options-list { padding: 0 20px 4px; display: flex; flex-direction: column; gap: 8px; }

.option-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 12px; cursor: pointer;
  background: #f8f9fa; border: 2px solid transparent;
  text-align: left; width: 100%;
  transition: all 0.2s; font-family: 'Factor A', sans-serif;
}
.option-btn:hover { background: #fff; border-color: rgba(231,167,72,0.4); transform: translateX(3px); }

.option-btn.selected {
  background: rgba(231,167,72,0.1);
  border-color: #E7A748;
  box-shadow: 0 2px 12px rgba(231,167,72,0.2);
}

.opt-indicator {
  flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #ddd; background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.option-btn.selected .opt-indicator {
  border-color: #E7A748; background: #E7A748;
}
.opt-indicator-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff; opacity: 0; transition: opacity 0.2s;
}
.option-btn.selected .opt-indicator-dot { opacity: 1; }

/* Checkbox variant */
.opt-check-indicator {
  flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 5px;
  border: 2px solid #ddd; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: #fff; font-weight: 900;
  transition: all 0.2s;
}
.option-btn.selected .opt-check-indicator {
  border-color: #E7A748; background: #E7A748;
}

.opt-label { font-size: 0.93rem; font-weight: 600; color: #222546; line-height: 1.4; }

/* Stop Banner (inside card) */
.stop-banner {
  margin: 16px 20px 8px;
  padding: 14px 18px;
  background: rgba(231,76,60,0.08);
  border: 2px solid rgba(231,76,60,0.4);
  border-radius: 12px;
  display: flex; gap: 14px; align-items: flex-start;
}
.stop-banner-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.stop-banner-title {
  font-size: 0.85rem; font-weight: 800; color: #c0392b; margin-bottom: 4px;
}
.stop-banner-text { font-size: 0.82rem; color: #666; font-weight: 500; line-height: 1.5; }

/* AI Hint */
.ai-hint-wrapper { padding: 16px 20px 8px; }

.ai-hint-box {
  padding: 14px 18px; border-radius: 12px;
  display: flex; gap: 12px; align-items: flex-start;
  animation: fadeIn 0.3s ease;
}
.ai-hint-box.ok      { background: rgba(39,174,96,0.07);  border: 1px solid rgba(39,174,96,0.3); }
.ai-hint-box.warning { background: rgba(243,156,18,0.07); border: 1px solid rgba(243,156,18,0.35); }
.ai-hint-box.stop    { background: rgba(231,76,60,0.07);  border: 1px solid rgba(231,76,60,0.35); }

.ai-hint-emoji { font-size: 1.2rem; flex-shrink: 0; line-height: 1.5; }
.ai-hint-body { flex: 1; }
.ai-hint-label {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 4px;
  display: block;
}
.ai-hint-box.ok      .ai-hint-label { color: #27ae60; }
.ai-hint-box.warning .ai-hint-label { color: #d68910; }
.ai-hint-box.stop    .ai-hint-label { color: #e74c3c; }
.ai-hint-text { font-size: 0.88rem; color: #444; font-weight: 500; line-height: 1.55; }

/* Skeleton */
.ai-skeleton {
  padding: 14px 18px; border-radius: 12px;
  background: #f3f4f6; border: 1px solid #e5e7eb;
}
.skeleton-line {
  height: 12px; background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  border-radius: 6px; margin-bottom: 8px;
  animation: skeleton-shimmer 1.4s infinite;
}
.skeleton-line.short { width: 60%; margin-bottom: 0; }
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Quiz Navigation */
.quiz-nav {
  padding: 20px 20px 24px;
  display: flex; gap: 10px; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: 8px;
}
.btn-nav {
  padding: 12px 24px; border-radius: 10px; cursor: pointer;
  font-size: 0.9rem; font-weight: 800; font-family: 'Factor A', sans-serif;
  transition: all 0.2s; border: 2px solid transparent;
}
.btn-nav.back {
  background: #f3f4f6; color: #666; border-color: #e5e7eb;
}
.btn-nav.back:hover:not(:disabled) { background: #e5e7eb; color: #333; }
.btn-nav.back:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-nav.next {
  background: linear-gradient(135deg, #E7A748 0%, #d4933a 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(231,167,72,0.35);
  flex: 1; max-width: 280px;
}
.btn-nav.next:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(231,167,72,0.5); }
.btn-nav.next:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ========================================
   LOADING SCREEN
   ======================================== */
.loading-screen {
  min-height: calc(100vh - 72px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.loading-content {
  text-align: center; max-width: 400px;
}
.loading-logo {
  width: 100px; height: 100px; border-radius: 18px;
  margin: 0 auto 28px;
  box-shadow: 0 16px 48px rgba(231,167,72,0.45);
  animation: float 2.5s ease-in-out infinite;
}
.loading-spinner {
  width: 52px; height: 52px; margin: 0 auto 24px;
  border: 4px solid rgba(231,167,72,0.2);
  border-top-color: #E7A748;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.loading-screen h2 {
  font-size: 1.6rem; font-weight: 800; color: #fff; margin-bottom: 10px;
}
.loading-screen p { font-size: 0.95rem; color: rgba(255,255,255,0.55); font-weight: 400; margin-bottom: 24px; }
.loading-dots { display: flex; justify-content: center; gap: 8px; }
.loading-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: #E7A748;
  animation: dot-bounce 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1; }
}

/* ========================================
   RESULTS SCREEN
   ======================================== */
.results-screen {
  max-width: 1140px; margin: 0 auto;
  padding: 40px 24px 80px;
}
.results-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
.results-main { min-width: 0; }
.results-sidebar {
  position: sticky;
  top: 130px;
}

/* ---- Promo Banner ---- */
.promo-banner {
  background: linear-gradient(145deg, rgba(231,167,72,0.08) 0%, rgba(34,37,70,0.6) 100%);
  border: 1px solid rgba(231,167,72,0.35);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.promo-banner-badge {
  display: inline-block;
  background: rgba(231,167,72,0.18);
  border: 1px solid rgba(231,167,72,0.4);
  color: #E7A748;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  width: fit-content;
}
.promo-banner-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}
.promo-banner-text {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.55;
}
.promo-banner-text strong { color: #E7A748; }
.promo-banner-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.promo-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.promo-contact-row:hover {
  background: rgba(231,167,72,0.12);
  border-color: rgba(231,167,72,0.3);
}
.promo-contact-icon { font-size: 0.85rem; color: #E7A748; flex-shrink: 0; }
.promo-contact-val  { font-size: 0.78rem; color: #fff; font-weight: 600; flex: 1; word-break: break-all; }
.promo-copy-hint    { font-size: 0.68rem; color: rgba(231,167,72,0.7); white-space: nowrap; }
.promo-banner-btn {
  display: block;
  background: linear-gradient(135deg, #E7A748, #d4922f);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  text-align: center;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
  line-height: 1.3;
}
.promo-banner-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* Results header */
.results-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 24px 28px;
  background: #fff; border-radius: 20px;
  border: 2px solid rgba(231,167,72,0.2);
  margin-bottom: 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.results-header-brand { display: flex; align-items: center; gap: 14px; }
.results-logo { width: 52px; height: 52px; border-radius: 10px; }
.results-brand-name { font-size: 1.1rem; font-weight: 800; color: #222546; }
.results-brand-sub  { font-size: 0.78rem; color: #888; font-weight: 500; }
.results-meta { text-align: right; }
.results-meta-name { font-size: 0.95rem; font-weight: 800; color: #222546; }
.results-meta-info { font-size: 0.8rem; color: #666; font-weight: 500; margin-top: 2px; }
.results-meta-date { font-size: 0.75rem; color: #aaa; margin-top: 4px; }

/* Class badge */
.badge-section {
  text-align: center; padding: 36px 28px;
  background: #fff; border-radius: 20px;
  border: 2px solid rgba(231,167,72,0.2);
  margin-bottom: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.badge-project { font-size: 1.3rem; font-weight: 800; color: #222546; margin-bottom: 6px; }
.badge-target { font-size: 0.82rem; color: #888; margin-bottom: 24px; font-weight: 500; }
.badge-target strong { color: #222546; }

.class-badge {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 24px 40px; border-radius: 20px;
  border: 3px solid currentColor; margin-bottom: 20px;
  min-width: 280px;
}
.badge-status-label {
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 8px; opacity: 0.8;
}
.badge-class-name {
  font-size: 1.8rem; font-weight: 800; line-height: 1.1;
}
.badge-class-name.confirmed-icon::before { content: '✓ '; }
.badge-class-name.denied-icon::before   { content: '✗ '; font-size: 1.4rem; }

.badge-verdict {
  font-size: 0.95rem; color: #555; font-weight: 500; line-height: 1.6;
  max-width: 560px; margin: 0 auto;
}

/* Results sections */
.results-section {
  background: #fff; border-radius: 20px;
  border: 2px solid rgba(231,167,72,0.15);
  margin-bottom: 16px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.section-header {
  padding: 20px 24px; border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex; align-items: center; gap: 10px;
}
.section-header h3 { font-size: 1rem; font-weight: 800; color: #222546; }
.section-body { padding: 20px 24px; }

/* Stop factors */
.stop-factor-card {
  padding: 14px 16px; border-radius: 10px;
  background: rgba(231,76,60,0.06); border: 1px solid rgba(231,76,60,0.25);
  margin-bottom: 10px;
}
.stop-factor-card:last-child { margin-bottom: 0; }
.sf-row { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.sf-num { font-size: 0.75rem; font-weight: 800; color: #e74c3c; background: rgba(231,76,60,0.1); padding: 2px 8px; border-radius: 6px; }
.sf-blocks { font-size: 0.75rem; font-weight: 700; color: #888; }
.sf-answer { font-size: 0.88rem; font-weight: 600; color: #333; }

/* Score bars */
.score-bar-item { margin-bottom: 18px; }
.score-bar-item:last-child { margin-bottom: 0; }
.score-bar-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.score-bar-name { font-size: 0.88rem; font-weight: 700; color: #333; }
.score-bar-val { font-size: 0.88rem; font-weight: 800; color: #222546; }
.score-bar-track {
  height: 10px; background: #f0f0f0; border-radius: 10px; overflow: hidden;
}
.score-bar-fill {
  height: 100%; border-radius: 10px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.score-bar-item.total .score-bar-name { font-weight: 800; font-size: 0.95rem; }
.score-bar-item.total .score-bar-val  { font-size: 1rem; color: #E7A748; }
.score-bar-item.total .score-bar-track { height: 14px; }

/* Strengths */
.strength-item {
  padding: 12px 16px; border-radius: 10px;
  background: rgba(39,174,96,0.06); border: 1px solid rgba(39,174,96,0.2);
  margin-bottom: 8px; display: flex; gap: 12px; align-items: flex-start;
}
.strength-item:last-child { margin-bottom: 0; }
.strength-param {
  font-size: 0.72rem; font-weight: 800; color: #27ae60;
  background: rgba(39,174,96,0.12); padding: 2px 8px; border-radius: 6px;
  white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}
.strength-text { font-size: 0.88rem; font-weight: 500; color: #333; line-height: 1.5; }

/* Improvements */
.improvement-item {
  padding: 14px 16px; border-radius: 10px;
  background: #fafafa; border: 1px solid #e9eaef;
  margin-bottom: 8px;
}
.improvement-item:last-child { margin-bottom: 0; }
.improvement-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.improvement-param {
  font-size: 0.72rem; font-weight: 800; color: #666;
  background: #eee; padding: 2px 8px; border-radius: 6px;
}
.priority-badge {
  font-size: 0.7rem; font-weight: 800; color: #fff;
  padding: 2px 9px; border-radius: 20px; text-transform: uppercase;
}
.improvement-text { font-size: 0.88rem; font-weight: 500; color: #333; line-height: 1.5; }

/* Full report */
.report-toggle-btn {
  width: 100%; padding: 18px 24px; text-align: left;
  background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Factor A', sans-serif; font-size: 1rem; font-weight: 800;
  color: #222546; transition: background 0.2s;
}
.report-toggle-btn:hover { background: rgba(231,167,72,0.05); }
.report-toggle-icon { font-size: 1.1rem; transition: transform 0.3s; }
.report-toggle-btn.open .report-toggle-icon { transform: rotate(180deg); }

.report-body {
  padding: 0 24px 24px;
  font-size: 0.92rem; font-weight: 400; color: #333; line-height: 1.75;
  white-space: pre-line;
}

/* Actions */
.results-actions {
  display: flex; gap: 12px; margin: 28px 0;
}
.btn-download {
  flex: 1; padding: 16px; font-size: 1rem; font-weight: 800;
  background: linear-gradient(135deg, #E7A748 0%, #d4933a 100%);
  color: #fff; border: none; border-radius: 14px; cursor: pointer;
  font-family: 'Factor A', sans-serif;
  box-shadow: 0 6px 24px rgba(231,167,72,0.4);
  transition: all 0.25s;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(231,167,72,0.55); }
.btn-restart {
  padding: 16px 24px; font-size: 0.9rem; font-weight: 800;
  background: #fff; color: #222546;
  border: 2px solid rgba(34,37,70,0.2);
  border-radius: 14px; cursor: pointer;
  font-family: 'Factor A', sans-serif; transition: all 0.25s;
}
.btn-restart:hover { border-color: #222546; background: #f8f9fa; }

/* Results footer */
.results-footer {
  text-align: center; padding: 24px;
  background: rgba(255,255,255,0.05); border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
}
.results-footer p { font-size: 0.82rem; color: rgba(255,255,255,0.5); font-weight: 400; margin-bottom: 6px; line-height: 1.6; }
.results-footer strong { color: #E7A748; font-weight: 800; }
.results-footer a { color: #E7A748; text-decoration: none; font-weight: 700; font-size: 0.9rem; }

/* Glow divider */
.glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(231,167,72,0.4), transparent);
  margin: 32px 0;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
  .navbar-menu { display: none; }
  .burger-menu { display: flex; }

  .start-screen { padding: 32px 16px 60px; }
  .start-hero h1 { font-size: 1.9rem; }
  .start-card { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .class-selector { gap: 8px; }
  .class-btn { padding: 16px 6px 12px; }
  .class-name { font-size: 0.65rem; }
  .class-sub  { font-size: 0.58rem; }

  .quiz-body { grid-template-columns: 1fr; padding: 16px 12px 60px; gap: 14px; }
  .quiz-right { position: static; }
  .ai-history-panel { max-height: 260px; }
  .question-title { padding: 12px 20px 16px; font-size: 1.05rem; }
  .options-list { padding: 0 12px 4px; gap: 6px; }
  .option-btn { padding: 12px 14px; }
  .quiz-nav { padding: 16px 16px 20px; }
  .btn-nav.next { max-width: 100%; }

  .results-screen { padding: 24px 16px 60px; }
  .results-layout { grid-template-columns: 1fr; }
  .results-sidebar { position: static; }
  .results-header { flex-direction: column; gap: 16px; }
  .results-meta { text-align: left; }
  .class-badge { padding: 20px 28px; min-width: unset; width: 100%; }
  .badge-class-name { font-size: 1.4rem; }
  .results-actions { flex-direction: column; }
}

@media (max-width: 480px) {
  .start-hero h1 { font-size: 1.6rem; }
  .question-card-header { padding: 18px 16px 0; }
  .question-title { padding: 12px 16px 14px; font-size: 1rem; }
  .options-list { padding: 0 8px 4px; }
  .quiz-nav { padding: 14px 12px 18px; }
}
