/* IT Emergency Readiness Check Stylesheet
   Design system consistent with The IT Emergency Playbook
*/

.check-page {
  background: var(--ink);
  color: var(--paper);
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(211, 164, 112, 0.08);
  border: 1px solid rgba(211, 164, 112, 0.25);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--amber);
  text-transform: uppercase;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--red-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(227, 75, 63, 0.15), 0 0 12px var(--red-bright);
  animation: pulse 1.7s infinite;
}

/* HERO SECTION */
.check-hero {
  position: relative;
  padding: 130px 0 60px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.check-hero-content {
  position: relative;
  z-index: 3;
  max-width: 860px;
}

.check-hero-content h1 {
  font-size: clamp(42px, 5.2vw, 76px);
  margin-bottom: 24px;
  line-height: 0.95;
}

.check-hero-lead {
  font-size: clamp(17px, 1.25vw, 20px);
  color: #b6c0c3;
  line-height: 1.65;
  margin-bottom: 30px;
}

.check-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.check-badges .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--paper-dim);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.check-badges .badge i {
  font-style: normal;
  color: var(--amber);
}

.start-action-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.start-hint {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* QUIZ CONTAINER */
.quiz-section {
  padding: 60px 0 100px;
  scroll-margin-top: 90px;
}

.quiz-status-bar {
  margin-bottom: 24px;
}

.status-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.step-indicator {
  color: var(--paper);
  font-family: var(--display);
  font-size: 15px;
}

.category-badge {
  padding: 4px 10px;
  background: rgba(211, 164, 112, 0.12);
  border: 1px solid rgba(211, 164, 112, 0.3);
  color: var(--amber);
  font-size: 11px;
}

.time-estimate {
  color: var(--muted);
  font-size: 12px;
}

.quiz-progress-track {
  width: 100%;
  height: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red) 0%, var(--red-bright) 100%);
  transition: width 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* QUIZ QUESTION CARD */
.quiz-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 40px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  transition: opacity 220ms ease, transform 220ms ease;
}

.quiz-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--red-bright) 0%, var(--amber) 100%);
}

.quiz-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.incident-code {
  font-family: var(--display);
  font-size: 18px;
  color: var(--red-bright);
  letter-spacing: 0.08em;
}

.incident-tag {
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

.quiz-question-title {
  font-family: var(--display);
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.1;
  color: var(--paper);
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* ANECDOTE CALLOUT */
.quiz-anecdote {
  position: relative;
  background: rgba(22, 51, 66, 0.35);
  border-left: 3px solid var(--amber);
  border-top: 1px solid rgba(211, 164, 112, 0.15);
  border-right: 1px solid rgba(211, 164, 112, 0.15);
  border-bottom: 1px solid rgba(211, 164, 112, 0.15);
  padding: 18px 22px;
  margin-bottom: 24px;
}

.anecdote-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--amber-pale);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.anecdote-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #cdd5d8;
  font-style: italic;
}

.quiz-question-desc {
  font-size: 15px;
  color: var(--paper-dim);
  line-height: 1.6;
  margin-bottom: 30px;
}

/* OPTIONS GRID */
.quiz-options {
  display: grid;
  gap: 14px;
  margin-bottom: 36px;
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 24px;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--paper);
  text-align: left;
  cursor: pointer;
  font-family: var(--body);
  font-size: 15px;
  transition: all 160ms ease;
  position: relative;
}

.quiz-option-btn:hover,
.quiz-option-btn:focus-visible {
  background: #141f26;
  border-color: var(--amber);
  transform: translateX(4px);
}

.quiz-option-btn.selected {
  background: #172630;
  border-color: var(--amber-pale);
  box-shadow: 0 0 0 1px var(--amber-pale);
}

.option-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.option-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 160ms ease;
}

.quiz-option-btn.selected .option-indicator {
  border-color: var(--amber);
  background: var(--amber);
}

.quiz-option-btn.selected .option-indicator::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}

.option-text-wrap strong {
  display: block;
  font-size: 16px;
  margin-bottom: 3px;
  color: var(--paper);
}

.option-text-wrap small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.option-kbd {
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-family: monospace;
  font-size: 11px;
  color: var(--muted);
  border-radius: 3px;
}

