/* heal dashboard — the same look as heal.rip: warm paper in light mode, soft black in dark mode,
   Inter, rounded cards. No inline styles anywhere (the page's security policy forbids them). */
@font-face { font-family: Inter; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --paper: #efeee9; --paper-2: #e8e6e0; --surface: #f8f7f3; --raised: #fbfaf7;
  --ink: #1d1d1f; --ink-2: #4a4a4f; --ink-3: #86868b;
  --line: rgba(29,29,31,.09); --fill: rgba(118,118,128,.12); --fill-2: rgba(118,118,128,.2);
  --solid: #1d1d1f; --on-solid: #fff;
  --blue: #0a84ff; --green: #248a3d; --amber: #c25e00; --red: #d70015;
  --ok-bg: rgba(52,199,89,.14); --warn-bg: rgba(255,159,10,.16); --bad-bg: rgba(255,59,48,.12);
  --mention: #4752c4; --mention-bg: rgba(88,101,242,.12);
  --shadow: 0 1px 2px rgba(40,38,34,.05), 0 8px 22px -12px rgba(40,38,34,.2);
  --lift: 0 1px 1px rgba(40,38,34,.04), 0 22px 46px -16px rgba(40,38,34,.32);
  --radius: 20px;
  --ease: cubic-bezier(.32,.72,0,1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e0e10; --paper-2: #141416; --surface: #18181b; --raised: #1c1c20;
    --ink: #f4f4f5; --ink-2: #c6c6cc; --ink-3: #8e8e96;
    --line: rgba(255,255,255,.08); --fill: rgba(255,255,255,.07); --fill-2: rgba(255,255,255,.13);
    --solid: #f4f4f5; --on-solid: #111;
    --green: #5fd67f; --amber: #f0b232; --red: #ff6b62;
    --mention: #c9cdfb; --mention-bg: rgba(88,101,242,.3);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 26px -14px rgba(0,0,0,.6);
    --lift: 0 2px 4px rgba(0,0,0,.3), 0 26px 50px -18px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --paper: #0e0e10; --paper-2: #141416; --surface: #18181b; --raised: #1c1c20;
  --ink: #f4f4f5; --ink-2: #c6c6cc; --ink-3: #8e8e96;
  --line: rgba(255,255,255,.08); --fill: rgba(255,255,255,.07); --fill-2: rgba(255,255,255,.13);
  --solid: #f4f4f5; --on-solid: #111;
  --green: #5fd67f; --amber: #f0b232; --red: #ff6b62;
  --mention: #c9cdfb; --mention-bg: rgba(88,101,242,.3);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 26px -14px rgba(0,0,0,.6);
  --lift: 0 2px 4px rgba(0,0,0,.3), 0 26px 50px -18px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: radial-gradient(1100px 420px at 50% -160px, var(--glow), transparent 70%) no-repeat, var(--paper); color: var(--ink); font: 15px/1.5 Inter, -apple-system, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: .9em; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--champ); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

.boot { min-height: 100dvh; display: grid; place-items: center; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--fill-2); border-top-color: var(--ink-3); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 max(16px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.brand img { width: 28px; height: 28px; border-radius: 50%; }
.brand span { color: var(--ink-3); font-weight: 500; }
.bar .grow { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px; border-radius: 18px; background: var(--fill); font-weight: 600; font-size: 14px; max-width: 46vw; }
.chip:hover { background: var(--fill-2); }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip img, .chip .ph { width: 24px; height: 24px; border-radius: 50%; flex: none; }
.ph { display: grid; place-items: center; background: var(--fill-2); color: var(--ink-3); font-weight: 700; font-size: 11px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: var(--fill); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-btn { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 20px; font-weight: 600; font-size: 14.5px; background: var(--fill); transition: transform .2s var(--ease), background .15s; }
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.97); }
.btn.solid { background: var(--solid); color: var(--on-solid); }
.btn.solid:hover { opacity: .88; }
.btn.danger { background: var(--bad-bg); color: var(--red); }
.btn.small { height: 32px; padding: 0 13px; font-size: 13.5px; border-radius: 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- pages ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 28px max(18px, env(safe-area-inset-left)) 80px; }
.center { min-height: calc(100dvh - 60px); display: grid; place-items: center; padding: 24px; }
.hero { max-width: 460px; text-align: center; }
.hero img { display: block; width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 22px; box-shadow: var(--shadow); }
.hero h1 { font-size: 32px; letter-spacing: -.02em; line-height: 1.15; }
.hero p { margin: 12px 0 26px; color: var(--ink-2); font-size: 16px; }
.hero small { display: block; margin-top: 18px; color: var(--ink-3); font-size: 13px; }
.title { font-size: 28px; letter-spacing: -.02em; font-weight: 700; }
.lead { color: var(--ink-2); margin-top: 6px; max-width: 640px; }
.section-label { display: flex; align-items: center; gap: 14px; margin: 34px 0 14px; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.section-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* servers */
.server { display: flex; align-items: center; gap: 14px; padding: 16px; text-align: left; width: 100%; transition: transform .25s var(--ease), box-shadow .25s; }
.server:not(.locked):hover { transform: translateY(-2px); box-shadow: var(--lift); }
.server img, .server .ph { width: 52px; height: 52px; border-radius: 16px; flex: none; font-size: 18px; }
.server b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server small { color: var(--ink-3); }
.server .txt { min-width: 0; flex: 1; }
.server.locked { cursor: default; } .server.locked > img, .server.locked > .ph, .server.locked .txt > b, .server.locked .txt > small { opacity: .55; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11.5px; font-weight: 600; background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.tag.premium { background: rgba(175,82,222,.16); color: #af52de; }
.tag.ok { background: var(--ok-bg); color: var(--green); }
.tag.warn { background: var(--warn-bg); color: var(--amber); }

/* ---------- server layout ---------- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 26px; max-width: 1240px; margin: 0 auto; padding: 22px max(18px, env(safe-area-inset-left)) 80px; align-items: start; }
.side { position: sticky; top: 82px; max-height: calc(100dvh - 104px); overflow: auto; padding: 10px; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 12px; background: var(--fill); margin-bottom: 8px; }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; }
.side h4 { margin: 14px 10px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.nav { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; height: 36px; padding: 0 10px 0 12px; border-radius: 10px; text-align: left; font-weight: 500; font-size: 14.5px; color: var(--ink-2); transition: background .15s, color .15s; }
.nav:hover { background: var(--fill); color: var(--ink); }
.nav[aria-current="page"] { background: var(--fill-2); color: var(--ink); font-weight: 600; }
.nav[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2.5px; border-radius: 2px; background: var(--champ-metal); }
.nav span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glyph { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav .glyph { opacity: .75; }
.nav[aria-current="page"] .glyph { opacity: 1; }
/* module icons: plain line icons on a neutral tile, like on heal.rip */
.tile { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; color: var(--ink); background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 7%, var(--surface)), color-mix(in srgb, var(--ink) 3%, var(--surface))); box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.06); }
.tile .glyph { width: 17px; height: 17px; }
.tile.big { width: 48px; height: 48px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.06), 0 10px 22px -12px rgba(0,0,0,.35); }
.tile.big .glyph { width: 24px; height: 24px; stroke-width: 1.7; }

