:root {
  /* neutrals */
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f3f4f7;
  --text: #121318;
  --muted: #5b5f6a;
  --border: rgba(17, 24, 39, 0.12);

  /* exact factor palette (from your summary page) */
  --c-energy: #C65D0E;
  --c-stress: #1F6F78;
  --c-autonomy: #6B4C9A;
  --c-competence: #2E7D32;
  --c-relatedness: #B11E3B;

  /* neutral action color (NOT a factor color) */
  --c-action: #1F2A44;            /* dark navy */
  --c-action-hover: #162034;      /* darker navy for hover */
  --c-action-soft: rgba(31, 42, 68, 0.12);
  --c-action-border: rgba(31, 42, 68, 0.45);
  --c-action-focus: 0 0 0 3px rgba(31, 42, 68, 0.22);

  /* defaults: theme drives these */
  --accent: var(--c-autonomy);
  --accent-2: var(--c-autonomy);

  /* derived */
  --accent-soft: rgba(107, 76, 154, 0.14);
  --accent-border: rgba(107, 76, 154, 0.48);
  --focus: 0 0 0 3px rgba(107, 76, 154, 0.22);

  /* feedback */
  --danger-bg: #ffe6e6;
  --danger-text: #7a1f25;

  /* layout */
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.10);
}

/* Theme switching: set <html data-theme="energy|stress|autonomy|competence|relatedness"> */
:root[data-theme="energy"] {
  --accent: var(--c-energy);
  --accent-2: var(--c-energy);
  --accent-soft: rgba(198, 93, 14, 0.14);
  --accent-border: rgba(198, 93, 14, 0.48);
  --focus: 0 0 0 3px rgba(198, 93, 14, 0.22);
}

:root[data-theme="stress"] {
  --accent: var(--c-stress);
  --accent-2: var(--c-stress);
  --accent-soft: rgba(31, 111, 120, 0.14);
  --accent-border: rgba(31, 111, 120, 0.48);
  --focus: 0 0 0 3px rgba(31, 111, 120, 0.22);
}

:root[data-theme="autonomy"] {
  --accent: var(--c-autonomy);
  --accent-2: var(--c-autonomy);
  --accent-soft: rgba(107, 76, 154, 0.14);
  --accent-border: rgba(107, 76, 154, 0.48);
  --focus: 0 0 0 3px rgba(107, 76, 154, 0.22);
}

:root[data-theme="competence"] {
  --accent: var(--c-competence);
  --accent-2: var(--c-competence);
  --accent-soft: rgba(46, 125, 50, 0.14);
  --accent-border: rgba(46, 125, 50, 0.48);
  --focus: 0 0 0 3px rgba(46, 125, 50, 0.22);
}

:root[data-theme="relatedness"] {
  --accent: var(--c-relatedness);
  --accent-2: var(--c-relatedness);
  --accent-soft: rgba(177, 30, 59, 0.14);
  --accent-border: rgba(177, 30, 59, 0.48);
  --focus: 0 0 0 3px rgba(177, 30, 59, 0.22);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-content {
  width: 100%;
  padding: 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--c-action);
  text-decoration: none;
  margin-right: auto;
  letter-spacing: 0.2px;
}

.navbar-menu {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-left: auto;
}

.navbar-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}

.navbar-link:hover {
  background: rgba(17, 24, 39, 0.05);
  color: var(--text);
}

.navbar-link.active {
  background: var(--accent-soft);
  color: var(--text);
}

/* Layout */
.body-content {
  min-height: 0;
  display: flex;
  justify-content: center;
  padding: 28px 20px 60px 20px;
}

.container {
  max-width: 760px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 44px;
  position: relative;
}

/* Progress */
.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--c-action);
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.step-indicator {
  text-align: center;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.85em;
  margin-top: 30px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding-bottom: 10px;
}

/* Multi-step checkin */
.multi-step-form {
  position: relative;
  min-height: 320px;
}

.question-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.question-card.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

.question-card.prev {
  opacity: 0;
  transform: translateX(-100px);
}

.question-number {
  background: var(--accent);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15em;
  font-weight: 750;
  margin-bottom: 18px;
}

