:root {
  --brand: #0b6cf2;
  --brand-dark: #084fb1;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --success: #047857;
  --error: #b91c1c;
  --radius: 10px;
  --shadow: 0 2px 6px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

/* HTML5 `hidden` attribute should always beat CSS display rules */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-bottom: 32px;
}
.header-row {
  display: flex;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  height: 52px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand);
}
.brand-tag {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 480px) {
  .brand-logo { height: 42px; }
  .brand-name { font-size: 18px; }
  .brand-tag  { font-size: 12px; }
}

.site-footer {
  margin-top: 60px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.section-title {
  font-size: 20px;
  margin: 0 0 12px;
}
.section-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

#active-section {
  margin-bottom: 48px;
}
#catalog-section {
  margin-top: 24px;
}

.empty-state {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Course list */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.course-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.course-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}
.course-card h3 {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 18px;
}
.course-card .cta {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  color: var(--brand);
}

.course-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  font-size: 14px;
}
.course-meta li {
  padding: 4px 0;
}

/* ── Active Batch Card (premium look) ── */
.active-batch-card {
  position: relative;
  border-color: var(--brand);
  border-width: 1.5px;
}
.active-batch-card .batch-label {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* ── Catalog (dormant courses, grouped by stack) ── */
.catalog-stacks {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.catalog-stack-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.catalog-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.catalog-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  transition: border-color 0.1s ease, transform 0.1s ease;
}
.catalog-card:hover {
  text-decoration: none;
  border-color: var(--brand);
  transform: translateY(-1px);
}
.catalog-card-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.catalog-card-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}
.catalog-card-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: #f3f4f6;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.catalog-card-tag.tag-core       { background: #fce4ec; color: #c62828; }
.catalog-card-tag.tag-selenium   { background: #e3f2fd; color: #1565c0; }
.catalog-card-tag.tag-playwright { background: #f3e5f5; color: #6a1b9a; }
.catalog-card-tag.tag-bdd        { background: #e8f5e9; color: #2e7d32; }
.catalog-card-tag.tag-api        { background: #e0f2f1; color: #00695c; }
.catalog-card-tag.tag-mobile     { background: #f1f8e9; color: #558b2f; }
.catalog-card-tag.tag-ai         { background: #fff3e0; color: #e65100; }
.catalog-card-tag.tag-database   { background: #ede7f6; color: #4527a0; }
.catalog-card-tag.tag-performance{ background: #fbe9e7; color: #bf360c; }
.catalog-card-tag.tag-devops     { background: #eceff1; color: #455a64; }
.catalog-card-tag.tag-project    { background: #fff8e1; color: #ff6f00; }
.catalog-card-fees {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.catalog-card-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
}

/* Step bar */
.step-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.step-indicator {
  flex: 1 1 auto;
  min-width: 110px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-indicator span {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e5e7eb;
  color: #374151;
  font-weight: 600;
  font-size: 12px;
}
.step-indicator.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.step-indicator.active span {
  background: #fff;
  color: var(--brand);
}
.step-indicator.done span {
  background: var(--success);
  color: #fff;
}

/* Form step container */
.form-step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.form-step h2 {
  margin: 0 0 16px;
  color: var(--brand);
}
.form-step h3 {
  margin: 20px 0 8px;
  font-size: 16px;
}

/* Prerequisites */
.prereq-list {
  margin: 0 0 16px;
  padding-left: 20px;
}
.prereq-list li { padding: 3px 0; }

/* Fields */
.field {
  display: block;
  margin-bottom: 16px;
}
.field > span {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.field em { color: var(--error); font-style: normal; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
.field small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

/* Checkbox */
.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  background: #f1f5f9;
  border-radius: 8px;
  margin: 12px 0;
  cursor: pointer;
}
.checkbox-row input { margin-top: 3px; }
.checkbox-row.small {
  background: transparent;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Honeypot — invisible to real users */
.honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Buttons */
.form-actions {
  margin-top: 24px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.btn {
  display: inline-block;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) { background: #f3f4f6; }
.btn-link {
  background: transparent;
  color: var(--brand);
  border: none;
  padding: 11px 8px;
  margin-left: auto;
}
.btn-link:hover:not(:disabled) { text-decoration: underline; }

/* Success */
.success-box {
  text-align: center;
  padding: 24px 8px;
}
.success-box h2 { color: var(--success); }

/* Inline message */
.msg {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  margin: 10px 0;
}
.msg.error { background: #fee2e2; color: var(--error); }
.msg.info  { background: #dbeafe; color: var(--brand-dark); }

@media (max-width: 600px) {
  .form-step { padding: 20px; }
  .step-indicator { flex-basis: calc(50% - 4px); }
  .btn-link { margin-left: 0; }
}

/* ── Plan picker (Live / Recording / Both) ── */
.plan-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.plan-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.1s ease, background 0.1s ease;
}
.plan-row:hover {
  border-color: var(--brand);
}
.plan-row input[type="radio"] {
  margin: 0;
  flex-shrink: 0;
}
.plan-row input[type="radio"]:checked ~ .plan-row-text {
  color: var(--brand);
}
.plan-row:has(input[type="radio"]:checked) {
  border-color: var(--brand);
  background: #f0f7ff;
}
.plan-row-text {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.plan-row-label {
  font-weight: 600;
  font-size: 15px;
}
.plan-row-note {
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
}
.plan-row-fee {
  font-weight: 700;
  font-size: 15px;
  color: var(--brand);
  white-space: nowrap;
}

/* ── Interest mode header ── */
.interest-header {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.interest-header h2 {
  margin: 0 0 8px;
  color: var(--brand);
}
.interest-header p {
  margin: 0;
  color: var(--muted);
}

/* ── Batch label badge inside register form ── */
#batch-label-host .batch-label {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* ── Escape hatch (different slot / multi-course link on step 1) ── */
.escape-hatch {
  margin-top: 20px;
  padding: 14px 16px;
  background: #fffbeb;
  border: 1px dashed #fcd34d;
  border-radius: 8px;
  font-size: 14px;
  color: #78350f;
}
.escape-hatch p { margin: 0; }
.escape-hatch a {
  font-weight: 600;
  color: #b45309;
  white-space: nowrap;
}

/* ── Unified interest form ── */
.ifield-heading {
  margin: 24px 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.ifield-heading:first-child { margin-top: 0; }
.ifield-help {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}

/* Course checklist (grouped by stack) */
.course-checklist {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 16px;
}
.cc-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  overflow: hidden;
}
/* <summary> styled as a click-to-toggle header */
.cc-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;          /* hide default ▶ disclosure marker */
  user-select: none;
  transition: background 0.1s ease;
}
.cc-section-title::-webkit-details-marker { display: none; }
.cc-section-title:hover { background: #f1f5f9; }
.cc-section-name {
  flex: 1;
  position: relative;
  padding-left: 18px;
}
/* Custom chevron — rotates when section opens */
.cc-section-name::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(-45deg);
  transition: transform 0.15s ease;
}
.cc-section[open] .cc-section-name::before {
  transform: translateY(-30%) rotate(45deg);
}
.cc-section-count {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: none;
}
.cc-section[open] .cc-section-title {
  border-bottom: 1px solid var(--border);
}
.cc-section .cc-row:first-of-type { margin-top: 6px; }
.cc-section .cc-row {
  margin: 0 8px;
}
.cc-section .cc-row:last-of-type { margin-bottom: 8px; }
.cc-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s ease;
}
.cc-row:hover { background: #f1f5f9; }
.cc-row input[type="checkbox"] {
  margin: 3px 0 0;
  flex-shrink: 0;
}
.cc-row.checked { background: #f0f7ff; }
.cc-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}
.cc-fee {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.cc-row.checked .cc-fee { color: var(--brand); font-weight: 600; }

/* Bundle summary (live total) */
.bundle-summary {
  margin: 16px 0;
  padding: 12px 16px;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}
.bundle-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.bundle-total {
  font-size: 16px;
  color: var(--brand);
}
.bundle-summary-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* Slot picker */
.slot-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.slot-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  font-size: 14px;
  transition: border-color 0.1s ease, background 0.1s ease;
}
.slot-row:hover { border-color: var(--brand); }
.slot-row input[type="radio"] {
  margin: 0;
  flex-shrink: 0;
}
.slot-row:has(input[type="radio"]:checked) {
  border-color: var(--brand);
  background: #f0f7ff;
}