.head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.head img, .head .ph { width: 60px; height: 60px; border-radius: 18px; font-size: 22px; flex: none; }
.head h1 { font-size: 26px; letter-spacing: -.02em; }
.head p { color: var(--ink-2); }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { padding: 16px 18px; }
.stat small { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.stat b { display: block; font-size: 28px; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat b.small { font-size: 19px; margin: 12px 0 4px; }
.stat.link { transition: border-color .2s, transform .25s var(--ease); }
.stat.link:hover { border-color: var(--champ-line); transform: translateY(-2px); }
.stat span { color: var(--ink-3); font-size: 13px; }
.peek { padding: 16px 18px; }
.peek > small { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.module { display: flex; align-items: center; gap: 15px; padding: 16px 16px 16px 16px; text-align: left; width: 100%; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.module:hover { transform: translateY(-2px); box-shadow: var(--lift); border-color: var(--champ-line); }
.module .m-txt { flex: 1; min-width: 0; }
.module b { display: block; font-size: 15px; }
.module .m-txt span { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13.5px; line-height: 1.4; }
.module .m-chev { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .25s var(--ease); }
.module:hover .m-chev { opacity: 1; transform: none; }
.server-head img, .server-head .ph { width: 68px; height: 68px; border-radius: 50%; }
.ring { box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--champ-line), 0 14px 30px -14px rgba(0,0,0,.5); }
.server-head h1 { font-size: 30px; line-height: 1.15; }
.prem-mark { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 3px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--champ-ink); }
.prem-mark .star { width: 12px; height: 12px; }
.foot-note { margin-top: 26px; color: var(--ink-3); font-size: 13.5px; max-width: 640px; }

/* ---------- commands ---------- */
.family { margin-top: 14px; overflow: hidden; }
.family > header { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px 10px; }
.family > header b { font-size: 16px; }
.family > header span { color: var(--ink-3); font-size: 13.5px; }
.cmd { border-top: 1px solid var(--line); }
.cmd > button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 18px; text-align: left; }
.cmd > button:hover { background: var(--fill); }
.cmd .name { flex: none; width: 210px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd .name i { font-style: normal; color: var(--ink-3); font-weight: 500; }
.cmd .what { flex: 1; min-width: 0; color: var(--ink-2); font-size: 14px; }
.cmd .chev { width: 16px; height: 16px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); flex: none; }
.cmd.open .chev { transform: rotate(90deg); }
.cmd.open > button { background: var(--fill); }
.form { padding: 6px 18px 18px; background: var(--raised); border-top: 1px solid var(--line); }
.perms { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 2px; }
.field { margin-top: 14px; }
.field > label, .field > .lbl { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; text-transform: capitalize; }
.field .opt { font-weight: 500; font-size: 12px; color: var(--ink-3); text-transform: none; }
.field .hint { margin-top: 5px; font-size: 12.5px; color: var(--ink-3); }
.in, select.in, textarea.in { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.in { min-height: 76px; resize: vertical; line-height: 1.45; }
.in:focus { border-color: var(--champ); box-shadow: 0 0 0 3px color-mix(in srgb, var(--champ) 20%, transparent); }
select.in { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 17px, calc(100% - 13px) 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.in[multiple] { background-image: none; min-height: 132px; padding: 6px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--fill); gap: 2px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 6px 18px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--champ); }
.who { position: relative; }
.who .results { position: absolute; z-index: 5; left: 0; right: 0; top: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--lift); overflow: hidden; }
.who .results button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; text-align: left; }
.who .results button:hover { background: var(--fill); }
.who .results img { width: 26px; height: 26px; border-radius: 50%; }
.who .results small { color: var(--ink-3); }
.who .picked { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 5px 8px 5px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.who .picked img { width: 28px; height: 28px; border-radius: 50%; }
.who .picked small { color: var(--ink-3); }
.who .picked button { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; color: var(--ink-3); font-size: 18px; line-height: 1; }
.who .picked button:hover { background: var(--fill); }
.more { margin-top: 14px; }
.more > summary { cursor: pointer; color: var(--ink-3); font-size: 13.5px; font-weight: 600; list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: "+ "; }
.more[open] > summary::before { content: "− "; }
.actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.actions .syn { color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

/* answers */
.out { margin-top: 16px; display: grid; gap: 10px; }
.answer { padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; }
.answer.err { background: var(--bad-bg); border-color: transparent; color: var(--red); font-weight: 600; }
.answer.ask { background: var(--warn-bg); border-color: transparent; }
.answer .ask-actions { display: flex; gap: 10px; margin-top: 12px; }
.answer p { margin: 0; white-space: pre-wrap; }
.answer p + p, .answer p + img, .answer img + p { margin-top: 8px; }
.answer h3 { font-size: 16px; margin: 2px 0 4px; }
.answer .sub { color: var(--ink-3); font-size: 12.5px; }
.answer blockquote { margin: 4px 0; padding-left: 10px; border-left: 3px solid var(--fill-2); color: var(--ink-2); }
.answer pre { margin: 6px 0; padding: 10px 12px; border-radius: 10px; background: var(--fill); overflow: auto; font-size: 13px; }
.answer code { padding: 1px 5px; border-radius: 6px; background: var(--fill); }
.answer pre code { padding: 0; background: none; }
.answer hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.answer img.pic { max-width: min(100%, 520px); border-radius: 12px; display: block; }
.answer img.emo { width: 1.25em; height: 1.25em; vertical-align: -.25em; display: inline; }
.answer a { color: var(--blue); }
.mention { padding: 0 4px; border-radius: 5px; background: var(--mention-bg); color: var(--mention); font-weight: 600; white-space: nowrap; }
.notice { padding: 14px 16px; border-radius: 14px; background: var(--fill); color: var(--ink-2); }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding-top: 14px; }
  .side { position: fixed; z-index: 30; inset: 60px 0 0 0; max-height: none; border-radius: 0; border: 0; transform: translateX(-102%); transition: transform .35s var(--ease); background: var(--paper); }
  .side.open { transform: none; }
  .menu-btn { display: grid; }
  .cmd > button { flex-wrap: wrap; gap: 4px 14px; }
  .cmd .name { width: auto; flex: 1 1 100%; }
  .cmd .chev { display: none; }
  .title { font-size: 24px; }
  .brand span { display: none; }
}

