/* FEM Playground — système de design.
   Palette volontairement sobre : un seul bleu (encre de Prusse), papier chaud, cuivre
   (Dirichlet), sauge (Neumann), ocre (mise en évidence). Pas de dégradés décoratifs. */
:root {
  --bg: #f4f2ed; --bg-2: #ebe8e1; --card: #fffdf9; --card-2: #f8f6f1;
  --text: #17191d; --text-2: #3b3f46; --muted: #6d7078; --faint: #9c9ea4;
  --border: #e4e0d7; --border-strong: #d2cdc2;
  --accent: #1f4b73; --accent-hover: #173b5c; --accent-soft: #e8edf1; --accent-ring: rgba(31, 75, 115, .2);
  --ok: #2e7553; --ok-soft: #e6f0ea; --bad: #ae3a2c; --bad-soft: #f6e7e3; --warn: #96610e; --warn-soft: #f6eedd;
  --dir: #b0552a; --dir-soft: #f5e9e1; --neu: #3a7558; --neu-soft: #e5efe8;
  --free: #1f4b73; --kind-edge: #2b7480; --kind-int: #8a4d80;
  --hl: #c18514; --hl-soft: #f7edd6;
  --mesh: #6d7078; --mesh-faint: #d6d2c8;
  --shadow-sm: 0 1px 1px rgba(23, 25, 29, .04);
  --shadow: 0 1px 2px rgba(23, 25, 29, .04), 0 8px 24px -14px rgba(23, 25, 29, .14);
  --shadow-lg: 0 24px 60px -18px rgba(23, 25, 29, .32);
  --radius: 12px; --radius-sm: 8px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1013; --bg-2: #15171b; --card: #17191d; --card-2: #1c1f24;
  --text: #e8e5de; --text-2: #c9c6be; --muted: #98968f; --faint: #66655f;
  --border: #282a2f; --border-strong: #35383e;
  --accent: #8eb0cf; --accent-hover: #a9c4dd; --accent-soft: rgba(142, 176, 207, .11); --accent-ring: rgba(142, 176, 207, .28);
  --ok: #7cbf98; --ok-soft: rgba(124, 191, 152, .11); --bad: #e58b7c; --bad-soft: rgba(229, 139, 124, .11);
  --warn: #dcb366; --warn-soft: rgba(220, 179, 102, .11);
  --dir: #db9068; --dir-soft: rgba(219, 144, 104, .12); --neu: #84bc9c; --neu-soft: rgba(132, 188, 156, .11);
  --free: #8eb0cf; --kind-edge: #75b4bd; --kind-int: #c495bb;
  --hl: #e1b257; --hl-soft: rgba(225, 178, 87, .14);
  --mesh: #8a8982; --mesh-faint: #2d2f34;
  --shadow-sm: none; --shadow: 0 10px 30px -16px rgba(0, 0, 0, .7); --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
.num, .mono, td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
::selection { background: var(--accent-ring); }
.katex { font-size: 1.06em; }
.katex-display { margin: .35em 0; }
.rich .katex { white-space: nowrap; }

/* ================================================================ PAGE D'ACCUEIL */
#landing { position: fixed; inset: 0; z-index: 60; overflow-y: auto; overflow-x: hidden; background: #0a0b0d; color: #ebe7de;
  scrollbar-width: thin; scrollbar-color: #2a2b2f transparent; }
#landing.leave { animation: l-leave .75s cubic-bezier(.6, 0, .3, 1) forwards; pointer-events: none; }
@keyframes l-leave { to { opacity: 0; transform: scale(1.035); filter: blur(6px); } }
#app.enter { animation: a-enter .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes a-enter { from { opacity: 0; transform: translateY(10px); } }

.l-stage { position: relative; min-height: 100vh; display: flex; flex-direction: column; isolation: isolate; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.l-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, #0a0b0d 0%, rgba(10, 11, 13, .92) 30%, rgba(10, 11, 13, .35) 58%, rgba(10, 11, 13, 0) 75%),
    linear-gradient(0deg, #0a0b0d 0%, rgba(10, 11, 13, 0) 24%); }
.l-grain { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .07;
  background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px); background-size: 3px 3px; mix-blend-mode: overlay; }

.l-nav { display: flex; align-items: center; justify-content: space-between; padding: 26px clamp(20px, 5vw, 72px); }
.l-brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: .01em; font-size: 15px; }
.l-brand .mark { width: 30px; height: 30px; border: 1px solid rgba(235, 231, 222, .35); border-radius: 7px; display: grid; place-items: center; }
.l-links { display: flex; gap: 6px; align-items: center; }
.l-links button { background: none; border: 0; color: rgba(235, 231, 222, .66); cursor: pointer; padding: 8px 12px; border-radius: 8px; font-size: 13.5px; transition: color .2s, background .2s; }
.l-links button:hover { color: #ebe7de; background: rgba(255, 255, 255, .05); }

.l-hero { flex: 1; display: grid; grid-template-columns: minmax(0, 860px); align-content: center; padding: 10px clamp(20px, 5vw, 72px) 40px; }
.l-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: #d4ad62;
  display: flex; align-items: center; gap: 14px; margin-bottom: 26px; opacity: 0; animation: l-up .9s .1s forwards; }
.l-eyebrow::before { content: ""; width: 38px; height: 1px; background: #d4ad62; }
.l-title { font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 7.2vw, 112px); line-height: .96; letter-spacing: -.025em; margin: 0; }
.l-title span { display: block; opacity: 0; animation: l-up 1s forwards; }
.l-title span:nth-child(1) { animation-delay: .2s; }
.l-title span:nth-child(2) { animation-delay: .32s; }
.l-title span:nth-child(3) { animation-delay: .44s; color: rgba(235, 231, 222, .62); }
.l-title em { font-style: italic; color: #e8c681; }
.l-eq { margin: 34px 0 4px; font-size: clamp(34px, 5.2vw, 80px); color: #f3efe6; opacity: 0; animation: l-up 1s .6s forwards;
  text-shadow: 0 0 40px rgba(232, 198, 129, .18); }
.l-eq .katex { font-size: 1em; }
.l-eq .katex-display { margin: 0; text-align: left; }
.l-eq .katex-display > .katex { text-align: left; }
.l-sub { max-width: 600px; color: rgba(235, 231, 222, .66); font-size: 16.5px; line-height: 1.65; margin: 18px 0 34px; opacity: 0; animation: l-up 1s .75s forwards; }
.l-sub .katex { color: #ebe7de; }
.l-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; opacity: 0; animation: l-up 1s .9s forwards; }
.l-cta { display: inline-flex; align-items: center; gap: 12px; padding: 15px 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: #ece8df; color: #0c0d10; font-weight: 650; font-size: 15px; letter-spacing: .005em; transition: transform .25s, box-shadow .25s, background .25s; }
.l-cta svg { transition: transform .25s; }
.l-cta:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 14px 40px -12px rgba(232, 198, 129, .45); }
.l-cta:hover svg { transform: translateX(4px); }
.l-orders { display: inline-flex; gap: 8px; }
.l-orders button { border: 1px solid rgba(235, 231, 222, .22); background: rgba(255, 255, 255, .02); color: #ebe7de; cursor: pointer;
  padding: 12px 18px; border-radius: 999px; font-family: var(--serif); font-size: 17px; transition: all .25s; }
.l-orders button:hover { border-color: #d4ad62; color: #e8c681; background: rgba(212, 173, 98, .07); }
.l-orders button small { font-family: var(--font); font-size: 11px; color: rgba(235, 231, 222, .5); margin-left: 6px; }
@keyframes l-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.l-hud { position: absolute; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: rgba(235, 231, 222, .5); line-height: 1.8;
  pointer-events: none; text-transform: uppercase; }
.l-hud b { color: rgba(235, 231, 222, .85); font-weight: 500; }
.l-hud .katex { text-transform: none; font-size: 1.15em; letter-spacing: 0; color: rgba(235, 231, 222, .8); }
.l-hud.tr { top: 96px; right: clamp(20px, 4vw, 60px); text-align: right; }
.l-hud.br { bottom: 250px; right: clamp(20px, 4vw, 60px); text-align: right; }
.l-hud .bracket { display: inline-block; padding: 8px 12px; border: 1px solid rgba(235, 231, 222, .12); border-radius: 4px; background: rgba(10, 11, 13, .35); backdrop-filter: blur(3px); }
.l-pulse { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #e8c681; margin-right: 8px; box-shadow: 0 0 10px #e8c681; animation: pulse 1.6s infinite; vertical-align: 1px; }

.l-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0 clamp(20px, 5vw, 72px) 70px;
  border: 1px solid rgba(235, 231, 222, .1); border-radius: 14px; overflow: hidden; background: rgba(235, 231, 222, .08);
  backdrop-filter: blur(10px); opacity: 0; animation: l-up 1s 1.1s forwards; max-width: 1100px; }
.l-metric { background: rgba(12, 13, 16, .72); padding: 18px 22px; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center; }
.l-metric .k { font-family: var(--serif); font-size: 36px; line-height: 1; grid-row: span 2; color: #ece8df; }
.l-metric .k small { font-size: 12px; font-family: var(--font); color: rgba(235, 231, 222, .45); display: block; margin-top: 6px; letter-spacing: .02em; }
.l-metric .rate { font-size: 15px; color: #ebe7de; min-height: 24px; }
.l-metric .rate .katex { font-size: 1.12em; }
.l-metric .lab { font-size: 11px; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(235, 231, 222, .45); }
.l-metric svg { grid-column: 1 / -1; width: 100%; height: 34px; margin-top: 8px; }
.l-metric.loading .rate { color: transparent; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1), rgba(255,255,255,.04));
  background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 4px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.l-metrics-cap .katex, .l-metric .lab .katex { text-transform: none; letter-spacing: 0; font-size: 1.2em; color: rgba(235, 231, 222, .7); }
.l-metrics-cap { grid-column: 1 / -1; background: rgba(12, 13, 16, .72); padding: 10px 22px; font-family: var(--mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: rgba(235, 231, 222, .45); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.l-section { padding: 90px clamp(20px, 5vw, 72px) 70px; border-top: 1px solid rgba(235, 231, 222, .08); background: #0a0b0d; }
.l-section h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.6vw, 50px); letter-spacing: -.02em; margin: 0 0 12px; max-width: 900px; line-height: 1.08; }
.l-section h2 em { color: #e8c681; }
.l-section > p { color: rgba(235, 231, 222, .62); max-width: 640px; font-size: 16px; line-height: 1.65; margin: 0 0 46px; }
.l-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1240px; }
.l-pillar { display: flex; flex-direction: column; justify-content: flex-start; position: relative; border: 1px solid rgba(235, 231, 222, .1); border-radius: 16px; padding: 26px 26px 22px; background: #0e0f12;
  transition: border-color .35s, transform .35s, background .35s; cursor: pointer; overflow: hidden; text-align: left; color: inherit; }
.l-pillar:hover { border-color: rgba(212, 173, 98, .45); transform: translateY(-3px); background: #111215; }
.l-pillar .idx { font-family: var(--mono); font-size: 11px; color: #d4ad62; letter-spacing: .2em; }
.l-pillar h3 { font-family: var(--serif); font-weight: 400; font-size: 27px; margin: 12px 0 8px; letter-spacing: -.01em; }
.l-pillar p { color: rgba(235, 231, 222, .6); font-size: 14px; line-height: 1.6; margin: 0 0 18px; }
.l-pillar .f { margin-top: auto; border-top: 1px solid rgba(235, 231, 222, .08); padding-top: 16px; color: #ebe7de; overflow-x: auto; overflow-y: hidden; font-size: 15px; }
.l-pillar .go { position: absolute; top: 24px; right: 24px; color: rgba(235, 231, 222, .35); transition: color .3s, transform .3s; }
.l-pillar:hover .go { color: #e8c681; transform: translate(2px, -2px); }
.l-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 26px clamp(20px, 5vw, 72px) 40px; background: #0a0b0d;
  border-top: 1px solid rgba(235, 231, 222, .08); font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: rgba(235, 231, 222, .42); }
.l-scroll { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; letter-spacing: .25em;
  color: rgba(235, 231, 222, .35); text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.l-scroll i { width: 1px; height: 22px; background: linear-gradient(rgba(235, 231, 222, .5), transparent); animation: drip 2s infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 900px) {
  .l-hud { display: none; }
  .l-metrics, .l-pillars { grid-template-columns: minmax(0, 1fr); }
  .l-stage::before { background: linear-gradient(0deg, #0a0b0d 10%, rgba(10, 11, 13, .72) 60%, rgba(10, 11, 13, .55)); }
  .l-links button.opt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .l-title span, .l-eq, .l-sub, .l-actions, .l-eyebrow, .l-metrics { animation: none; opacity: 1; }
}

/* ================================================================ APPLICATION */
.appbar {
  position: sticky; top: 0; z-index: 40; height: 64px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.3) blur(14px); -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; border: 0; background: none; padding: 0; text-align: left; }
.brand .logo { width: 32px; height: 32px; border-radius: 8px; flex: none; background: var(--text); display: grid; place-items: center; color: var(--bg); transition: transform .3s; }
.brand:hover .logo { transform: rotate(-8deg); }
.brand .title { font-family: var(--serif); font-weight: 600; font-size: 18px; letter-spacing: -.01em; line-height: 1.1; }
.brand .subtitle { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .subtitle .katex { font-size: 1.02em; color: var(--text-2); }
.appbar-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }

.order-switch { position: relative; display: flex; padding: 4px; gap: 2px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; }
.order-switch button { position: relative; z-index: 1; border: 0; background: transparent; cursor: pointer; padding: 5px 18px; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; line-height: 1.15; color: var(--muted); transition: color .25s; min-width: 82px; }
.order-switch button b { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.order-switch button small { font-size: 10.5px; }
.order-switch button.active { color: var(--bg); }
.order-switch .pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; border-radius: 8px; background: var(--text);
  transition: left .32s cubic-bezier(.4, 1.25, .5, 1), width .32s; }

.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--card); white-space: nowrap; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, var(--border)); }
.status.ok .dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.status.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.status.bad .dot { background: var(--bad); }
.status.busy .dot { background: var(--hl); animation: pulse 1s infinite ease-in-out; }
@keyframes pulse { 50% { transform: scale(.55); opacity: .5; } }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); display: grid; place-items: center;
  cursor: pointer; color: var(--text-2); transition: background .15s, border-color .15s; }
.icon-btn:hover { border-color: var(--border-strong); background: var(--card-2); }
.icon-btn svg { width: 17px; height: 17px; }

.layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 20px; padding: 20px; max-width: 1700px; margin: 0 auto; }
.sidebar { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 104px); overflow-y: auto; display: flex; flex-direction: column;
  gap: 14px; padding: 2px 4px 2px 2px; scrollbar-width: thin; }
main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.panel, .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding: 15px 16px 16px; }
.panel > h3 { margin: 0 0 13px; font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.panel > h3 .n { font-family: var(--serif); font-style: italic; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--hl); font-weight: 600; }
.card { padding: 20px 22px; min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -.012em; line-height: 1.2; }
.card-head h2 .katex { font-size: .95em; }
.card-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; max-width: 75ch; line-height: 1.55; }
.card h4 { margin: 18px 0 8px; font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card h4:first-child { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-2-wide { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------------------------------------------------------------- contrôles */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 550; color: var(--text-2); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.field .value { font-family: var(--mono); font-size: 11.5px; color: var(--text); background: var(--bg-2); padding: 1px 8px; border-radius: 6px; font-weight: 600; }
.hint { color: var(--muted); font-size: 12px; margin: 0; line-height: 1.55; }
.hint.warn { color: var(--warn); }
select, input[type=number] { width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--card);
  outline: none; transition: border-color .15s, box-shadow .15s; }
select { appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236d7078' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
select:focus, input[type=number]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
input[type=number].sm { width: 80px; padding: 5px 8px; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; --p: 0%; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--text) var(--p), var(--border-strong) var(--p)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 999px; background: var(--border-strong); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--text); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); transition: transform .12s; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--text); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.18); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 9px; }
.seg.full { display: flex; }
.seg.full button { flex: 1; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 6px; cursor: pointer; font-size: 12.5px; font-weight: 550; color: var(--muted);
  white-space: nowrap; transition: background .15s, color .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.seg button svg { width: 15px; height: 15px; }
.seg button .katex { font-size: 1.08em; }
.seg.bc button { padding: 3px 10px; font-family: var(--serif); font-weight: 700; font-size: 13px; }
.seg.bc button.active.d { color: var(--dir); }
.seg.bc button.active.n { color: var(--neu); }

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--text-2); user-select: none; }
.switch input { appearance: none; width: 32px; height: 18px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked { background: var(--text); }
.switch input:checked::after { transform: translateX(14px); }
:root[data-theme="dark"] .switch input:checked::after { background: var(--bg); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--border); background: var(--card); border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer; color: var(--text-2);
  transition: all .15s; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--border-strong); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }

