/* SSBHam Coach Hub — design ported from SSOKC's hub for visual consistency.
   Dense, dashboard-style layout. DM Sans + JetBrains Mono. 960px max width.
   Color-coded link cards. Mono labels with letter-spacing. */

:root {
  --ss-red: #EE212D;
  --ss-blue: #00A3E1;
  --ss-gray: #707372;
  --ss-black: #212322;
  --bg: #F7F7F8;
  --surface: #FFFFFF;
  --surface-2: #F0F0F2;
  --surface-3: #E8E8EC;
  --border: #E0E0E4;
  --border-hover: #C8C8D0;
  --text: #212322;
  --text-secondary: #4A4A52;
  --text-muted: #707372;
  --red-glow: rgba(238, 33, 45, 0.08);
  --blue-glow: rgba(0, 163, 225, 0.08);
  --green: #2D8A4E;
  --green-glow: rgba(45, 138, 78, 0.08);
  --amber: #D4890A;
  --amber-glow: rgba(212, 137, 10, 0.08);
  --purple: #7C3AED;
  --purple-glow: rgba(124, 58, 237, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}

.container { max-width: 960px; margin: 0 auto; padding: 40px 24px 80px; }

/* ---------- Header ---------- */
.header { margin-bottom: 48px; border-bottom: 3px solid var(--ss-red); padding-bottom: 24px; }
.header-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 3px;
  color: var(--ss-red); margin-bottom: 8px; font-weight: 500;
}
.header h1 {
  font-size: 32px; font-weight: 700; letter-spacing: -0.5px;
  margin-bottom: 6px; color: var(--ss-black);
}
.header p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

/* ---------- Section ---------- */
.section { margin-bottom: 40px; }
.section-title {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 2px;
  color: var(--ss-gray); margin-bottom: 16px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ---------- Card grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card-grid-wide { grid-template-columns: 1fr; }
.card-grid-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

/* ---------- Link card (Systems & Tools) ---------- */
.link-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none; color: var(--text);
  transition: all 0.2s ease;
  cursor: pointer; position: relative; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.link-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.link-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  opacity: 0; transition: opacity 0.2s;
}
.link-card:hover::before { opacity: 1; }
.link-card.blue:hover   { background: var(--blue-glow); }   .link-card.blue::before   { background: var(--ss-blue); }
.link-card.green:hover  { background: var(--green-glow); }  .link-card.green::before  { background: var(--green); }
.link-card.amber:hover  { background: var(--amber-glow); }  .link-card.amber::before  { background: var(--amber); }
.link-card.red:hover    { background: var(--red-glow); }    .link-card.red::before    { background: var(--ss-red); }
.link-card.purple:hover { background: var(--purple-glow); } .link-card.purple::before { background: var(--purple); }

.card-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.card-icon.blue   { background: var(--blue-glow);   color: var(--ss-blue); }
.card-icon.green  { background: var(--green-glow);  color: var(--green); }
.card-icon.amber  { background: var(--amber-glow);  color: var(--amber); }
.card-icon.red    { background: var(--red-glow);    color: var(--ss-red); }
.card-icon.purple { background: var(--purple-glow); color: var(--purple); }

.card-content { flex: 1; min-width: 0; }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; color: var(--ss-black); }
.card-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.card-url {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; color: var(--ss-gray); margin-top: 2px;
}
.card-arrow {
  color: var(--ss-gray); font-size: 14px; flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}
.link-card:hover .card-arrow { transform: translateX(3px); color: var(--ss-blue); }

/* ---------- Resource card (containers) ---------- */
.resource-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.resource-card h3 {
  font-size: 14px; font-weight: 600; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px; color: var(--ss-black);
}
.resource-card h3 .badge {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9px; text-transform: uppercase; letter-spacing: 1px;
  padding: 2px 8px; border-radius: 4px; font-weight: 500;
}
.badge-start { background: var(--red-glow); color: var(--ss-red); }
.badge-ref { background: var(--blue-glow); color: var(--ss-blue); }
.resource-card p.intro { font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.5; }

/* ---------- Resource list (numbered links) ---------- */
.resource-list { list-style: none; }
.resource-list li { margin-bottom: 1px; }
.resource-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text); font-size: 13px;
  transition: background 0.15s;
}
.resource-list a:hover { background: var(--surface-2); }
.resource-list .num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; color: var(--ss-gray); width: 20px; text-align: center; flex-shrink: 0;
}
.resource-list .label { flex: 1; color: var(--text-secondary); }
.resource-list .label-desc { font-size: 11px; color: var(--ss-gray); }
.resource-list .tag {
  font-size: 10px; color: var(--ss-gray); padding: 2px 6px;
  background: var(--surface-2); border-radius: 4px; flex-shrink: 0;
}

