/* INCOSA admin: palette and components from design/admin-demandes-3d.html. */
:root {
  --bg: #1C1F2B;
  --side: #20232F;
  --field: #272B3C;
  --card: #2F3448;
  --muted-bg: #3A3F55;
  --line: rgba(80, 86, 121, .35);
  --line-strong: rgba(80, 86, 121, .6);
  --text: #FAFAFA;
  --text-2: #C9CBD6;
  --text-3: #8C90A6;
  --gold: #B89F51;
  --gold-text: #D8C57C;
  --blue: #4A90E2;
  --blue-text: #8DBAF0;
  --green: #3FA26A;
  --green-text: #6FCF97;
  --red: #D14B4B;
  --red-text: #EB8A8A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-text); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.ms {
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 'wght' 300;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  display: inline-block;
  user-select: none;
}
.mono { font-family: 'IBM Plex Mono', monospace; }
.muted { color: var(--text-3); }
.hidden { display: none !important; }

/* ---------- shell ---------- */
.shell { display: flex; height: 100vh; min-height: 0; }
.side {
  width: 196px; flex: none; background: var(--side);
  border-right: 1px solid var(--line);
  padding: 16px 12px; display: flex; flex-direction: column; gap: 2px;
}
.brand { display: flex; align-items: center; gap: 9px; padding: 2px 8px 16px; }
.logo {
  width: 28px; height: 28px; border-radius: 8px; background: var(--gold); color: var(--bg);
  display: grid; place-items: center; font-family: 'Space Grotesk', sans-serif; font-weight: 700; flex: none;
}
.brand .t { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; }
.brand .s { font-size: 11px; color: var(--text-3); }
.nv {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px;
  font-size: 13.5px; color: var(--text-2); text-decoration: none; border: 0; background: none; width: 100%; text-align: left;
}
.nv:hover { background: rgba(255, 255, 255, .03); }
.nv .ms { font-size: 19px; color: var(--text-3); }
.nv.on { background: rgba(184, 159, 81, .12); color: var(--gold-text); font-weight: 600; }
.nv.on .ms { color: var(--gold-text); }
.nv .n {
  margin-left: auto; font-family: 'Space Grotesk', sans-serif; font-size: 12px; padding: 1px 7px;
  border-radius: 999px; background: var(--gold); color: var(--bg); font-weight: 700;
}
.nv .n.g { background: var(--muted-bg); color: var(--text-2); }
.who {
  margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 10px 8px 0;
  border-top: 1px solid rgba(80, 86, 121, .3); font-size: 12.5px;
}
.av {
  width: 28px; height: 28px; border-radius: 999px; background: var(--muted-bg); display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: var(--gold-text); flex: none;
}
.av.sm { width: 24px; height: 24px; font-size: 11px; }
.iconbtn {
  border: 0; background: none; color: var(--text-3); padding: 4px; border-radius: 6px; display: inline-grid; place-items: center;
}
.iconbtn:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.iconbtn .ms { font-size: 18px; }

