/* ════════════════════════════
   SCOPED — prefix: hem26
   ════════════════════════════ */
#hem26-root {
  --h-bg:        #f0f4ff;
  --h-surface:   #ffffff;
  --h-surface2:  #eef2fb;
  --h-border:    #dce4f5;
  --h-text:      #1a2340;
  --h-muted:     #626f8f;
  --h-blue:      #2563eb;
  --h-blue-lt:   #eff4ff;
  --h-blue-bd:   #bfcffc;
  --h-amber:     #d97706;
  --h-amber-lt:  #fffbeb;
  --h-amber-bd:  #fcd34d;
  --h-amber-hd:  #FFC107;
  --h-green:     #059669;
  --h-green-lt:  #ecfdf5;
  --h-green-bd:  #6ee7b7;
  --h-sh-sm: 0 1px 4px rgba(37,99,235,0.07);
  --h-sh-md: 0 4px 18px rgba(37,99,235,0.10);
  --h-sh-lg: 0 8px 32px rgba(37,99,235,0.14);
  all: initial;
  display: block;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  overflow: hidden;
  position: relative;
}

/* Dot grid */
#hem26-root::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(37,99,235,0.065) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none; z-index: 0;
}

#hem26-root .hem-wrap { position: relative; z-index: 1; max-width: 100%; }

/* ── HEADER ── */
#hem26-root .hem-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: 28px; padding-bottom: 24px;
  border-bottom: 2px solid var(--h-border);
}
#hem26-root .hem-header-left { padding-left: 16px; position: relative; }
#hem26-root .hem-header-left::before {
  content: ''; position: absolute; left: 0; top: 2px; bottom: 2px;
  width: 4px; background: linear-gradient(to bottom, var(--h-blue), var(--h-amber)); border-radius: 4px;
}
#hem26-root .hem-eyebrow {
  font-size: 14px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--h-blue); display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
#hem26-root .hem-eyebrow::before {
  content: ''; display: inline-block; width: 18px; height: 2px; background: var(--h-blue); border-radius: 2px;
}
#hem26-root .hem-title { font-size: 52px; font-weight: 800; color: var(--h-text); letter-spacing: -0.5px; line-height: 1.2; }
#hem26-root .hem-title span { color: var(--h-blue); }
#hem26-root .hem-subtitle { font-size: 15px; color: var(--h-muted); font-weight: 400; margin-top: 4px; }
#hem26-root .hem-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#hem26-root .hem-icon-box {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--h-blue), #1d4ed8);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: var(--h-sh-md); margin-bottom: 6px; margin-left: auto;
}
#hem26-root .hem-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--h-amber-lt); border: 1px solid var(--h-amber-bd); color: var(--h-amber);
  padding: 4px 12px; border-radius: 20px; font-size: 16px; font-weight: 600;
}
#hem26-root .hem-bdot { width: 5px; height: 5px; background: currentColor; border-radius: 50%; display: inline-block; }

/* ── LEGEND ── */
#hem26-root .hem-legend {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  margin-bottom: 20px; background: var(--h-surface); border: 1.5px solid var(--h-border);
  border-radius: 12px; padding: 12px 18px; box-shadow: var(--h-sh-sm);
}
#hem26-root .hem-legend-label { font-size: 16px; font-weight: 700; color: var(--h-muted); text-transform: uppercase; letter-spacing: 1px; margin-right: 4px; }
#hem26-root .hem-legend-item  { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; color: var(--h-text); }
#hem26-root .hem-tick-demo { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; }
#hem26-root .hem-tick-demo.active { background: var(--h-green-lt); border: 1.5px solid var(--h-green-bd); color: var(--h-green); }
#hem26-root .hem-tick-demo.empty  { background: var(--h-surface2); border: 1.5px solid var(--h-border); color: var(--h-muted); }

/* ── STATS ── */
#hem26-root .hem-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
#hem26-root .hem-stat {
  background: var(--h-surface); border: 1.5px solid var(--h-border);
  border-radius: 12px; padding: 14px 18px; display: flex; align-items: center;
  gap: 12px; box-shadow: var(--h-sh-sm); min-width: 160px; flex: 1;
}
#hem26-root .hem-stat-icon {
  width: 55px; height: 55px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 30px; flex-shrink: 0;
}
#hem26-root .hem-stat-icon.blue  { background: var(--h-blue-lt); }
#hem26-root .hem-stat-icon.amber { background: var(--h-amber-lt); }
#hem26-root .hem-stat-icon.green { background: var(--h-green-lt); }
#hem26-root .hem-stat-num { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
#hem26-root .hem-stat-num.blue  { color: var(--h-blue); }
#hem26-root .hem-stat-num.amber { color: var(--h-amber); }
#hem26-root .hem-stat-num.green { color: var(--h-green); }
#hem26-root .hem-stat-lbl { font-size: 16px; color: var(--h-muted); font-weight: 500; line-height: 1.4; margin-top: 2px; }

