/**
 * BigBen CRM Landing — Tools Styles
 * Calculator, Quiz, Tool Cards, CTA Block
 */

/* ============================================
   Breadcrumbs (legacy markup only)
   Scoped to <ol> without .breadcrumbs__list — BEM markup
   from renderBreadcrumbs() uses main.css. Don't drop this
   block: 29 /tools/* pages still hardcode the legacy structure.
   ============================================ */

.breadcrumbs:has(> ol:not(.breadcrumbs__list)) {
  margin-bottom: 2rem;
  padding-top: 1rem;
}

@media (max-width: 768px) {
  .breadcrumbs:has(> ol:not(.breadcrumbs__list)) {
    padding-top: 2rem;
  }
}

.breadcrumbs > ol:not(.breadcrumbs__list) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  padding: 0;
  list-style: none;
}

.breadcrumbs > ol:not(.breadcrumbs__list) > li {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-light);
}

.breadcrumbs > ol:not(.breadcrumbs__list) > li:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: #ccc;
}

.breadcrumbs > ol:not(.breadcrumbs__list) a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs > ol:not(.breadcrumbs__list) a:hover {
  color: var(--primary);
}

.breadcrumbs > ol:not(.breadcrumbs__list) > li:last-child {
  color: var(--text);
  font-weight: 500;
}

/* ============================================
   Page Header
   ============================================ */

.page-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 3rem;
}

.page-header h1 {
  margin-bottom: 1rem;
}

.page-header .lead {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto;
}

/* ============================================
   Tool Cards Grid (Index Page)
   ============================================ */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.tool-card:hover {
  border-color: rgba(237, 83, 138, 0.2);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.tool-card:hover::before {
  transform: scaleX(1);
}

.tool-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  width: fit-content;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tool-card__badge--calculator {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.tool-card__badge--quiz {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

.tool-card__badge--checklist {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.tool-card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-pale);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 1.75rem;
  transition: transform 0.3s ease;
}

.tool-card:hover .tool-card__icon {
  transform: scale(1.1) rotate(-3deg);
}

.tool-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.tool-card__desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 1rem;
}

.tool-card__action {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  transition: gap 0.2s ease;
}

.tool-card:hover .tool-card__action {
  gap: 0.625rem;
}

@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .tool-card {
    padding: 1.5rem 1.25rem;
  }
}

/* ============================================
   Calculator Layout
   ============================================ */

.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 3rem;
}

.calc-panel {
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.calc-panel--inputs {
  position: sticky;
  top: 6rem;
}

.calc-panel__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Input Groups */
.calc-input-group {
  margin-bottom: 1.25rem;
}

.calc-input-group:last-of-type {
  margin-bottom: 0;
}

.calc-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.calc-label__hint {
  font-weight: 400;
  color: var(--text-light);
  font-size: 0.8125rem;
}

.calc-input-wrap {
  position: relative;
}

.calc-input {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 3.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 2px solid rgba(45, 49, 66, 0.1);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
}

.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(237, 83, 138, 0.12);
}

.calc-input-suffix {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 0.8125rem;
  pointer-events: none;
}

/* Select */
.calc-select {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 2px solid rgba(45, 49, 66, 0.1);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.calc-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(237, 83, 138, 0.12);
}

/* Range Slider */
.calc-range-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.calc-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(237, 83, 138, 0.15);
  border-radius: 3px;
  outline: none;
}

.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(237, 83, 138, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.calc-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(237, 83, 138, 0.4);
}

.calc-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--primary);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(237, 83, 138, 0.3);
}

.calc-range-value {
  min-width: 3rem;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary);
}

/* Calculator Button */
.calc-btn {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem;
  font-size: 1rem;
}

/* ============================================
   Results Panel
   ============================================ */

.calc-results {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.calc-results.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.result-card {
  background: var(--bg);
  border: 1px solid rgba(45, 49, 66, 0.06);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.result-card--highlight {
  background: linear-gradient(135deg, rgba(237, 83, 138, 0.04) 0%, rgba(237, 83, 138, 0.08) 100%);
  border-color: rgba(237, 83, 138, 0.15);
}

.result-card--profit {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.04) 0%, rgba(34, 197, 94, 0.08) 100%);
  border-color: rgba(34, 197, 94, 0.15);
}

.result-card--warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.04) 0%, rgba(245, 158, 11, 0.08) 100%);
  border-color: rgba(245, 158, 11, 0.15);
}

