/*
 * App-level layout CSS. This is NOT part of the portable component library
 * (exam_platform/static/components/) -- it's this app's own page/screen
 * layout, using the same --pf-* tokens so it stays visually consistent with
 * the components. Per the design system's progressive-enhancement principle,
 * static/non-interactive content sections (pricing table, legal pages, FAQ
 * layout, etc.) live here as plain CSS rather than becoming components.
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  flex: 1 0 auto;
}

/* Top nav */
.top-nav {
  background: var(--pf-color-surface);
  border-bottom: 1px solid var(--pf-color-border);
  position: relative;
}

.top-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-brand {
  font-family: var(--pf-font-family-heading);
  font-size: 1.15em;
  font-weight: 700;
  color: var(--pf-color-text);
  white-space: nowrap;
  flex: 0 0 auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.nav-link {
  background: none;
  border: none;
  font: inherit;
  font-size: 0.85em;
  color: var(--pf-color-text-muted);
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}

.nav-link:hover {
  background: var(--pf-color-accent-light);
  color: var(--pf-color-accent-light-text);
}

.nav-link.active {
  color: var(--pf-color-accent);
  font-weight: 700;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85em;
  white-space: nowrap;
  flex: 0 0 auto;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--pf-color-border);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  font-size: 0.9em;
  line-height: 1;
  cursor: pointer;
  color: var(--pf-color-text);
  flex: 0 0 auto;
}

/* Content injected into a <pf-nav-dropdown>'s slot -- these are plain light-DOM
   buttons the nav menu renderers create, styled here rather than inside the
   component (which only knows about generic slotted buttons). */
button.nav-mega-category {
  font-weight: 700;
  margin-top: 6px;
}

button.nav-mega-cert {
  font-size: 0.85em;
  color: var(--pf-color-text-muted);
}

.nav-mega-divider {
  height: 1px;
  background: var(--pf-color-border);
  margin: 6px 4px;
}

.cert-category-group {
  margin-top: 32px;
}

.cert-category-group:first-child {
  margin-top: 0;
}

.cert-category-title {
  font-size: 1.2em;
  margin-bottom: 4px;
}

.cert-subcategory-group {
  margin-top: 20px;
}

.cert-subcategory-title {
  font-size: 0.95em;
  font-weight: 700;
  color: var(--pf-color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.cert-empty-state {
  color: var(--pf-color-text-muted);
  padding: 20px 0;
}

.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--pf-color-border);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  font-size: 1.1em;
  cursor: pointer;
  color: var(--pf-color-text);
  flex: 0 0 auto;
}

@media (max-width: 860px) {
  .nav-hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* .nav-links (flex: 1) is what pushes .nav-actions to the right edge on
     desktop; hidden here (display: none removes it from the flex row
     entirely), so .nav-actions needs its own margin-left: auto or it just
     collapses to sit right next to the logo instead of at the right edge. */
  .nav-actions {
    margin-left: auto;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--pf-color-surface);
    border-bottom: 1px solid var(--pf-color-border);
    padding: 8px;
    overflow-x: visible;
    z-index: 20;
  }

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

  .nav-link {
    padding: 10px 12px;
    text-align: left;
  }
}

.content {
  padding: 20px 20px 40px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* Landing page */
.hero {
  text-align: center;
  padding: 20px 0 10px;
}

.landing-section {
  position: relative;
  margin-top: 48px;
  padding-top: 24px;
}

.landing-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--pf-color-primary) 30%, transparent);
}

.landing-section h3 {
  margin-bottom: 14px;
}

.section-title {
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--pf-color-text-muted);
  max-width: 640px;
  margin: 0 auto 28px;
}

.pricing-table-wrap {
  overflow-x: auto;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
}

.pricing-table th,
.pricing-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--pf-color-border);
  text-align: center;
}

.pricing-feature-col {
  text-align: left !important;
  width: 40%;
}

.pricing-table td:first-child {
  text-align: left;
}

.pricing-tier-label {
  font-family: var(--pf-font-family-heading);
  font-size: 1.1em;
}

.pricing-tier-price {
  color: var(--pf-color-primary);
  font-weight: 700;
  margin-top: 2px;
}

.pricing-tier-note {
  color: var(--pf-color-text-muted);
  font-size: 0.78em;
  margin-top: 2px;
}

