/* Átrio: tokens e componentes das maquetes. Sem dependência externa, abre offline.
   Valores e regras: docs/design/DESIGN.md. Trocar a marca = editar só o bloco de --accent*. */

:root {
  color-scheme: light;
  --bg: #fbfbfb;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --ink: #16171a;
  --ink-2: #4b4d54;
  --ink-3: #6b6e75;
  --line: #ececee;
  --axis: #dfdfe2;
  --accent-btn: #16171a;
  --accent-text: #16171a;
  --accent-soft: #f1f1f3;
  --good: #0ca30c;
  --good-text: #006300;
  --warn: #fab219;
  --serious: #ec835a;
  --crit: #d03b3b;
  --s1: #16171a;
  --s2: #9a9ca2;
  --o1: #d4d5d8;
  --o2: #9a9ca2;
  --o3: #5c5f66;
  --o4: #16171a;
  --on-fill: #ffffff;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  --font: "Inter Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #08090a;
    --surface: #0f1011;
    --surface-2: #17181a;
    --ink: #f7f8f8;
    --ink-2: #b4b6bb;
    --ink-3: #8a8d93;
    --line: #1f2023;
    --axis: #2b2c30;
    --accent-btn: #f7f8f8;
    --accent-text: #f7f8f8;
    --accent-soft: #1c1d20;
    --good-text: #4cb782;
    --s1: #f7f8f8;
    --s2: #6b6e75;
    --o1: #2b2c30;
    --o2: #5c5f66;
    --o3: #9a9ca2;
    --o4: #e6e7e9;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08090a;
  --surface: #0f1011;
  --surface-2: #17181a;
  --ink: #f7f8f8;
  --ink-2: #b4b6bb;
  --ink-3: #8a8d93;
  --line: #1f2023;
  --axis: #2b2c30;
  --accent-btn: #f7f8f8;
  --accent-text: #f7f8f8;
  --accent-soft: #1c1d20;
  --good-text: #4cb782;
  --s1: #f7f8f8;
  --s2: #6b6e75;
  --o1: #2b2c30;
  --o2: #5c5f66;
  --o3: #9a9ca2;
  --o4: #e6e7e9;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 14px; height: 14px; }

/* faixa de aviso da maquete */
.ribbon { height: 28px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 500; }

/* casca */
.app { display: grid; grid-template-columns: 56px minmax(0, 1fr); height: calc(100vh - 28px); }
.rail { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; background: var(--surface); border-right: 1px solid var(--line); }
.rail .logo { width: 32px; height: 32px; border-radius: 10px; background: var(--accent-btn); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 12px; }
.rail a, .rail button { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-2); background: none; border: 0; text-decoration: none; }
.rail a:hover, .rail button:hover { background: var(--surface-2); color: var(--ink); }
.rail a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
.rail a[aria-current="page"]::before { content: ""; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-btn); }
.rail .grow { flex: 1; }
.rail [data-tip]::after { left: 48px; top: 50%; transform: translateY(-50%); }

/* tooltip leve (também no foco do teclado) */
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; z-index: 30; pointer-events: none; opacity: 0; white-space: nowrap; padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 500; transition: opacity 120ms ease-out; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; }
.tip-top[data-tip]::after { bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); }

/* botões, campos, selos */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; transition: background 120ms ease-out, border-color 120ms ease-out; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent-btn); border-color: var(--accent-btn); color: #fff; height: 36px; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { border-color: color-mix(in srgb, var(--crit) 55%, var(--line)); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.field { width: 100%; height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); }
textarea.field { height: auto; padding: 8px 10px; resize: vertical; }
kbd { font: 500 11px/1 var(--font); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); }
.badge { --c: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--ink); }
.badge svg { color: var(--c); }
.badge.good { --c: var(--good); }
.badge.warn { --c: var(--warn); }
.badge.serious { --c: var(--serious); }
.badge.crit { --c: var(--crit); }
.badge.info { --c: var(--s1); }
.badge.mute { --c: var(--ink-3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-btn); flex: none; }
.dot.good { background: var(--good); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 600; border: 1px solid var(--line); flex: none; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.stack { display: inline-flex; } .stack .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); } .stack .avatar:first-child { margin-left: 0; }
.muted { color: var(--ink-3); }
.sec { color: var(--ink-2); }
.theme { margin-bottom: 4px; }

