/* Man's Precision List — styles */

:root {
  --bg: #eceff4;
  --panel: #ffffff;
  --panel-2: #f5f7fa;
  --text: #1b2130;
  --muted: #677085;
  --border: #dde2ea;
  --accent: #0a7bd1;
  --accent-hover: #0864ab;
  --accent-soft: #e2f0fb;
  --on-accent: #ffffff;
  --success: #1a8a4f;
  --danger: #cf3339;
  --warning: #b8740b;
  --gold: #c9930a;
  --silver: #7f8b99;
  --bronze: #b0652f;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
  --shadow-hover: 0 6px 18px rgba(16, 24, 40, 0.13);
  --radius: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f1218;
    --panel: #181c25;
    --panel-2: #1f2430;
    --text: #e5e8ef;
    --muted: #9aa3b5;
    --border: #2b3240;
    --accent: #3d9ef5;
    --accent-hover: #67b4f8;
    --accent-soft: #16273a;
    --on-accent: #08111c;
    --success: #3cb878;
    --danger: #f06a6f;
    --warning: #e3a43d;
    --gold: #e9b52f;
    --silver: #aab4c2;
    --bronze: #d38a55;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    --shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #0f1218;
  --panel: #181c25;
  --panel-2: #1f2430;
  --text: #e5e8ef;
  --muted: #9aa3b5;
  --border: #2b3240;
  --accent: #3d9ef5;
  --accent-hover: #67b4f8;
  --accent-soft: #16273a;
  --on-accent: #08111c;
  --success: #3cb878;
  --danger: #f06a6f;
  --warning: #e3a43d;
  --gold: #e9b52f;
  --silver: #aab4c2;
  --bronze: #d38a55;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

/* --- Base ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.3rem;
}

h3 {
  font-size: 1.05rem;
  margin-top: 1.25em;
}

p {
  margin: 0 0 0.75em;
}

img {
  max-width: 100%;
}

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

.small {
  font-size: 0.85rem;
}

.pre {
  white-space: pre-line;
}

.nowrap {
  white-space: nowrap;
}

.view {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  outline: none;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.panel > :last-child {
  margin-bottom: 0;
}

/* --- En-tête ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.brand-logo {
  width: 34px;
  height: 34px;
  flex: none;
}

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 20px 12px 17px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.main-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.main-nav a[data-nav='rated'],
.main-nav a[data-nav='unrated'] {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 6px;
}

.theme-toggle,
.nav-toggle {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: var(--radius);
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  margin-left: 6px;
  padding: 0;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  margin: 2px 0;
}

.banner {
  background: var(--accent);
  color: var(--on-accent);
}

.banner-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 16px;
  font-weight: 600;
}

.banner a {
  color: inherit;
  text-decoration: underline;
  margin-left: 6px;
}

/* --- Mise en page -------------------------------------------------------------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.side-col {
  position: sticky;
  top: 84px;
}

.side-box h3 {
  margin-top: 0;
  font-size: 1rem;
}

.side-box p {
  font-size: 0.93rem;
  color: var(--muted);
}

.narrow {
  max-width: 480px;
  margin: 24px auto;
}

.narrow-panel {
  max-width: 720px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 18px 16px;
}

.site-footer p {
  margin: 0;
}

/* --- Liste des niveaux --------------------------------------------------------- */

.list-head h1 {
  margin-top: 4px;
}

.list-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.list-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.list-tab:hover {
  text-decoration: none;
  color: var(--text);
  border-color: var(--accent);
}

.list-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.list-tab .count {
  font-size: 0.75rem;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.18);
}

.search {
  width: 100%;
  margin-top: 4px;
}

.level-card {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 12px;
  color: inherit;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

.level-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), #6a3fd0);
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-letter {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 3rem;
  font-weight: 800;
  opacity: 0.85;
}

.thumb-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.15s;
}

.thumb-play::after {
  content: '';
  margin-left: 5px;
  border-left: 20px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

.level-card:hover .thumb-play {
  opacity: 1;
}

.level-card h2 {
  font-size: 1.45rem;
  margin-bottom: 6px;
}

.pos {
  color: var(--accent);
}

.pos-1 {
  color: var(--gold);
}

.pos-2 {
  color: var(--silver);
}

.pos-3 {
  color: var(--bronze);
}

.level-by {
  margin-bottom: 4px;
}

.level-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Badge de précision (σ/s) à droite de chaque niveau */
.sigma-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  text-align: center;
}

