/* Fiabilisation Base Articles — feuille de style alignée sur Fleet Manager v2.
   Tokens : tokens.css. Shell sidebar pleine hauteur + topbar + main gris clair,
   cartes blanches arrondies, accent vert #264b21, police Inter/Segoe UI. */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--surface-50);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
svg { display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  background: var(--primary); color: #fff; padding: 8px 14px;
  border-radius: var(--radius-lg); transform: translateY(-150%);
  transition: transform var(--dur-fast) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); text-decoration: none; }

/* ── App shell ────────────────────────────────────────────── */
/* Shell à hauteur de viewport fixe : la sidebar et le contenu scrollent en interne,
   le body ne scrolle jamais -> l'app remplit toujours exactement l'écran et s'adapte
   au redimensionnement (comme fleet v2). En mobile, retour au scroll naturel. */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; overflow: hidden; }

.sidebar {
  background: var(--surface-0);
  border-right: 1px solid var(--surface-200);
  display: flex; flex-direction: column;
  height: 100%; min-height: 0; overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  border-bottom: 1px solid var(--surface-200);
}
.brand-mark { width: 38px; height: 38px; color: var(--primary); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--text-primary); line-height: 1.15; }
.brand-sub { font-weight: 500; color: var(--text-secondary); letter-spacing: 0.02em; }
.brand-tag { font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--text-muted); margin-top: 3px; }

.side-controls { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-4); }
.ctrl-section { display: flex; flex-direction: column; gap: var(--sp-3); }

/* ── Drop zone ────────────────────────────────────────────── */
#drop-zone {
  border: 1.5px dashed var(--surface-300); border-radius: var(--radius-xl);
  background: var(--surface-25); padding: var(--sp-5) var(--sp-4);
  text-align: center; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
#drop-zone:hover, #drop-zone:focus-visible, #drop-zone.over { border-color: var(--primary); background: var(--primary-50); }
#drop-zone.ok { border-style: solid; border-color: var(--primary); background: var(--primary-50); }
.drop-icon { color: var(--primary); margin-bottom: var(--sp-2); }
.drop-icon svg { width: 26px; height: 26px; margin: 0 auto; }
.drop-label { font-weight: 600; font-size: var(--text-body); color: var(--text-primary); }
.drop-sub { font-size: var(--text-micro); color: var(--text-muted); margin-top: 2px; }
#file-input, #tpl-input { display: none; }

/* ── Form fields ──────────────────────────────────────────── */
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: var(--text-micro); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); }
input[type="text"], input[type="password"], input[type="number"],
input[type="search"], select, textarea {
  width: 100%; padding: 9px 12px; font-size: var(--text-body);
  color: var(--text-primary); background: var(--surface-0);
  border: 1px solid var(--surface-200); border-radius: var(--radius-lg);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(38, 75, 33, 0.12);
}
textarea { resize: vertical; min-height: 64px; }
.row-inline { display: flex; align-items: center; gap: var(--sp-2); }
.row-inline input { flex: 1; }
.total-hint { font-size: var(--text-micro); color: var(--text-muted); white-space: nowrap; }

/* ── Buttons ──────────────────────────────────────────────── */
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 14px; font-size: var(--text-small); font-weight: 600;
  color: var(--text-secondary); background: var(--surface-0);
  border: 1px solid var(--surface-200); border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
}
button:hover { background: var(--surface-50); }
button:active { transform: translateY(0.5px); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button svg { flex-shrink: 0; }

#btn-launch, #btn-dl, #btn-generate, .btn-save-rules {
  color: #fff; background: var(--primary); border-color: var(--primary);
  width: 100%; padding: 11px 16px; font-size: var(--text-body);
}
#btn-launch:hover:not(:disabled), #btn-dl:hover, #btn-generate:hover:not(:disabled),
.btn-save-rules:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
#btn-launch:disabled { background: var(--surface-200); border-color: var(--surface-200); color: var(--text-faint); }

/* ── Progress / result / error ────────────────────────────── */
.progress-box { background: var(--surface-50); border: 1px solid var(--surface-200);
  border-radius: var(--radius-xl); padding: var(--sp-3); }
.progress-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.progress-phase { font-size: var(--text-small); font-weight: 600; color: var(--text-primary); }
.progress-pct { font-size: var(--text-small); font-weight: 700; color: var(--primary); }
.progress-bar-wrap { height: 7px; background: var(--surface-200); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--primary); border-radius: var(--radius-full);
  transition: width var(--dur-normal) var(--ease-out); }