.btn { border: 1px solid var(--border-strong); background: var(--card); padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all .15s; color: var(--text-2); }
.btn:hover { border-color: var(--text-2); color: var(--text); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .btn.primary:hover { color: #0f1013; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn.icon { padding: 6px 8px; }
.btn svg { width: 15px; height: 15px; }
.btn:disabled { opacity: .5; cursor: default; }
.solve-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* sélecteur de problème */
.problem-list { display: flex; flex-direction: column; gap: 6px; }
.problem-opt { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; align-items: start; text-align: left; border: 1px solid var(--border);
  background: var(--card); border-radius: var(--radius-sm); padding: 9px 11px; cursor: pointer; transition: border-color .15s, background .15s; }
.problem-opt:hover { border-color: var(--border-strong); background: var(--card-2); }
.problem-opt .radio { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--border-strong); margin-top: 3px; transition: all .15s; }
.problem-opt .p-name { font-size: 12px; font-weight: 600; color: var(--muted); }
.problem-opt .p-eq { font-size: 13px; color: var(--text); overflow-x: auto; overflow-y: hidden; margin-top: 1px; }
.problem-opt.on { border-color: var(--text); background: var(--card-2); }
.problem-opt.on .radio { border: 4px solid var(--text); }
.problem-opt.on .p-name { color: var(--text-2); }
.problem-note { margin-top: 10px; padding: 9px 11px; border-radius: var(--radius-sm); background: var(--bg-2); }
.problem-note .eq { margin-bottom: 6px; font-size: 13px; overflow-x: auto; overflow-y: hidden; }

/* conditions aux limites */
.bc-editor { display: grid; grid-template-columns: 116px 1fr; gap: 14px; align-items: center; }
.bc-editor svg { width: 116px; height: 116px; overflow: visible; }
.bc-editor .side { cursor: pointer; stroke-linecap: round; transition: stroke-width .15s; }
.bc-editor .side:hover { stroke-width: 10; }
.bc-rows { display: flex; flex-direction: column; gap: 6px; }
.bc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.bc-presets { margin-top: 12px; }

/* tuiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
@media (min-width: 1400px) { .kpis { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 13px 15px 12px; min-width: 0; position: relative; overflow: hidden; }
.kpi .k-label { font-size: 12px; color: var(--muted); font-weight: 550; white-space: nowrap; min-height: 19px; }
.kpi .k-label .katex { font-size: 1.08em; color: var(--text-2); }
.kpi .k-value { font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: -.01em; margin-top: 3px; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .k-value .katex { font-size: .9em; }
.kpi .k-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .k-sub .katex { font-size: 1.05em; color: var(--muted); }
.kpi.accent { background: var(--text); border-color: var(--text); color: var(--bg); }
.kpi.accent .k-label, .kpi.accent .k-sub, .kpi.accent .katex { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.kpi.accent .k-value .katex { color: var(--bg); }
.kpi.ok .k-value { color: var(--ok); } .kpi.bad .k-value { color: var(--bad); }
.kpi.ok::after, .kpi.bad::after { content: ""; position: absolute; right: 14px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.kpi.ok::after { color: var(--ok); } .kpi.bad::after { color: var(--bad); }

/* onglets */
.tabs { display: flex; gap: 2px; padding: 5px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow-x: auto; position: sticky; top: 76px; z-index: 20; scrollbar-width: none; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: all .15s; }
.tabs button svg { width: 15px; height: 15px; opacity: .85; }
.tabs button:hover { color: var(--text); background: var(--card-2); }
.tabs button.active { color: var(--text); background: var(--bg-2); box-shadow: inset 0 -2px 0 var(--hl); }
.view { display: none; flex-direction: column; gap: 16px; animation: fadein .3s ease; }
.view.active { display: flex; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } }

