/* ============================================================
   Prime Surface Systems Academy — public Academy V1
   Self-contained styles for pages/academy.html. No dependency on
   internal-academy-v1.css or training-v1.css (separate, gated
   systems). Mobile-first; scales up at 700px / 960px.
   ============================================================ */

.av1 {
  padding: calc(var(--nav-height, 5rem) + 2rem) 0 4rem;
}

.av1__intro {
  max-width: 44rem;
  margin: 0 0 1.75rem;
}

.av1__eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.av1__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.av1__lede {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
}

.av1-gate {
  max-width: 40rem;
  margin: 0 0 2rem;
  padding: 1.5rem 1.5rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated, transparent);
}

.av1-gate .av1__lede {
  margin-bottom: 1.25rem;
}

.av1-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.av1-staff-banner {
  padding-bottom: 0;
}

.av1-purchase-banner {
  padding-top: 1.5rem;
  padding-bottom: 0;
}

.av1-purchase-banner__inner {
  margin-bottom: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.14), rgba(201, 168, 76, 0.05));
}

.av1-purchase-banner__label {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-primary);
}

.av1-purchase-banner__text {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 52rem;
}

.av1-purchase-banner__btn {
  min-height: 2.75rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.85rem;
}

.av1-purchase-inline {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.av1-purchase-inline__note {
  margin: 0.75rem 0 0;
  max-width: 44rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}

.av1-staff-banner__inner {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  background: var(--gold-muted);
}

.av1-staff-banner__label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.av1-staff-banner__text {
  margin: 0 0 0.85rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 52rem;
}

.av1-staff-banner__btn {
  min-height: 2.5rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.78rem;
}

.av1-staff-portal {
  margin: 2rem 0 1.5rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  background: rgba(201, 168, 76, 0.08);
}

.av1-staff-portal__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-primary);
}

.av1-staff-portal__text {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 44rem;
}

/* ── Progress summary strip ─────────────────────────────────── */

.av1-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.av1-summary__stat {
  flex: 1 1 12rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.av1-summary__value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--gold-light);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.av1-summary__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ── Category grid ───────────────────────────────────────────── */

.av1-categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 700px) {
  .av1-categories { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .av1-categories { grid-template-columns: repeat(3, 1fr); }
}

.av1-category {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.av1-category--available {
  border-color: var(--border-gold);
}

.av1-category--locked {
  opacity: 0.72;
}

.av1-category__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin: 0;
}

.av1-category__desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.av1-category__progress {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.av1-category__progress strong {
  color: var(--gold-light);
  font-weight: 600;
}

.av1-lesson-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.av1-lesson-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  color: var(--text-primary);
  font-size: 0.9rem;
  min-height: 3rem;
}

.av1-lesson-item:hover,
.av1-lesson-item:focus-visible {
  border-color: var(--gold);
  outline: none;
}

.av1-lesson-item__status {
  flex-shrink: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.av1-lesson-item__status--done {
  color: var(--gold-light);
}

/* ── Reset progress control ─────────────────────────────────── */

.av1-reset-row {
  margin-top: 0.5rem;
}

.av1-reset-btn {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.5rem 0;
  min-height: 2.5rem;
}

.av1-reset-btn:hover,
.av1-reset-btn:focus-visible {
  color: var(--text-secondary);
}

/* ── Lesson view ──────────────────────────────────────────────── */

.av1-lesson {
  max-width: 44rem;
  margin: 0 auto;
}

.av1-lesson__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.av1-return-link {
  min-width: auto;
  padding: 0.6rem 1.25rem;
}

.av1-progress {
  margin-bottom: 1.75rem;
}

.av1-progress__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.av1-progress__track {
  height: 0.375rem;
  border-radius: 1rem;
  background: var(--bg-elevated);
  overflow: hidden;
}

.av1-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  transition: width var(--transition);
}

.av1-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  min-height: 12rem;
}

.av1-section__heading {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text-primary);
  margin: 0 0 1rem;
}

.av1-section__body {
  color: var(--text-secondary);
  font-size: 0.975rem;
  line-height: 1.7;
  margin: 0;
}

/* Video placeholder */

.av1-video-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2.5rem 1.5rem;
  margin-top: 1rem;
  background: var(--bg-elevated);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
  text-align: center;
}

.av1-video-box__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.25rem;
}

.av1-video-box__label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Checklist */

.av1-checklist {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.av1-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.av1-checklist li::before {
  content: "";
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  border: 1px solid var(--border-gold);
  border-radius: 0.25rem;
}

/* Jobsite questions */

.av1-questions {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.av1-questions li {
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
}

.av1-questions strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.av1-questions span {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Lesson nav */

.av1-lesson-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.av1-lesson-nav .btn {
  min-width: 8rem;
}

@media (max-width: 640px) {
  .av1-lesson-nav { flex-direction: column-reverse; }
  .av1-lesson-nav .btn { width: 100%; }
}

/* ── Lesson complete panel ───────────────────────────────────── */

.av1-complete {
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem);
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
}

.av1-complete__title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--gold-light);
  margin: 0 0 0.75rem;
}

.av1-complete__body {
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

.av1-complete__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ── Quiz ─────────────────────────────────────────────────────── */

.av1-quiz {
  max-width: 44rem;
  margin: 0 auto;
}

.av1-quiz__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.av1-quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.av1-quiz-prompt {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.av1-quiz-options {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.av1-quiz-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  min-height: 3rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
}

.av1-quiz-option:hover,
.av1-quiz-option:focus-visible {
  border-color: var(--gold);
  outline: none;
}

.av1-quiz-option[aria-checked="true"] {
  border-color: var(--gold);
  background: var(--gold-muted);
}

.av1-quiz-option:disabled {
  cursor: default;
}

.av1-quiz-option--correct {
  border-color: #4caf72;
  background: rgba(76, 175, 114, 0.12);
}

.av1-quiz-option--incorrect {
  border-color: #d16060;
  background: rgba(209, 96, 96, 0.12);
}

.av1-quiz-option__marker {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.av1-quiz-feedback {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.av1-quiz-feedback--correct {
  background: rgba(76, 175, 114, 0.1);
  border: 1px solid rgba(76, 175, 114, 0.35);
  color: var(--text-primary);
}

.av1-quiz-feedback--incorrect {
  background: rgba(209, 96, 96, 0.1);
  border: 1px solid rgba(209, 96, 96, 0.35);
  color: var(--text-primary);
}

.av1-quiz-feedback__title {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.av1-quiz-nav {
  display: flex;
  justify-content: flex-end;
}

/* Quiz result */

.av1-result {
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.av1-result--pass { border-color: rgba(76, 175, 114, 0.4); }
.av1-result--fail { border-color: rgba(209, 96, 96, 0.4); }

.av1-result__score {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--gold-light);
  margin: 0 0 0.5rem;
  line-height: 1;
}

.av1-result__status {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.av1-result__meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 1.5rem;
}

.av1-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ── Coming soon note (categories with no lessons yet) ──────── */

.av1-coming-soon-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 640px) {
  .av1-summary { flex-direction: column; }
}
