/* MAHA Suspension Course — standalone site.
   Deliberately self-contained: this page ships on its own hosting target and
   shares no build with the PuckControl app, so the palette is restated here
   rather than imported. Values mirror src/App.css. */

:root {
  --midnight-blue: #1e293b;
  --hockey-red: #C8102E;
  --deep-blue: #005D21;
  --hockey-green: #047857;
  --ice-blue: #E8F4F8;
  --ice-blue-light: #e0f2fe;
  --steel-gray: #6B7280;
  --light-gray: #e2e8f0;
  --border: rgba(10, 37, 64, 0.15);
  --shadow: rgba(10, 37, 64, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--midnight-blue);
  background: var(--ice-blue);
  line-height: 1.55;
}

/* ---------- header / footer ---------- */

.cs-header {
  background: var(--midnight-blue);
  color: #fff;
  padding: 20px 16px;
}
.cs-header-inner { max-width: 1180px; margin: 0 auto; }
.cs-header h1 {
  margin: 0;
  font-family: 'Bebas Neue', 'Work Sans', sans-serif;
  font-size: 28px;
  letter-spacing: 0.5px;
}
.cs-sub { margin: 4px 0 0; font-size: 14px; color: #cbd5e1; }

.cs-footer {
  margin-top: 40px;
  padding: 20px 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.cs-footer p { margin: 0; font-size: 12px; color: var(--steel-gray); }

/* ---------- layout ---------- */

.cs-main { max-width: 1180px; margin: 0 auto; padding: 28px 16px; }
.cs-state { animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

.cs-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  padding: 28px;
  max-width: 640px;
  margin: 0 auto;
}
.cs-card-error { border-left: 4px solid var(--hockey-red); }
.cs-card h2 { margin: 0 0 14px; font-family: 'Bebas Neue', 'Work Sans', sans-serif; font-size: 24px; }

.cs-greeting { margin: 0 0 6px; color: var(--steel-gray); font-size: 15px; }
.cs-fineprint { font-size: 13px; color: var(--steel-gray); }
.cs-fineprint code { background: var(--ice-blue); padding: 2px 5px; border-radius: 4px; }

.cs-steps { margin: 0 0 20px; padding-left: 20px; }
.cs-steps li { margin-bottom: 16px; }

.cs-resume {
  background: var(--ice-blue-light);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin: 0 0 18px;
}

/* ---------- buttons ---------- */

.cs-btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.05s ease;
}
.cs-btn:active { transform: translateY(1px); }
.cs-btn-primary { background: var(--deep-blue); color: #fff; margin-top: 10px; }
.cs-btn-primary:hover { background: var(--hockey-green); }
.cs-btn-go { background: var(--hockey-green); color: #fff; width: 100%; font-size: 17px; padding: 14px; }
.cs-btn-go:hover { background: var(--deep-blue); }

/* ---------- player ---------- */

.cs-player-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; }
.cs-video-col { min-width: 0; }

#video {
  width: 100%;
  aspect-ratio: 4 / 3;   /* the source is 720x540; don't letterbox it into 16:9 */
  background: #000;
  border-radius: 10px;
  display: block;
}

.cs-progress { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.cs-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--light-gray);
  border-radius: 999px;
  overflow: hidden;
}
.cs-progress-fill {
  height: 100%;
  width: 0;
  background: var(--hockey-green);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.cs-progress-label { font-size: 13px; color: var(--steel-gray); white-space: nowrap; }

.cs-note { font-size: 13px; color: var(--steel-gray); margin: 10px 0 0; min-height: 20px; }
.cs-note-warn { color: var(--hockey-red); font-weight: 600; }

.cs-done {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--ice-blue-light);
  border-left: 4px solid var(--hockey-green);
  font-size: 14px;
}
.cs-done a { color: var(--deep-blue); }

/* ---------- side panel ---------- */

.cs-side { display: flex; flex-direction: column; gap: 18px; }
.cs-side-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.cs-side-block h3 {
  margin: 0 0 4px;
  font-family: 'Bebas Neue', 'Work Sans', sans-serif;
  font-size: 17px;
  letter-spacing: 0.4px;
}
.cs-side-hint { margin: 0 0 10px; font-size: 12px; color: var(--steel-gray); }

#links-list { list-style: none; margin: 0; padding: 0; }
#links-list li { padding: 7px 0; border-bottom: 1px solid var(--light-gray); font-size: 13px; }
#links-list li:last-child { border-bottom: none; }
#links-list a { color: var(--deep-blue); }
.cs-link-active a { font-weight: 700; }
.cs-link-active::before { content: '▶ '; color: var(--hockey-green); }

.cs-chapters { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.cs-chapter {
  display: flex;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 7px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--midnight-blue);
}
.cs-chapter:hover { background: var(--ice-blue); }
.cs-chapter-time { color: var(--steel-gray); font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* ---------- loading ---------- */

.cs-state#state-loading { text-align: center; padding: 60px 0; color: var(--steel-gray); }
.cs-spinner {
  width: 28px; height: 28px;
  margin: 0 auto 14px;
  border: 3px solid var(--light-gray);
  border-top-color: var(--deep-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .cs-player-wrap { grid-template-columns: 1fr; }
  .cs-chapters { max-height: 260px; }
}
@media (max-width: 768px) {
  .cs-header h1 { font-size: 22px; }
  .cs-card { padding: 20px; }
  .cs-main { padding: 18px 12px; }
}
