/* ==========================================================================
   Tutor LMS bridge
   Tutor ships a light theme. This maps its variables and utility colours onto
   the Andy Porter tokens so course pages, lessons and the student dashboard
   sit on the ink ground without touching Tutor's templates.
   ========================================================================== */

body.andy {
  --tutor-color-primary: #d7ae41;
  --tutor-color-primary-rgb: 215, 174, 65;
  --tutor-color-primary-hover: #b8912f;
  --tutor-color-black: #F2EFE8;
  --tutor-color-secondary: #C6C3BC;
  --tutor-color-muted: #A9A59C;
  --tutor-body-color: #C6C3BC;
  --tutor-border-color: #2B2B38;
  --tutor-color-gray: #1D1D28;
  --tutor-color-gray-10: #14141C;
  --tutor-color-white: #14141C;
}

/* Copy and headings inside Tutor screens */
.andy .tutor-wrap,
.andy .tutor-course-details-page,
.andy .tutor-dashboard,
.andy .tutor-course-single-content-wrapper,
.andy .tutor-login-wrap {
  color: var(--on-dark);
  font-family: var(--font-body);
}
.andy .tutor-wrap h1, .andy .tutor-wrap h2, .andy .tutor-wrap h3,
.andy .tutor-course-details-title,
.andy .tutor-dashboard h1, .andy .tutor-dashboard h2, .andy .tutor-dashboard h3 {
  font-family: var(--font-head);
  color: var(--on-dark-head);
}

/* Panels */
.andy .tutor-card,
.andy .tutor-course-details-widget,
.andy .tutor-sidebar-card,
.andy .tutor-dashboard-left-menu,
.andy .tutor-login-form-wrapper {
  background: var(--ink-2);
  border-color: var(--ink-line);
  color: var(--on-dark);
  border-radius: var(--radius);
}

/* Buttons follow the site's pill buttons */
.andy .tutor-btn { border-radius: 999px; font-family: var(--font-body); font-weight: 700; }
.andy .tutor-btn-primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.andy .tutor-btn-primary:hover, .andy .tutor-btn-primary:focus { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--ink); }
.andy .tutor-btn-outline-primary { color: var(--gold-soft); border-color: var(--gold); background: transparent; }

/* Form fields on ink */
.andy .tutor-form-control,
.andy .tutor-form-select {
  background: var(--ink);
  color: var(--on-dark-head);
  border-color: var(--ink-line);
}
.andy .tutor-form-control::placeholder { color: #8E8A82; }
.andy .tutor-form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215,174,65,.25); }

/* Links inside Tutor screens: gold-soft on ink clears AA */
.andy .tutor-wrap a:not(.tutor-btn),
.andy .tutor-dashboard a:not(.tutor-btn) { color: var(--gold-soft); }

/* ==========================================================================
   [andy_courses] grid
   ========================================================================== */

