/* ══════════════════════════════════════
   SUMMARY
   ══════════════════════════════════════ */

.summary-section {
  margin-bottom: 20px;
}
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
/* ── Collapsible sections ── */
.section-toggle {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.section-toggle .section-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: var(--text-muted);
  display: flex;
  margin-top: 6px;
}
.section-toggle.collapsed .section-chevron {
  transform: rotate(-90deg);
}
/* Remove heading margins inside toggles — the toggle itself handles spacing */
.section-toggle h2,
.section-toggle h3 {
  margin-bottom: 0;
}
.section-toggle + .section-body {
  padding-top: 12px;
  transition: opacity 0.2s ease;
}
.section-toggle.collapsed + .section-body {
  display: none;
}
.summary-card > .section-toggle {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.summary-card > .section-toggle.no-separator {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.summary-card > .section-toggle.collapsed {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Offset scroll target to account for sticky topbar */
.summary-section-title[id],
.summary-subsection-title[id] {
  scroll-margin-top: 130px;
}

.summary-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.section-toggle .summary-section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  flex: 1;
}
.summary-subsection {
  margin-bottom: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.summary-subsection:first-child {
  padding-top: 0;
  border-top: none;
}
.summary-subsection:last-child {
  margin-bottom: 0;
}
.summary-subsection > .section-toggle {
  padding-left: 30px;
}
.summary-subsection-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.summary-text {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text);
  padding-left: 10px;
}
.summary-text p {
  margin-bottom: 12px;
}
.summary-text strong {
  color: var(--accent);
  font-weight: 700;
}
.summary-text ul, .summary-text ol {
  margin: 10px 0 14px 24px;
}
.summary-text li {
  margin-bottom: 6px;
}
.summary-text li::marker {
  color: var(--accent);
}

/* ══════════════════════════════════════
   TABLE OF CONTENTS (shared Cours/Résumé)
   ══════════════════════════════════════ */

.cours-toc {
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cours-toc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  text-align: left;
}
.cours-toc-toggle::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform 0.2s ease;
  vertical-align: middle;
}
.cours-toc-toggle.open::after {
  transform: rotate(90deg);
}
.cours-toc-content {
  border-top: 1px solid var(--border);
}
.cours-toc-list {
  padding: 0;
}
.cours-toc-export {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 14px;
  margin: 0;
  border: none;
  border-top: 1px solid var(--border);
  background: none;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: background var(--transition);
}
.cours-toc-export:active { opacity: 0.7; }

/* ── Group = 1 section + its subs ── */
.cours-toc-group {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.cours-toc-group:last-child {
  border-bottom: none;
}

/* Section row: chevron + label, centered vertically */
.cours-toc-section {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 14px;
  min-height: 32px;
  cursor: pointer;
  touch-action: manipulation;
}
.cours-toc-section:active {
  background: var(--surface2);
}
.cours-toc-chevron {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  transition: transform 0.2s ease;
  color: var(--text-muted);
}
.cours-toc-chevron.open {
  transform: rotate(90deg);
}
.cours-toc-section-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.35;
}

/* Sub items: tight under their section, no extra gap */
.cours-toc-subs {
  overflow: hidden;
  transition: max-height 0.2s ease;
}
.cours-toc-subs.collapsed {
  display: none;
}
.cours-toc-sub {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 14px 6px 52px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
  cursor: pointer;
  touch-action: manipulation;
}
.cours-toc-sub:active {
  background: var(--surface2);
}

/* ── Back to top button ── */
.back-to-top {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 99;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  width: 42px;
  height: 42px;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.back-to-top.visible {
  opacity: 0.85;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.back-to-top:active {
  opacity: 0.6;
}


/* ══════════════════════════════════════
   EXERCISES
   ══════════════════════════════════════ */

.exercise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.exercise-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.exercise-header .section-chevron {
  margin-top: 0;
}
.exercise-header.collapsed {
  margin-bottom: 0;
}
.exercise-header + .section-body {
  padding-top: 6px;
}
.exercise-header-top {
  display: contents;
}
.exercise-header-title {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  order: 1;
}
.exercise-header .exercise-duration {
  margin-left: auto;
  flex-shrink: 0;
  order: 2;
}

/* Mobile : titre sur une ligne séparée, toujours visible en entier */
@media (max-width: 767px) {
  .exercise-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .exercise-header-top {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  .exercise-header-top .exercise-duration {
    margin-left: auto;
  }
  .exercise-header-title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    padding-left: 24px;
    line-height: 1.4;
  }
}
.exercise-type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(56,189,248,.12);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.exercise-duration {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.exercise-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.exercise-subject {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-style: italic;
}

.exercise-reveal-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: all var(--transition);
  margin-bottom: 8px;
  text-align: left;
}
.exercise-reveal-btn:active { opacity: 0.7; }
.exercise-reveal-btn .arrow {
  transition: transform var(--transition);
  flex-shrink: 0;
}
.exercise-reveal-btn.open .arrow {
  transform: rotate(90deg);
}

.exercise-hidden-content {
  display: none;
  padding: 14px 16px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.exercise-hidden-content.visible {
  display: block;
}
.exercise-hidden-content .summary-text {
  font-size: 0.85rem;
}

/* Tips list */
.exercise-tips {
  list-style: none;
  padding: 0;
  margin: 0;
}
.exercise-tips li {
  padding: 6px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.exercise-tips li::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5'/%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5'/%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3C/svg%3E") center/contain no-repeat;
  vertical-align: middle;
}

/* ══════════════════════════════════════
   TIMER
   ══════════════════════════════════════ */

.timer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.timer-display {
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  min-width: 70px;
}
.timer-display.urgent { color: var(--bad); }
.timer-display.ended { color: var(--bad); font-size: 1rem; }
.timer-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 36px;
}
.timer-btn:active { opacity: 0.7; }
.timer-btn.start { color: var(--good); border-color: var(--good); }
.timer-btn.stop { color: var(--bad); border-color: var(--bad); }

/* ══════════════════════════════════════
   SEARCH
   ══════════════════════════════════════ */

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: var(--tap-size);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  cursor: pointer;
  touch-action: manipulation;
}
.search-bar-icon { font-size: 1rem; flex-shrink: 0; }
.search-bar-placeholder { font-size: 0.9rem; color: var(--text-muted); }

.search-bar-full {
  margin-bottom: 20px;
}
.search-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

.search-result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  touch-action: manipulation;
  transition: all var(--transition);
}
.search-result-card.glossary-result {
  border-left-color: var(--accent2);
}
.search-result-card:active { opacity: 0.7; }
.search-result-icon {
  flex-shrink: 0;
  color: var(--accent);
  display: flex;
}
.search-result-card.glossary-result .search-result-icon {
  color: var(--accent2);
}
.search-result-body {
  flex: 1;
  min-width: 0;
}
.search-result-q {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 2px;
}
.search-result-q mark {
  background: rgba(56,189,248,.2);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 1px;
}
.search-result-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Search section badges */
.search-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 10px;
  margin-top: 4px;
}
.search-section-badge.chapter {
  background: rgba(56,189,248,.1);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.search-section-badge.glossary {
  background: rgba(129,140,248,.1);
  color: var(--accent2);
  border: 1px solid rgba(129,140,248,.3);
}

/* ══════════════════════════════════════
   GLOSSARY
   ══════════════════════════════════════ */

/* Search */
.glossary-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: var(--tap-size);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.glossary-search-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  display: inline-flex;
}
.glossary-search-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  min-width: 0;
}
.glossary-search-input::placeholder { color: var(--text-muted); }
.glossary-search:focus-within { border-color: var(--accent); }