.progress-text { font-size: var(--text-micro); color: var(--text-muted); margin-top: 8px; }

.result-box { background: #F6FDF2; border: 1px solid #DCF0D0; border-radius: var(--radius-xl);
  padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-3); }
.result-stats { font-size: var(--text-small); color: var(--text-secondary); display: grid; gap: 4px; }
.result-stats strong { color: var(--forest); }

.error-box { display: flex; align-items: center; gap: var(--sp-2); background: #FFF8F8;
  border: 1px solid var(--danger-bg); color: var(--danger-fg); border-radius: var(--radius-lg);
  padding: 10px 12px; font-size: var(--text-small); }
.error-icon { width: 18px; height: 18px; flex-shrink: 0; }
.error-close { margin-left: auto; border: none; background: none; color: var(--danger-fg);
  font-size: 18px; line-height: 1; padding: 0 4px; }
.error-close:hover { background: none; opacity: 0.7; }

.prev-files-section { gap: var(--sp-2); }
.prev-title { font-size: var(--text-micro); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted); }
#prev-list { display: flex; flex-direction: column; gap: 6px; }
.prev-list-item, .resume-file-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  padding: 8px 11px; border: 1px solid var(--surface-200); border-radius: var(--radius-lg);
  background: var(--surface-0); font-size: var(--text-small); color: var(--text-secondary); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.prev-list-item { background: var(--surface-50); }
.prev-list-item:hover, .resume-file-row:hover { background: var(--surface-100); border-color: var(--surface-300); }
.dl-icon { color: var(--text-faint); }
.no-files { font-size: var(--text-small); color: var(--text-faint); font-style: italic; }

/* ── Main column / topbar ─────────────────────────────────── */
.main-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--sp-4); padding: 0 var(--sp-6);
  background: var(--surface-0); border-bottom: 1px solid var(--surface-200);
}
.tabs { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px;
  font-size: var(--text-small); font-weight: 600; color: var(--text-muted);
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-lg);
}
.tab:hover { background: var(--surface-100); color: var(--text-secondary); }
.tab.active { background: var(--primary-50); color: var(--primary); }
.tab-ico { width: 15px; height: 15px; }

.header-meta { display: flex; align-items: center; gap: var(--sp-3); }
.header-api-status { display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px; border-radius: var(--radius-full); background: var(--surface-50); }
.status-dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--text-faint); }
.status-dot.ok, .status-dot--active { background: var(--forest); }
.status-label { font-size: var(--text-micro); font-weight: 600; color: var(--text-muted); }
.header-sep { width: 1px; height: 22px; background: var(--surface-200); }
.header-counter { display: flex; flex-direction: column; line-height: 1.15; }
.counter-label { font-size: 9px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-faint); }
.counter-value { font-size: var(--text-small); font-weight: 700; color: var(--text-primary); }

/* ── Main content & cards ─────────────────────────────────── */
.main { flex: 1; min-height: 0; padding: var(--sp-8); overflow-y: auto; }
.tab-panel { display: none; animation: panelIn var(--dur-normal) var(--ease-out); }
.tab-panel.active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.resume-section, .r-section, .import-block, .anomalies-wrap, .custom-zone, .stat-pill {
  background: var(--surface-0); border: 1px solid var(--surface-200);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-card);
}

/* ── Résumé panel ─────────────────────────────────────────── */
.resume-content { display: flex; flex-direction: column; gap: var(--sp-5); max-width: 940px; }
.resume-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-4); }
.stat-pill { padding: var(--sp-5); display: flex; flex-direction: column; gap: 4px;
  font-size: var(--text-micro); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); }
.stat-pill strong { font-size: var(--text-h1); font-weight: 700; color: var(--text-primary);
  line-height: 1.05; letter-spacing: normal; text-transform: none; }

.resume-section { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.resume-section-title { font-size: var(--text-h2); font-weight: 700; color: var(--text-primary); }
#resume-files { display: flex; flex-direction: column; gap: 6px; }

.check-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.check-item { display: flex; gap: var(--sp-3); align-items: flex-start;
  font-size: var(--text-body); color: var(--text-secondary); }
.check-item strong { color: var(--text-primary); }
.check-ico { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; margin-top: 1px; }

.resume-toggle { width: 100%; justify-content: space-between; background: none; border: none; padding: 0;
  color: var(--text-primary); }
.resume-toggle:hover { background: none; }
.toggle-chevron { width: 18px; height: 18px; transition: transform var(--dur-fast) var(--ease-out); }
.resume-toggle[aria-expanded="true"] .toggle-chevron { transform: rotate(180deg); }
.resume-steps { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-3); }
.step { display: flex; gap: var(--sp-3); align-items: flex-start; }
.step-n { width: 22px; height: 22px; flex-shrink: 0; border-radius: var(--radius-full);
  background: var(--primary-50); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: var(--text-micro); font-weight: 700; }