/* ---------- premium: black and champagne gold, quiet but unmistakable ---------- */
:root {
  --champ: #b08a3e; --champ-ink: #8a6a2b;
  --champ-metal: linear-gradient(135deg, #f7e7bf 0%, #d9b46a 38%, #b8913f 62%, #ecd49a 100%);
  --champ-line: rgba(176,138,62,.42);
  --prem-bg: #141416; --prem-ink: #f1dfae;
}
:root { --glow: rgba(176,138,62,.10); }
:root[data-theme="dark"] { --glow: rgba(217,180,106,.09); --champ: #d9b46a; --champ-ink: #e2c584; --champ-line: rgba(217,180,106,.38); --prem-bg: #1b1a17; }
.star { width: 13px; height: 13px; flex: none; fill: currentColor; }
.prem-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 13px 0 10px; margin-bottom: 16px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; color: var(--prem-ink); background: var(--prem-bg); box-shadow: inset 0 0 0 1px var(--champ-line), 0 6px 18px -8px rgba(0,0,0,.45); }
.prem-pill .star { width: 14px; height: 14px; color: #e3c27a; filter: drop-shadow(0 0 4px rgba(227,194,122,.45)); }
.btn.premium { gap: 7px; color: var(--prem-ink); background: var(--prem-bg); box-shadow: inset 0 0 0 1px var(--champ-line), 0 8px 20px -10px rgba(0,0,0,.5); }
.btn.premium .star { color: #e3c27a; }
.btn.premium:hover { box-shadow: inset 0 0 0 1px var(--champ), 0 10px 24px -10px rgba(0,0,0,.55); }
:root[data-theme="dark"] .btn.premium { color: #1c1609; background: var(--champ-metal); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 22px -10px rgba(217,180,106,.45); }
:root[data-theme="dark"] .btn.premium .star { color: #1c1609; }
:root[data-theme="dark"] .btn.premium:hover { filter: brightness(1.05); }
.prem-note { display: flex; align-items: center; gap: 16px; margin: 22px 0 4px; padding: 16px 16px 16px 20px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--champ-line), var(--shadow); }
.prem-note p { flex: 1; margin: 0; color: var(--ink-2); font-size: 14.5px; }
.prem-note p b { color: var(--ink); }
.needs { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--champ-ink); }
.needs .star { width: 12px; height: 12px; }
.prem-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; color: var(--ink-3); font-size: 14px; }
.btn.small .star { width: 12px; height: 12px; }
.hero small a { color: var(--champ-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--champ-line); text-underline-offset: 3px; }
.hero small a:hover { text-decoration-color: currentColor; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }

/* ---------- back to heal.rip ---------- */
.home-link { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px 0 8px; border-radius: 17px; color: var(--ink-2); font-size: 14px; font-weight: 500; transition: background .15s, color .15s; }
.home-link:hover { background: var(--fill); color: var(--ink); }
.home-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- light / dark switch, same motion as heal.rip ---------- */
.icon-btn.theme { position: relative; transition: transform .2s var(--ease), background .15s; }
.icon-btn.theme:active { transform: scale(.92); }
.icon-btn.theme svg { position: absolute; transition: transform 1s var(--ease), opacity .5s; }
.icon-btn.theme .sun, :root[data-theme="dark"] .icon-btn.theme .moon { opacity: 0; transform: rotate(-120deg) scale(.3); }
:root[data-theme="dark"] .icon-btn.theme .sun { opacity: 1; transform: none; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; mask-image: radial-gradient(circle closest-side, #000 68%, rgba(0,0,0,.55) 82%, transparent 100%); -webkit-mask-image: radial-gradient(circle closest-side, #000 68%, rgba(0,0,0,.55) 82%, transparent 100%); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: 0 0; -webkit-mask-size: 0 0; }
::view-transition-group(root) { animation: none; }
html.theme-fade, html.theme-fade * { transition: background-color .8s ease, color .8s ease, border-color .8s ease, fill .8s ease, stroke .8s ease, box-shadow .8s ease !important; }

/* ---------- 404 ---------- */
.nf { max-width: 460px; text-align: center; animation: nf-in .6s var(--ease) both; }
.nf-num { display: flex; justify-content: center; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 112px; font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--ink); }
.nf-0 { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; box-shadow: inset 0 0 0 10px var(--ink); overflow: hidden; }
.nf-0 img { width: 60px; height: 60px; border-radius: 50%; animation: nf-look 4.5s var(--ease) infinite; }
.nf h1 { font-size: 26px; letter-spacing: -.02em; }
.nf p { margin: 10px 0 24px; color: var(--ink-2); }
main#main .nf { margin: 60px auto; }
@keyframes nf-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes nf-look { 0%, 30%, 100% { transform: translateX(0); } 40%, 55% { transform: translateX(-9px) rotate(-6deg); } 65%, 80% { transform: translateX(9px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .nf, .nf-0 img { animation: none; } .icon-btn.theme svg { transition: none; } }

@media (max-width: 640px) {
  .prem-note { flex-direction: column; align-items: flex-start; }
  .home-link span { display: none; }
  .bar { gap: 4px; }
  .bar .chip.srv { display: none; }
  .bar .chip.me { padding: 0 6px; } .bar .chip.me > span:not(.ph) { display: none; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 12px; } .stat b { font-size: 21px; } .stat b.small { font-size: 14px; margin: 8px 0 0; } .stat span { display: none; }
  .server-head h1 { font-size: 24px; } .server-head img, .server-head .ph { width: 56px; height: 56px; }
  .home-link { padding: 0 8px; }
  .nf-num { font-size: 84px; } .nf-0 { width: 70px; height: 70px; box-shadow: inset 0 0 0 8px var(--ink); } .nf-0 img { width: 44px; height: 44px; }
}

/* ---------- pages with switches (setup.js) ---------- */
.setup, .set-fs { display: grid; gap: 16px; }
.set-fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.setup-wait { display: grid; place-items: center; min-height: 180px; }
#setup.busy { cursor: progress; }
#setup.busy button, #setup.busy select, #setup.busy input, #setup.busy label { pointer-events: none; }
.set-card { overflow: visible; }
.set-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; }
.set-title h2 { font-size: 17px; letter-spacing: -.01em; font-weight: 650; }
.set-title p { margin-top: 3px; color: var(--ink-3); font-size: 13.5px; max-width: 580px; }
.set-head .btn svg, .msg-top .btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.set-row { position: relative; border-top: 1px solid var(--line); transition: background .3s; }
.set-card > .set-row:first-child { border-top: 0; }
.set-card > .set-row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.set-card > .set-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.set-card > .set-row:only-child { border-radius: var(--radius); }
.set-row.on::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2.5px; border-radius: 2px; background: var(--champ-metal); }
.set-main { display: flex; align-items: center; gap: 16px; min-height: 66px; padding: 13px 20px; }
.set-txt { flex: 1; min-width: 0; }
.set-txt b { display: block; font-size: 15px; font-weight: 600; }
.set-txt span { display: block; margin-top: 1px; color: var(--ink-3); font-size: 13.5px; line-height: 1.45; }
.set-txt code { padding: 1px 5px; border-radius: 6px; background: var(--fill); font-size: 12px; }
.set-row.big .set-main { min-height: 84px; }
.set-row.big .set-txt b { font-size: 16.5px; }
.ctl { flex: none; width: 260px; display: flex; justify-content: flex-end; }
.ctl > .in, .ctl > select.in { width: 100%; }
.set-opts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; padding: 0 20px 18px; animation: opts-in .4s var(--ease); }
@keyframes opts-in { from { opacity: 0; transform: translateY(-4px); } }
.opt { display: grid; gap: 5px; }
.opt > span:first-child { font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; }
.opt .in, .ctl .in { min-height: 38px; padding: 7px 11px; border-radius: 11px; }
.opt select.in, .ctl select.in { padding-right: 34px; background-position: calc(100% - 18px) 16px, calc(100% - 13px) 16px; }
.opt.wide .in { width: 100%; }
.num { display: inline-flex; align-items: center; gap: 8px; }
.num .in { width: 82px; font-variant-numeric: tabular-nums; }
.num small { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }

/* the switch: black and champagne in light mode, champagne metal in dark mode */
.sw { position: relative; flex: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fill-2); transition: background .3s var(--ease), box-shadow .3s; }
.sw i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2), 0 0 0 .5px rgba(0,0,0,.05); transition: transform .38s var(--ease), background .3s; }
.sw[aria-checked="true"] { background: var(--prem-bg); box-shadow: inset 0 0 0 1px var(--champ-line); }
.sw[aria-checked="true"] i { transform: translateX(20px); background: var(--champ-metal); box-shadow: 0 2px 6px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.5); }
:root[data-theme="dark"] .sw[aria-checked="true"] { background: var(--champ-metal); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 18px -4px rgba(217,180,106,.45); }
:root[data-theme="dark"] .sw[aria-checked="true"] i { background: #fff; }
.sw:active i { width: 31px; }
.sw[aria-checked="true"]:active i { transform: translateX(16px); }
.sw:disabled { opacity: .45; cursor: not-allowed; }

.tick { position: relative; display: inline-flex; align-items: center; gap: 9px; min-height: 38px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.tick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tick .box { width: 20px; height: 20px; flex: none; border-radius: 6px; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--fill-2); transition: background .2s, box-shadow .2s; }
.tick .box svg { width: 14px; height: 14px; fill: none; stroke: var(--prem-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .3s var(--ease); }
.tick input:checked + .box { background: var(--prem-bg); box-shadow: inset 0 0 0 1px var(--champ-line); }
.tick input:checked + .box svg { opacity: 1; transform: none; }
:root[data-theme="dark"] .tick input:checked + .box { background: var(--champ-metal); box-shadow: none; }
:root[data-theme="dark"] .tick .box svg { stroke: #1c1609; }
.tick input:focus-visible + .box { outline: 2px solid var(--champ); outline-offset: 2px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 16px; background: var(--fill); color: var(--ink-2); font-size: 13.5px; font-weight: 600; transition: background .2s, color .2s, box-shadow .2s, transform .2s var(--ease); }
.pill:hover { background: var(--fill-2); color: var(--ink); }
.pill:active { transform: scale(.96); }
.pill svg { width: 0; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: width .25s var(--ease); }
.pill.on { padding-left: 10px; background: var(--prem-bg); color: var(--prem-ink); box-shadow: inset 0 0 0 1px var(--champ-line); }
.pill.on svg { width: 14px; color: #e3c27a; }
:root[data-theme="dark"] .pill.on { background: color-mix(in srgb, var(--champ) 16%, var(--surface)); color: var(--champ-ink); }
.pill:disabled { opacity: .5; cursor: not-allowed; }
.more { margin-top: 12px; }
.more .pills { margin-top: 10px; }

.set-block, .set-pad { padding: 16px 20px 18px; border-top: 1px solid var(--line); }
.set-head + .set-pad { border-top: 0; padding-top: 2px; }
.pg-head { margin-bottom: 12px; }
.pg-head b { display: block; font-size: 14.5px; }
.pg-head span { color: var(--ink-3); font-size: 13px; }
.people { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.person { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; height: 40px; padding: 0 5px 0 5px; border-radius: 20px; background: var(--fill); }
.person.plain { padding-left: 14px; }
.person img, .person .ph { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.p-txt { display: flex; align-items: baseline; gap: 6px; min-width: 0; padding-right: 8px; }
.p-txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-txt small { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.person .tag { margin-right: 6px; background: var(--prem-bg); color: var(--prem-ink); }
.x { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); }
.x:hover { background: var(--fill-2); color: var(--ink); }
.x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.none { margin-bottom: 12px; color: var(--ink-3); font-size: 13.5px; }
.none.pad { padding: 0 20px 18px; margin: 0; }
.who.add { max-width: 420px; }
.add-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.add-row .who.add { max-width: none; }
.add-row .in { min-height: 40px; }
.set-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13.5px; }
.set-inline select.in { width: 240px; min-height: 36px; padding: 6px 34px 6px 11px; border-radius: 11px; background-position: calc(100% - 18px) 15px, calc(100% - 13px) 15px; }
.set-lock { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--champ-line); color: var(--ink-2); font-size: 14px; }
.set-lock svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--champ-ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.raid { display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 18px; background: var(--bad-bg); border-color: transparent; box-shadow: none; }
.raid > svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; }
.raid > div { flex: 1; min-width: 0; }
.raid b { display: block; color: var(--red); }
.raid span { color: var(--ink-2); font-size: 13.5px; }
.log .dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--fill-2); transition: background .3s, box-shadow .3s; }
.log.on .dot { background: var(--champ); box-shadow: 0 0 0 3px color-mix(in srgb, var(--champ) 22%, transparent); }
.log.on::before { display: none; }

.segs { display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 12px; background: var(--fill); }
.segs button { height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background .2s, color .2s; }
.segs button:hover { color: var(--ink); }
.segs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 0 20px 18px; }
.kv > div { padding: 12px 14px; border-radius: 14px; background: var(--fill); min-width: 0; }
.kv small { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.kv b { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv + .set-row { border-top: 1px solid var(--line); }
.danger-row .set-txt b { color: var(--red); }
.set-empty { display: grid; justify-items: center; gap: 10px; padding: 36px 24px 32px; text-align: center; }
.set-empty .tile { margin-bottom: 6px; }
.set-empty h2 { font-size: 20px; letter-spacing: -.01em; }
.set-empty p { max-width: 470px; margin-bottom: 10px; color: var(--ink-2); }

/* welcome, goodbye and boost messages */
.msg { padding: 14px 20px 16px; border-top: 1px solid var(--line); }
.set-head + .msg, .set-head + .msg-edit { border-top: 0; padding-top: 2px; }
.msg-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.msg-top .grow, .msg-foot .grow { flex: 1; }
.msg-ch { font-weight: 600; }
.msg-top .btn.on { background: var(--prem-bg); color: var(--prem-ink); }
.msg-src { margin: 10px 0 0; padding: 10px 12px; max-height: 170px; overflow: auto; border-radius: 12px; background: var(--fill); color: var(--ink-2); font: 12.5px/1.55 "JetBrains Mono", ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-prev { display: grid; gap: 8px; margin-top: 10px; }
.msg-prev > small { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.msg-edit { display: grid; gap: 12px; padding: 16px 20px 18px; border-top: 1px solid var(--line); background: var(--raised); border-radius: 0 0 var(--radius) var(--radius); }
.msg-edit textarea.in { min-height: 120px; font: 13.5px/1.55 "JetBrains Mono", ui-monospace, Menlo, monospace; }
.vars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vars > span { margin-right: 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.var { height: 26px; padding: 0 9px; border-radius: 8px; background: var(--fill); color: var(--ink-2); font: 12px "JetBrains Mono", ui-monospace, Menlo, monospace; }
.var:hover { background: var(--fill-2); color: var(--ink); }
.msg-edit .hint { color: var(--ink-3); font-size: 12.5px; }
.msg-edit .hint code { padding: 1px 5px; border-radius: 6px; background: var(--fill); font-size: 11.5px; }
.msg-foot { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }

/* every command, under the switches */
.adv { margin-top: 30px; }
.adv > summary { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; list-style: none; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); order: 2; }
.adv > summary small { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--fill); font-size: 11px; letter-spacing: 0; }
.adv > summary .chev { order: 3; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.adv[open] > summary .chev { transform: rotate(90deg); }
.adv > summary:hover { color: var(--ink-2); }
.adv-note { margin: 6px 0 2px; color: var(--ink-3); font-size: 13.5px; }

/* what heal answered, for a moment at the bottom */
.toast { position: fixed; z-index: 60; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); padding: 11px 18px 11px 14px; border-radius: 16px; background: #141416; color: #e9e9ec; font-size: 14px; box-shadow: inset 0 0 0 1px var(--champ-line), 0 20px 44px -16px rgba(0,0,0,.6); opacity: 0; transform: translate(-50%, 16px) scale(.98); pointer-events: none; transition: opacity .3s, transform .5s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #e3c27a; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.toast.bad svg { stroke: #ff8a80; }
.toast b { color: #fff; }
.toast code { padding: 1px 5px; border-radius: 6px; background: rgba(255,255,255,.1); }
.toast .mention { background: rgba(255,255,255,.12); color: #fff; }
.toast .emo { width: 1.2em; height: 1.2em; vertical-align: -.25em; }
:root[data-theme="dark"] .toast { background: #23221e; }
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(10,10,12,.38); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade-in .2s; }
.modal-box { width: 100%; max-width: 420px; padding: 22px; box-shadow: var(--lift); animation: pop-in .35s var(--ease); }
.modal-txt p { white-space: pre-wrap; }
.modal-txt p + p { margin-top: 8px; }
.modal .ask-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.96) translateY(6px); } }

@media (max-width: 640px) {
  .set-head, .set-block, .set-pad, .msg, .msg-edit, .set-inline { padding-left: 16px; padding-right: 16px; }
  .set-main { flex-wrap: wrap; gap: 10px 14px; padding: 13px 16px; }
  .set-opts { padding: 0 16px 16px; }
  .ctl { width: 100%; justify-content: flex-start; }
  .log .ctl { padding-left: 22px; }
  .segs { width: 100%; } .segs button { flex: 1; padding: 0 6px; }
  .set-inline select.in { width: 100%; }
  .kv { padding: 0 16px 16px; }
  .none.pad { padding: 0 16px 16px; }
  .toast { bottom: max(14px, env(safe-area-inset-bottom)); }
}
.who .results .ph { width: 26px; height: 26px; border-radius: 50%; flex: none; }

/* ---------- drafts: unsaved changes, the save bar, reset to default ---------- */
.unsaved { display: inline-block; margin: 0 0 0 9px; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; font-size: 10.5px; font-weight: 650; line-height: 1.35; letter-spacing: .08em; text-transform: uppercase; color: var(--champ-ink); background: color-mix(in srgb, var(--champ) 14%, transparent); box-shadow: inset 0 0 0 1px var(--champ-line); animation: tag-in .35s var(--ease); }
@keyframes tag-in { from { opacity: 0; transform: scale(.85); } }
.set-txt .unsaved, .pg-head .unsaved { display: inline-block; margin-top: 0; color: var(--champ-ink); font-size: 10.5px; line-height: 1.35; }
.sb-short { display: none; }
.none.gone { color: var(--ink-3); }
.head .reset-btn { margin-left: auto; flex: none; align-self: center; }
.reset-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.has-draft main { padding-bottom: 110px; }

.savebar { position: fixed; z-index: 55; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); width: min(640px, calc(100vw - 32px)); opacity: 0; transform: translate(-50%, 22px) scale(.98); pointer-events: none; transition: opacity .3s, transform .5s var(--ease); }
.savebar.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.sb-in { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 20px; border-radius: 20px; background: #141416; color: #e9e9ec; box-shadow: inset 0 0 0 1px var(--champ-line), 0 24px 50px -18px rgba(0,0,0,.65); }
:root[data-theme="dark"] .sb-in { background: #23221e; }
.sb-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.sb-txt b { font-size: 14.5px; font-weight: 600; color: #fff; }
.sb-txt b.err { color: #ffb4ab; }
.sb-txt small { font-size: 12.5px; color: rgba(233,233,236,.62); }
.savebar .sb-discard { background: rgba(255,255,255,.08); color: #e9e9ec; }
.savebar .sb-discard:hover { background: rgba(255,255,255,.14); }
.savebar .sb-save { gap: 8px; padding: 0 16px; color: #1c1609; background: var(--champ-metal); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 22px -10px rgba(217,180,106,.5); }
.savebar .sb-save:hover { filter: brightness(1.05); }
.savebar .btn[disabled] { opacity: .7; }
.sb-spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(28,22,9,.25); border-top-color: #1c1609; animation: spin .8s linear infinite; }
.savebar.nudge .sb-in { animation: nudge .5s var(--ease); box-shadow: inset 0 0 0 1px var(--champ), 0 0 0 4px color-mix(in srgb, var(--champ) 22%, transparent), 0 24px 50px -18px rgba(0,0,0,.65); }
@keyframes nudge { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
.toast.above { bottom: calc(max(20px, env(safe-area-inset-bottom)) + 78px); }

@media (max-width: 640px) {
  .head .reset-btn { width: 36px; height: 36px; padding: 0; border-radius: 50%; }
  .head .reset-btn span { display: none; }
  .head .reset-btn svg { width: 17px; height: 17px; }
  .savebar { bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  .sb-in { padding: 10px 10px 10px 16px; gap: 8px; }
  .sb-txt small { display: none; }
  .sb-long { display: none; } .sb-short { display: inline; }
  .toast.above { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 70px); }
}
@media (prefers-reduced-motion: reduce) { .savebar.nudge .sb-in { animation: none; } }

/* ---------- big pages: statistics and tickets ---------- */
.stats { display: grid; gap: 16px; }
.stats-body { display: grid; gap: 16px; min-width: 0; }
.stats-wait { display: grid; place-items: center; min-height: 260px; }
.tabbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 14px; background: var(--fill); }
.tabs button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s, box-shadow .2s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tabs button small, .segs button small { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--fill); font-size: 11px; color: var(--ink-3); }
.tabs button.on small { background: var(--prem-bg); color: var(--prem-ink); }
.tab-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.segs.small button { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.segs button small { margin-left: 5px; }
.btn.icon-txt svg, .back-link svg, .tk-ed-actions .btn svg, .tk-links .btn svg, .set-head .btn svg, .card-foot .btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.card-foot.pager { justify-content: space-between; color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.back-link { display: inline-flex; align-items: center; gap: 6px; justify-self: start; height: 32px; padding: 0 12px 0 8px; border-radius: 16px; color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.back-link:hover { background: var(--fill); color: var(--ink); }
.note-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 18px; box-shadow: inset 0 0 0 1px var(--champ-line); }
.note-row > svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--champ-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.note-row > div { flex: 1; min-width: 0; }
.note-row b { display: block; }
.note-row span { color: var(--ink-2); font-size: 13.5px; }

/* number cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kpi { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 4px; min-height: 136px; padding: 16px 18px 14px; overflow: hidden; }
.kpi-top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.kpi-top small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.kpi-ico { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--prem-bg); box-shadow: inset 0 0 0 1px var(--champ-line); }
.kpi-ico svg { width: 15px; height: 15px; fill: none; stroke: #e3c27a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpi-num { margin-top: 8px; font-size: 32px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-sub { position: relative; z-index: 1; color: var(--ink-3); font-size: 12.5px; }
.kpi-sub .up, .ch-sub .up { color: var(--green, #248a3d); font-weight: 600; }
.kpi-sub .down, .ch-sub .down { color: var(--red); font-weight: 600; }
.delta { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--fill); color: var(--ink-2); }
.delta.up { background: color-mix(in srgb, #34c759 16%, transparent); color: #1f8a3e; }
.delta.down { background: var(--bad-bg); color: var(--red); }
:root[data-theme="dark"] .delta.up { color: #5fd683; }
.spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34px; opacity: .9; }
.kpi:has(.spark) { padding-bottom: 42px; }
.spark path { fill: none; stroke: var(--champ); stroke-width: 2; stroke-linecap: round; opacity: .55; }

/* charts */
.chart { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; }
.ch-y { position: relative; grid-row: 1; }
.ch-y span { position: absolute; right: 0; bottom: var(--y); transform: translateY(50%); font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ch-plot { position: relative; grid-column: 2; height: 220px; }
.ch-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }
.ch-base { stroke: var(--line); stroke-width: 1; }
.ch-line { fill: none; stroke: var(--champ); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ch-stop-a { stop-color: var(--champ); stop-opacity: .28; }
.ch-stop-b { stop-color: var(--champ); stop-opacity: 0; }
.ch-x { position: relative; grid-column: 2; height: 22px; margin-top: 6px; }
.ch-x span { position: absolute; left: var(--x); transform: translateX(-50%); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.ch-x span:first-child { transform: none; }
.ch-x span:last-child { transform: translateX(-100%); }
.ch-cursor { position: absolute; top: 0; bottom: 0; left: var(--px); width: 1px; background: var(--champ-line); pointer-events: none; }
.ch-dot { position: absolute; left: var(--px); top: var(--py); width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 2.5px var(--champ), 0 2px 8px rgba(0,0,0,.25); pointer-events: none; }
.ch-tip { position: absolute; z-index: 3; top: -6px; left: var(--tx); display: grid; gap: 1px; padding: 7px 11px; border-radius: 11px; background: #141416; color: #e9e9ec; font-size: 12.5px; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--champ-line), 0 12px 28px -12px rgba(0,0,0,.6); pointer-events: none; transform: translateY(-100%); }
.ch-tip small { color: rgba(233,233,236,.6); font-size: 11px; }
.ch-tip b { color: #f1dfae; }
:root[data-theme="dark"] .ch-tip { background: #23221e; }
.ch-sub { display: flex; gap: 18px; margin: 18px 0 8px 52px; color: var(--ink-3); font-size: 12.5px; }
.ch-sub b { color: var(--ink); }
.key { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 3px; }
.key.up { background: var(--champ); }
.key.down { background: var(--ink-3); opacity: .55; }
.ud, .bars { grid-template-columns: minmax(0, 1fr); }
.ud .ch-x, .bars .ch-x { grid-column: 1; }
.ud-plot, .bar-plot { position: relative; display: flex; align-items: stretch; gap: 2px; height: 120px; }
.bar-plot { height: 150px; }
.ud-mid { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.ud-col, .bar-col { position: relative; flex: 1; min-width: 0; border-radius: 4px; }
.ud-col:hover, .bar-col:hover { background: var(--fill); }
.ud-up, .ud-down { position: absolute; left: 15%; right: 15%; border-radius: 3px; }
.ud-up { bottom: 50%; height: calc(var(--h) / 2); background: var(--champ); }
.ud-down { top: 50%; height: calc(var(--h) / 2); background: var(--ink-3); opacity: .5; }
.bar-col span { position: absolute; left: 14%; right: 14%; bottom: 0; height: max(var(--h), 2px); border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--champ), color-mix(in srgb, var(--champ) 55%, transparent)); }
.ud .ch-tip, .bars .ch-tip { top: -4px; }

/* busiest times */
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: color-mix(in srgb, var(--champ) calc(var(--a) * 100%), var(--fill)); }
.heat i:hover { outline: 1.5px solid var(--ink-2); outline-offset: 1px; }
.hm-day { font-size: 11px; color: var(--ink-3); }
.heat b { font-size: 10.5px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.hm-scale { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 12px; font-size: 11px; color: var(--ink-3); }
.hm-scale i { width: 12px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--champ) calc(var(--a) * 100%), var(--fill)); }
.hm-scale span { margin: 0 4px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 2px 20px 20px; }
.facts > div { padding: 13px 15px; border-radius: 14px; background: var(--fill); min-width: 0; }
.facts small { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.facts b { display: block; margin-top: 4px; font-size: 18px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* leaderboards */
.lb { display: grid; padding: 0 10px 10px; }
.lb-row { position: relative; display: grid; grid-template-columns: 28px auto minmax(0, 1fr) auto; align-items: center; column-gap: 11px; width: 100%; padding: 9px 10px 13px; border-radius: 14px; text-align: left; }
button.lb-row:hover { background: var(--fill); }
.lb-place { font-size: 13px; font-weight: 700; color: var(--ink-3); text-align: center; font-variant-numeric: tabular-nums; }
.lb-row:nth-child(-n+3) .lb-place { color: var(--champ-ink); }
.lb-pic, .lb-ch { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.lb-ch { display: grid; place-items: center; border-radius: 10px; background: var(--fill); }
.lb-ch svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-name { display: grid; min-width: 0; }
.lb-name b, .lb-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name b { font-size: 14px; font-weight: 600; }
.lb-name small, .lb-val small { color: var(--ink-3); font-size: 12px; }
.lb-val { display: grid; justify-items: end; font-variant-numeric: tabular-nums; }
.lb-val b { font-size: 14px; }
.lb-bar { position: absolute; left: 83px; right: 12px; bottom: 6px; height: 3px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.lb-bar i { display: block; width: var(--w); height: 100%; border-radius: 2px; background: var(--champ-metal); }
.lb-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.lb-tools .lookup { flex: 1; min-width: 220px; max-width: 360px; margin-left: auto; }
.dt-head { display: flex; align-items: center; gap: 14px; }
.dt-head h2 { font-size: 22px; letter-spacing: -.02em; }
.dt-head p { color: var(--ink-3); font-size: 13.5px; }
.dt-pic { width: 52px; height: 52px; border-radius: 50%; flex: none; }
.dt-pic.ch { display: grid; place-items: center; border-radius: 15px; background: var(--fill); }
.dt-pic.ch svg { width: 24px; height: 24px; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* tickets */
.tk-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 0 20px 14px; }
.tk-tools .in { flex: 1; min-width: 200px; max-width: 320px; margin-left: auto; min-height: 36px; padding: 6px 12px; }
.tk-head, .tk-main { display: grid; grid-template-columns: 74px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 84px 80px; align-items: center; gap: 12px; }
.tk-head { padding: 0 30px 8px; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.tk-list { display: grid; padding: 0 10px 10px; }
.tk-row { border-radius: 14px; }
.tk-row.open { background: var(--fill); }
.tk-main { width: 100%; padding: 10px; border-radius: 14px; text-align: left; font-size: 13.5px; }
.tk-main:hover { background: var(--fill); }
.tk-case { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.tk-opt { display: grid; min-width: 0; }
.tk-opt b, .tk-opt small, .tk-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-opt small { color: var(--ink-3); font-size: 12px; }
.tk-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tk-pic { width: 24px; height: 24px; border-radius: 50%; flex: none; font-size: 10px; }
.none-txt { color: var(--ink-3); font-size: 13px; }
.tk-time { color: var(--ink-3); font-size: 12.5px; text-align: right; }
.badge { display: inline-flex; align-items: center; justify-self: start; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.badge.st-open { background: var(--prem-bg); color: var(--prem-ink); box-shadow: inset 0 0 0 1px var(--champ-line); }
:root[data-theme="dark"] .badge.st-open { background: color-mix(in srgb, var(--champ) 16%, var(--surface)); color: var(--champ-ink); }
.badge.st-deleted { color: var(--ink-3); }
.tk-more { display: grid; gap: 12px; padding: 4px 10px 14px; animation: opts-in .35s var(--ease); }
.tk-more .kv { padding: 0; }
.tk-more .kv > div { background: var(--surface); }
.tk-answers { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--surface); }
.tk-answers > small { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.tk-answers div { display: grid; gap: 2px; }
.tk-answers b { font-size: 13px; }
.tk-answers span { color: var(--ink-2); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tk-links .btn { background: var(--surface); }
.hint { color: var(--ink-3); font-size: 12.5px; }
.hint code { padding: 1px 5px; border-radius: 6px; background: var(--fill); font-size: 11.5px; }

.tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.tk-card { display: grid; align-content: start; gap: 8px; padding: 18px; text-align: left; transition: transform .25s var(--ease), border-color .2s, box-shadow .25s; }
.tk-card:hover { transform: translateY(-2px); border-color: var(--champ-line); box-shadow: var(--lift); }
.tk-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tk-card-top b { font-size: 16px; letter-spacing: -.01em; }
.tk-card-sub { color: var(--ink-3); font-size: 13px; }
.tk-card-state { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.tk-card-state.ok { color: var(--champ-ink); }
.tk-card-state svg, .tk-status svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tk-card-opts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.tk-card-opts .dc-btn { height: 24px; padding: 0 9px; font-size: 11.5px; font-style: normal; }
.tk-card.add { place-content: center; justify-items: center; min-height: 160px; text-align: center; border-style: dashed; background: transparent; box-shadow: none; color: var(--ink-2); }
.tk-card.add > svg { width: 22px; height: 22px; fill: none; stroke: var(--champ-ink); stroke-width: 2; stroke-linecap: round; }
.tk-card.add span { color: var(--ink-3); font-size: 13px; max-width: 230px; }
.tk-ed-head { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px 16px; }
.tk-name { flex: 1; min-width: 240px; display: grid; gap: 4px; }
.tk-name .in.big { max-width: 420px; min-height: 46px; font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.tk-name small { color: var(--ink-3); font-size: 12.5px; }
.tk-name .unsaved { justify-self: start; margin-left: 0; }
.tk-ed-actions { display: flex; gap: 8px; }
.tk-status { display: flex; align-items: center; gap: 7px; margin-top: -6px; color: var(--ink-3); font-size: 13.5px; }
.tk-status.ok { color: var(--ink-2); }
.tk-status.ok svg { color: var(--champ-ink); }
.tk-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tk-col { display: grid; gap: 16px; min-width: 0; }
.tk-col.tk-aside .sticky { position: sticky; top: 84px; }
.tk-secs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.tk-sec > summary { cursor: pointer; list-style: none; align-items: center; }
.tk-sec > summary::-webkit-details-marker { display: none; }
.tk-sec > summary .chev { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.tk-sec[open] > summary .chev { transform: rotate(90deg); }
.tk-sec:not([open]) > summary { padding-bottom: 18px; }
.tk-sec > .set-row:first-of-type { border-top: 1px solid var(--line); }
.set-row.wide .set-main { min-height: 0; padding-bottom: 8px; }
.set-opts.wide { display: block; padding-top: 0; }
.set-opts.wide textarea.in { min-height: 96px; font: 13px/1.55 "JetBrains Mono", ui-monospace, Menlo, monospace; }
.set-opts.wide .people { margin-bottom: 10px; }
.set-opts.wide > select.in { max-width: 260px; }
.ctl .in.dur { width: 100%; }
.msg-foot.tight { margin-top: 8px; align-items: center; }
.prev-box:not(:empty) { display: grid; gap: 8px; margin-top: 10px; }
.prev-note { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.role-chip .p-txt b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--c, var(--ink-3)); vertical-align: 1px; }
.role-chip[data-c=""] .p-txt b::before { background: var(--ink-3); }
.tk-opt-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 20px; border-top: 1px solid var(--line); }
.tk-opt-row.open { background: var(--raised); }
.tk-opt-name { flex: 1; display: grid; min-width: 0; text-align: left; }
.tk-opt-name b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-opt-name small { color: var(--ink-3); font-size: 12.5px; }
.tk-opt-row .x:disabled { opacity: .3; pointer-events: none; }
.tk-opt-row .x svg { stroke-width: 2.2; }
.tk-opt-ed { display: grid; gap: 12px; padding: 4px 14px 16px; background: var(--raised); border-radius: 0 0 var(--radius) var(--radius); }
.tk-opt-ed .tk-sec { box-shadow: none; }

/* a rough Discord look, only for previews */
.dc-prev { display: grid; gap: 10px; padding: 2px 20px 20px; }
.dc-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: #fff; background: #4e5058; }
.dc-btn.s-blurple { background: #5865f2; }
.dc-btn.s-green { background: #248046; }
.dc-btn.s-red { background: #da373c; }
.dc-btn.mini { width: 12px; height: 26px; padding: 0; border-radius: 4px; flex: none; }
.dc-emo { font-size: 15px; }
.dc-select { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 12px; border-radius: 8px; background: var(--fill); color: var(--ink-3); font-size: 13.5px; }
.dc-select svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.dc-menu { display: grid; border-radius: 8px; background: var(--fill); overflow: hidden; }
.dc-menu > div { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.dc-menu > div + div { border-top: 1px solid var(--line); }
.dc-menu span { display: grid; }
.dc-menu b { font-size: 13.5px; }
.dc-menu small { color: var(--ink-3); font-size: 12px; }
.dc-note { padding: 12px; border-radius: 10px; background: var(--fill); color: var(--ink-3); font-size: 13px; text-align: center; }
.spinner.small { width: 18px; height: 18px; border-width: 2.5px; margin: 8px auto; }
.dc-modal { display: grid; gap: 14px; margin: 2px 20px 20px; padding: 18px; border-radius: 14px; background: var(--fill); }
.dc-modal-title { font-size: 17px; }
.dc-field { display: grid; gap: 6px; }
.dc-label { font-size: 13px; font-weight: 600; }
.dc-label i { margin-left: 3px; color: var(--red); font-style: normal; }
.dc-field small { color: var(--ink-3); font-size: 12px; }
.dc-input { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 0 11px; border-radius: 8px; background: var(--surface); color: var(--ink-3); font-size: 13px; }
.dc-input.tall { min-height: 76px; align-items: flex-start; padding-top: 10px; }
.dc-input svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.dc-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.dc-check i { width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--fill-2); background: var(--surface); }
.dc-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; font-size: 13.5px; color: var(--ink-2); }
.tk-field { display: grid; gap: 10px; padding: 14px 16px 2px 20px; border-top: 1px solid var(--line); }
.tk-field-top { display: flex; align-items: center; gap: 8px; }
.tk-field-top .in { flex: 1; font-weight: 600; }
.tk-field-top .x:disabled { opacity: .3; pointer-events: none; }
.tk-num { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--prem-bg); color: var(--prem-ink); font-size: 12px; font-weight: 700; }
.tk-field .set-opts { padding: 0 0 14px 34px; }
.tk-field .opt.wide { flex: 1 1 100%; }
.tk-field textarea.in { min-height: 90px; }

@media (max-width: 980px) {
  .two, .tk-split, .tk-secs { grid-template-columns: minmax(0, 1fr); }
  .tk-col.tk-aside .sticky { position: static; }
  .tk-col.tk-aside { order: -1; }
}
@media (max-width: 760px) {
  .tk-head { display: none; }
  .tk-main { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "case opt status" "who who time"; row-gap: 6px; }
  .tk-case { grid-area: case; } .tk-opt { grid-area: opt; } .tk-main .badge { grid-area: status; justify-self: end; } .tk-time { grid-area: time; }
  .tk-main > .tk-who:nth-of-type(3) { grid-area: who; }
  .tk-main > .tk-who:nth-of-type(4) { display: none; }
}
@media (max-width: 640px) {
  .tabbar { gap: 10px; }
  .stats .set-head, .tickets .set-head { flex-wrap: wrap; row-gap: 12px; }
  .stats .set-head > .set-title, .tickets .set-head > .set-title { flex: 1 1 100%; }
  .stats .set-head > .segs { width: 100%; }
  .stats .set-head > .segs button { flex: 1; }
  .kpi-top { gap: 7px; }
  .kpi-ico { display: none; }
  .kpi .delta { height: 20px; padding: 0 6px; font-size: 10.5px; }
  .tabs { width: 100%; overflow-x: auto; }
  .tabs button { flex: 1; padding: 0 10px; }
  .tab-tools { width: 100%; margin-left: 0; }
  .tab-tools .segs { flex: 1; overflow-x: auto; }
  .tab-tools .segs button { flex: 1; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { min-height: 120px; padding: 14px; }
  .kpi-num { font-size: 25px; }
  .kpi-top small { font-size: 10.5px; }
  .chart { grid-template-columns: 34px minmax(0, 1fr); }
  .ch-plot { height: 180px; }
  .heat { grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: 2px; }
  .heat i { border-radius: 2px; }
  .facts { padding: 2px 16px 16px; }
  .lb { padding: 0 4px 8px; }
  .tk-tools { padding: 0 16px 12px; }
  .tk-tools .in { max-width: none; margin-left: 0; }
  .tk-list { padding: 0 4px 8px; }
  .tk-opt-row { padding: 10px 10px 10px 16px; gap: 6px; }
  .tk-field { padding: 14px 12px 2px 14px; }
  .tk-field .set-opts { padding-left: 0; }
  .dc-prev, .dc-modal { margin-left: 16px; margin-right: 16px; }
  .dc-prev { padding: 2px 0 16px; }
  .lb-tools .lookup { max-width: none; margin-left: 0; }
}