.pricing-feature-name {
  font-weight: 600;
}

.pricing-feature-desc {
  color: var(--pf-color-text-muted);
  font-size: 0.85em;
  margin-top: 2px;
}

.pricing-check {
  color: var(--pf-color-success);
  font-weight: 700;
  font-size: 1.2em;
}

.pricing-dash {
  color: var(--pf-color-text-muted);
}

@media (max-width: 640px) {
  .pricing-table th,
  .pricing-table td {
    padding: 10px 8px;
    font-size: 0.85em;
  }
}

/* "How it works" step cards -- replaces the old circle-and-connecting-line
   milestone timeline with icon-led cards, for visual consistency with the
   exam-detail page's "Path to This Exam" step cards. */
.icon-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.icon-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pf-color-accent-light);
  color: var(--pf-color-accent-light-text);
  font-weight: 700;
  font-size: 0.9em;
  margin-bottom: 10px;
}

.icon-step-card h3 {
  font-size: 1.02em;
  margin-bottom: 6px;
}

.icon-step-card p {
  color: var(--pf-color-text-muted);
  font-size: 0.9em;
}

/* Certification picker grid (home page) -- surfaces exams directly on the
   homepage instead of requiring a visitor to already know the nav dropdowns
   exist. */
.cert-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.cert-picker-icon {
  font-size: 1.5em;
  margin-bottom: 8px;
}

.cert-picker-card h3 {
  font-size: 1.02em;
  margin-bottom: 4px;
}

.cert-picker-card p {
  opacity: 0.9;
  font-size: 0.85em;
}

.cert-picker-meta {
  /* Pins to the bottom of the (now-equal-height, see pf-card) card, so the
     "N Questions - N Minutes" line lines up across a row regardless of how
     long each card's description happens to be. */
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.78em;
  opacity: 0.85;
}

.cert-picker-footer {
  text-align: center;
  margin-top: 16px;
  color: var(--pf-color-text-muted);
  font-size: 0.9em;
}

.cert-picker-footer button {
  background: none;
  border: none;
  padding: 0;
  color: var(--pf-color-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cert-picker-footer button:hover {
  text-decoration: underline;
}

/* Exam Domains / Path to Exam / FAQ tabs (exam-detail page). No top
   separator bar (unlike .landing-section) -- this section immediately
   follows the results-summary stats, so the tab bar's own border already
   reads as a clear section break. Only tabs whose underlying config data
   exists are rendered, so there's never a tab pointing at empty content. */
.exam-detail-tabs-section {
  margin-top: 40px;
}

.detail-tab-bar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--pf-color-border);
  margin-bottom: 20px;
}

.detail-tab-btn {
  background: none;
  border: none;
  font: inherit;
  padding: 10px 14px;
  font-size: 0.88em;
  font-weight: 600;
  color: var(--pf-color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.detail-tab-btn:hover {
  color: var(--pf-color-accent-dark);
}

.detail-tab-btn.active {
  color: var(--pf-color-accent);
  border-bottom-color: var(--pf-color-accent);
}

.exam-domain-icon,
.cert-path-step-icon {
  font-size: 1.3em;
  margin-bottom: 8px;
}

.cert-path-step-icon {
  margin-bottom: 0;
}

/* Standard spacing for every screen's top "<- Back" button, and a row
   layout for any group of adjacent buttons -- both replace what used to be
   copy-pasted (and inconsistent) inline `style="margin..."` attributes. */
.back-button {
  margin-bottom: 24px;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.button-row.centered {
  justify-content: center;
}

.cert-prereq-box {
  background: var(--pf-color-accent-light);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.cert-prereq-box h4 {
  margin-bottom: 8px;
  color: var(--pf-color-accent-light-text);
}

.cert-prereq-box ul {
  margin: 0;
  padding-left: 20px;
}

.cert-prereq-box li {
  margin-bottom: 4px;
  color: var(--pf-color-accent-light-text);
}

.blueprint-format-note {
  margin-top: 16px;
  color: var(--pf-color-text-secondary);
}

.blueprint-source-note {
  margin-top: 8px;
  color: var(--pf-color-text-muted);
  font-size: 0.8em;
}

/* Path to This Exam -- collapsible steps (pf-accordion-item, same component
   as the FAQ list below/above it) so every step is the same size collapsed,
   regardless of how much content is inside it, and the whole step -- not a
   separate button -- is what's clickable. */
.cert-path-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cert-path-step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.cert-path-card-desc {
  color: var(--pf-color-text-secondary);
}

/* A step's action (if any) is a plain text link at the end of its expanded
   body, not a bordered button -- reuses .open-cheat-sheet-btn's look, with
   some breathing room added only in this context. */
.cert-path-step .open-cheat-sheet-btn {
  display: inline-block;
  margin-top: 10px;
}

.cert-path-official-guide {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--pf-color-border);
}

.cert-path-official-guide h5 {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--pf-color-text-muted);
  margin-bottom: 10px;
}

.cert-path-note {
  color: var(--pf-color-text-muted);
  margin-bottom: 14px;
}

.cert-path-source-note {
  color: var(--pf-color-text-muted);
  font-size: 0.78em;
  margin-top: 14px;
}

.exam-detail-header {
  margin-bottom: 20px;
}

.exam-detail-header p {
  color: var(--pf-color-text-muted);
  margin-top: 8px;
}

.exam-detail-title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.exam-detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.exam-detail-title-row h2 {
  margin: 0;
}

.focus-areas {
  margin: 24px 0;
  padding: 16px 20px;
  border: 1px solid var(--pf-color-border);
  border-radius: 10px;
}

.focus-areas h3 {
  margin-bottom: 12px;
}

.focus-area-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--pf-color-border);
}