.main { flex: 1; display: flex; min-width: 0; min-height: 0; }
.list { width: 350px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.lh { padding: 16px 18px 10px; flex: none; }
.lh .t, .page-title { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; }
.stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.stats b { font-family: 'Space Grotesk', sans-serif; color: var(--text); font-size: 13px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tb {
  height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-strong); background: none;
  font-size: 12px; color: var(--text-2); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.tb.on { background: rgba(184, 159, 81, .14); border-color: var(--gold); color: var(--gold-text); font-weight: 600; }
.tb em { font-style: normal; font-family: 'Space Grotesk', sans-serif; color: var(--text-3); }
.search {
  margin-top: 10px; height: 34px; border-radius: 9px; background: var(--field); border: 1px solid var(--line-strong);
  display: flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--text-3);
}
.search .ms { font-size: 18px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 13px; color: var(--text); }
.items { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.it {
  display: flex; gap: 10px; padding: 11px 10px; border-radius: 10px; margin-top: 2px; width: 100%;
  border: 0; background: none; text-align: left;
}
.it:hover { background: rgba(47, 52, 72, .5); }
.it.on { background: var(--card); outline: 1px solid rgba(184, 159, 81, .55); }
.it .tx { flex: 1; min-width: 0; }
.it .n { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.it .n > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.it .s { font-size: 12px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it .d { font-size: 11.5px; color: var(--text-3); white-space: nowrap; font-family: 'Space Grotesk', sans-serif; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--gold); flex: none; margin-top: 6px; }
.dot.off { background: transparent; }
.empty { padding: 28px 12px; text-align: center; color: var(--text-3); font-size: 13px; line-height: 1.5; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 7px;
  background: var(--muted-bg); color: var(--text-2); font-size: 11px; font-weight: 500; white-space: nowrap; flex: none;
}
.chip .ms { font-size: 14px; }
.chip.g { background: rgba(184, 159, 81, .15); color: var(--gold-text); }
.chip.ok { background: rgba(63, 162, 106, .15); color: var(--green-text); }
.chip.ko { background: rgba(209, 75, 75, .15); color: var(--red-text); }
.chip.in { background: rgba(74, 144, 226, .15); color: var(--blue-text); }

.detail { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.dh { padding: 18px 24px 0; flex: none; }
.dh .top { display: flex; align-items: flex-start; gap: 12px; }
.dh .t { font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 700; overflow-wrap: anywhere; }
.dh .meta { font-size: 12.5px; color: var(--text-3); margin-top: 4px; line-height: 1.45; }
.dh .meta b { color: var(--text-2); font-weight: 600; }
.back { display: none; }
.dbody {
  flex: 1; overflow-y: auto; padding: 12px 24px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start;
}
.dbody.ideas { grid-template-columns: 1fr 300px; }
.card { background: var(--card); border: 1px solid rgba(80, 86, 121, .45); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.card.full { grid-column: 1 / -1; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sec { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.kv { display: flex; gap: 10px; margin-top: 8px; font-size: 13px; }
.kv > span:first-child { width: 92px; color: var(--text-3); flex: none; }
.quote {
  border-left: 2px solid var(--gold); padding: 2px 0 2px 10px; margin-top: 8px; font-size: 13px; color: var(--text-2);
  line-height: 1.45; font-style: italic; white-space: pre-line; overflow-wrap: anywhere;
}
.link {
  color: var(--blue-text); font-size: 13px; display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  text-decoration: none; border: 0; background: none; padding: 0;
}
.link .ms { font-size: 16px; }
.link:hover { text-decoration: underline; }
.sim {
  display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(80, 86, 121, .25);
  font-size: 13px; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left;
}
.sim:first-of-type { border-top: none; }
.sim .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim .ms { font-size: 18px; }
.ref { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--text-3); }
.has3d { color: var(--gold-text); }
.no3d { color: #505679; }
.hint { font-size: 11.5px; color: var(--text-3); margin-top: 8px; line-height: 1.45; }
.message { margin-top: 10px; font-size: 14.5px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- answer bar ---------- */
.answer { flex: none; border-top: 1px solid rgba(80, 86, 121, .4); background: var(--side); padding: 14px 24px 16px; max-height: 70vh; overflow-y: auto; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ac {
  height: 36px; padding: 0 14px; white-space: nowrap; border-radius: 9px; border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); background: none;
}
.ac .ms { font-size: 18px; }
.ac:hover { border-color: rgba(201, 203, 214, .5); }
.ac.on { border-color: var(--gold); background: rgba(184, 159, 81, .14); color: var(--gold-text); }
.ac.blue.on { border-color: rgba(74, 144, 226, .7); background: rgba(74, 144, 226, .14); color: var(--blue-text); }
.ac.red.on { border-color: rgba(209, 75, 75, .6); background: rgba(209, 75, 75, .12); color: var(--red-text); }
.ac.green.on { border-color: rgba(63, 162, 106, .6); background: rgba(63, 162, 106, .12); color: var(--green-text); }
.keys { margin-top: 9px; font-size: 11.5px; color: var(--text-3); display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.kbd { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; padding: 1px 5px; border-radius: 4px; border: 1px solid rgba(80, 86, 121, .7); color: var(--text-3); }

.form { display: grid; grid-template-columns: 1fr 330px; gap: 16px; margin-top: 12px; }
.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.lbl small { font-weight: 400; color: var(--text-3); font-size: 12px; }
.input {
  height: 38px; width: 100%; border-radius: 9px; background: var(--field); border: 1px solid var(--line-strong);
  display: flex; align-items: center; gap: 8px; padding: 0 11px; font-size: 13.5px; color: var(--text);
}
.input:focus-within { border-color: var(--gold); }
.input input { flex: 1; min-width: 0; border: 0; background: none; outline: none; }
.input .ms { font-size: 17px; color: var(--text-3); }
textarea.area {
  display: block; width: 100%; border-radius: 9px; background: var(--field); border: 1px solid var(--line-strong);
  padding: 9px 11px; font-size: 13px; line-height: 1.45; color: var(--text); min-height: 64px; resize: vertical; outline: none;
}
textarea.area:focus { border-color: var(--gold); }
textarea.area::placeholder, .input input::placeholder, .search input::placeholder { color: var(--text-3); }
.tpl { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.tpl button {
  font-size: 11.5px; padding: 3px 8px; border-radius: 7px; border: 1px dashed rgba(80, 86, 121, .8); color: var(--text-2); background: none;
}
.tpl button:hover { border-color: var(--gold); color: var(--gold-text); }
.pick { margin-top: 6px; border-radius: 9px; background: var(--field); border: 1px solid var(--line-strong); overflow: hidden; }
.pk {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px; font-size: 13px; border: 0;
  border-top: 1px solid rgba(80, 86, 121, .25); width: 100%; background: none; text-align: left;
}
.pk:first-child { border-top: none; }
.pk:hover { background: rgba(255, 255, 255, .03); }
.pk.on { background: rgba(74, 144, 226, .1); }
.pk .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk .r { font-size: 18px; color: var(--text-3); }
.pk.on .r { color: var(--blue-text); }
.pk .ms:first-child { font-size: 17px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 6px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--blue); margin: 0; }
.check.green input { accent-color: var(--green); }
.notif { background: rgba(58, 63, 85, .85); border-radius: 14px; padding: 10px 12px; }
.notif .h { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-2); }
.notif .napp {
  width: 18px; height: 18px; border-radius: 5px; background: var(--gold); display: grid; place-items: center; color: var(--bg);
  font-size: 12px; font-weight: 700; font-family: 'Space Grotesk', sans-serif;
}
.notif .ti { font-size: 13px; font-weight: 600; margin-top: 5px; }
.notif .bd { font-size: 12.5px; color: var(--text-2); margin-top: 2px; line-height: 1.4; overflow-wrap: anywhere; }
.btn {
  height: 38px; padding: 0 18px; border-radius: 9px; background: var(--gold); color: var(--bg); font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; white-space: nowrap;
}
.btn .ms { font-size: 18px; }
.btn.red { background: var(--red); color: var(--text); }
.btn.blue { background: var(--blue); color: var(--text); }
.btn.green { background: var(--green); color: var(--text); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.ghost {
  height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-strong); color: var(--text-2);
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: none; white-space: nowrap;
}
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.foot .why { margin-left: auto; font-size: 12px; color: var(--text-3); }
.counter { font-size: 11.5px; color: var(--text-3); text-align: right; margin-top: 4px; }
.counter.over { color: var(--red-text); }

/* ---------- toast ---------- */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 10; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  background: var(--muted-bg); border-radius: 10px; padding: 10px 14px; font-size: 13px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.toast .ms { font-size: 20px; }
.toast .ok { color: var(--green-text); }
.toast .ko { color: var(--red-text); }
.toast button { border: 0; background: none; color: var(--gold-text); font-weight: 700; padding: 0; white-space: nowrap; }

/* ---------- history ---------- */
.page { flex: 1; padding: 18px 24px; min-width: 0; overflow-y: auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.page-head .page-title { flex: 1; }
.page-head select {
  height: 28px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text-2); font-size: 12px; padding: 0 8px;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 14px; }
th {
  text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 600;
  padding: 8px 10px; border-bottom: 1px solid rgba(80, 86, 121, .4);
}
td { padding: 10px; border-bottom: 1px solid rgba(80, 86, 121, .22); vertical-align: top; }
td .s { font-size: 12px; color: var(--text-3); margin-top: 2px; }
tr.row { cursor: pointer; }
tr.row:hover td { background: rgba(47, 52, 72, .4); }
td.clip { max-width: 360px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
tr.open td { background: rgba(47, 52, 72, .4); }
tr.more td { color: var(--text-2); line-height: 1.5; white-space: pre-line; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at 50% 30%, #262A3B, var(--bg) 70%); }
.lbox { width: 360px; max-width: 100%; background: var(--field); border: 1px solid rgba(80, 86, 121, .5); border-radius: 14px; padding: 26px; }
.lbox.refused { border-color: rgba(209, 75, 75, .4); }
.lbox .title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 17px; }
.lbox .input { margin-bottom: 12px; }
.lbox .btn { width: 100%; margin-top: 6px; }
.error { color: var(--red-text); font-size: 12.5px; margin-top: 10px; line-height: 1.4; }
.loading { min-height: 100vh; display: grid; place-items: center; color: var(--text-3); }


/* ---------- statistics (K7) ---------- */
.stats-page { max-width: 1240px; }
.stabs { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; border-bottom: 1px solid rgba(80, 86, 121, .4); font-size: 13.5px; }
.stabs a { padding: 0 0 9px; color: var(--text-3); text-decoration: none; }
.stabs a:hover { color: var(--text-2); }
.stabs a.on { color: var(--gold-text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--gold); }
.measured { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 12px; color: var(--text-3); line-height: 1.45; }
.measured .ms { font-size: 16px; flex: none; }
.measured b { color: var(--text-2); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 12px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.kpi { background: var(--card); border: 1px solid rgba(80, 86, 121, .45); border-radius: 12px; padding: 11px 13px; min-width: 0; }
.kpi .l { font-size: 11.5px; color: var(--text-3); }
.kpi .v { font-family: 'Space Grotesk', sans-serif; font-size: 26px; font-weight: 700; margin-top: 3px; }
.kpi .d { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.up { color: var(--green-text); }
.down { color: var(--red-text); }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.ch { display: flex; align-items: center; gap: 8px; }
.src { margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--text-3); text-align: right; }
.cnote { font-size: 12px; color: var(--text-3); margin-top: 10px; line-height: 1.45; }
svg.line { width: 100%; display: block; margin-top: 10px; }
svg.line .grid { stroke: rgba(80, 86, 121, .3); }
svg.line .axis { stroke: rgba(80, 86, 121, .55); }
svg.line .tick { font-size: 11px; fill: var(--text-3); font-family: 'Instrument Sans', sans-serif; }
svg.line .series { fill: none; stroke: var(--gold-text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.line .dot { fill: var(--gold-text); stroke: var(--card); stroke-width: 2; }
svg.line .value { font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 700; fill: var(--text); }
svg.line .hit { fill: transparent; }
svg.line .hit:hover { fill: rgba(255, 255, 255, .04); }
.hm { display: grid; grid-template-columns: 32px repeat(24, 1fr); gap: 2px; margin-top: 12px; }
.hm i { height: 19px; border-radius: 3px; display: block; }
.hm .hx { font-size: 10px; color: var(--text-3); }
.hm .hy { font-size: 10.5px; color: var(--text-3); align-self: center; }
.hl { display: flex; align-items: center; gap: 3px; margin-top: 8px; font-size: 10.5px; color: var(--text-3); }
.hl i { width: 16px; height: 10px; border-radius: 2px; display: block; }
.hl span { margin: 0 4px; }
.l0 { background: rgba(184, 159, 81, .07); }
.l1 { background: rgba(184, 159, 81, .2); }
.l2 { background: rgba(184, 159, 81, .38); }
.l3 { background: rgba(184, 159, 81, .6); }
.l4 { background: rgba(184, 159, 81, .9); }
.fn { display: grid; grid-template-columns: 150px 1fr 52px; align-items: center; gap: 10px; font-size: 12.5px; margin-top: 9px; color: var(--text-2); }
.fn .t { height: 14px; border-radius: 4px; background: rgba(80, 86, 121, .25); }
.fn .b { height: 100%; border-radius: 4px; background: var(--gold); min-width: 2px; }
.fn b { text-align: right; font-family: 'Space Grotesk', sans-serif; font-size: 13px; color: var(--text); }
table.ret th, table.ret td { text-align: center; }
table.ret th:first-child, table.ret td:first-child { text-align: left; }
table.ret td.l0, table.ret td.l1, table.ret td.l2 { color: var(--text); }
table.ret td.l3, table.ret td.l4 { color: var(--bg); font-weight: 600; }
table.ft { margin-top: 0; }
table.ft td { vertical-align: middle; padding: 8px 10px; }
table.ft tr.row:focus-visible { outline: 2px solid var(--gold); }
.fnm { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.fnm .ms { font-size: 18px; color: var(--gold-text); }
.ad { display: flex; align-items: center; gap: 8px; font-family: 'Space Grotesk', sans-serif; font-size: 13px; }
.tr { width: 110px; height: 8px; border-radius: 4px; background: rgba(80, 86, 121, .3); position: relative; flex: none; }
.tr b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--gold); }
.cmp { width: 170px; }
.cmp div { display: flex; align-items: center; gap: 6px; font-size: 12px; height: 16px; font-family: 'Space Grotesk', sans-serif; }
.cmp i { display: block; height: 6px; border-radius: 3px; flex: none; }
.cmp i.a, .lg i.a { background: var(--gold); }
.cmp i.o, .lg i.o { background: #6B7090; }
.lg { display: flex; gap: 5px; align-items: center; margin-top: 3px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.lg i { width: 10px; height: 6px; border-radius: 3px; display: inline-block; }
.vb { display: flex; align-items: flex-end; gap: 12px; height: 190px; margin-top: 8px; }
.vb > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.vb b { width: 100%; max-width: 44px; border-radius: 4px 4px 0 0; background: var(--gold); min-height: 2px; }
.vb span { font-family: 'Space Grotesk', sans-serif; font-size: 12px; }
.vb em { font-style: normal; font-size: 11px; color: var(--text-3); }
.rule {
  margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: rgba(74, 144, 226, .1); border: 1px solid rgba(74, 144, 226, .35);
  font-size: 13px; color: var(--text-2); line-height: 1.5;
}
.rule b { color: var(--text); }
.rule ul { margin: 6px 0 0; padding-left: 18px; }
.rule li { margin-top: 4px; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .shell { flex-direction: column; height: auto; min-height: 100vh; }
  .side {
    width: auto; flex-direction: row; align-items: center; gap: 4px; padding: 8px 12px; border-right: 0;
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; overflow-x: auto;
  }
  .brand { padding: 0 6px 0 0; }
  .brand > div:last-child { display: none; }
  .nv { width: auto; flex: none; padding: 0 8px; gap: 6px; }
  .nv .label { display: none; }
  .nv .n { margin-left: 0; }
  .who { margin: 0 0 0 auto; padding: 0; border: 0; }
  .who .name { display: none; }
  .main { flex-direction: column; }
  .list { width: auto; border-right: 0; }
  .items { overflow: visible; }
  .detail { display: none; }
  .shell.detail-open .list { display: none; }
  .shell.detail-open .detail { display: flex; }
  .shell.detail-open .side { display: none; }
  .back { display: inline-grid; margin: -6px 0 0 -8px; }
  .back .ms { font-size: 23px; }
  .dh { padding: 12px 16px 0; }
  .dh .t { font-size: 19px; }
  .dbody, .dbody.ideas { grid-template-columns: 1fr; padding: 12px 16px 18px; overflow: visible; }
  .answer { padding: 12px 16px 26px; max-height: none; position: sticky; bottom: 0; }
  .acts { display: grid; grid-template-columns: 1fr 1fr; }
  .ac { justify-content: center; }
  .keys { display: none; }
  .form { grid-template-columns: 1fr; }
  .page { padding: 14px 16px; }
  table, tbody, tr, td { display: block; }
  thead, th { display: none; }
  tr.row { border-bottom: 1px solid rgba(80, 86, 121, .3); padding: 8px 0; }
  td { border: 0; padding: 2px 0; }
  td.clip { max-width: none; white-space: normal; }
  .kpis, .kpis.three { grid-template-columns: 1fr 1fr; }
  .g2 { grid-template-columns: 1fr; }
  .fn { grid-template-columns: 110px 1fr 46px; }
  .hm { grid-template-columns: 26px repeat(24, 1fr); gap: 1px; }
  .hm .hx { font-size: 8px; }
  table.ft tr { border-bottom: 1px solid rgba(80, 86, 121, .3); padding: 8px 0; }
  table.ft td { padding: 3px 0; display: flex; align-items: center; gap: 10px; }
  table.ft td::before { content: attr(data-label); width: 96px; flex: none; font-size: 11.5px; color: var(--text-3); }
  table.ft td:first-child::before { content: none; }
  table.ret, table.ret tbody { display: table; width: 100%; }
  table.ret thead { display: table-header-group; }
  table.ret tr { display: table-row; }
  table.ret th, table.ret td { display: table-cell; padding: 8px 6px; }
}