.sigma-badge b {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.sigma-badge span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.sigma-unset {
  background: var(--panel-2);
  color: var(--muted);
}

.sigma-unset b {
  font-size: 1rem;
}

.empty-panel {
  text-align: center;
  color: var(--muted);
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 18px 8px;
  margin: 0;
}

/* --- Page d'un niveau ---------------------------------------------------------- */

.level-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.level-title {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.level-title h1 {
  margin: 6px 0 4px;
  overflow-wrap: anywhere;
}

.list-badge {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-arrow {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
}

.nav-arrow:hover {
  text-decoration: none;
  border-color: var(--accent);
  color: var(--accent);
}

.nav-arrow.disabled {
  opacity: 0.3;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  display: grid;
  place-items: center;
  background: var(--panel-2);
  border: 1px dashed var(--border);
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-width: 0;
}

.stat span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.stat b {
  display: block;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.stat-sigma {
  background: var(--accent-soft);
  border-color: transparent;
}

.stat-sigma b {
  font-size: 1.5rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stat-sigma small {
  font-size: 0.85rem;
  color: var(--muted);
}

.copy-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.level-desc {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 12px;
}

.level-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.section-head h2 {
  margin: 0;
}

.chg {
  font-weight: 700;
  white-space: nowrap;
}

.chg-up {
  color: var(--success);
}

.chg-down {
  color: var(--danger);
}

.chg-new {
  color: var(--accent);
}

/* --- Tableaux, étiquettes ------------------------------------------------------ */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

/* « σ/s » ne doit pas devenir « Σ/S » (symbole différent) */
.table th.keep-case {
  text-transform: none;
  font-size: 0.85rem;
}

.table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table .num {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.table .actions {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.table .actions .btn {
  margin-left: 4px;
}

.table .sub {
  color: var(--muted);
  font-size: 0.83rem;
}

.unset {
  color: var(--warning);
  font-weight: 700;
}

.notice {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(184, 116, 11, 0.12);
  color: var(--warning);
  font-weight: 600;
}

.role {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.role-admin {
  background: rgba(207, 51, 57, 0.12);
  color: var(--danger);
}

.role-moderator {
  background: var(--accent-soft);
  color: var(--accent);
}

/* --- Boutons et formulaires ---------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
  border-color: var(--accent);
  color: var(--accent);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.btn-danger {
  color: var(--danger);
  border-color: currentColor;
  background: transparent;
}

.btn-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.modal .btn-danger[type='submit'] {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-discord {
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
}

.btn-discord:hover {
  background: #4752c4;
  border-color: #4752c4;
  color: #fff;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.84rem;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
  vertical-align: middle;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field-label {
  font-weight: 700;
  font-size: 0.9rem;
}

.field-label em {
  color: var(--danger);
  font-style: normal;
}

.field-help {
  color: var(--muted);
  font-size: 0.82rem;
}

.field-check label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

input[type='checkbox'] {
  width: auto;
  accent-color: var(--accent);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--accent-soft);
  border-color: var(--accent);
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(207, 51, 57, 0.1);
  color: var(--danger);
  font-weight: 600;
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-2);
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.88rem;
}

.seg-btn + .seg-btn {
  border-left: 1px solid var(--border);
}

.seg-btn:hover {
  text-decoration: none;
  color: var(--text);
}

.seg-btn.active {
  background: var(--accent);
  color: var(--on-accent);
}

/* --- Chargement, erreurs, notifications --------------------------------------- */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  color: var(--muted);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-panel {
  text-align: center;
}

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  display: grid;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
}

.toast {
  padding: 11px 16px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--panel);
  box-shadow: var(--shadow-hover);
  font-weight: 600;
  font-size: 0.92rem;
  transition: opacity 0.4s, transform 0.4s;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-hide {
  opacity: 0;
  transform: translateY(8px);
}

/* --- Dashboard ----------------------------------------------------------------- */

.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-head h1 {
  margin-bottom: 2px;
}

.admin-head p {
  margin: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin: 4px 0 16px;
}

.tab {
  padding: 9px 14px;
  margin-bottom: -2px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.tab:hover {
  text-decoration: none;
  color: var(--text);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.toolbar h2 {
  margin: 0;
}

.toolbar > .btn-primary {
  margin-left: auto;
}

.toolbar-info {
  color: var(--muted);
  font-weight: 700;
}

/* --- Fenêtres modales ---------------------------------------------------------- */

dialog.modal {
  width: min(540px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

dialog.modal-wide {
  width: min(780px, calc(100vw - 24px));
}

dialog.modal::backdrop {
  background: rgba(8, 12, 20, 0.55);
}

.modal-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 26px);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.modal-close {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px 20px;
  overflow-y: auto;
}

.modal-body > * {
  grid-column: 1 / -1;
}

.modal-body > .field-half {
  grid-column: auto;
}

.modal-message {
  margin: 0;
  color: var(--muted);
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}

/* --- Petits écrans ------------------------------------------------------------- */

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-col {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-grid;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 16px 14px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-hover);
  }

  .site-header.nav-open .main-nav {
    display: flex;
  }

  .main-nav a {
    padding: 11px 4px;
    border-bottom: 1px solid var(--border);
  }

  .main-nav a.active {
    border-bottom-color: var(--border);
    box-shadow: inset 3px 0 0 var(--accent);
    padding-left: 12px;
  }

  #nav-auth a {
    display: flex;
  }

  .nav-sep {
    display: none;
  }

  .theme-toggle {
    margin: 10px 0 0;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 1.4rem;
  }

  .panel {
    padding: 14px;
  }

  .brand {
    font-size: 1rem;
    white-space: normal;
    line-height: 1.2;
  }

  .level-card {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px 12px;
    padding: 10px;
  }

  .level-card h2 {
    font-size: 1.05rem;
  }

  .level-by,
  .level-meta {
    font-size: 0.82rem;
  }

  .sigma-badge {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    padding: 6px 10px;
  }

  .sigma-badge b {
    font-size: 1.1rem;
  }

  .nav-arrow {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
  }

  .modal-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .table .actions {
    white-space: normal;
  }

  .table .actions .btn {
    margin: 2px 0 2px 4px;
  }
}
