/* ── HitHard Guide Report Card Styles ── */
.report-card-section {
  max-width: 780px;
  margin: 48px auto 120px;
  padding: 0 20px;
  font-family: 'Inter', sans-serif;
}
.rc-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #0d1b2a, #1a3a5c);
  border-radius: 18px 18px 0 0;
  padding: 24px 28px;
  border-bottom: 3px solid #f5600a;
}
.rc-icon { font-size: 2.4rem; flex-shrink: 0; }
.rc-title { font-family: 'Oswald', sans-serif; font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 2px; }
.rc-sub { font-size: .75rem; color: rgba(255,255,255,.45); }
.rc-body { background: #fff; border-radius: 0 0 18px 18px; padding: 28px; box-shadow: 0 8px 32px rgba(0,0,0,.1); }

.rc-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.rc-field label { display: block; font-size: .7rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 5px; }
.rc-field input[type="text"],
.rc-field input[type="date"] {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: .88rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color .15s;
  color: #111;
}
.rc-field input:focus { border-color: #f5600a; }

.rc-block { margin-bottom: 28px; }
.rc-block-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0d1b2a;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f4f8;
}

/* Rating rows */
.rc-rating-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid #f0f4f8; }
.rc-rating-row:last-child { border-bottom: none; }
.rc-rating-label { flex: 1; min-width: 0; }
.rc-rating-name { font-size: .86rem; font-weight: 600; color: #1f2937; display: block; }
.rc-rating-hint { font-size: .72rem; color: #9ca3af; margin-top: 1px; display: block; }
.rc-rating-input { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.rc-rating-input input[type="range"] {
  -webkit-appearance: none;
  width: 120px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #f5600a var(--pct,50%), #e5e7eb var(--pct,50%));
  outline: none;
  cursor: pointer;
}
.rc-rating-input input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #f5600a;
  box-shadow: 0 2px 6px rgba(245,96,10,.4);
  cursor: pointer;
}
.rc-rating-val {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #f5600a;
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Goals */
.rc-goal-row { margin-bottom: 16px; }
.rc-goal-label { font-size: .82rem; font-weight: 600; color: #374151; margin-bottom: 6px; }
.rc-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: .85rem;
  font-family: 'Inter', sans-serif;
  color: #111;
  resize: vertical;
  outline: none;
  transition: border-color .15s;
  line-height: 1.55;
}
.rc-textarea:focus { border-color: #f5600a; }

/* Habit tracker */
.rc-habit-table { border: 2px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
.rc-habit-header, .rc-habit-row {
  display: grid;
  grid-template-columns: 1fr repeat(7, 34px);
  align-items: center;
}
.rc-habit-header {
  background: linear-gradient(135deg, #0d1b2a, #1a3a5c);
  padding: 8px 12px;
}
.rc-habit-header .rc-habit-name-col { font-size: .7rem; font-weight: 700; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .06em; }
.rc-habit-header .rc-day-col { text-align: center; font-size: .7rem; font-weight: 700; color: #f5600a; }
.rc-habit-row { padding: 8px 12px; border-top: 1px solid #f0f4f8; }
.rc-habit-row:hover { background: #fafbff; }
.rc-habit-name-col { font-size: .8rem; color: #374151; line-height: 1.3; padding-right: 8px; }
.rc-day-col { text-align: center; }
.rc-day-col input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: #22c55e;
  cursor: pointer;
}

/* Actions */
.rc-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.rc-save-btn, .rc-print-btn {
  flex: 1;
  padding: 13px 20px;
  border: none;
  border-radius: 12px;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .15s;
}
.rc-save-btn { background: linear-gradient(135deg, #f5600a, #ff8c42); color: #fff; box-shadow: 0 3px 12px rgba(245,96,10,.3); }
.rc-save-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(245,96,10,.4); }
.rc-print-btn { background: #f3f4f6; color: #374151; border: 2px solid #e5e7eb; }
.rc-print-btn:hover { background: #e5e7eb; }
.rc-saved-msg { display: none; text-align: center; color: #22c55e; font-size: .82rem; margin-top: 10px; font-weight: 700; }

/* Progress history */
.rc-history { display: flex; flex-direction: column; gap: 7px; }
.rc-hist-row { display: grid; grid-template-columns: 64px 1fr 52px; align-items: center; gap: 10px; }
.rc-hist-date { font-size: .72rem; color: #6b7280; font-variant-numeric: tabular-nums; }
.rc-hist-bar { height: 8px; background: #eef1f5; border-radius: 4px; overflow: hidden; }
.rc-hist-bar > span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #f5600a, #ff8c42); }
.rc-hist-score { font-size: .74rem; font-weight: 700; color: #15803d; text-align: right; font-variant-numeric: tabular-nums; }

/* Cross-device sync */
.rc-sync { margin-top: 18px; border-top: 1px solid #f0f4f8; padding-top: 14px; }
.rc-sync-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rc-sync-title { font-size: .78rem; font-weight: 600; color: #6b7280; }
.rc-sync-toggle {
  background: none; border: none; padding: 4px 2px; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: .74rem; font-weight: 700;
  color: #f5600a; text-decoration: underline; text-underline-offset: 3px;
}
.rc-sync-body { margin-top: 12px; }
.rc-sync-note { font-size: .74rem; color: #6b7280; line-height: 1.55; margin-bottom: 10px; }
.rc-sync-code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 1.15rem; font-weight: 700; letter-spacing: .14em;
  color: #0d1b2a; background: #f0f4f8; border: 2px dashed #cbd5e1;
  border-radius: 10px; padding: 12px 14px; text-align: center;
  user-select: all; margin-bottom: 12px;
}
.rc-sync-restore { display: flex; gap: 8px; }
.rc-sync-restore input {
  flex: 1; min-width: 0; padding: 10px 14px;
  border: 2px solid #e5e7eb; border-radius: 10px;
  font-family: 'Menlo', 'Consolas', monospace; font-size: .88rem;
  letter-spacing: .08em; text-transform: uppercase; color: #111; outline: none;
  transition: border-color .15s;
}
.rc-sync-restore input:focus { border-color: #f5600a; }
.rc-sync-btn {
  padding: 10px 20px; border: none; border-radius: 10px; cursor: pointer;
  background: #0d1b2a; color: #fff;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: .85rem; letter-spacing: .04em;
  transition: background .15s;
}
.rc-sync-btn:hover { background: #1a3a5c; }
.rc-sync-msg { font-size: .74rem; margin-top: 9px; min-height: 1em; color: #6b7280; }
.rc-sync-msg.is-ok { color: #15803d; font-weight: 600; }
.rc-sync-msg.is-err { color: #b91c1c; font-weight: 600; }

.rc-sync-toggle:focus-visible,
.rc-sync-btn:focus-visible,
.rc-save-btn:focus-visible,
.rc-print-btn:focus-visible { outline: 3px solid #f5600a; outline-offset: 2px; }

/* Score summary */
.rc-score-bar {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #22c55e;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.rc-score-label { font-size: .82rem; color: #166534; font-weight: 600; }
.rc-score-num { font-family: 'Oswald', sans-serif; font-size: 2rem; font-weight: 700; color: #15803d; }

/* Section divider above report card */
.rc-divider {
  max-width: 780px;
  margin: 0 auto 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.rc-divider-line { flex: 1; height: 2px; background: linear-gradient(90deg, transparent, #f5600a, transparent); }
.rc-divider-text { font-size: .72rem; font-weight: 700; color: #f5600a; letter-spacing: .15em; text-transform: uppercase; white-space: nowrap; }

/* Print styles */
@media print {
  .buy-bar, .sticky-bar, .back-link { display: none !important; }
  .report-card-section { margin-bottom: 0; page-break-before: always; }
  .rc-save-btn, .rc-print-btn, .rc-sync { display: none; }
  .rc-rating-input input[type="range"] { display: none; }
  .rc-rating-val { border: 2px solid #f5600a; background: #fff; color: #f5600a; }
}

@media (max-width: 580px) {
  .rc-field-row { grid-template-columns: 1fr; }
  .rc-rating-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .rc-rating-input { width: 100%; }
  .rc-rating-input input[type="range"] { width: calc(100% - 44px); }
  .rc-habit-header, .rc-habit-row { grid-template-columns: 1fr repeat(7, 28px); }
  .rc-header { flex-direction: column; text-align: center; }
}

/* ── Mobile input zoom guard ──────────────────────────────────
   iOS Safari zooms the page whenever a focused field is under 16px
   and never zooms back out. The report card is the most form-heavy
   part of a guide, so it was the worst offender. 16px is the
   threshold, not a style choice. */
@media (max-width: 768px) {
  .rc-field input[type="text"],
  .rc-field input[type="date"],
  .rc-textarea,
  .rc-sync-restore input {
    font-size: 16px;
  }
}