/* paleta de comandos */
dialog.cmd { width: min(560px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); margin-top: 12vh; }
dialog.cmd::backdrop { background: rgba(0, 0, 0, 0.35); }
dialog.cmd[open] { animation: pop 200ms ease-out; }
.cmd input { width: 100%; height: 48px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--line); background: none; outline: none; }
.cmd ul { list-style: none; margin: 0; padding: 8px; max-height: 320px; overflow: auto; }
.cmd li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 6px; }
.cmd li[aria-selected="true"], .cmd li:hover { background: var(--accent-soft); }
.cmd .grp { padding: 8px 10px 2px; font-size: 12px; font-weight: 600; color: var(--ink-3); }

@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============ CAIXA ============ */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-width: 0; height: 100%; }
.list { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); background: var(--surface); }
.list header { padding: 16px 16px 8px; display: grid; gap: 12px; }
.list h1 { font-size: 20px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.search { position: relative; } .search svg { position: absolute; left: 10px; top: 7px; color: var(--ink-3); } .search .field { padding-left: 34px; }
.tabs { display: flex; gap: 4px; padding: 0 12px 8px; border-bottom: 1px solid var(--line); }
.tabs button { height: 28px; padding: 0 10px; border-radius: 6px; border: 0; background: none; color: var(--ink-2); font-weight: 500; }
.tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-text); }
.tabs .n { margin-left: 4px; color: var(--ink-3); font-weight: 500; }
.rows { flex: 1; overflow: auto; list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; border-left: 3px solid transparent; }
.row:hover { background: var(--surface-2); }
.row[aria-current="true"] { background: var(--accent-soft); border-left-color: var(--accent-btn); }
.row .name { font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.row.read .name { font-weight: 500; }
.row .prev { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; grid-column: 2; }
.row .time { color: var(--ink-3); font-size: 12px; text-align: right; }
.row .meta { grid-column: 2 / 4; display: flex; gap: 6px; flex-wrap: wrap; }
.row .avatar { grid-row: 1 / 3; }
.list footer { padding: 8px 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; }

.thread { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-width: 0; height: 100%; }
.thread[hidden] { display: none; }
.conv { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; height: 100%; background: var(--bg); }
.conv > header { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.conv > header .who { flex: 1; min-width: 0; }
.conv > header h2 { font-size: 16px; font-weight: 600; }
.conv > header .actions { display: flex; gap: 8px; align-items: center; }
.msgs { overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.day { align-self: center; font-size: 12px; font-weight: 500; color: var(--ink-3); margin: 4px 0; }
.msg { max-width: min(520px, 78%); padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); animation: rise 180ms ease-out; }
.msg .t { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-3); }
.msg.out { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.msg.out .t { text-align: right; }
.msg.bot { align-self: flex-end; background: var(--surface); border: 1px dashed var(--axis); }
.msg .by { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 2px; }
.sys { align-self: center; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 500; }
.sys svg { color: var(--ink-3); }
.status { display: inline-flex; align-items: center; gap: 4px; }

.composer { background: var(--surface); border-top: 1px solid var(--line); padding: 8px 20px 16px; display: grid; gap: 8px; }
.window { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.window.closed { color: var(--ink); }
.window .pill { margin-left: auto; }
.box { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 8px; display: grid; gap: 8px; }
.box textarea { border: 0; background: none; outline: none; resize: none; min-height: 52px; width: 100%; }
.box .bar { display: flex; align-items: center; gap: 8px; }
.box .bar .grow { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 500; color: var(--ink-2); }
.chip:hover { border-color: var(--accent-text); color: var(--accent-text); }
.preview { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 10px 12px; font-size: 13px; }
.preview .lbl { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 4px; display: block; }
.banner { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--serious) 14%, var(--surface)); font-size: 13px; }
.banner svg { color: var(--serious); }

.case { overflow: auto; background: var(--surface); border-left: 1px solid var(--line); padding: 16px; display: grid; gap: 16px; align-content: start; }
.case h3 { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; letter-spacing: 0.02em; text-transform: uppercase; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; text-align: right; font-weight: 500; }
.meter { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--m, var(--s1)) 18%, var(--surface-2)); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--m, var(--s1)); }
.meter.warn { --m: var(--warn); } .meter.crit { --m: var(--crit); } .meter.good { --m: var(--good); }
.tl { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line); display: grid; gap: 10px; }
.tl li { position: relative; font-size: 13px; }
.tl li::before { content: ""; position: absolute; left: -19px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--axis); box-shadow: 0 0 0 2px var(--surface); }
.tl li.now::before { background: var(--accent-btn); }
.tl time { display: block; color: var(--ink-3); font-size: 12px; }
.tabs-t { display: flex; gap: 6px; flex-wrap: wrap; }
.mobile-back { display: none; }