.result-card__label {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-bottom: 0.375rem;
}

.result-card__value {
  font-family: var(--font-display);
  font-size: 1.625rem;
  color: var(--text);
  line-height: 1.2;
}

.result-card--highlight .result-card__value {
  color: var(--primary);
}

.result-card--profit .result-card__value {
  color: #16a34a;
}

.result-card--warning .result-card__value {
  color: #d97706;
}

/* Animated number counting */
.result-card__value[data-animate] {
  transition: none;
}

.result-card__sub {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* Margin hint */
.calc-margin-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--primary-pale);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text);
  margin-top: 0.75rem;
}

.calc-margin-info svg {
  flex-shrink: 0;
  color: var(--primary);
}

@media (max-width: 768px) {
  .calc-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .calc-panel--inputs {
    position: static;
  }

  .calc-panel {
    padding: 1.5rem;
  }

  .result-card__value {
    font-size: 1.375rem;
  }
}

/* ============================================
   Quiz Styles
   ============================================ */

.quiz-container {
  max-width: 760px;
  margin: 0 auto 3rem;
}

/* Progress Bar */
.quiz-progress {
  margin-bottom: 2rem;
}

.quiz-progress__bar {
  height: 8px;
  background: rgba(45, 49, 66, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.quiz-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}

.quiz-progress__text {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.quiz-progress__text span:last-child {
  font-weight: 600;
  color: var(--primary);
}

/* Question Card */
.quiz-card {
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  animation: quizSlideIn 0.4s ease forwards;
}

@keyframes quizSlideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.quiz-card__direction {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.quiz-card__direction--finance {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.quiz-card__direction--team {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

.quiz-card__direction--students {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.quiz-card__direction--marketing {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.quiz-card__direction--tech {
  background: rgba(237, 83, 138, 0.1);
  color: var(--primary);
}

.quiz-card__question {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.quiz-card__number {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

/* Radio Options */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.quiz-option {
  position: relative;
  cursor: pointer;
}

.quiz-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.quiz-option__label {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 2px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.4;
}

.quiz-option__label::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(45, 49, 66, 0.2);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.quiz-option:hover .quiz-option__label {
  border-color: rgba(237, 83, 138, 0.25);
  background: var(--primary-pale);
}

.quiz-option input:checked + .quiz-option__label {
  border-color: var(--primary);
  background: rgba(237, 83, 138, 0.05);
}

.quiz-option input:checked + .quiz-option__label::before {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 3px white;
}

/* Navigation */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  gap: 1rem;
}

.quiz-nav .btn {
  min-width: 140px;
}

.quiz-nav .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================
   Quiz Results
   ============================================ */

.quiz-results {
  animation: quizSlideIn 0.5s ease forwards;
}

.quiz-results__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.quiz-results__grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: white;
  margin-bottom: 1rem;
}

.quiz-results__grade--excellent {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.quiz-results__grade--good {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.quiz-results__grade--average {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.quiz-results__grade--poor {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.quiz-results__score {
  font-size: 1rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* Radar Chart (CSS-only) */
.radar-chart {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 2rem auto;
}

.radar-chart__bg {
  position: absolute;
  inset: 0;
}

.radar-chart__bg circle {
  fill: none;
  stroke: rgba(45, 49, 66, 0.06);
  stroke-width: 1;
}

.radar-chart__grid line {
  stroke: rgba(45, 49, 66, 0.06);
  stroke-width: 1;
}

.radar-chart__polygon {
  fill: rgba(237, 83, 138, 0.12);
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linejoin: round;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.radar-chart__dot {
  fill: var(--primary);
  r: 5;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.radar-chart__label {
  font-size: 0.75rem;
  font-weight: 600;
  fill: var(--text);
  text-anchor: middle;
}

/* Direction Score Cards */
.direction-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.direction-score {
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  transition: var(--transition);
}

.direction-score:hover {
  box-shadow: var(--shadow-sm);
}

.direction-score__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.direction-score__icon {
  font-size: 1.25rem;
}

.direction-score__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.direction-score__bar {
  height: 6px;
  background: rgba(45, 49, 66, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.direction-score__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.direction-score__fill--excellent {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.direction-score__fill--good {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.direction-score__fill--average {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.direction-score__fill--poor {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.direction-score__value {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.direction-score__value strong {
  color: var(--text);
}

/* Recommendations */
.quiz-recommendations {
  margin-top: 2rem;
}

.quiz-recommendations h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.recommendation-card {
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.recommendation-card__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.recommendation-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.recommendation-card__text {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.5;
  margin: 0;
}

/* Lead Capture */
.quiz-lead {
  background: var(--primary-pale);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}

.quiz-lead__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.quiz-lead__text {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.quiz-lead__form {
  display: flex;
  gap: 0.75rem;
  max-width: 400px;
  margin: 0 auto;
}

.quiz-lead__input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  border: 2px solid rgba(45, 49, 66, 0.1);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s;
}

.quiz-lead__input:focus {
  border-color: var(--primary);
}

@media (max-width: 600px) {
  .quiz-card {
    padding: 1.5rem;
  }

  .quiz-card__question {
    font-size: 1.125rem;
  }

  .quiz-option__label {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
  }

  .quiz-nav .btn {
    min-width: 100px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .quiz-lead__form {
    flex-direction: column;
  }

  .radar-chart {
    width: 260px;
    height: 260px;
  }

  .direction-scores {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   CTA Block
   ============================================ */

.cta-block {
  margin: 3rem 0 0;
  padding: 0;
}

.cta-block__inner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #b02d5a 100%);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-block__inner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.cta-block__inner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 40%;
  height: 150%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.cta-block__content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.cta-block__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: white;
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.cta-block__text {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.cta-block__btn {
  background: white !important;
  color: var(--primary) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.cta-block__btn:hover {
  background: var(--primary-pale) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2) !important;
}

@media (max-width: 600px) {
  .cta-block__inner {
    padding: 2.5rem 1.5rem;
  }
}

/* ============================================
   Content Block (SEO text for tools)
   ============================================ */

.content-block {
  max-width: 760px;
  margin: 3rem auto;
  line-height: 1.7;
}

.content-block h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.content-block h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.content-block p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.content-block ul,
.content-block ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.content-block li {
  margin-bottom: 0.375rem;
  color: var(--text-light);
  list-style: disc;
}

.content-block ol li {
  list-style: decimal;
}

/* Formula Block */
.formula-block {
  background: var(--primary-pale);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.formula-block p {
  margin-bottom: 0;
  color: var(--text);
  font-family: 'Courier New', monospace;
  font-size: 1rem;
}

/* Example Block */
.example-block {
  background: rgba(45, 49, 66, 0.03);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}

.example-block p {
  margin-bottom: 0.375rem;
  color: var(--text);
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
}

.example-block p:last-child {
  margin-bottom: 0;
}

/* ============================================
   Restart / Share
   ============================================ */

.quiz-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

@media (max-width: 480px) {
  .quiz-actions {
    flex-direction: column;
  }

  .quiz-actions .btn {
    width: 100%;
  }
}

/* ============================================
   BUSINESS MODEL CALCULATOR
   ============================================ */

/* Benchmark hints under inputs */
.bm-hint {
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
  transition: color 0.2s;
}

.bm-hint--normal { color: #16a34a; }
.bm-hint--stretch { color: #d97706; }
.bm-hint--extreme { color: #dc2626; }

/* Adequacy badge */
.bm-adequacy {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 2px solid;
}

.bm-adequacy--normal {
  background: rgba(34, 197, 94, 0.08);
  border-color: #22c55e;
}

.bm-adequacy--stretch {
  background: rgba(245, 158, 11, 0.08);
  border-color: #f59e0b;
}

.bm-adequacy--extreme {
  background: rgba(239, 68, 68, 0.08);
  border-color: #ef4444;
}

.bm-adequacy__score {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-body);
}

.bm-adequacy--normal .bm-adequacy__score { color: #16a34a; }
.bm-adequacy--stretch .bm-adequacy__score { color: #d97706; }
.bm-adequacy--extreme .bm-adequacy__score { color: #dc2626; }

.bm-adequacy__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.bm-adequacy__source {
  font-size: 11px;
  color: var(--text-light);
  margin-left: auto;
}

/* Summary cards grid */
.bm-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

/* Loss state for result card */
.result-card--loss {
  background: linear-gradient(135deg, #fef2f2, #fff1f2);
  border-color: #fecaca;
}

.result-card--loss .result-card__value {
  color: #dc2626;
}

/* Chart section */
.bm-chart-section {
  margin-bottom: 24px;
}

.bm-chart-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.bm-chart-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  background: var(--bg-warm);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.2s;
}

.bm-chart-tab:hover {
  color: var(--text);
}

.bm-chart-tab--active {
  background: white;
  border-color: var(--primary);
  color: var(--primary);
}

.bm-chart-wrap {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 16px;
  height: 320px;
}

.bm-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Actions */
.bm-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

/* Monthly table */
.bm-table-section {
  margin-top: 8px;
}

.bm-table-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-warm);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--text-light);
  transition: all 0.2s;
}

.bm-table-toggle:hover {
  color: var(--text);
  background: #f3f4f6;
}

.bm-table-toggle svg {
  transition: transform 0.2s;
}

.bm-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  -webkit-overflow-scrolling: touch;
}

.bm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 700px;
}

.bm-table th {
  padding: 10px 12px;
  text-align: right;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  background: var(--bg-warm);
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}

.bm-table th:first-child {
  text-align: center;
  width: 60px;
}

.bm-table td {
  padding: 8px 12px;
  text-align: right;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  white-space: nowrap;
}

.bm-table td:first-child {
  text-align: center;
  font-weight: 600;
  color: var(--text-light);
}

.bm-table tbody tr:hover td {
  background: rgba(237, 83, 138, 0.03);
}

.bm-table__profit {
  color: #16a34a;
  font-weight: 600;
}

.bm-table__loss {
  color: #dc2626;
  font-weight: 600;
}

/* ============================================
   PRICE CHECK TOOL
   ============================================ */

.pc-tool {
  max-width: 800px;
  margin: 0 auto 3rem;
}

/* Hero input */
.pc-hero {
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.pc-hero__label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.pc-hero__input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 360px;
  margin: 0 auto;
}

.pc-hero__step {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(45, 49, 66, 0.12);
  background: var(--bg);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pc-hero__step:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-pale);
}

.pc-hero__step:active {
  transform: scale(0.92);
}

.pc-hero__input-row .calc-input-wrap {
  flex: 1;
}

/* Gauge section */
.pc-gauge-section {
  margin-bottom: 1.5rem;
  padding: 0 0.5rem;
}

.pc-gauge { padding: 8px 0; }

.pc-gauge__track {
  position: relative;
  height: 20px;
  border-radius: 10px;
  display: flex;
  overflow: visible;
  margin-bottom: 8px;
}

.pc-gauge__zone {
  height: 100%;
}

.pc-gauge__zone--low {
  width: 25%;
  background: #fecaca;
  border-radius: 10px 0 0 10px;
}

.pc-gauge__zone--normal {
  width: 50%;
  background: linear-gradient(90deg, #bbf7d0, #86efac);
}

.pc-gauge__zone--high {
  width: 25%;
  background: #c4b5fd;
  border-radius: 0 10px 10px 0;
}

.pc-gauge__marker {
  position: absolute;
  top: -6px;
  width: 4px;
  height: 32px;
  background: #1a1a2e;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: left 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pc-gauge__labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
}

/* Verdict */
.pc-verdict-card {
  text-align: center;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.pc-verdict__percentile {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  transition: color 0.3s;
}

.pc-verdict__text {
  font-size: 0.9375rem;
  transition: color 0.3s;
}

/* Stats row */
.pc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.pc-stat {
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.06);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.pc-stat__label {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.375rem;
}

.pc-stat__value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 700;
}

.pc-stat__value--accent {
  color: var(--primary);
}

/* Advice */
.pc-advice {
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .pc-stats {
    grid-template-columns: 1fr;
  }

  .pc-hero__input-row {
    max-width: 100%;
  }

  .pc-verdict__percentile {
    font-size: 1.75rem;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .bm-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .bm-adequacy {
    flex-wrap: wrap;
    gap: 8px;
  }

  .bm-adequacy__source {
    margin-left: 0;
    width: 100%;
  }

  .bm-chart-wrap {
    height: 260px;
    padding: 12px;
  }

  .bm-actions {
    flex-direction: column;
  }
}

/* ============================================
   Small button variant (used in biznes-model)
   ============================================ */
.btn--sm {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  border-radius: 8px;
}

/* ============================================
   Compare CRM tool (/tools/sravnenie-crm/)
   ============================================ */
.compare-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 2rem 0 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-sm);
}

.compare-filters__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
}

.compare-filters__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.compare-tag {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(45, 49, 66, 0.05);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.compare-tag:hover {
  background: rgba(45, 49, 66, 0.08);
}

.compare-tag.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.compare-table-wrap {
  overflow-x: auto;
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 16px rgba(45, 49, 66, 0.04);
  margin-bottom: 2rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 720px;
}

.compare-table thead th {
  padding: 1rem 0.875rem;
  text-align: center;
  font-weight: 700;
  color: var(--text);
  background: rgba(45, 49, 66, 0.03);
  border-bottom: 2px solid rgba(45, 49, 66, 0.08);
  white-space: nowrap;
}

.compare-table th.compare-table__feature {
  text-align: left;
  min-width: 220px;
}

.compare-table th.compare-table__system--highlight {
  background: var(--primary-pale);
  color: var(--primary);
}

.compare-table tbody td {
  padding: 0.75rem 0.875rem;
  text-align: center;
  border-bottom: 1px solid rgba(45, 49, 66, 0.05);
  vertical-align: middle;
}

.compare-table td.compare-table__feature {
  text-align: left;
  font-weight: 500;
  color: var(--text);
}

.compare-table td.compare-table__system--highlight {
  background: rgba(237, 83, 138, 0.04);
}

.compare-table tbody tr:hover td {
  background: rgba(45, 49, 66, 0.02);
}

.compare-table tbody tr:hover td.compare-table__system--highlight {
  background: rgba(237, 83, 138, 0.07);
}

.compare-table__total td {
  padding: 1rem 0.875rem;
  font-size: 1rem;
  background: rgba(45, 49, 66, 0.04);
  border-top: 2px solid rgba(45, 49, 66, 0.08);
  border-bottom: none;
}

.compare-table__total td.compare-table__system--highlight {
  background: var(--primary-pale);
}

.compare-table__total small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 400;
  margin-top: 2px;
}

.compare-score {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
  min-width: 72px;
}

.compare-score--yes {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.compare-score--partial {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.compare-score--no {
  background: rgba(45, 49, 66, 0.08);
  color: var(--text-light);
}

.compare-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1rem 0 2.5rem;
}

.compare-score-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  row-gap: 0.5rem;
  padding: 1rem 1.125rem;
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-sm);
}

.compare-score-card__name {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9375rem;
}

.compare-score-card__pct {
  font-weight: 700;
  font-size: 1rem;
}

.compare-score-card__bar {
  grid-column: 1 / -1;
  height: 8px;
  background: rgba(45, 49, 66, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.compare-score-card__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

@media (max-width: 640px) {
  .compare-filters {
    padding: 0.875rem 1rem;
  }
  .compare-tag {
    padding: 0.4375rem 0.875rem;
    font-size: 0.8125rem;
  }
}

/* ============================================
   Schedule constructor (/tools/konstruktor-raspisaniya/)
   ============================================ */
.sched-settings {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-sm);
}

.sched-settings__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.sched-grid-wrap {
  margin: 1.5rem 0;
  overflow-x: auto;
  background: var(--card-bg);
  border: 1px solid rgba(45, 49, 66, 0.08);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 16px rgba(45, 49, 66, 0.04);
}

.sched-grid {
  min-width: 720px;
}

.sched-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  table-layout: fixed;
}

.sched-table thead th {
  padding: 0.75rem 0.5rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(45, 49, 66, 0.03);
  border-bottom: 2px solid rgba(45, 49, 66, 0.08);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.75rem;
}

.sched-table .sched-time-col {
  width: 64px;
  padding: 0.5rem 0.625rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-light);
  font-size: 0.8125rem;
  background: rgba(45, 49, 66, 0.02);
  border-right: 1px solid rgba(45, 49, 66, 0.06);
  white-space: nowrap;
  vertical-align: middle;
}

.sched-cell {
  height: 48px;
  padding: 0;
  border: 1px solid rgba(45, 49, 66, 0.06);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease;
  vertical-align: middle;
}

.sched-cell:hover {
  background: rgba(237, 83, 138, 0.06);
}

.sched-cell--filled {
  cursor: pointer;
}

.sched-cell--conflict {
  box-shadow: inset 0 0 0 2px #dc2626;
  animation: schedConflictPulse 1.4s ease-in-out infinite;
}

@keyframes schedConflictPulse {
  0%, 100% { box-shadow: inset 0 0 0 2px #dc2626; }
  50%      { box-shadow: inset 0 0 0 2px rgba(220, 38, 38, 0.5); }
}

.sched-slot {
  padding: 0.375rem 0.5rem;
  text-align: left;
  line-height: 1.2;
}

.sched-slot__group {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sched-slot__meta {
  font-size: 0.6875rem;
  color: var(--text-light);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sched-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