.step-txt { font-size: var(--text-body); color: var(--text-secondary); }

/* ── Règles panel ─────────────────────────────────────────── */
.rules-jump-nav { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.jump-link { font-size: var(--text-small); font-weight: 600; padding: 6px 12px;
  border-radius: var(--radius-full); background: var(--surface-0);
  border: 1px solid var(--surface-200); color: var(--text-secondary); }
.jump-link:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.rules-content { display: flex; flex-direction: column; gap: var(--sp-5); max-width: 940px; }
.r-section { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.r-section h3 { font-size: var(--text-h2); font-weight: 700; color: var(--text-primary); }
.tag-wrap { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px;
  font-size: var(--text-small); font-weight: 500; background: var(--surface-100);
  color: var(--text-secondary); border-radius: var(--radius-full); }
.tag.red { background: #FBE9E7; color: #8e2c1f; }
.tag.white { background: var(--surface-100); color: var(--text-secondary); }
.tag.rose { background: #FCE7EF; color: #9d2b5b; }
.tag .x { cursor: pointer; font-weight: 700; opacity: 0.55; line-height: 1; }
.tag .x:hover { opacity: 1; }
.add-tag-row { display: flex; gap: var(--sp-2); }
.add-tag-row input { flex: 1; }
.add-tag-row button { padding: 8px 14px; color: #fff; background: var(--primary); border-color: var(--primary); }
.add-tag-row button:hover { background: var(--primary-hover); }
.custom-item { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: 10px 12px; background: var(--surface-50); border: 1px solid var(--surface-200);
  border-radius: var(--radius-lg); margin-bottom: 6px; font-size: var(--text-body); color: var(--text-secondary); }
.btn-del { padding: 5px 10px; font-size: var(--text-micro); color: var(--danger-fg); border-color: var(--danger-bg); }
.btn-del:hover { background: var(--danger-bg); }
.custom-zone { margin-top: var(--sp-5); max-width: 940px; padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-3); }
.custom-zone-actions { display: flex; gap: var(--sp-3); }
.custom-zone-actions button { flex: 1; }
.loading { color: var(--text-muted); font-style: italic; padding: var(--sp-4); }

/* ── Prompt panel ─────────────────────────────────────────── */
.raw-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  background: var(--surface-0); border: 1px solid var(--surface-200);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0; border-bottom: none;
  padding: var(--sp-3) var(--sp-4); max-width: 940px; }
.raw-label { font-size: var(--text-small); font-weight: 600; color: var(--text-muted);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.raw-toolbar-actions { display: flex; gap: var(--sp-2); }
.raw-toolbar-actions button { padding: 6px 12px; font-size: var(--text-micro); }
.md-rendered { max-width: 940px; background: var(--surface-0); border: 1px solid var(--surface-200);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl); box-shadow: var(--shadow-card);
  padding: var(--sp-6); font-size: var(--text-body); color: var(--text-secondary); line-height: 1.65; }
.md-rendered h1, .md-rendered h2, .md-rendered h3 { color: var(--text-primary); margin: 1.2em 0 0.5em; }
.md-rendered h1 { font-size: 20px; } .md-rendered h2 { font-size: var(--text-h2); }
.md-rendered code { background: var(--surface-100); padding: 1px 5px; border-radius: 4px;
  font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.md-rendered pre { background: var(--surface-100); border: 1px solid var(--surface-200);
  border-radius: var(--radius-lg); padding: var(--sp-4); overflow-x: auto; margin: var(--sp-3) 0; }
.md-rendered pre code { background: none; padding: 0; }
.md-rendered table { border-collapse: collapse; width: 100%; margin: var(--sp-3) 0; font-size: var(--text-small); }
.md-rendered th, .md-rendered td { border: 1px solid var(--surface-200); padding: 6px 10px; text-align: left; }
.md-rendered th { background: var(--surface-50); color: var(--text-muted); }
.md-rendered strong { color: var(--text-primary); }
.md-rendered ul, .md-rendered ol { margin: var(--sp-2) 0 var(--sp-2) var(--sp-5); }

/* ── Import panel ─────────────────────────────────────────── */
.import-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--sp-4); margin-bottom: var(--sp-5); }
.import-block { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.import-block-title { font-size: var(--text-micro); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 2px; }
.mini-drop { border: 1.5px dashed var(--surface-300); border-radius: var(--radius-lg);
  background: var(--surface-25); padding: var(--sp-4); text-align: center;
  font-size: var(--text-small); color: var(--text-muted); cursor: pointer; }
.mini-drop:hover, .mini-drop.over { border-color: var(--primary); background: var(--primary-50); }
.mini-drop.ok { border-style: solid; border-color: var(--primary); background: var(--primary-50);
  color: var(--text-primary); font-weight: 600; }
.mini-info { font-size: var(--text-micro); color: var(--text-muted); min-height: 14px; }
.mini-info.err { color: var(--danger-fg); }
.import-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.import-actions button { padding: 7px 10px; font-size: var(--text-micro); flex: 1; }
.import-legend { display: flex; gap: var(--sp-3); font-size: var(--text-micro); }
.leg-r, .leg-o { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); }
.leg-r::before, .leg-o::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.leg-r::before { background: #FBD9D2; }
.leg-o::before { background: var(--warning-bg); }

.anomalies-toolbar { display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-4); flex-wrap: wrap; }
.toolbar-search { position: relative; flex: 1; min-width: 220px; }
.toolbar-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-faint); }
#anom-search { padding-left: 36px; }
.toolbar-filters select { width: auto; }
.toolbar-count { font-size: var(--text-small); color: var(--text-muted); white-space: nowrap; }