/* NAVIGATION FOOTER */
.quiz-nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.quiz-btn-prev,
.quiz-btn-next {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--paper-dim);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 160ms ease;
}

.quiz-btn-prev:hover:not(:disabled),
.quiz-btn-next:hover:not(:disabled) {
  border-color: var(--amber);
  color: var(--paper);
}

.quiz-btn-prev:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.quiz-btn-next {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
}

.quiz-btn-next:hover:not(:disabled) {
  background: var(--amber-pale);
  border-color: var(--amber-pale);
  color: var(--ink);
}

.nav-shortcuts-hint {
  font-size: 12px;
  color: var(--muted);
}

.nav-shortcuts-hint kbd {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: monospace;
  color: var(--amber-pale);
}

/* RESULTS SECTION */
.quiz-results {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 50px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: fadeIn 350ms ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.results-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(227, 75, 63, 0.12);
  border: 1px solid rgba(227, 75, 63, 0.4);
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--red-bright);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.results-badge.status-green {
  background: rgba(46, 139, 87, 0.15);
  border-color: rgba(46, 139, 87, 0.5);
  color: #5edb96;
}

.results-badge.status-green .pulse-dot {
  background: #5edb96;
  box-shadow: 0 0 0 4px rgba(94, 219, 150, 0.2), 0 0 12px #5edb96;
}

.results-badge.status-amber {
  background: rgba(211, 164, 112, 0.15);
  border-color: rgba(211, 164, 112, 0.5);
  color: var(--amber-pale);
}

.results-badge.status-amber .pulse-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(211, 164, 112, 0.2), 0 0 12px var(--amber);
}

.results-title {
  font-size: clamp(32px, 3.8vw, 52px);
  margin-bottom: 12px;
}

.results-subtitle {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

/* SCORE OVERVIEW GRID */
.score-overview-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
  margin-bottom: 50px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.score-display-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
  background: var(--ink);
  border: 1px solid var(--line);
  text-align: center;
}

.score-dial {
  position: relative;
  width: 170px;
  height: 170px;
  margin-bottom: 20px;
}

.dial-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.dial-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 14;
}

.dial-meter {
  fill: none;
  stroke: var(--red-bright);
  stroke-width: 14;
  stroke-linecap: square;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.4s ease;
}

.dial-number-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dial-number {
  font-family: var(--display);
  font-size: 54px;
  line-height: 1;
  font-weight: 700;
  color: var(--paper);
}