/* ── TABLE WRAPPER ── */
#hem26-root .hem-table-outer {
  background: var(--h-surface); border: 1.5px solid var(--h-border);
  border-radius: 18px; overflow: hidden; box-shadow: var(--h-sh-sm);
}
#hem26-root .hem-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
#hem26-root .hem-table-scroll::-webkit-scrollbar { height: 5px; }
#hem26-root .hem-table-scroll::-webkit-scrollbar-track { background: var(--h-surface2); }
#hem26-root .hem-table-scroll::-webkit-scrollbar-thumb { background: var(--h-blue-bd); border-radius: 3px; }

/* ── TABLE ── */
#hem26-root table { width: 100%; min-width: 900px; border-collapse: collapse; }

/* Header row 1 */
#hem26-root thead tr:first-child th {
  background: #e8a000; color: #fff;
  font-size: 16px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  padding: 14px 10px; text-align: center;
  border-right: 1px solid rgba(0,0,0,0.1); border-bottom: 1px solid rgba(0,0,0,0.12);
  white-space: nowrap;
}
#hem26-root thead tr:first-child th:first-child {
  text-align: left; padding-left: 18px; font-size: 15px; letter-spacing: 0.5px;
  background: linear-gradient(135deg, #d97706 0%, #e8a000 100%); color: #fff; min-width: 240px;
}

/* Header row 2 */
#hem26-root thead tr:last-child th {
  background: #fff8e1; color: var(--h-amber);
  font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 7px 6px; text-align: center;
  border-right: 1px solid var(--h-amber-bd); border-bottom: 2px solid var(--h-amber-bd);
}
#hem26-root thead tr:last-child th:first-child {
  background: #fff3cd; color: var(--h-amber);
  font-size: 14px; font-weight: 700; letter-spacing: 0.5px; text-align: left; padding-left: 18px;
}

/* Body rows */
#hem26-root tbody tr { transition: background 0.15s ease; }
#hem26-root tbody tr:nth-child(even) { background: rgba(240,244,255,0.4); }
#hem26-root tbody tr:hover { background: var(--h-blue-lt); }

/* Activity name cell */
#hem26-root tbody td:first-child {
  background: var(--h-surface2); font-size: 15px; font-weight: 600; color: var(--h-text);
  padding: 11px 14px 11px 18px; border-right: 2px solid var(--h-blue-bd);
  border-bottom: 1px solid var(--h-border); min-width: 240px; line-height: 1.4;
}
#hem26-root tbody tr:nth-child(even) td:first-child { background: #e8edf8; }
#hem26-root tbody tr:hover td:first-child { background: #dce8fb; }

/* Month data cells */
#hem26-root tbody td:not(:first-child) {
  padding: 10px 6px; text-align: center;
  border-right: 1px solid var(--h-border); border-bottom: 1px solid var(--h-border);
  width: 56px; min-width: 48px;
}
#hem26-root tbody tr:last-child td { border-bottom: none; }
#hem26-root tbody td:last-child { border-right: none; }

/* Tick chip */
#hem26-root .hem-tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--h-green-lt); border: 1.5px solid var(--h-green-bd); color: var(--h-green);
  font-size: 14px; font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease; cursor: default;
}
#hem26-root .hem-tick:hover { transform: scale(1.15); box-shadow: 0 2px 8px rgba(5,150,105,0.25); }

/* Row number badge */
#hem26-root .hem-row-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 25px; height: 25px; background: var(--h-blue); color: #fff;
  border-radius: 50%; font-size: 12px; font-weight: 700; margin-right: 8px; flex-shrink: 0;
}

/* Activity cell inner */
#hem26-root .hem-act { display: flex; align-items: center; }

/* ── FOOTER ── */
#hem26-root .hem-footer {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px; margin-top: 16px; padding: 14px 18px;
  background: var(--h-surface); border: 1.5px solid var(--h-border);
  border-radius: 12px; box-shadow: var(--h-sh-sm);
}
#hem26-root .hem-footer-note {
  font-size: 16px; color: var(--h-muted); font-weight: 400;
  display: flex; align-items: center; gap: 6px;
}
#hem26-root .hem-footer-note::before { content: 'ℹ️'; font-size: 13px; }
#hem26-root .hem-months-bar { display: flex; gap: 4px; flex-wrap: wrap; }
#hem26-root .hem-month-pip {
  width: 28px; height: 6px; border-radius: 3px;
  background: var(--h-amber-hd); opacity: 0.5; transition: opacity 0.15s;
}
#hem26-root .hem-month-pip.has-activity { opacity: 1; background: linear-gradient(90deg, var(--h-blue), var(--h-amber)); }