.anomalies-wrap { overflow: hidden; }
.anom-summary { display: flex; gap: var(--sp-4); padding: 11px 16px; background: var(--surface-50);
  border-bottom: 1px solid var(--surface-200); font-size: var(--text-micro); font-weight: 600; flex-wrap: wrap; }
.anom-sum-det { color: var(--forest); }
.anom-sum-llm { color: var(--warning-fg); }
.anom-table { width: 100%; border-collapse: collapse; font-size: var(--text-body); }
.anom-table thead tr, .anom-table th { background: var(--surface-50); }
.anom-table th { text-align: left; padding: 11px 16px; font-size: var(--text-micro); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); white-space: nowrap;
  border-bottom: 1px solid var(--surface-200); position: sticky; top: 0; z-index: 1; cursor: pointer; user-select: none; }
.anom-table th.sort-asc::after { content: " ↑"; } .anom-table th.sort-desc::after { content: " ↓"; }
.anom-table td { padding: 10px 16px; border-bottom: 1px solid var(--surface-200);
  color: var(--text-secondary); vertical-align: top; max-width: 280px; }
.anom-table tbody tr:hover td { background: var(--surface-50); }
.anom-table tbody tr:last-child td { border-bottom: none; }
.anom-table input[type="checkbox"], .anom-chk { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.anom-table tr.src-det td:first-child { box-shadow: inset 3px 0 0 var(--forest); }
.anom-table tr.src-llm td:first-child { box-shadow: inset 3px 0 0 #d9a73a; }
.anom-table tr.src-both td:first-child { box-shadow: inset 3px 0 0 var(--info-fg); }
.badge-det, .badge-llm, .badge-both {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-md);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.badge-det { background: var(--success-bg); color: var(--success-fg); }
.badge-llm { background: var(--warning-bg); color: var(--warning-fg); }
.badge-both { background: var(--info-bg); color: var(--info-fg); }

.empty-state { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
  padding: var(--sp-8); text-align: center; }
.empty-state-icon { width: 40px; height: 40px; color: var(--surface-300); }
.empty-state-text { font-size: var(--text-body); color: var(--text-muted); }

/* ── Toasts ───────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--text-primary); color: #fff; padding: 11px 16px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal); font-size: var(--text-small); max-width: 340px;
  animation: toastIn var(--dur-normal) var(--ease-out); }
.toast--success, .toast.ok { background: var(--forest); }
.toast--error, .toast.err { background: #8e2c1f; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  /* En mobile : on rend la main au scroll naturel du body (pile verticale). */
  .app { grid-template-columns: 1fr; height: auto; min-height: 100vh; overflow: visible; }
  .sidebar { height: auto; overflow: visible; border-right: none; border-bottom: 1px solid var(--surface-200); }
  .main-col { overflow: visible; }
  .main { overflow: visible; padding: var(--sp-4); }
  .topbar { flex-wrap: wrap; height: auto; padding: var(--sp-3) var(--sp-4); gap: var(--sp-2); position: static; }
  .tabs { order: 2; width: 100%; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