/* figures */
.figure { position: relative; background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.figure .fig-hint { position: absolute; left: 12px; bottom: 9px; font-size: 11px; color: var(--faint); pointer-events: none; }
.mesh-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.mesh-figure { max-width: 860px; }
svg.mesh { width: 100%; display: block; aspect-ratio: 1; cursor: grab; touch-action: none; user-select: none; }
svg.mesh.grabbing { cursor: grabbing; }
svg.mesh text { font-family: var(--mono); pointer-events: none; }
svg.mesh .tri { fill: transparent; stroke: var(--mesh); stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill .12s; }
svg.mesh .tri.pick { cursor: pointer; }
svg.mesh .tri.pick:hover { fill: var(--accent-soft); }
svg.mesh .tri.sel { fill: var(--hl-soft); stroke: var(--hl); stroke-width: 2.5; }
svg.mesh .tri.cw { fill: var(--bad-soft); }
svg.mesh .bd-D { stroke: var(--dir); stroke-width: 3.5; vector-effect: non-scaling-stroke; stroke-linecap: round; }
svg.mesh .bd-N { stroke: var(--neu); stroke-width: 3.5; vector-effect: non-scaling-stroke; stroke-dasharray: 7 5; stroke-linecap: round; }
svg.mesh .dof { stroke: var(--card-2); stroke-width: 1.2; vector-effect: non-scaling-stroke; cursor: help; }
svg.mesh .dof.fixed { fill: var(--dir); }
svg.mesh .dof.free { fill: var(--free); }
svg.mesh .dof:hover { stroke: var(--text); stroke-width: 2; }
svg.mesh .lbl { fill: var(--text); font-weight: 600; paint-order: stroke; stroke: var(--card-2); stroke-linejoin: round; }
svg.mesh .lbl-red { fill: var(--free); font-weight: 700; paint-order: stroke; stroke: var(--card-2); }
svg.mesh .lbl-elem { fill: var(--faint); font-style: italic; }
svg.mesh .lbl-loc { fill: var(--hl); font-weight: 800; paint-order: stroke; stroke: var(--card-2); }
svg.mesh .arrow { stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; fill: none; }
svg.mesh .arrow.flip { stroke: var(--bad); }
svg.mesh .ah { fill: var(--accent); } svg.mesh .ah.flip { fill: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-top: 12px; align-items: center; }
.legend .sw { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { width: 16px; height: 12px; overflow: visible; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }

/* tableaux & matrices */
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); max-width: 100%; }
.table-wrap.tall { max-height: 440px; }
table.data { border-collapse: collapse; width: 100%; font-size: 13px; }
table.data th { text-align: left; font-size: 11px; font-weight: 650; color: var(--muted); letter-spacing: .03em; background: var(--card-2); padding: 8px 12px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; white-space: nowrap; z-index: 1; }
table.data th .katex { font-size: 1.15em; color: var(--text-2); letter-spacing: 0; }
table.data td { padding: 7px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--card-2); }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.data td.mono, table.data td .katex { white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge.dir { color: var(--dir); background: var(--dir-soft); }
.badge.neu { color: var(--neu); background: var(--neu-soft); }
.badge.free { color: var(--free); background: var(--accent-soft); }
.badge.ok { color: var(--ok); background: var(--ok-soft); }
.badge.bad { color: var(--bad); background: var(--bad-soft); }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.badge.muted { color: var(--muted); background: var(--bg-2); }
.badge.k0 { color: var(--free); background: var(--accent-soft); }
.badge.k1 { color: var(--kind-edge); background: color-mix(in srgb, var(--kind-edge) 11%, transparent); }
.badge.k2 { color: var(--kind-int); background: color-mix(in srgb, var(--kind-int) 11%, transparent); }
.badge .katex { font-size: 1.05em; }
.nz-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.nz-chips > span { background: var(--neu-soft); color: var(--neu); padding: 1px 7px; border-radius: 6px; white-space: nowrap; }

.matrix-wrap { overflow: auto; max-width: 100%; max-height: 620px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--card); }
.matrix-wrap.canvas { max-height: none; border: 0; background: transparent; overflow: visible; }
table.m { border-collapse: separate; border-spacing: 0; font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
table.m th { white-space: nowrap; position: sticky; background: var(--card-2); color: var(--faint); font-weight: 500; padding: 3px 6px; z-index: 1; font-size: 10.5px; }
table.m thead th { top: 0; border-bottom: 1px solid var(--border); }
table.m tbody th { left: 0; border-right: 1px solid var(--border); text-align: right; }
table.m thead th:first-child { left: 0; z-index: 2; }
table.m td { padding: 3px 7px; text-align: right; border-right: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); min-width: 34px; white-space: nowrap; transition: background .15s; }
table.m td.z { color: var(--mesh-faint); }
table.m td.click { cursor: pointer; }
table.m td.click:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
table.m td.hl { outline: 2px solid var(--hl); outline-offset: -2px; font-weight: 700; color: var(--text); }
table.m td.sel { outline: 2.5px solid var(--accent); outline-offset: -2.5px; font-weight: 700; }
table.m td.fixedrc { background-image: repeating-linear-gradient(45deg, transparent 0 5px, color-mix(in srgb, var(--dir) 10%, transparent) 5px 10px); }
table.m .sub { display: block; font-size: 9.5px; color: var(--faint); font-weight: 400; }
table.m.ke td { padding: 5px 8px; font-size: 11.5px; min-width: 58px; }
table.m.ke th { font-size: 11px; color: var(--muted); }
table.m.ke th .katex { font-size: 1.1em; }
table.m.ke th.kind-1 { color: var(--kind-edge); } table.m.ke th.kind-2 { color: var(--kind-int); }
.matrix-canvas { width: 100%; max-width: 620px; aspect-ratio: 1; display: block; image-rendering: pixelated; cursor: crosshair;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }

