/* Daily Delta Plan — planner UI styles (design tokens copied from site index.html). */

:root {
  --bg: #0d0f0e;
  --surface: #151918;
  --border: rgba(255, 255, 255, 0.07);
  --text: #e8ece9;
  --muted: #7a8a7e;
  --green: #4ade80;
  --green-dim: rgba(74, 222, 128, 0.12);
  --green-glow: rgba(74, 222, 128, 0.25);
  /* planner-specific status colors */
  --amber: #fbbf24;
  --red: #f87171;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Form controls inherit the page fonts. */
button, input, select, textarea {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Visible keyboard focus everywhere. */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ---------- Top nav (matches main site: blur + border-bottom, sticky) ---------- */

.plan-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  background: rgba(13, 15, 14, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.plan-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.plan-nav a:hover {
  color: var(--text);
}

.plan-nav .nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
}

.plan-nav .nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.plan-nav .nav-logo span {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

/* ---------- Shell: mobile-first, 720px max, centered ---------- */

.plan-shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

@media (min-width: 480px) {
  .plan-shell {
    padding: 1.75rem 1.5rem 5rem;
  }
}

/* ---------- Step card ---------- */

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 480px) {
  .step-card {
    padding: 1.75rem;
  }
}

.step-card-title {
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
}

/* ---------- Radio cards (input + label, :checked styling) ---------- */

.radio-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

@media (min-width: 480px) {
  .radio-cards {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

.radio-cards input[type="radio"],
.radio-cards input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.radio-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  min-height: 44px; /* touch target */
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.radio-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.radio-cards input:checked + .radio-card {
  border-color: var(--green);
  background: var(--green-dim);
  box-shadow: 0 0 0 1px var(--green), 0 0 16px var(--green-glow);
}

/* Hint text inside a checked card: --muted (#7a8a7e) falls below WCAG AA on the
   green-tinted checked background. #93a397 measures 5.24:1 against the composited
   checked background rgb(27, 49, 36) (--green-dim over --surface), clearing the
   4.5:1 bar while staying in the site's muted-green family. */
.radio-cards input:checked + .radio-card .radio-card-hint {
  color: #93a397;
}

.radio-cards input:focus-visible + .radio-card {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.radio-card-label {
  font-weight: 500;
  color: var(--text);
}

.radio-card-hint {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- Field (label, input, hint, error) ---------- */

.field {
  margin-bottom: 1rem;
}

.field-label {
  display: block;
  font-weight: 500;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.field-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.field input[type="number"],
.field input[type="text"],
.field input[type="date"],
.field select {
  width: 100%;
  min-height: 44px; /* touch target */
  padding: 0.55rem 0.85rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.field input:hover,
.field select:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}

.field-suffix {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.88rem;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.field-error {
  font-size: 0.8rem;
  color: var(--red);
  margin-top: 0.3rem;
  min-height: 0;
}

.field.has-error input,
.field.has-error select {
  border-color: var(--red);
}

/* ---------- Progress (thin green bar) ---------- */

.progress {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* ---------- Summary grid (stat cards like the site's .score-card) ---------- */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

.summary-grid .stat-card,
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.4rem;
  min-width: 100px;
  text-align: center;
}

.stat-card .label {
  font-size: 0.75rem;
  color: var(--muted);
}

.stat-card .value {
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green);
}

.stat-card .sub {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ---------- Buttons (site pill buttons) ---------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px; /* touch target */
  background: var(--green);
  color: #0d0f0e;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.8rem;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px; /* touch target */
  background: transparent;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- Expandable (details/summary — "How this was calculated") ---------- */

.expandable {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 0.75rem 0;
}

.expandable > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px; /* touch target */
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s;
}

.expandable > summary::-webkit-details-marker {
  display: none;
}

.expandable > summary::before {
  content: '▸';
  color: var(--green);
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.expandable[open] > summary::before {
  transform: rotate(90deg);
}

.expandable > summary:hover {
  color: var(--text);
}

.expandable-body {
  padding: 0.25rem 1rem 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  animation: modalIn 0.18s ease both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.modal-title {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.modal-body {
  font-size: 0.92rem;
  color: var(--text);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 300;
  max-width: min(92vw, 480px);
  background: var(--surface);
  border: 1px solid var(--green);
  border-radius: 12px;
  padding: 0.7rem 1.1rem;
  font-size: 0.9rem;
  color: var(--text);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 12px var(--green-glow);
  animation: toastIn 0.2s ease both;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Status text colors ---------- */

.warn {
  color: var(--amber);
}

.error {
  color: var(--red);
}

/* ---------- Table (plain meal table, horizontal scroll wrapper) ---------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table th {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table td.num,
.table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Screen-reader-only (srAnnounce live region etc.) ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* =============================================================================
   Coverage additions — classes used by plan/index.html and the plan/js views
   that previously had no rules. Purely additive; the blocks above are untouched.
   ============================================================================= */

/* Safety net: keeps UA-rendered widgets (date picker, file input, scrollbars)
   dark even where no explicit style reaches them. */
:root {
  color-scheme: dark;
}

/* ---------- Base type rhythm inside the app shell ---------- */
/* :where() keeps specificity at bare-class level so the utility classes below
   and view-specific rules can override without escalation. */

.plan-shell :where(h1) {
  font-size: 1.65rem;
  margin-bottom: 0.4rem;
}

.plan-shell :where(h2) {
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
}

.plan-shell :where(p) {
  margin-bottom: 0.65rem;
}

/* ---------- Text utilities (lede, hints, stat text) ---------- */

.lede {
  font-size: 1rem;
  color: var(--muted);
  max-width: 58ch;
  margin-bottom: 1rem;
}

.hint {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.stat-note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
}

.stage-intro {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.sub-h {
  font-size: 0.98rem;
  margin: 1.5rem 0 0.4rem;
}

.step-count {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.prov p {
  margin-bottom: 0.45rem;
}

.prov strong {
  color: var(--text);
}

/* ---------- Nav additions (app links, active route, logo accent) ---------- */

/* These links ARE the app navigation, so on phones they wrap
   instead of hiding like the marketing site's nav does. */
.plan-nav {
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.1rem 0.35rem;
  list-style: none;
}

.plan-nav .nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* touch target */
  padding: 0 0.45rem;
  border-radius: 8px;
}

.plan-nav .nav-links a.active {
  color: var(--green);
}

.plan-nav .nav-logo em {
  font-style: normal;
  color: var(--green);
}

/* ---------- Footer ---------- */

.plan-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 2rem 1.2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.plan-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.plan-footer a:hover {
  color: var(--text);
}

.disclaimer {
  max-width: 560px;
  margin: 0.5rem auto 0;
  font-size: 0.78rem;
}

/* ---------- Welcome view (mirrors the homepage hero) ---------- */

.welcome {
  padding: 2rem 0 0.5rem;
  text-align: center;
}

.welcome h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.welcome h1 em {
  font-style: normal;
  color: var(--green);
}

.welcome .lede {
  margin: 0 auto 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--green-dim);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 1.5rem;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.welcome-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.welcome-points {
  margin-top: 2.25rem;
}

.welcome-points .stat-card {
  text-align: left;
}

/* ---------- Onboarding wizard shell ---------- */

.wizard-grid {
  display: grid;
  grid-template-columns: 1fr; /* preview card stacks under the step card (720px shell) */
  align-items: start;
}

.step-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0.9rem 0 1.1rem;
}

.step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;  /* 44px touch target */
  height: 2.75rem;
  padding: 0;
  background: var(--surface);
  color: var(--muted);
  font-family: 'Sora', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.step-dot:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.step-dot.done {
  color: var(--green);
  border-color: rgba(74, 222, 128, 0.4);
}

.step-dot.active {
  color: var(--green);
  background: var(--green-dim);
  border-color: var(--green);
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.preview-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.preview-row {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--border);
}

.preview-row strong {
  font-family: 'Sora', sans-serif;
  font-size: 1.05rem;
  color: var(--green);
}

/* ---------- Field layout helpers ---------- */

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field-group {
  border: 1px solid var(--border); /* fieldset: replaces the UA groove border */
  border-radius: 12px;
  padding: 0.75rem 1rem 0.1rem;
  margin-bottom: 1rem;
  min-inline-size: 0;
}

.field-group legend {
  font-family: 'Sora', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0 0.4rem;
}

.field-group-block {
  margin-bottom: 1.1rem;
}

.field-group-block .sub-h {
  margin-top: 0;
}

/* Plain labels inside .field (e.g. the check-in date field) match .field-label. */
.field > label {
  display: block;
  font-weight: 500;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

/* ---------- Food picker & tool cards ---------- */

.food-picker {
  margin-bottom: 1rem;
}

.food-picker .expandable {
  margin: 0.5rem 0;
}

.tool-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.9rem;
}

.tool-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

/* ---------- Callouts (info / warning / error) ---------- */

.callout {
  background: var(--green-dim);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  margin: 0.9rem 0;
}

.warn-callout {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.3);
}

.warn-callout strong {
  color: var(--amber);
}

.error-callout {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.35);
}

.error-callout strong {
  color: var(--red);
}

/* ---------- Button variants ---------- */

.btn-small {
  min-height: 36px;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
}

@media (pointer: coarse) {
  .btn-small {
    min-height: 44px; /* touch target on touch devices */
  }
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px; /* touch target */
  background: transparent;
  color: var(--red);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.8rem;
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.btn-danger:hover {
  border-color: var(--red);
  background: rgba(248, 113, 113, 0.08);
}

/* File-picker label styled as a button; show focus when the hidden input has it. */
.file-label {
  cursor: pointer;
}

.file-label:has(+ .visually-hidden:focus-visible) {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ---------- Plan view ---------- */

.plan-header {
  margin-bottom: 1rem;
}

.plan-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.plan-toolbar .field {
  flex: 1 1 260px;
  margin-bottom: 0;
}

.day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}

.day-tab {
  min-height: 44px; /* touch target */
  padding: 0.5rem 1.05rem;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.day-tab:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.day-tab.active {
  color: var(--green);
  background: var(--green-dim);
  border-color: var(--green);
}

.meal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.meal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.6rem;
}

.meal-head h3 {
  font-size: 1.02rem;
}

.subs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  white-space: normal; /* swap lists render inside nowrap table cells */
}

.day-totals {
  margin: 1rem 0;
}

/* ---------- Check-ins view ---------- */

.trend-chart {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem;
  margin-bottom: 1rem;
}

.trend-chart svg {
  display: block;
}

/* ---------- Data view ---------- */

.cal-list {
  list-style: none;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.cal-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
}

.danger-card {
  border-color: rgba(248, 113, 113, 0.35);
}

/* Same technique as .sr-only above (kept as its own block: additive-only change). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Modal form controls (modals mount on <body>, outside the shell) ---------- */

.modal-body p {
  margin-bottom: 0.6rem;
}

.modal input[type="text"],
.modal input[type="number"],
.modal input[type="date"],
.modal select {
  width: 100%;
  min-height: 44px; /* touch target */
  padding: 0.55rem 0.85rem;
  margin-top: 0.4rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