.focus-area-row:last-child {
  border-bottom: none;
}

.focus-area-percent {
  font-weight: 700;
  color: var(--pf-color-accent);
  flex: 0 0 auto;
}

.diagnostic-analysis {
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid var(--pf-color-accent);
  border-radius: 10px;
}

.diagnostic-analysis h3 {
  margin-bottom: 8px;
}

.diagnostic-analysis > p {
  color: var(--pf-color-text-secondary);
  margin-bottom: 16px;
}

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

.analysis-columns h4 {
  margin-bottom: 8px;
}

.analysis-columns ul {
  list-style: none;
  color: var(--pf-color-text-secondary);
  font-size: 0.92em;
}

.analysis-columns li {
  padding: 3px 0;
}

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

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

.breakdown-table th,
.breakdown-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--pf-color-border);
}

.breakdown-table th {
  color: var(--pf-color-text-muted);
  font-weight: 600;
  font-size: 0.85em;
}

.breakdown-count {
  color: var(--pf-color-text-muted);
  font-size: 0.85em;
}

.breakdown-empty {
  color: var(--pf-color-text-muted);
}

.breakdown-question-link {
  display: inline-block;
  color: var(--pf-color-accent);
  text-decoration: none;
  font-weight: 600;
  margin-right: 4px;
}

.breakdown-question-link:hover {
  text-decoration: underline;
}

@keyframes highlightFlash {
  0%, 100% { background: transparent; }
  30% { background: color-mix(in srgb, var(--pf-color-accent) 20%, transparent); }
}

.highlight-flash {
  animation: highlightFlash 1.5s ease-out;
}

@media (max-width: 640px) {
  .breakdown-table {
    font-size: 0.8em;
  }

  .breakdown-table th,
  .breakdown-table td {
    padding: 6px 4px;
  }
}

.faq-list {
  max-width: 760px;
  margin: 0;
  display: grid;
  gap: 10px;
}

.faq-section .section-title,
.faq-section h3 {
  text-align: left;
  margin-bottom: 20px;
}

/* Match the pricing table's font weight/size for FAQ heading and answer text. */
.faq-section pf-accordion-item {
  --pf-accordion-heading-weight: 600;
  --pf-accordion-answer-size: 0.85em;
}

/* Home screen */
.exam-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.practice-mode-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.practice-mode-card {
  background: var(--pf-color-surface);
  border: 1px solid var(--pf-color-border);
  border-radius: 8px;
  padding: 18px 20px;
}

