/* ============================================================
   Courseware Studio — Runtime Player Styles
   ============================================================ */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-subtle: #eff6ff;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --green: #10b981;
  --green-subtle: #ecfdf5;
  --amber: #b45309;
  --amber-subtle: #fffbeb;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Skip Link */
.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  transform: translateY(-200%);
  background: #ffffff;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */
.course-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #0f172a 100%);
  color: #ffffff;
  padding: 3.5rem 1.5rem 2.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-inner {
  max-width: 1060px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.course-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.65rem;
  color: #ffffff;
}

.course-subtitle {
  font-size: 1.05rem;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Main Container */
.main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

.card.highlight {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.card.green-accent {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

/* Labels & Typography */
.unit-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 0.35rem;
}

.card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.markdown {
  font-size: 1.02rem;
  line-height: 1.75;
  color: #334155;
}

/* Buttons */
.button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--primary);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 8px;
  padding: 0.65rem 1.4rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.button:hover, .btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface-subtle);
  color: #334155 !important;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a !important;
}

.btn-green {
  background: var(--green);
  color: #0f172a !important;
  font-weight: 700;
}

.btn-green:hover {
  background: #059669;
  color: #ffffff !important;
}

.btn-accent {
  background: var(--accent);
  color: #ffffff !important;
}

.btn-accent:hover {
  background: var(--accent-hover);
}

/* Module Cards */
.module-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  flex-wrap: wrap;
  transition: all 0.2s ease;
}

.module-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.completion-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: 2px 10px;
}

/* B2B Showcase & Download Boxes */
.grid-downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.download-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.download-box h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.download-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .course-title { font-size: 1.85rem; }
  .card { padding: 1.25rem; }
  .module-card { padding: 1rem; }
}

/* Timing Matrix & Badges */
.timing-table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.timing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.timing-table th, .timing-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.timing-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #0f172a;
}

.timing-table tr:last-child td {
  border-bottom: none;
}

.timing-table tr.total-row {
  background: #eff6ff;
  font-weight: 700;
  color: #1e40af;
}

.time-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.time-pill.lab {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.time-pill.total {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
  font-weight: 700;
}