@media (max-width: 1180px) { .thread { grid-template-columns: minmax(0, 1fr); } .case { display: none; } }
@media (max-width: 760px) {
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox .list { display: none; }
  .inbox.show-list .list { display: flex; }
  .inbox.show-list .thread { display: none; }
  .mobile-back { display: inline-flex; }
  .app { grid-template-columns: 48px minmax(0, 1fr); }
  .btn, .chip, .tabs button { min-height: 44px; }
}

/* ============ PAINÉIS ============ */
.page { overflow: auto; height: 100%; padding: 24px 32px 48px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-h h1 { font-size: 20px; font-weight: 600; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 0 20px; }
.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { height: 28px; padding: 0 12px; border-radius: 6px; border: 0; background: none; color: var(--ink-2); font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.card { grid-column: span 12; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.card h2 { font-size: 14px; font-weight: 600; }
.card .sub { color: var(--ink-3); font-size: 12px; margin-top: -8px; }
@media (min-width: 900px) { .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 4px; }
.tile .lbl { color: var(--ink-2); font-size: 12px; font-weight: 500; }
.tile .val { font-size: 32px; line-height: 1.1; font-weight: 600; }
.tile .val small { font-size: 14px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.tile .d { font-size: 12px; font-weight: 500; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.tile .d.up { color: var(--good-text); }
.tile .d.dn { color: var(--ink-2); }
.spark { width: 100%; height: 28px; margin-top: 4px; }
.spark path { fill: none; stroke: var(--axis); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark circle { fill: var(--s1); stroke: var(--surface); stroke-width: 2; }

.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; }
.hbar .nm { color: var(--ink-2); font-size: 13px; }
.hbar .track { display: flex; align-items: center; gap: 8px; }
.hbar .bar { height: 20px; border-radius: 0 4px 4px 0; background: var(--b, var(--s1)); min-width: 2px; }
.hbar .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar .v small { font-weight: 400; color: var(--ink-3); }
.seg-bar { display: flex; gap: 2px; height: 28px; }
.seg-bar > div { display: flex; align-items: center; padding: 0 10px; border-radius: 4px; color: var(--on-fill); font-weight: 600; font-size: 12px; white-space: nowrap; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--ink-2); font-size: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: right; font-weight: 500; color: var(--ink-3); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { text-align: right; padding: 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tfoot td { font-weight: 600; border-bottom: 0; }
.meters { display: grid; gap: 14px; }
.mrow { display: grid; gap: 6px; }
.mrow .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mrow .top b { font-variant-numeric: tabular-nums; }
.health { display: grid; gap: 10px; }
.health .r { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.health .r:last-child { border-bottom: 0; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--crit) 10%, var(--surface)); }
.alert svg { color: var(--crit); margin-top: 2px; }
.tooltip { position: fixed; z-index: 50; pointer-events: none; padding: 6px 10px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 500; opacity: 0; transition: opacity 120ms ease-out; max-width: 260px; }
.tooltip.on { opacity: 1; }
dialog.confirm { width: min(440px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); padding: 20px; }
dialog.confirm::backdrop { background: rgba(0, 0, 0, 0.35); }
dialog.confirm h2 { font-size: 16px; margin-bottom: 8px; }
dialog.confirm .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ajustes de altura (cada coluna rola sozinha) */
main, .inbox, #threads { min-height: 0; min-width: 0; }
#threads { height: 100%; }
.list, .rows, .conv, .case, .msgs { min-height: 0; }
.app > main { height: 100%; overflow: hidden; }

/* grade aninhada: coluna única no estreito, 6 colunas no largo */
.grid > .c4, .grid > .c5, .grid > .c6, .grid > .c7, .grid > .c8 { grid-column: span 12; }
@media (min-width: 900px) {
  .grid > .c4 { grid-column: span 4; } .grid > .c5 { grid-column: span 5; } .grid > .c6 { grid-column: span 6; }
  .grid > .c7 { grid-column: span 7; } .grid > .c8 { grid-column: span 8; }
}


/* ============ CAMPANHAS E AUTOMAÇÕES ============ */
:root { --s3: #1baf7a; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) { --s3: #199e70; } }
:root[data-theme="dark"] { --s3: #199e70; }
.two { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: 100%; min-width: 0; }
.side { background: var(--surface); border-right: 1px solid var(--line); overflow: auto; min-height: 0; display: flex; flex-direction: column; }
.side header { padding: 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.side h1 { font-size: 20px; font-weight: 600; }
.item { display: grid; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; cursor: pointer; }
.item:hover { background: var(--surface-2); }
.item[aria-current="true"] { background: var(--accent-soft); border-left-color: var(--accent-btn); }
.item .t { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.item .s { color: var(--ink-2); font-size: 13px; }
.work { overflow: auto; padding: 24px 32px 48px; min-height: 0; }
.work .page-h { margin-bottom: 8px; }
.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--axis); transition: background 120ms ease-out; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 120ms ease-out; }
.switch input:checked + i { background: var(--accent-btn); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.sentence { display: grid; gap: 12px; }
.step { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; align-items: start; }
.step > .k { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .02em; padding-top: 10px; }
.blocks { display: flex; flex-wrap: wrap; gap: 8px; }
.blk { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.blk svg { color: var(--ink-3); }
.blk b { font-weight: 600; }
.blk .x { color: var(--ink-3); background: none; border: 0; padding: 0 2px; }
.blk.add { border-style: dashed; color: var(--ink-2); background: none; }
.blk.add:hover { border-color: var(--accent-text); color: var(--accent-text); }
.rule-note { display: flex; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; }
.rule-note svg { color: var(--accent-text); margin-top: 2px; }
.res { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--surface-2); }
.res.ok { background: color-mix(in srgb, var(--good) 14%, var(--surface)); }
.res.skip { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); }
.weekbar { display: grid; grid-template-columns: 44px repeat(14, 1fr); gap: 2px; align-items: center; font-size: 11px; color: var(--ink-3); }
.weekbar .d { height: 16px; border-radius: 3px; background: var(--surface-2); }
.weekbar .d.on { background: var(--s1); }
.weekbar .d.hol { background: repeating-linear-gradient(135deg, var(--axis) 0 3px, transparent 3px 6px); }
.stepper { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kvgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kvgrid .cell { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.kvgrid .cell span { color: var(--ink-3); font-size: 12px; font-weight: 500; }
.kvgrid .cell b { font-weight: 600; }
@media (max-width: 900px) { .two { grid-template-columns: minmax(0, 1fr); } .side { max-height: 40vh; } .step { grid-template-columns: minmax(0, 1fr); } .step > .k { padding-top: 0; } }