.practice-mode-card-head {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.practice-mode-card-head-with-action {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.practice-mode-card-head-with-action .practice-mode-card-text {
  flex: 1;
  min-width: 220px;
}

.practice-mode-card-head-with-action pf-button {
  flex-shrink: 0;
}

.practice-mode-icon {
  font-size: 1.6em;
  line-height: 1;
}

.practice-mode-card-head h3 {
  font-size: 1.05em;
  margin-bottom: 4px;
}

.practice-mode-desc {
  color: var(--pf-color-text-muted);
  font-size: 0.9em;
}

.practice-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.practice-topic-chip {
  padding: 8px 14px;
  background: var(--pf-color-surface-muted);
  border: 1px solid var(--pf-color-divider);
  border-radius: 999px;
  color: var(--pf-color-text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 0.85em;
  font-weight: 600;
}

button.practice-topic-chip:hover {
  border-color: var(--pf-color-accent);
  background: var(--pf-color-accent-light);
  color: var(--pf-color-accent-light-text);
}

.paywall {
  max-width: 680px;
  margin: 20px auto;
  padding: 32px;
  background: var(--pf-color-surface-muted);
  border-radius: 8px;
  text-align: center;
}

.paywall h2 { color: var(--pf-color-text); margin-bottom: 12px; }
.paywall p { color: var(--pf-color-text-secondary); margin-bottom: 16px; }

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
  padding: 20px;
  background: var(--pf-color-surface);
  border: 1px solid var(--pf-color-border);
  border-radius: 10px;
}

.dashboard-upsell {
  margin: 20px 0;
  padding: 20px;
  background: var(--pf-color-accent-light);
  border-radius: 10px;
}

.dashboard-upsell h3 {
  color: var(--pf-color-accent-light-text);
  margin-bottom: 8px;
}

.dashboard-upsell p {
  color: var(--pf-color-accent-light-text);
}

.dashboard-cert-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cert-chip {
  background: var(--pf-color-surface-muted);
  border: 1px solid var(--pf-color-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85em;
  color: var(--pf-color-text-secondary);
}

/* Sign in / sign up */
.auth-page {
  max-width: 420px;
  margin: 40px auto;
  text-align: center;
}

.auth-page-title {
  font-family: var(--pf-font-family-heading);
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-page-subtitle {
  color: var(--pf-color-text-muted);
  margin-bottom: 24px;
}

.auth-card {
  background: var(--pf-color-surface);
  border: 1px solid var(--pf-color-border);
  border-radius: 14px;
  padding: 32px;
  text-align: left;
}

.auth-page-cancel {
  margin-top: 16px;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 20px;
}

.auth-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.auth-link {
  color: var(--pf-color-accent);
  font-size: 0.85em;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-submit {
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  background: var(--pf-color-accent);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 1em;
  cursor: pointer;
  margin-top: 6px;
}

.auth-submit:hover {
  background: var(--pf-color-accent-dark);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  color: var(--pf-color-text-muted);
  font-size: 0.85em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--pf-color-border);
}

.auth-google-btn {
  width: 100%;
  padding: 11px;
  border-radius: 999px;
  border: 1px solid var(--pf-color-border);
  background: var(--pf-color-surface);
  color: var(--pf-color-text);
  font-weight: 600;
  cursor: pointer;
  font-size: 1em;
}

.auth-google-btn:hover:not(:disabled) {
  background: var(--pf-color-accent-light);
  border-color: var(--pf-color-accent);
}

.auth-google-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9em;
  color: var(--pf-color-text-muted);
}

.auth-help-text {
  color: var(--pf-color-text-muted);
  font-size: 0.85em;
  margin-bottom: 16px;
}

.attempt-list {
  display: grid;
  gap: 8px;
}

.attempt-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: var(--pf-color-surface-muted);
  border-left: 4px solid var(--pf-color-text-muted);
  border-radius: 5px;
}

.attempt-item.passed { border-left-color: var(--pf-color-success); }
.attempt-item.failed { border-left-color: var(--pf-color-danger); }
.attempt-name { color: var(--pf-color-text); font-weight: 700; }
.attempt-meta { margin-top: 3px; color: var(--pf-color-text-muted); font-size: 0.85em; }
.attempt-score { color: var(--pf-color-text-secondary); font-size: 1.1em; font-weight: 700; }

/* Cheat sheet */
.cheat-sheet-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.domain-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.domain-card-header h3 {
  font-size: 0.98em;
}

.domain-stats {
  display: flex;
  gap: 14px;
  margin: 10px 0;
}

.domain-stats div {
  text-align: left;
}

.domain-stats .number {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--pf-color-text);
}

.domain-stats .label {
  font-size: 0.75em;
  color: var(--pf-color-text-muted);
}

/* Exam Domains (exam-detail page's official blueprint) -- a distinct card
   style from the Cheat Sheet page's .domain-card above: weight is the
   headline here (large percentage + a proportional fill bar) since domains
   are presented heaviest-first as a study-priority guide. */
.exam-domain-intro {
  color: var(--pf-color-text-muted);
  margin-bottom: 16px;
}

.exam-domain-weight {
  font-size: 1.7em;
  font-weight: 700;
  line-height: 1;
  color: var(--pf-color-accent);
  margin-bottom: 6px;
}

.exam-domain-title {
  font-size: 1.02em;
  margin-bottom: 12px;
}

.exam-domain-bar {
  height: 6px;
  border-radius: var(--pf-radius-full);
  background: var(--pf-color-surface-muted);
  overflow: hidden;
  margin-bottom: 12px;
}

.exam-domain-fill {
  height: 100%;
  border-radius: var(--pf-radius-full);
  background: linear-gradient(90deg, var(--pf-color-primary), var(--pf-color-accent));
}

.cheat-sheet-detail-list {
  list-style: none;
  margin: 0 0 14px;
}

.cheat-sheet-detail-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--pf-color-divider);
  color: var(--pf-color-text);
}