.andy-courses { align-items: stretch; }
.andy-course {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: var(--on-dark);
  height: 100%;
  transition: border-color .2s ease;
}
.andy-course:hover { border-color: var(--gold-deep); }
.andy-course:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.andy-course-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.andy-course-body {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.6rem 1.8rem 1.8rem;
  flex: 1;
}
.andy-course-title { margin: 0; line-height: 1.15; color: var(--on-dark-head); }
.andy-course:hover .andy-course-title { color: var(--gold-soft); }
.andy-course-lede { display: block; }
.andy-course-meta {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--ink-line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.andy-course-price { font-family: var(--font-head); font-size: 1.35rem; color: var(--gold-soft); }
.andy-course-go { font-weight: 700; color: var(--gold-soft); }
.andy-courses-empty {
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: 2.2rem;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

/* Numbered steps on the home page */
.andy-steps .step { counter-increment: none; }
/* Tutor 4 tokens */
/* Tutor 4 renamed its colour and font variables (--tutor-text-primary,
   --tutor-surface-l1 and friends) and its input rules out-rank a plain class
   override, so the login form kept a light field with near-white text and a
   dark heading on the dark card. Setting the variables fixes every Tutor
   screen at once instead of chasing selectors. */
body.andy {
  --tutor-text-primary: #F2EFE8;
  --tutor-text-secondary: #C6C3BC;
  --tutor-text-subdued: #A9A59C;
  --tutor-surface-l1: #0B0B10;
  --tutor-surface-l2: #14141C;
  --tutor-surface-l3: #0B0B10;
  --tutor-border-idle: #2B2B38;
  --tutor-input-border-color: #2B2B38;
  --tutor-font-family-heading: 'Spectral', Georgia, 'Times New Roman', serif;
  --tutor-font-family-body: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}
.andy .tutor-input-field .tutor-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(215,174,65,.25);
}
/* Tutor 4 hardcoded light surfaces */
/* Some Tutor 4 rules use fixed colours rather than variables: the curriculum
   accordion headers (#FCFCFD, and #EFF1F6 when open), the sidebar panels
   under the price box, and .tutor-color-secondary (#41454F). These are the
   same selectors, loaded after Tutor, so they win on source order. */
body.andy { --tutor-color-subdued: #A9A59C; }
.andy .tutor-color-secondary { color: var(--on-dark); }
.andy .tutor-color-muted,
.andy .tutor-color-subdued { color: #A9A59C; }

.andy .tutor-accordion-item { border-color: var(--ink-line); }
.andy .tutor-accordion-item-header {
  background-color: var(--ink-2);
  color: var(--on-dark-head);
  border-color: var(--ink-line);
}
.andy .tutor-accordion-item-header.is-active {
  background-color: var(--ink-3);
  color: var(--gold-soft);
}
.andy .tutor-accordion-item-body { background-color: var(--ink); border-color: var(--ink-line); }

.andy .tutor-single-course-sidebar-more > div,
.andy .tutor-course-details-instructors,
.andy .tutor-sidebar-card .tutor-card-body,
.andy .tutor-sidebar-card .tutor-card-footer,
.andy .tutor-course-sidebar-card .tutor-card-body,
.andy .tutor-course-sidebar-card .tutor-card-footer {
  background-color: var(--ink-2);
  color: var(--on-dark);
  border-color: var(--ink-line);
}
/* Curriculum list items */
/* The open module's lesson rows are white in Tutor 4 (.tutor-accordion-item
   and .tutor-course-content-list-item), which left near-white lesson titles
   unreadable once the variables above made the text light. */
.andy .tutor-accordion-item,
.andy .tutor-course-content-list-item {
  background-color: var(--ink);
  border-color: var(--ink-line);
  color: var(--on-dark);
}
.andy .tutor-course-content-list-item:hover,
.andy .tutor-course-content-list-item:focus-within {
  background-color: var(--ink-2);
}
.andy .tutor-course-content-list-item-title,
.andy .tutor-course-content-list-item-title a { color: var(--on-dark-head); }
.andy .tutor-course-content-list-item:hover .tutor-course-content-list-item-title a { color: var(--gold-soft); }
.andy .tutor-course-content-list-item-icon,
.andy .tutor-course-content-list-item-duration { color: #A9A59C; }
/* Tutor 4 learning area */
/* Lessons and quizzes open in Tutor 4's separate learning area (header,
   curriculum sidebar, Previous / Next footer, quiz answers). It is driven by
   a second, larger set of neutral variables. Only the neutral and soft brand
   surfaces are mapped here; warning, success and critical tints are left as
   Tutor ships them because their alert text is designed for a light tint. */
body.andy {
  --tutor-surface-base: #0B0B10;
  --tutor-surface-l1-hover: #1D1D28;
  --tutor-surface-sidebar-l1: #14141C;
  --tutor-surface-brand-tertiary: #1D1D28;
  --tutor-surface-brand-quaternary: #2B2B38;

  --tutor-border-idle2: #2B2B38;

  --tutor-button-disabled: #1D1D28;
  --tutor-button-secondary: #1D1D28;
  --tutor-button-secondary-focused: #2B2B38;
  --tutor-button-outline-hover: #1D1D28;
  --tutor-button-ghost-hover: #1D1D28;
  --tutor-button-primary-soft: #2B2B38;
  --tutor-button-primary-soft-focused: #2B2B38;

  --tutor-tab-sidebar-l2: #14141C;
  --tutor-tab-sidebar-l2-hover: #1D1D28;
  --tutor-tab-sidebar-l2-active: #2B2B38;
  --tutor-tab-sidebar-l4-hover: #1D1D28;
  --tutor-tab-sidebar-l4-active: #2B2B38;
  --tutor-tab-l3: #1D1D28;
  --tutor-tab-l3-active: #2B2B38;
  --tutor-tab-l3-active-hover: #2B2B38;

  --tutor-actions-gray-empty: #14141C;
  --tutor-actions-gray-secondary: #1D1D28;
  --tutor-actions-gray-tertiary: #2B2B38;
  --tutor-actions-gray-quaternary: #2B2B38;
  --tutor-actions-brand-tertiary: #2B2B38;

  --tutor-quiz-idle: #14141C;
  --tutor-quiz-hover: #1D1D28;

  --tutor-visual-gray-1: #14141C;
  --tutor-visual-gray-2: #2B2B38;
}
.andy .tutor-learning-nav-item.active { box-shadow: inset 3px 0 0 var(--gold); }
.andy .tutor-learning-area-footer .tutor-btn-ghost { color: var(--on-dark-head); }
.andy .tutor-learning-area-footer .tutor-btn-ghost.disabled { color: #8E8A82; }