/* Clear button */
.glossary-search-clear {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: var(--surface2);
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  touch-action: manipulation;
  transition: all var(--transition);
}
.glossary-search-clear:active { opacity: 0.7; }
.glossary-search-clear.hidden { display: none; }

/* Search highlight */
.glossary-card mark {
  background: rgba(56,189,248,.2);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 1px;
}

/* Relevance ordering within groups */
.glossary-group { display: flex; flex-direction: column; }

/* Letter bar */
.glossary-letter-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.glossary-letter-bar::-webkit-scrollbar { display: none; }
.glossary-letter-btn {
  min-width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  transition: all var(--transition);
}
.glossary-letter-btn:active { opacity: 0.7; }
.glossary-letter-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.glossary-letter-btn.dimmed {
  opacity: 0.3;
  pointer-events: none;
}

/* Count */
.glossary-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 600;
}

/* Letter groups */
.glossary-group {
  margin-bottom: 16px;
}
.glossary-group-header {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  position: sticky;
  top: 60px;
  background: var(--bg);
  z-index: 10;
  align-items: center;
}
.glossary-group-header .section-chevron {
  margin-top: 0;
}

/* Cards */
.glossary-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.glossary-term {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.glossary-def {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
}
.glossary-def strong { color: var(--accent); }

/* ── Glossary inline links (in Cours/Résumé) ── */
.glossary-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--text-muted);
  text-underline-offset: 3px;
  cursor: help;
}