.cheat-sheet-detail-list li.key-point::before {
  content: '\2713 ';
  color: var(--pf-color-success-text);
  font-weight: 700;
}

.cheat-sheet-detail-list li.anti-pattern {
  color: var(--pf-color-danger-text);
}

.cheat-sheet-detail-list li.anti-pattern::before {
  content: '\2717 ';
  font-weight: 700;
}

.open-cheat-sheet-btn {
  background: none;
  border: none;
  color: var(--pf-color-accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}

/* Resources page */
.resource-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--pf-color-border);
}

.resource-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--pf-color-border);
  color: var(--pf-color-text);
  text-decoration: none;
}

.resource-row h4 {
  font-size: 1em;
  margin-bottom: 4px;
}

.resource-row p {
  color: var(--pf-color-text-muted);
  font-size: 0.88em;
}

.resource-row .resource-arrow {
  flex: 0 0 auto;
  color: var(--pf-color-text-muted);
  font-size: 1.2em;
  transition: transform 0.2s;
}

.resource-row:hover .resource-arrow {
  transform: translateX(4px);
  color: var(--pf-color-accent);
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--pf-color-border);
  background: var(--pf-color-surface);
  flex-shrink: 0;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px;
  text-align: center;
  color: var(--pf-color-text-muted);
  font-size: 0.85em;
}

.site-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 10px;
}

.site-footer-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--pf-color-text-muted);
  font-size: 1em;
  cursor: pointer;
  text-decoration: underline;
}

.site-footer-link:hover {
  color: var(--pf-color-primary);
}

/* Content layout inside pf-card instances -- pf-card only supplies the
   generic container chrome (border/background/hover), these classes (added
   alongside the `variant` attribute) describe the specific children each use
   case slots in. */
.exam-card h3 {
  font-size: 1.05em;
  margin-bottom: 4px;
}

.exam-card p {
  opacity: 0.9;
  font-size: 0.82em;
  margin-top: 2px;
}

/* Exam screen */
.exam-container {
  display: flex;
  gap: 20px;
}

.progress-sidebar {
  flex: 0 0 200px;
  background: var(--pf-color-surface-muted);
  padding: 20px;
  border-radius: 10px;
  height: fit-content;
}

.progress-sidebar h4 {
  margin-bottom: 15px;
  color: var(--pf-color-text);
}

