/* ===== PAGE HEADER ===== */
.page-header { margin-bottom: 28px; }
.page-title { font-size: 22px; font-weight: 800; color: var(--text-primary); line-height: 1.2; }
.page-subtitle { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

/* ===== CARDS ===== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card-title { font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 16px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius); border: none;
  font-size: 13px; font-weight: 600; line-height: 1; cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary-sheen); background-color: var(--btn-primary-bg); color: var(--btn-primary-text); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-primary); }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 7px 12px; }
.btn-ghost:hover { background: var(--surface-sub); color: var(--text-primary); }
.btn:disabled { opacity: 0.45; pointer-events: none; }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 6px; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 14px; line-height: 1.5;
  background: var(--surface); color: var(--text-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ===== PHASE 2A: THEME TRANSITION, TOGGLE, MEDAL CHIPS, PAUSED ===== */
/* Colour transitions only while the theme is being switched (never on load or in screenshots) */
[data-theme-anim] *,
[data-theme-anim] *::before,
[data-theme-anim] *::after {
  transition: color var(--theme-dur), background-color var(--theme-dur), border-color var(--theme-dur) !important;
}

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: var(--tap-min); min-height: var(--tap-min); padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text);
  font-family: var(--font-body); font-size: 13px; font-weight: 600; line-height: 1; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--primary-border); }
.theme-toggle:focus-visible, .theme-seg-opt:focus-visible { outline: 2px solid var(--primary-border); outline-offset: 2px; }
.theme-toggle-icon { width: 18px; height: 18px; flex-shrink: 0; }

.theme-seg {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface-sub);
}
.theme-seg-opt {
  min-height: calc(var(--tap-min) - 8px); min-width: var(--tap-min); padding: 0 18px;
  border: none; border-radius: var(--radius-pill); background: transparent; color: var(--muted);
  font-family: var(--font-body); font-size: 13px; font-weight: 600; cursor: pointer;
}
.theme-seg-opt[aria-checked="true"] { background: var(--primary-sheen); color: var(--on-primary); }

.grade-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-weight: 600; font-size: 13px; line-height: 1;
  background: var(--chip-bg); color: var(--chip-text);
}
.grade-chip--sm { min-width: 24px; height: 24px; padding: 0 6px; font-size: 11px; }
.grade-chip--lg { min-width: 44px; height: 44px; padding: 0 12px; font-size: 18px; }
.grade-chip--gold { background: var(--medal-gold); color: #1E2227; }
.grade-chip--silver { background: var(--medal-silver); color: #1E2227; }
.grade-chip--bronze { background: var(--medal-bronze); color: #000000; }
.grade-chip--steel { background: var(--chip-bg); color: var(--chip-text); }

/* Paused actions (Phase 3 consumes) */
.is-paused { opacity: 0.55; cursor: not-allowed; }
.paused-banner {
  display: block; padding: 10px 14px; border: 1px solid var(--apply-border); border-radius: var(--radius);
  background: var(--surface-sub); color: var(--apply-text); font-size: 13px; font-weight: 500;
}