/* ---------- Pricing ---------- */
.pricing-bar { display: flex; gap: 12px; margin-top: 12px; }
.price-item {
  flex: 1; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.price-amount { font-size: 22px; font-weight: 700; color: var(--ss-black); margin-bottom: 2px; }
.price-label { font-size: 11px; color: var(--ss-gray); }

.pricing-script {
  margin-top: 12px; background: var(--ss-black);
  border-radius: var(--radius-sm); padding: 16px 20px;
}
.pricing-script-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--ss-blue); margin-bottom: 8px;
}
.pricing-script p { font-size: 13px; color: rgba(255, 255, 255, 0.85); line-height: 1.6; font-style: italic; }

/* ---------- Checklist (details) ---------- */
.checklist-section details { margin-bottom: 8px; }
.checklist-section summary {
  font-size: 14px; font-weight: 600; color: var(--ss-black); cursor: pointer;
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--surface-3);
  list-style: none; display: flex; align-items: center; gap: 10px;
  transition: background 0.15s;
}
.checklist-section summary:hover { background: var(--surface-3); }
.checklist-section summary::-webkit-details-marker { display: none; }
.checklist-section summary::before {
  content: '▸'; font-size: 14px; color: var(--ss-gray);
  transition: transform 0.15s; flex-shrink: 0;
}
.checklist-section details[open] > summary::before { transform: rotate(90deg); }
.checklist-section summary .freq-badge {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9px; text-transform: uppercase; letter-spacing: 1px;
  padding: 2px 8px; border-radius: 4px; font-weight: 500; margin-left: auto;
}
.freq-daily   { background: var(--red-glow);   color: var(--ss-red); }
.freq-weekly  { background: var(--blue-glow);  color: var(--ss-blue); }
.freq-session { background: var(--green-glow); color: var(--green); }
.freq-after   { background: var(--amber-glow); color: var(--amber); }
.freq-ref     { background: var(--purple-glow); color: var(--purple); }

.checklist-group { padding: 12px 0 4px 16px; }
.checklist-group-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--ss-gray); margin-bottom: 6px; padding-left: 6px;
}
.checklist-items { list-style: none; padding: 0; margin: 0 0 8px 0; }
.checklist-items li {
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
  padding: 5px 8px 5px 6px; border-radius: 4px;
  display: flex; align-items: flex-start; gap: 8px;
}
.checklist-items li:hover { background: var(--surface-2); }
.checklist-items .check {
  color: var(--border-hover); font-size: 13px; flex-shrink: 0; margin-top: 1px; line-height: 1;
}
.checklist-items .sub { list-style: none; padding: 2px 0 2px 24px; margin: 0; }
.checklist-items .sub li { padding: 3px 8px 3px 6px; font-size: 11px; color: var(--text-muted); }
.checklist-items .emphasis { color: var(--text); font-weight: 500; }
.checklist-mindset {
  font-size: 12px; color: var(--text-secondary); font-style: italic;
  padding: 10px 14px; margin: 8px 0 4px 16px;
  background: var(--surface-2); border-radius: var(--radius-sm);
  border-left: 3px solid var(--ss-red); line-height: 1.5;
}

/* ---------- Video section (collapsible) ---------- */
.video-section details { margin-bottom: 8px; }
.video-section summary {
  font-size: 13px; font-weight: 600; color: var(--ss-black); cursor: pointer;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--surface-3);
  list-style: none; display: flex; align-items: center; gap: 10px;
  transition: background 0.15s;
}
.video-section summary:hover { background: var(--surface-3); }
.video-section summary::-webkit-details-marker { display: none; }
.video-section summary::before {
  content: '▸'; font-size: 14px; color: var(--ss-gray);
  transition: transform 0.15s; flex-shrink: 0;
}
.video-section details[open] > summary::before { transform: rotate(90deg); }
.video-section summary .count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; color: var(--ss-gray); margin-left: auto; flex-shrink: 0;
}
.video-section summary .hint { font-size: 11px; font-weight: 400; color: var(--text-secondary); }
.video-section .video-list { list-style: none; padding: 4px 0 8px 0; }
.video-section .video-list li { margin-bottom: 1px; }
.video-section .video-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px 7px 38px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text-secondary);
  font-size: 12px; transition: background 0.15s;
}
.video-section .video-list a:hover { background: var(--surface-2); }
.video-section .video-list .tag-yt {
  font-size: 9px; color: var(--ss-red); padding: 1px 5px;
  background: var(--red-glow); border-radius: 3px; flex-shrink: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 500;
}