/* ══ RESPONSIVE — 768px ══ */
@media (max-width: 768px) {
  #hem26-root .hem-header { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 20px; padding-bottom: 18px; }
  #hem26-root .hem-header-left { padding-left: 14px; }
  #hem26-root .hem-eyebrow { font-size: 10px; letter-spacing: 1.5px; gap: 6px; margin-bottom: 5px; }
  #hem26-root .hem-eyebrow::before { width: 14px; }
  #hem26-root .hem-title { font-size: clamp(22px, 6.5vw, 34px); letter-spacing: -0.3px; line-height: 1.2; }
  #hem26-root .hem-subtitle { font-size: 12px; margin-top: 3px; line-height: 1.5; }
  #hem26-root .hem-header-right { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
  #hem26-root .hem-icon-box { width: 38px; height: 38px; font-size: 17px; border-radius: 9px; margin-bottom: 0; margin-left: 0; }
  #hem26-root .hem-badge { font-size: 12px; padding: 3px 10px; }
  #hem26-root .hem-stats { gap: 8px; margin-bottom: 14px; }
  #hem26-root .hem-stat { padding: 11px 12px; border-radius: 10px; min-width: 0; gap: 10px; }
  #hem26-root .hem-stat-icon { width: 42px; height: 42px; font-size: 20px; border-radius: 8px; }
  #hem26-root .hem-stat-num { font-size: 22px; letter-spacing: -0.5px; }
  #hem26-root .hem-stat-lbl { font-size: 11px; line-height: 1.35; margin-top: 1px; }
  #hem26-root .hem-legend { padding: 10px 14px; gap: 10px; border-radius: 10px; margin-bottom: 14px; }
  #hem26-root .hem-legend-label { font-size: 10px; letter-spacing: 0.8px; margin-right: 0; }
  #hem26-root .hem-legend-item { font-size: 12px; gap: 5px; }
  #hem26-root .hem-tick-demo { width: 20px; height: 20px; font-size: 11px; border-radius: 5px; }
  #hem26-root .hem-table-outer { border-radius: 12px; }
  #hem26-root table { min-width: 680px; }
  #hem26-root thead tr:first-child th { font-size: 11px; padding: 10px 6px; letter-spacing: 0.5px; }
  #hem26-root thead tr:first-child th:first-child { font-size: 11px; padding-left: 12px; min-width: 170px; }
  #hem26-root thead tr:last-child th { font-size: 10px; padding: 5px 4px; letter-spacing: 0.5px; }
  #hem26-root thead tr:last-child th:first-child { font-size: 11px; padding-left: 12px; }
  #hem26-root tbody td:first-child { font-size: 12.5px; padding: 9px 10px 9px 12px; min-width: 170px; line-height: 1.4; }
  #hem26-root .hem-row-num { width: 20px; height: 20px; font-size: 10px; margin-right: 6px; }
  #hem26-root tbody td:not(:first-child) { padding: 8px 4px; width: 42px; min-width: 36px; }
  #hem26-root .hem-tick { width: 22px; height: 22px; font-size: 11px; border-radius: 5px; }
  #hem26-root .hem-footer { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 10px; }
  #hem26-root .hem-footer-note { font-size: 11.5px; line-height: 1.55; gap: 5px; }
  #hem26-root .hem-months-bar { gap: 3px; }
  #hem26-root .hem-month-pip { width: 20px; height: 5px; }
}

/* ══ RESPONSIVE — 480px ══ */
@media (max-width: 480px) {
  #hem26-root .hem-stats { flex-direction: column; gap: 7px; }
  #hem26-root .hem-stat { padding: 10px 12px; }
  #hem26-root .hem-stat-num { font-size: 20px; }
  #hem26-root .hem-stat-lbl { font-size: 10.5px; }
  #hem26-root .hem-stat-icon { width: 38px; height: 38px; font-size: 18px; }
  #hem26-root .hem-title { font-size: clamp(20px, 7.5vw, 26px); }
  #hem26-root .hem-eyebrow { font-size: 9px; letter-spacing: 1px; }
  #hem26-root .hem-subtitle { font-size: 11px; }
  #hem26-root .hem-badge { font-size: 11px; padding: 2px 8px; }
  #hem26-root .hem-legend { flex-direction: column; align-items: flex-start; gap: 7px; }
  #hem26-root thead tr:first-child th { font-size: 10px; padding: 8px 5px; }
  #hem26-root thead tr:first-child th:first-child { min-width: 150px; }
  #hem26-root tbody td:first-child { font-size: 11.5px; min-width: 150px; }
  #hem26-root tbody td:not(:first-child) { width: 36px; min-width: 30px; padding: 7px 3px; }
  #hem26-root .hem-tick { width: 20px; height: 20px; font-size: 10px; }
  #hem26-root .hem-footer-note { font-size: 11px; }
  #hem26-root .hem-month-pip { width: 16px; }
}