.dial-unit {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.score-tier-label {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.score-tier-desc {
  font-size: 13px;
  color: #b6c0c3;
  line-height: 1.55;
  margin: 0;
}

/* DEPENDENCY / BUS FACTOR ANALYSIS */
.dependency-analysis-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  margin-bottom: 8px;
}

.dependency-intro {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.dependency-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.dep-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dep-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.dep-header span:first-child {
  color: var(--paper);
}

.dep-header .dep-state {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dep-state.state-red { color: var(--red-bright); }
.dep-state.state-amber { color: var(--amber); }
.dep-state.state-green { color: #5edb96; }

.dep-track {
  width: 100%;
  height: 8px;
  background: var(--ink);
  border: 1px solid var(--line);
  overflow: hidden;
}

.dep-fill {
  height: 100%;
  transition: width 0.8s cubic-bezier(0.2, 0, 0, 1);
}

.dep-fill.fill-red { background: var(--red-bright); }
.dep-fill.fill-amber { background: var(--amber); }
.dep-fill.fill-green { background: #5edb96; }

.audit-disclaimer-callout {
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--muted);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* 3 CONCRETE NEXT STEPS */
.next-steps-section {
  margin-bottom: 50px;
}

.steps-heading {
  margin-bottom: 28px;
}

.steps-heading h3 {
  font-size: clamp(26px, 2.5vw, 36px);
  margin-bottom: 8px;
}

.steps-intro {
  color: var(--paper-dim);
  font-size: 15px;
  margin: 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-card {
  position: relative;
  background: var(--ink);
  border: 1px solid var(--line);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.step-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--amber);
}

.step-num {
  font-family: var(--display);
  font-size: 24px;
  color: var(--amber);
  margin-bottom: 12px;
}

.step-card h4 {
  font-family: var(--display);
  font-size: 18px;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0 0 10px;
  line-height: 1.2;
}

.step-card p {
  font-size: 14px;
  color: #b6c0c3;
  line-height: 1.6;
  margin-bottom: 18px;
}

.step-playbook-ref {
  display: block;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--amber-pale);
  text-transform: uppercase;
}

/* BOOK BRIDGE CARD */
.book-bridge-card {
  position: relative;
  background: linear-gradient(135deg, #0e1a22 0%, #070c0e 100%);
  border: 1px solid rgba(211, 164, 112, 0.4);
  padding: 44px;
  margin-bottom: 50px;
  overflow: hidden;
}

.bridge-content {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.bridge-tag {
  display: inline-block;
  color: var(--amber);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.bridge-copy h3 {
  font-size: clamp(26px, 2.8vw, 40px);
  margin-bottom: 16px;
}

.bridge-copy p {
  font-size: 15px;
  color: #c7d2d6;
  line-height: 1.65;
  margin-bottom: 20px;
}

.bridge-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bridge-bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--paper);
}

.bridge-bullets li span {
  color: var(--amber);
  font-weight: bold;
}

.bridge-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.bridge-visual img {
  width: 100%;
  height: auto;
  box-shadow: -15px 20px 40px rgba(0, 0, 0, 0.7);
  transform: rotate(-3deg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* OPTIONAL LEAD CAPTURE CARD (N8N WEBHOOK) */
.optional-lead-card {
  background: var(--ink);
  border: 1px solid var(--line);
  padding: 36px;
  margin-bottom: 40px;
}

.lead-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.lead-icon {
  font-size: 32px;
  line-height: 1;
}

.lead-head h4 {
  font-family: var(--display);
  font-size: 22px;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.lead-head p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.lead-inputs {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.lead-inputs input[type="email"] {
  flex: 1;
  min-width: 260px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--body);
  font-size: 15px;
  outline: none;
  transition: border-color 160ms ease;
}

.lead-inputs input[type="email"]:focus {
  border-color: var(--amber);
}

.lead-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #b6c0c3;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--amber);
  cursor: pointer;
}

.checkbox-label em {
  color: var(--amber-pale);
  font-style: normal;
}

.form-feedback {
  font-size: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: none;
}

.form-feedback.success {
  display: block;
  background: rgba(94, 219, 150, 0.15);
  border: 1px solid rgba(94, 219, 150, 0.4);
  color: #5edb96;
}

.form-feedback.error {
  display: block;
  background: rgba(227, 75, 63, 0.15);
  border: 1px solid rgba(227, 75, 63, 0.4);
  color: var(--red-bright);
}

.privacy-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* RESULT UTILITY ACTIONS */
.results-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-utility {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--paper-dim);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 160ms ease;
}

.btn-utility:hover {
  border-color: var(--amber);
  color: var(--paper);
}

/* FAQ SECTION */
.check-faq {
  padding: 60px 0 100px;
  border-top: 1px solid var(--line);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.faq-item h4 {
  font-family: var(--display);
  font-size: 18px;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--paper);
}

.faq-item p {
  font-size: 14px;
  color: #b6c0c3;
  line-height: 1.6;
  margin: 0;
}

.faq-item a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 980px) {
  .score-overview-grid {
    grid-template-columns: 1fr;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .bridge-content {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .bridge-visual {
    display: none;
  }
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .quiz-card {
    padding: 24px 18px;
  }
  .quiz-results {
    padding: 28px 18px;
  }
  .quiz-option-btn {
    padding: 14px 16px;
  }
  .option-kbd {
    display: none;
  }
  .nav-shortcuts-hint {
    display: none;
  }
}

/* PRINT STYLES */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .site-header, .site-footer, .check-hero, .quiz-status-bar, .quiz-card, .results-actions, .optional-lead-card, .check-faq, .skip-link, .grain, .scroll-progress {
    display: none !important;
  }
  .quiz-results {
    display: block !important;
    background: #fff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #000 !important;
  }
  .score-display-card, .step-card, .dependency-analysis-card, .book-bridge-card {
    background: #f9f9f9 !important;
    border: 1px solid #ccc !important;
    color: #000 !important;
  }
  .dial-number, h1, h2, h3, h4, strong {
    color: #000 !important;
  }
  .step-card p, .score-tier-desc, .dependency-intro, .audit-disclaimer-callout {
    color: #333 !important;
  }
}