/* ---------- Playbook / protocol bodies (reuse checklist styling for callouts) ---------- */
.playbook-body { padding: 14px 16px 8px; }
.playbook-body p { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.55; }
.playbook-body p:last-child { margin-bottom: 0; }
.playbook-body h4 {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--ss-gray); margin: 14px 0 8px;
}
.playbook-body h4:first-child { margin-top: 0; }
.playbook-body table {
  width: 100%; border-collapse: collapse;
  background: var(--surface); margin: 8px 0;
  font-size: 12px; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border);
}
.playbook-body table th,
.playbook-body table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.playbook-body table th {
  background: var(--surface-2); font-weight: 600; color: var(--ss-black);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
}
.playbook-body table tbody tr:last-child td { border-bottom: 0; }

.program-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px; margin: 10px 0;
}
.program-day {
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px;
  border: 1px solid var(--surface-3);
}
.program-day h5 {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--ss-red); margin-bottom: 6px; font-weight: 500;
}
.program-day ul {
  list-style: none; padding: 0; margin: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; color: var(--text-secondary);
}
.program-day li { padding: 2px 0; }

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 8px 0; }
ol.steps li {
  counter-increment: step;
  padding: 8px 0 8px 38px; position: relative;
  font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid var(--surface-2);
}
ol.steps li:last-child { border-bottom: 0; }
ol.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 8px;
  width: 24px; height: 24px;
  background: var(--red-glow); color: var(--ss-red);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
@media (max-width: 600px) { .do-dont { grid-template-columns: 1fr; } }
.do-dont .do, .do-dont .dont {
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 12px;
}
.do-dont .do  { background: var(--green-glow); border: 1px solid #c8e8d3; }
.do-dont .dont { background: var(--red-glow);   border: 1px solid #f3c8cc; }
.do-dont h5 {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 6px; font-weight: 600;
}
.do-dont .do h5  { color: var(--green); }
.do-dont .dont h5 { color: var(--ss-red); }
.do-dont ul { list-style: none; padding: 0; margin: 0; }
.do-dont li { padding: 3px 0; color: var(--text-secondary); }
.do-dont .do li::before  { content: '✓ '; color: var(--green);  font-weight: 700; }
.do-dont .dont li::before { content: '✗ '; color: var(--ss-red); font-weight: 700; }

.script-box {
  background: var(--ss-black); color: rgba(255, 255, 255, 0.88);
  font-style: italic; font-size: 13px; line-height: 1.6;
  padding: 14px 18px; border-radius: var(--radius-sm); margin: 8px 0;
}
.callout {
  background: var(--surface-2); border-left: 3px solid var(--ss-red);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
  margin: 10px 0;
}
.callout strong { color: var(--text); }

/* ---------- Schedule dashboard ---------- */
.schedule-status {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 4px; font-weight: 500;
}
.schedule-status.live { background: var(--green-glow); color: var(--green); }
.schedule-status.error { background: var(--amber-glow); color: var(--amber); }

/* Coach name pills — high-contrast, 2px solid colored border (matches SSOKC's dashboard).
   One pill per coach; multi-coach sessions render multiple pills with gap. */
.coach-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.coach-pill {
  display: inline-block;
  font-size: 13px; font-weight: 600;
  padding: 4px 12px; border-radius: 20px;
  border: 2px solid;
  white-space: nowrap;
  line-height: 1.3;
}
.coach-pill.green   { background: #f0fdf4; border-color: #16a34a; color: #16a34a; }
.coach-pill.amber   { background: #fffbeb; border-color: #d97706; color: #d97706; }
.coach-pill.purple  { background: #faf5ff; border-color: #9333ea; color: #9333ea; }
.coach-pill.blue    { background: #eff6ff; border-color: #2563eb; color: #2563eb; }
.coach-pill.red     { background: #fef2f2; border-color: #dc2626; color: #dc2626; }
.coach-pill.neutral { background: #f9fafb; border-color: #6b7280; color: #6b7280; }
.coach-pill.uncoached {
  background: #fef2f2; border-color: #ef4444; color: #ef4444;
  animation: pulse-border 1.5s ease-in-out infinite;
}
@keyframes pulse-border {
  0%, 100% { border-color: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
  50%      { border-color: #f87171; box-shadow: 0 0 0 4px rgba(239,68,68,0.1); }
}

/* Day cell: "Monday" big, "May 12" small underneath. */
.schedule-day .day-name { font-weight: 600; color: var(--ss-black); font-size: 13px; white-space: nowrap; }
.schedule-day .day-date { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: #94a3b8; font-weight: 400; margin-top: 1px; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 48px; padding-top: 20px;
  border-top: 2px solid var(--border);
  text-align: center; font-size: 11px; color: var(--ss-gray);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .container { padding: 24px 16px 60px; }
  .header h1 { font-size: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid-apps { grid-template-columns: 1fr; }
  .pricing-bar { flex-direction: column; }
}

/* ---------- Print ---------- */
@media print {
  body { background: white; }
  .container { padding: 16px; }
  details { break-inside: avoid; }
  details[open] > div { display: block !important; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 10px; color: #888; }
}