.formula { font-family: var(--mono); font-size: 12.5px; background: var(--card-2); border: 1px solid var(--border); padding: 10px 12px;
  border-radius: var(--radius-sm); white-space: pre-wrap; line-height: 1.6; overflow-x: auto; }
.tex-block { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.kv-grid { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; font-size: 13px; align-items: baseline; margin: 0; }
.kv-grid dt { color: var(--muted); font-size: 12px; }
.kv-grid dd { margin: 0; overflow-x: auto; overflow-y: hidden; }

.ops { font-family: var(--mono); font-size: 11.5px; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 2px 14px;
  max-height: 220px; overflow: auto; padding: 10px 12px; background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ops .zero { color: var(--faint); }
.ops b { color: var(--accent); font-weight: 600; }
.ops-cap { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.crosscheck { margin: 10px 0 0; }

.stepper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stepper input[type=range] { flex: 1; min-width: 140px; }
.stepper .pos { font-size: 13px; color: var(--muted); min-width: 96px; text-align: right; }

.contrib-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.contrib-head .big { font-size: 20px; }
.contrib-sum { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; font-size: 13px; }
.contrib-sum .term { background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 6px; }
.empty { display: grid; place-items: center; text-align: center; color: var(--muted); padding: 30px 16px; font-size: 13px; border: 1.5px dashed var(--border); border-radius: var(--radius-sm); }

/* solution */
.sol-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.sol-figure { max-width: 720px; }
#field-canvas { width: 100%; aspect-ratio: 1; display: block; cursor: crosshair; }
#surface-canvas { width: 100%; aspect-ratio: 8 / 7; display: block; cursor: grab; touch-action: none; }
#surface-canvas.grabbing { cursor: grabbing; }
.cb-title { margin: 0 0 12px; font-size: 18px; }
.colorbar { display: grid; grid-template-columns: 14px 1fr; gap: 10px; height: 240px; }
.colorbar canvas { width: 14px; height: 100%; border-radius: 4px; border: 1px solid var(--border); }
.colorbar .ticks { display: flex; flex-direction: column; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.probe { background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; color: var(--text-2); }
.probe .p-grid { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; align-items: baseline; }
.probe .p-grid > span:nth-child(odd) { color: var(--muted); }
.probe .p-grid > span:nth-child(even) { font-family: var(--mono); font-size: 12px; text-align: right; color: var(--text); }
.probe .p-title { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 9px; font-weight: 650; }

/* validation */
.checks { display: flex; flex-direction: column; gap: 8px; }
.check { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--card); }
.check .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.check.pass .ic { background: var(--ok-soft); color: var(--ok); }
.check.fail { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.check.fail .ic { background: var(--bad-soft); color: var(--bad); }
.check.info .ic { background: var(--bg-2); color: var(--muted); font-family: var(--serif); font-style: italic; }
.check .c-name { font-weight: 600; font-size: 13.5px; }
.check .c-name .katex { font-size: 1.05em; }
.check .c-exp { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.check .c-val { text-align: right; white-space: nowrap; font-size: 13px; }
.check .c-tol { color: var(--faint); font-size: 11px; margin-top: 2px; }
.assume { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.assume li { position: relative; padding-left: 18px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.assume li::before { content: ""; position: absolute; left: 2px; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--hl); }
.plot-wrap { position: relative; }
.plot-wrap .ov { position: absolute; transform: translate(-50%, -50%); font-size: 12px; color: var(--muted); white-space: nowrap; pointer-events: none; }
.plot-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; padding: 6px 8px 4px; }
.plot-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.plot-legend i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
svg.plot { width: 100%; display: block; }
svg.plot text { fill: var(--muted); font-size: 11px; font-family: var(--serif); }
svg.plot .axis { stroke: var(--border-strong); }
svg.plot .grid { stroke: var(--border); }
svg.plot .ref { stroke: var(--faint); stroke-dasharray: 5 5; fill: none; }
svg.plot circle { stroke: var(--card); stroke-width: 2; }
.rate { font-weight: 700; font-family: var(--mono); }
.rate.good { color: var(--ok); } .rate.off { color: var(--warn); }

/* théorie */
.theory { max-width: 1000px; }
.theory h3 { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin: 34px 0 10px; display: flex; align-items: center; gap: 12px; }
.theory h3:first-child { margin-top: 0; }
.theory h3 .tag { font-family: var(--font); font-size: 11px; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: var(--bg-2); color: var(--text-2); letter-spacing: .02em; }
.theory p, .theory li { color: var(--text-2); line-height: 1.75; font-size: 14.5px; }
.theory p { margin: 6px 0; }
.theory .tex-block { margin: 12px 0; font-size: 1.04em; }
.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 11px 15px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 12px 0; color: var(--text-2); font-size: 13.5px; line-height: 1.65; }
.callout.warn { border-color: var(--hl); background: var(--hl-soft); }
.callout.ok { border-color: var(--ok); background: var(--ok-soft); }
.basis-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.ref-svg { width: 100%; max-width: 250px; display: block; }
.ref-svg text { font-family: var(--mono); }

/* info-bulles, toasts, progression */
.tooltip { position: fixed; z-index: 200; pointer-events: none; background: #17191d; color: #f1eee7; font-size: 12px; line-height: 1.5; padding: 7px 10px; border-radius: 7px;
  box-shadow: var(--shadow-lg); max-width: 340px; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; white-space: pre-line; font-family: var(--mono); }
:root[data-theme="dark"] .tooltip { background: #ece8df; color: #17191d; }
.tooltip.show { opacity: 1; transform: none; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 220; display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.toast { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--bad); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow-lg); font-size: 13px; animation: toastin .25s ease; }
.toast.info { border-left-color: var(--accent); }
.toast b { display: block; margin-bottom: 2px; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.topbar-progress { position: fixed; top: 63px; left: 0; height: 2px; width: 0; z-index: 50; opacity: 0; background: var(--hl); transition: width .6s ease, opacity .3s; }
.topbar-progress.run { width: 85%; opacity: 1; transition: width 4s cubic-bezier(.1, .7, .2, 1); }
.topbar-progress.done { width: 100%; opacity: 0; transition: width .2s, opacity .4s .2s; }
main.busy .card, main.busy .kpi { transition: opacity .2s; opacity: .6; }

/* responsive */
@media (max-width: 1320px) { .grid-2-wide, .mesh-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .sidebar { position: static; max-height: none; }
  .grid-2, .sol-layout { grid-template-columns: minmax(0, 1fr); }
  .appbar { grid-template-columns: auto 1fr; height: auto; padding: 10px 14px; row-gap: 8px; }
  .appbar .order-switch { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .tabs { position: static; }
  .topbar-progress { top: 0; }
}
@media (max-width: 560px) {
  .brand .subtitle { display: none; }
  .order-switch button { min-width: 64px; padding: 5px 10px; }
  .basis-grid, .bc-editor { grid-template-columns: minmax(0, 1fr); }
}