.question-card h2 {
  font-size: 2em;
  color: var(--c-action);
  margin-bottom: 10px;
  font-weight: 750;
}

.question-description {
  color: var(--muted);
  font-size: 1.02em;
  margin-bottom: 34px;
}

/* =========================
   Rating options (FIXED)
   ========================= */

.rating-container {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)); /* equal width columns */
  gap: 14px;
  margin-bottom: 54px;
}

.rating-option {
  position: relative;
  width: 100%;
  min-width: 0; /* prevent overflow from making items “look wider” */
}

.rating-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.rating-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;           /* fill the grid cell */
  box-sizing: border-box;
  min-height: 118px;     /* consistent height */

  padding: 18px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;

  text-align: center;
  line-height: 1.1;

  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.rating-option label:hover {
  background: rgba(17, 24, 39, 0.03);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.rating-option input[type="radio"]:checked + label {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Force uniform digit width (prevents “5” looking wider in some fonts) */
.rating-number {
  font-size: 1.9em;
  font-weight: 750;
  color: var(--accent);
  margin-bottom: 6px;
  transition: color 0.15s ease;

  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  line-height: 1;
}

/* Keep "Very Low/High" from wrapping and changing perceived size */
.rating-label {
  font-size: 0.85em;
  font-weight: 650;
  color: var(--muted);
  text-align: center;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.navigation-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 36px;
  transition: opacity 0.3s;
}

/* Buttons */
.btn {
  padding: 12px 18px;
  font-size: 0.98em;
  font-weight: 650;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  font-family: inherit;
}

.btn:focus {
  outline: none;
  box-shadow: var(--focus);
}

/* primary buttons use neutral navy */
.btn-primary {
  background: var(--c-action);
  color: white;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
  background: var(--c-action-hover);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: rgba(17, 24, 39, 0.03);
}

.btn-back {
  position: absolute;
  top: 0;
  right: 0;
  padding: 10px 14px;
  font-size: 0.9em;
  font-weight: 650;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease;
  background: var(--surface);
  color: var(--text);
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.btn-back:hover {
  background: rgba(17, 24, 39, 0.03);
}

/* Inputs */
textarea,
.form-group input,
.date-input,
.reply-input,
.reflection-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1em;
  line-height: 1.6;
  background: var(--surface);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

textarea:focus,
.form-group input:focus,
.date-input:focus,
.reply-input:focus,
.reflection-textarea:focus {
  outline: none;
  border-color: var(--accent-border);
  box-shadow: var(--focus);
}

/* Reflection step (step 6) */
.reflection-card {
  min-height: auto;
}

.reflection-header {
  margin-bottom: 22px;
}

.reflection-header h2 {
  font-size: 2em;
  color: var(--c-action);
  margin-bottom: 10px;
  font-weight: 750;
}

.scores-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 26px;
  padding: 18px;
  background: var(--surface-2);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.scores-summary .score-item {
  width: 100%;
  min-width: 0;
  padding: 14px 8px;
}

.scores-summary .score-label {
  font-size: 0.75em;
  white-space: nowrap;
  color: var(--muted);
}

.scores-summary .score-value {
  font-size: 1.2em;
  color: var(--text);
  font-weight: 800;
}

.scores-summary .score-item:nth-child(1) .score-value { color: var(--c-energy); }
.scores-summary .score-item:nth-child(2) .score-value { color: var(--c-stress); }
.scores-summary .score-item:nth-child(3) .score-value { color: var(--c-autonomy); }
.scores-summary .score-item:nth-child(4) .score-value { color: var(--c-competence); }
.scores-summary .score-item:nth-child(5) .score-value { color: var(--c-relatedness); }

/* Mobile responsive for scores */
@media (max-width: 600px) {
  .scores-summary {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 15px 10px;
  }

  .scores-summary .score-item {
    padding: 12px 4px;
  }

  .scores-summary .score-label {
    font-size: 0.65em;
  }

  .scores-summary .score-value {
    font-size: 1.1em;
  }
}

@media (max-width: 400px) {
  .scores-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

.button-group {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.button-group button {
  flex: 1;
}

/* Conversation UI */
.messages {
  max-height: 500px;
  overflow-y: auto;
  margin-bottom: 18px;
  padding: 18px;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.message {
  margin-bottom: 18px;
  animation: fadeIn 0.25s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-label {
  font-size: 0.85em;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--muted);
}

.message-content {
  padding: 14px 16px;
  border-radius: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid var(--border);
  background: var(--surface);
}

.user-message .message-content {
  border-left: 4px solid var(--accent);
}

.ai-message .message-content {
  border-left: 4px solid var(--c-autonomy);
  background: rgba(107, 76, 154, 0.06);
}

/* Summary circles (solid and exact palette; no gradients) */
.factor-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  color: #0b0c10;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: var(--shadow-sm);
}

.factor-circle.energy { background: var(--c-energy); }
.factor-circle.stress { background: var(--c-stress); }
.factor-circle.autonomy { background: var(--c-autonomy); }
.factor-circle.competence { background: var(--c-competence); }
.factor-circle.relatedness { background: var(--c-relatedness); }

.factor-number {
  font-size: 1.8em;
  font-weight: 800;
  line-height: 1;
}

.factor-name {
  font-size: 0.7em;
  font-weight: 650;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(11, 12, 16, 0.62);
}

/* Responsive */
@media (max-width: 768px) {
  .container { padding: 28px 22px; }
  .question-card h2 { font-size: 1.6em; }

  .rating-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .rating-option label {
    padding: 15px 8px;
    min-height: 100px;
  }

  .rating-number { font-size: 1.6em; }
  .rating-label { font-size: 0.75em; }

  .navbar-content {
    flex-direction: column;
    gap: 12px;
  }

  .navbar-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .rating-container {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .rating-option label {
    padding: 12px 4px;
    min-height: 90px;
  }

  .rating-label { font-size: 0.65em; }
}

/* ================================
   SUMMARY PAGE ONLY (formatting)
   Requires: <div class="container summary-container"> in summary HTML
   ================================ */

.summary-container {
  max-width: 1100px;
  padding: 34px 40px;
}

/* Header */
.summary-header h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.summary-subtitle {
  color: var(--muted);
  margin-bottom: 18px;
}

/* Time selector */
.time-period-selector {
  margin: 18px 0 18px 0;
}

.quick-selects {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.time-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.time-btn:hover {
  background: rgba(17, 24, 39, 0.03);
  box-shadow: var(--shadow-sm);
}

.time-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.custom-range-picker {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.date-inputs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}

.date-input-group {
  display: grid;
  gap: 6px;
}

.date-input-group label {
  font-size: 0.85em;
  font-weight: 650;
  color: var(--muted);
}

.btn-small {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92em;
}

/* Stats card */
.stats-card {
  margin-top: 16px;
  margin-bottom: 22px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-box {
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: grid;
  gap: 4px;
  align-content: start;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.stat-label {
  font-size: 0.9em;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Charts layout */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.chart-container {
  padding: 18px 18px 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.chart-container h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 800;
}

/* Keep the canvas from stretching oddly */
.chart-container canvas {
  width: 100% !important;
  height: 360px !important;
  display: block;
}

/* Reflection insights layout */
.reflection-insights {
  padding-top: 6px;
}

.no-data {
  color: var(--muted);
}

/* Factor section: restore horizontal row of circles */
.factor-section {
  margin-top: 6px;
  margin-bottom: 18px;
}

.factor-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.factor-subtitle {
  color: var(--muted);
  font-size: 0.95em;
  margin-bottom: 12px;
}

.factor-counts {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

/* Summary card under circles */
.period-summary-card {
  margin-top: 18px;
  padding: 16px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
}

.period-label {
  font-weight: 800;
  margin-bottom: 2px;
}

.period-subtitle {
  color: var(--muted);
  font-size: 0.95em;
  margin-bottom: 10px;
}

.period-summary {
  color: var(--text);
  line-height: 1.7;
}

/* Actions */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* Responsive summary page */
@media (max-width: 900px) {
  .summary-container {
    padding: 26px 22px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .chart-container canvas {
    height: 320px !important;
  }
}

/* =========================================
   LOGIN PAGE (auth-container/auth-card)
   Restores centered card layout without
   changing global page styling.
   ========================================= */

.auth-container {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 44px;
}

.auth-card h1 {
  color: var(--c-action);
}

.auth-subtitle {
  color: var(--muted);
  margin-top: 6px;
  margin-bottom: 22px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.btn-full {
  width: 100%;
}

.auth-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
}

.auth-footer a {
  color: var(--c-action);
  font-weight: 650;
  text-decoration: none;
}

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

.error-message {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid rgba(122, 31, 37, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0 18px 0;
}

@media (max-width: 520px) {
  .auth-card {
    padding: 28px 22px;
  }
}

/* Add to the END of /static/style.css (safe: only affects checkin_singlecard.html) */
.singlecard-section {
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  margin-top: 14px;
}

.singlecard-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.singlecard-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text);
}

.singlecard-subtitle {
  color: var(--muted);
  font-size: 0.95em;
}

.singlecard-ratings {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .singlecard-section {
    padding: 16px 14px;
  }
}

/* ===== Reflection summary scores: clean mobile grid ===== */

.reflection-score-box,
.summary-scores,
.checkin-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  width: 100%;
}

.reflection-score-item,
.summary-score,
.checkin-summary-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.reflection-score-item .name,
.summary-score .name,
.checkin-summary-item .name {
  color: #4b5563;
  font-weight: 600;
  white-space: nowrap;
}

.reflection-score-item .value,
.summary-score .value,
.checkin-summary-item .value {
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
}

/* Make it single column only on very narrow devices */
@media (max-width: 360px) {
  .reflection-score-box,
  .summary-scores,
  .checkin-summary {
    grid-template-columns: 1fr;
  }
}

/* ===== Reflection page: mobile score box ===== */

/* outer grey box */
.score-summary-box,
.scores-box,
.reflection-score-box,
.checkin-scores-box {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px 18px;
}

/* grid layout inside the grey box */
.score-summary-box .scores-grid,
.scores-box .scores-grid,
.reflection-score-box .scores-grid,
.checkin-scores-box .scores-grid,
.score-summary-box,
.scores-box,
.reflection-score-box,
.checkin-scores-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

/* each score row */
.score-item,
.score-row,
.score-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 8px 10px;
  background: rgba(255,255,255,0.55);
  border-radius: 12px;
}

/* label (Energy, Stress, etc.) */
.score-item .label,
.score-row .label,
.score-line .label {
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* numeric value */
.score-item .value,
.score-row .value,
.score-line .value {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

/* make Relatedness span full width (looks nicer) */
.score-item.relatedness,
.score-row.relatedness,
.score-line.relatedness {
  grid-column: 1 / -1;
}

/* mobile tuning */
@media (max-width: 480px) {
  .score-summary-box,
  .scores-box,
  .reflection-score-box,
  .checkin-scores-box {
    padding: 16px;
    border-radius: 16px;
  }

  .score-item,
  .score-row,
  .score-line {
    padding: 10px 12px;
  }
}
/* ================================
   Reflection page: journal feel 
   Only affects templates/reflection.html via #reflectionTextarea
   ================================ */

.reflection-form-section {
  /* Keep consistent with app surfaces */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-top: 18px;
}

/* Override the global textarea styles ONLY for this textarea */
#reflectionTextarea {
  /* keep the same base look as other inputs */
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;

  /* journal cues, subtle */
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 1.02em;
  line-height: 1.75;

  min-height: 240px;
  padding: 14px 14px 14px 54px;

  background-image:
    /* margin rule */
    linear-gradient(to right, rgba(31, 42, 68, 0.08) 0, rgba(31, 42, 68, 0.08) 2px, transparent 2px),
    /* ruled lines */
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(1.75em - 1px),
      rgba(17, 24, 39, 0.06) calc(1.75em - 1px),
      rgba(17, 24, 39, 0.06) 1.75em
    );
  background-position: 40px 0, 0 0;
  background-size: 100% 100%;
}

#reflectionTextarea:focus {
  /* match app focus language */
  outline: none;
  border-color: var(--accent-border);
  box-shadow: var(--focus);
}

#reflectionTextarea::placeholder {
  color: #9ca3af;
  font-style: italic;
}