.progress-stats {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.question-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  font-size: 0.75em;
  color: var(--pf-color-text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border: 1px solid var(--pf-color-divider);
  border-radius: 2px;
  flex: 0 0 auto;
}

.legend-swatch.pending { background: var(--pf-color-surface); }
.legend-swatch.answered { background: var(--pf-color-success-bg); border-color: var(--pf-color-success); }
.legend-swatch.current { background: var(--pf-color-accent); border-color: var(--pf-color-accent-dark); }
.legend-swatch.flagged { background: var(--pf-color-warning); border-color: var(--pf-color-warning); border-radius: 50%; }

/* Question area */
.question-area {
  flex: 1;
}

.question-header {
  background: var(--pf-color-surface-muted);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.question-number {
  color: var(--pf-color-text-muted);
  font-size: 0.9em;
  margin-bottom: 10px;
}

.question-text {
  font-size: 1.2em;
  color: var(--pf-color-text);
  font-weight: 500;
}

.question-meta {
  margin-top: 10px;
  font-size: 0.9em;
  color: var(--pf-color-text-muted);
}

.choices {
  display: grid;
  gap: 15px;
  margin-bottom: 20px;
}

.practice-feedback-panel {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 8px;
  border-left: 4px solid var(--pf-color-primary);
  background: var(--pf-color-surface-muted);
  color: var(--pf-color-text-secondary);
}

.practice-feedback-panel .feedback-verdict {
  font-weight: 700;
}

.practice-checkpoint {
  text-align: center;
  padding: 32px 20px;
}

.practice-checkpoint h3 {
  margin-bottom: 8px;
}

.practice-checkpoint p {
  color: var(--pf-color-text-muted);
}

.practice-checkpoint-capacity-note {
  font-weight: 600;
  color: var(--pf-color-accent-light-text);
}

.practice-checkpoint-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.nav-buttons {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

@media (max-width: 640px) {
  .navigation {
    flex-direction: column;
    align-items: stretch;
  }

  .navigation > pf-button {
    width: 100%;
  }

  .nav-buttons {
    margin-left: 0;
    width: 100%;
  }

  .nav-buttons > pf-button {
    flex: 1;
  }
}

/* Results screen */
.results-container {
  max-width: 800px;
  margin: 0 auto;
}

.score-card .score {
  font-size: 4em;
  font-weight: bold;
  margin-bottom: 10px;
}

.score-card .result-status {
  font-size: 1.5em;
  margin-bottom: 10px;
}

.score-card .result-details {
  font-size: 1.1em;
  opacity: 0.9;
}

.results-summary {
  background: var(--pf-color-surface-muted);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.summary-item {
  text-align: center;
}

.summary-item .number {
  font-size: 2em;
  font-weight: bold;
  color: var(--pf-color-primary);
  margin-bottom: 5px;
}

.summary-item .label {
  color: var(--pf-color-text-muted);
  font-size: 0.9em;
}

/* Incorrect answers */
.incorrect-answers {
  margin-top: 30px;
}

.incorrect-answers h3 {
  margin-bottom: 20px;
  color: var(--pf-color-danger);
}

.answer-feedback {
  background: var(--pf-color-danger-bg);
  border-left: 4px solid var(--pf-color-danger);
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 5px;
}

.answer-feedback .question {
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--pf-color-text);
}

.answer-feedback .details {
  display: grid;
  gap: 8px;
  font-size: 0.95em;
}

.answer-feedback .detail-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
}

.answer-feedback .detail-label {
  font-weight: 500;
  color: var(--pf-color-text-muted);
}

.answer-feedback .user-answer {
  color: var(--pf-color-danger);
}

.answer-feedback .correct-answer {
  color: var(--pf-color-success-text);
}

.question-number-label {
  margin-bottom: 6px;
  color: var(--pf-color-danger-text);
  font-size: 0.8em;
  font-weight: 700;
  text-transform: uppercase;
}

.incorrect-option-review {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.incorrect-option-review li {
  margin-top: 8px;
  color: var(--pf-color-danger-text);
  font-size: 0.9em;
}

.incorrect-option-review strong {
  color: var(--pf-color-danger-text);
}

.answer-feedback .explanation {
  margin-top: 10px;
  padding: 10px;
  background: var(--pf-color-surface);
  border-radius: 5px;
  font-size: 0.9em;
  color: var(--pf-color-text-muted);
}

.loader {
  border: 4px solid var(--pf-color-divider);
  border-top: 4px solid var(--pf-color-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error {
  background: var(--pf-color-danger-bg);
  color: var(--pf-color-danger);
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.success {
  background: var(--pf-color-success-bg);
  color: var(--pf-color-success-text);
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .exam-container {
    flex-direction: column;
  }

  .progress-sidebar {
    flex: 1;
    height: auto;
  }

  .content {
    padding: 20px;
  }
}

@media print {
  .top-nav, .site-footer, .no-print {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .domain-card {
    break-inside: avoid;
    border-color: #999;
  }

  .open-cheat-sheet-btn {
    display: none;
  }
}