/* ── Glossary tooltip ── */
.glossary-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: 300px;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  padding: 14px 16px;
  animation: tooltip-in 0.15s ease;
  pointer-events: none;
}
.glossary-tooltip-term {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.glossary-tooltip-def {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text);
}
.glossary-tooltip-def strong { color: var(--accent); }
@keyframes tooltip-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════
   CARD LIST (browse all flashcards)
   ══════════════════════════════════════ */

/* Sort buttons */
.fc-filters-wrap {
  position: relative;
  margin-bottom: 12px;
}
.fc-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fc-filters::-webkit-scrollbar { display: none; }
.fc-filters-scroll-hint {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: linear-gradient(to right, transparent, var(--bg) 60%);
  color: var(--text-muted);
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.fc-filters-scroll-hint.hidden {
  opacity: 0;
}
@media (min-width: 1024px) {
  .fc-filters { overflow: visible; }
  .fc-filters-scroll-hint { display: none; }
}
.fc-filter-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: all var(--transition);
  flex-shrink: 0;
  white-space: nowrap;
}
.fc-filter-btn:active { opacity: 0.7; }
.fc-filter-btn.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.cardlist-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}
.cardlist-card {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity var(--transition);
  overflow: hidden;
}
.cardlist-card.banned {
  opacity: 0.45;
}
.cardlist-body {
  flex: 1;
  min-width: 0;
}
.cardlist-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
}
.cardlist-left {
  flex: 1;
  min-width: 0;
}
.cardlist-cat {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56,189,248,.12);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  margin-bottom: 6px;
}
.cardlist-q {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}
.cardlist-a {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border);
}
.cardlist-a.hidden { display: none; }
.cardlist-a strong { color: var(--accent); }
/* Ban bar — vertical strip on the right side of card */
.cardlist-banbar {
  flex-shrink: 0;
  width: 10px;
  border: none;
  background: var(--accent);
  cursor: pointer;
  touch-action: manipulation;
  transition: width var(--transition), background var(--transition);
  padding: 0;
}
.cardlist-banbar:active {
  width: 16px;
}
.cardlist-banbar.banned {
  background: var(--text-muted);
  width: 12px;
}
.cardlist-banbar.session-good {
  background: var(--good);
  cursor: default;
}
.cardlist-banbar.session-bad {
  background: var(--bad);
  cursor: default;
}
.cardlist-score {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--surface2);
  color: var(--text-muted);
}
.cardlist-score.good { background: rgba(34,197,94,.15); color: var(--good); }
.cardlist-score.bad { background: rgba(244,63,94,.15); color: var(--bad); }

/* Category + score on same row */
.cardlist-cat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  justify-content: space-between;
}
.cardlist-cat-row .cardlist-cat {
  margin-bottom: 0;
}
.cardlist-score-inline {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text-muted);
}
.cardlist-score-inline.good { background: rgba(34,197,94,.15); color: var(--good); }
.cardlist-score-inline.bad { background: rgba(244,63,94,.15); color: var(--bad); }

/* ══════════════════════════════════════
   SETTINGS BUTTONS
   ══════════════════════════════════════ */

.settings-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.settings-btn {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  text-align: left;
  min-height: var(--tap-size);
  transition: all var(--transition);
}
.settings-btn:active { opacity: 0.7; }
.settings-btn.danger { color: var(--bad); border-color: rgba(244,63,94,.3); }

/* ══════════════════════════════════════
   DASHBOARD STATS
   ══════════════════════════════════════ */

.dashboard-stats-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.dashboard-stat {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 10px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.dashboard-stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.dashboard-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.dashboard-stat.clickable {
  cursor: pointer;
  touch-action: manipulation;
  transition: all var(--transition);
}
.dashboard-stat.clickable:active {
  transform: scale(0.95);
  opacity: 0.7;
  border-color: var(--accent);
}
