@import url('fonts.css');

/* Daylined design system — KNOWN, strictly black and white.
   Outfit for every UI face. Geist Mono only for the live clock.
   Color only inside event tiles and category dots. */
:root {
  /* Pure black surfaces, white type. Color appears only inside event tiles and category dots.
     Contrast on #000: --text 21:1 · --text2 18.8:1 · --muted 11.6:1 · --dim 7.0:1 (all ≥ WCAG AAA 7:1 except dim = AAA for large / AA for body). */
  --bg: #000000;
  --page: #000000;
  --panel: #000000;      /* cards are black too — structure comes from hairlines */
  --elev: #0E0E0E;       /* hover */
  --elev2: #171717;
  --line: #2A2A2A;       /* hairline */
  --line2: #3D3D3D;
  --text: #FFFFFF;
  --text2: #B8B8B8;
  --muted: #B8B8B8;
  --dim: #808080;
  --silver: #FFFFFF;
  --accent: #FFFFFF;     /* no amber/brown anywhere */
  --good: #FFFFFF;
  --good-bg: #171717;
  --bad: #FFFFFF;
  --warn: #FFFFFF;
  --r: 10px;
  --r-sm: 6px;
  --display: Outfit, -apple-system, 'Segoe UI Variable', 'Segoe UI', sans-serif;
  --sans: Outfit, -apple-system, 'Segoe UI Variable', 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 500 13px/1.4 var(--sans); font-synthesis: none; font-variant-numeric: tabular-nums; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2, h3, .display { text-rendering: optimizeLegibility; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }

.mono { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.display { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; }
.label { font: 500 13px/1.3 var(--sans); letter-spacing: 0; color: var(--muted); }
.caps { font: 500 13px/1.3 var(--sans); letter-spacing: 0; color: var(--muted); }
.muted { color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; background: currentColor; }

/* ---------- wordmark ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 10px; line-height: 1; user-select: none; }
.wordmark .mark { width: 86px; height: 14px; display: block; flex: none; }
.wordmark b { font: 560 16px/1 var(--display); letter-spacing: -.045em; color: var(--silver); }
.wordmark small { font: 600 11px/1.2 var(--sans); letter-spacing: .06em; color: var(--text-3); text-transform: uppercase; }

/* ---------- live clock ---------- */
.clock { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; }
.clock .t { font: 600 13px/1 var(--mono); color: #FFFFFF; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.clock .dot { width: 6px; height: 6px; background: var(--muted); }
.clock .dot.busy { background: #fff; animation: beat 2.4s infinite; }
.clock .dot.idle { background: var(--dim); }
.status { display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #FFFFFF; white-space: nowrap; }
.status .dot { width: 5px; height: 5px; box-shadow: 0 0 0 0 currentColor; animation: beat 2.4s infinite; }
.status.busy { color: var(--accent); }
.status.idle { color: var(--muted); }
.status.idle .dot { animation: none; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }

/* ---------- controls ---------- */
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.seg button { height: 32px; padding: 0 13px; border-radius: 6px; color: var(--text2); font: 500 13px/1 var(--sans); letter-spacing: 0; display: inline-flex; align-items: center; gap: 7px; transition: background-color var(--d-hover-in) var(--ease-out), color var(--d-hover-in) var(--ease-out); white-space: nowrap; }
.seg button:hover { color: var(--text); background: var(--elev); }
.seg button.on { background: #FFFFFF; color: #000000; }
.seg button svg { width: 18px; height: 18px; }

.btn { height: 36px; padding: 0 13px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line2); color: var(--text); font: 500 13px/1 var(--sans);
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; transition: background-color var(--d-hover-out) var(--ease-out), color var(--d-hover-out) var(--ease-out); white-space: nowrap; }
.btn:hover { background: var(--elev); }
.btn:active, .seg button:active, .qa-go:active { transform: scale(calc(1 - .06 * var(--move))); }
.btn svg { width: 18px; height: 18px; }
.ico { width: 36px; height: 36px; min-width: 36px; min-height: 36px; display: inline-grid; place-items: center; padding: 0; border-radius: 999px; border: 0; color: var(--text-2); background: transparent;
  transition: background-color var(--d-hover-out) var(--ease-out), color var(--d-hover-out) var(--ease-out), transform var(--d-press) var(--ease-out); }
.ico svg { width: 18px; height: 18px; display: block; pointer-events: none; }
.ico:hover { background: rgba(255,255,255,.08); color: var(--text-1); transition-duration: var(--d-hover-in); }
.ico:active { background: rgba(255,255,255,.14); transform: scale(calc(1 - .06 * var(--move))); }
.ico:disabled { opacity: .35; }
.ico.spin svg, .btn.spin svg { animation: spin 800ms linear infinite; }
.btn.primary { background: #FFFFFF; color: #000000; border-color: transparent; }
.btn.primary:hover { background: #fff; }
.btn.danger { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.btn.spin svg { animation: spin .8s linear infinite; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; color: var(--text-2); border: 0; background: transparent; transition: background-color var(--d-hover-out) var(--ease-out), color var(--d-hover-out) var(--ease-out); }
.icon-btn:hover { background: rgba(255,255,255,.08); color: var(--text-1); transition-duration: var(--d-hover-in); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 7px; border: 1px solid var(--line2); color: var(--text2); font: 500 13px/1 var(--display); transition: background var(--dur-hover-out) var(--ease-out), border-color var(--dur-hover-out) var(--ease-out), color var(--dur-hover-out) var(--ease-out); }
.pill:hover { color: var(--text); border-color: var(--dim); }

/* ---------- cards ---------- */
.card { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06); backdrop-filter: none; }
.rail .card { position: relative; }
.rail .card:hover { border-color: var(--hairline-strong); }
.card-h h2 { margin: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px 0; }
.card-h .label { color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; font-size: 11px; text-shadow: none; }
.card-h .right { font: 500 11px/1.2 var(--sans); color: var(--text-2); }
.card-b { padding: 12px 15px 14px; }

/* stat strip: one card, hairline-divided cells, mono figures */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; background: none; border: 0; overflow: visible; }
.stat { position: relative; padding: 14px; min-width: 0; background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--radius-lg); box-shadow: none; backdrop-filter: none; }
.stat.glimmer:hover { border-color: var(--hairline-strong); }
.stat .lbl { font: 600 11px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #A0A0A0; text-shadow: none; cursor: default; user-select: none; }
.stat .val { font: 600 28px/1.1 var(--sans); margin-top: 8px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--text-1); text-shadow: none; }
.stat .val.warn { color: var(--warn); }

/* banner */
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 13px; border-radius: var(--r); font-size: 14px; color: var(--text); background: var(--panel); border: 1px solid var(--line2); }
.banner span { min-width: 0; overflow-wrap: anywhere; }
.banner b { color: var(--text); font-weight: 500; }
.banner button { margin-left: auto; min-height: 32px; color: #FFFFFF; font-weight: 600; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- quick add ---------- */
.qa { position: relative; }
.qa-box { position: relative; z-index: 0; display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 5px 0 13px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--hairline); box-shadow: none; backdrop-filter: none; }
.qa-box:focus-within { border-color: var(--neon-white); box-shadow: 0 0 0 3px rgba(255,255,255,.15); }
.qa-box .plus { color: #fff; width: 18px; height: 18px; display: grid; place-items: center; flex: none; }
.qa-box .plus svg { width: 18px; height: 18px; }
.qa-box input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; height: 100%; font-size: 13px; }
.qa-box input::placeholder { color: var(--dim); opacity: 1; }
.qa-go { background: var(--surface-2); color: var(--text-3); border-color: var(--hairline); pointer-events: none; }
.qa.ready .qa-go { background: #fff; color: #000; border-color: #fff; pointer-events: auto; }
.qa-preview { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.qa-preview:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 26px; padding: 4px 9px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--hairline); color: var(--text-1); box-shadow: none;
  font: 500 13px/1.3 var(--sans); overflow-wrap: break-word; white-space: normal; }
.chip.fig { font-size: 12px; }
.chip b { color: var(--text); font: 500 12px/1 var(--sans); }
.chip.accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.chip.bad { color: var(--bad); }
.chip .dot { width: 6px; height: 6px; }
.qa-hint { margin-top: 8px; font-size: 11px; font-weight: 500; color: var(--text-2); }
.qa-hint code { font: 500 12px var(--sans); color: var(--text-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }

/* ---------- timeline ---------- */
.tl { position: relative; display: grid; grid-template-columns: 48px 1fr; }
.tl-hours { position: relative; }
.tl-hours span { position: absolute; right: 4px; left: 0; margin: 0; height: 16px; line-height: 16px; font: 500 12px/16px var(--sans); color: var(--text-3); letter-spacing: 0; font-variant-numeric: tabular-nums; text-align: right; }
.tl-col { position: relative; border-left: 0; box-shadow: inset 1px 0 0 rgba(255,255,255,.05); overflow: clip; contain: layout paint; }
.tl-line { position: absolute; left: 0; right: 0; height: 1px; border: 0; background: rgba(255,255,255,.06); pointer-events: none; }
.tl-half { position: absolute; left: 0; right: 0; height: 1px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 4px, transparent 4px 8px); pointer-events: none; }
.tl-off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(255,255,255,.016) 7px 8px); pointer-events: none; }

/* events drawn like KNOWN's position tiles */
.ev { position: absolute; z-index: 3; border-radius: var(--radius); padding: 0; overflow: hidden; cursor: pointer; text-align: left; touch-action: none;
  background: color-mix(in oklab, var(--c) 6%, #000);
  border: 1px solid color-mix(in oklab, var(--c) 55%, transparent);
  border-left: 3px solid var(--c);
  box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  transition: border-color var(--d-hover-out) var(--ease-out), background-color var(--d-hover-out) var(--ease-out); }
.ev:focus-visible { z-index: 6; outline: 2px solid #fff; outline-offset: 3px; }
.ev .ev-resize { display: none; position: absolute; left: 6px; right: 6px; bottom: 0; height: 8px; cursor: ns-resize; z-index: 3; }
.ev.can-resize .ev-resize { display: block; }
.anim .ev { animation: rise var(--dur-switch) var(--ease-out); }
.ev:hover, .ev:focus-visible, .ev.open, .ev.live { border-color: var(--c); background: color-mix(in oklab, var(--c) 16%, #000); z-index: 5; transition-duration: var(--d-hover-in); }
.ev.lit::after { display: none; }
.ev.dragging { transition: none; z-index: 8; }
.ev .body { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-start; height: 100%; min-width: 0; overflow: hidden; pointer-events: none; }
.ev .t, .ev .s { position: relative; z-index: 1; min-width: 0; max-width: 100%; flex: none; }
.ev.narrow { padding: 4px 5px 4px 6px; border-left-width: 2px; }
.ev .t { display: flex; width: 100%; font: 500 13px/16px var(--sans); letter-spacing: 0;
  color: var(--text-1); text-shadow: none; }
.ev .t .w { height: 16px; line-height: 16px; }
.ev.narrow .t { font-size: 12px; font-weight: 600; }
.ev .s { font: 500 12px/14px var(--sans); letter-spacing: 0; font-variant-numeric: tabular-nums;
  overflow-wrap: normal; word-break: normal; hyphens: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0;
  color: var(--text-2); text-shadow: none; }
.ev.thin { min-height: 0; border-radius: 4px; }
.ev.thin .body, .ev.quiet .body { display: none; }
.ev.tiny .s { display: none; }
.ev.past { border-color: color-mix(in oklab, var(--c) 35%, transparent); }
.ev.past .t, .ev.past .s { color: var(--text-2); }
.ev.declined .t { text-decoration: line-through; }
.ev.declined .t, .ev.declined .s { color: var(--text-3); }
.ev.tentative { border-style: dashed; }
.ev.readonly { cursor: default; }
.ev.free { background: transparent; border-style: dashed; }
.ev.live { border-color: var(--c); }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }

.gap { position: absolute; z-index: 1; left: 4px; right: 4px; border-radius: var(--radius); border: 1px dashed transparent;
  display: flex; align-items: flex-start; padding: 6px 8px; font: 500 11px/1.2 var(--sans); color: var(--text-2);
  background: transparent; cursor: pointer; white-space: nowrap; overflow: hidden; }
.gap .gap-label { visibility: hidden; }
.gap:hover, .gap:focus-visible { border-color: var(--neon-white); background: color-mix(in oklab, var(--neon-white) 8%, transparent); }
.gap:hover .gap-label, .gap:focus-visible .gap-label { visibility: visible; }
.gap .add { font-weight: 500; }

.now { position: absolute; left: -4px; right: 0; height: 1px; border: 0; background: rgba(255,255,255,.92); z-index: 4; pointer-events: none; }
.now::before { content: ''; position: absolute; left: 0; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: #fff; pointer-events: none; }
@media (min-resolution: 1.5dppx) {
  .ev, .allday .ad { border-top-width: 0.5px; border-right-width: 0.5px; border-bottom-width: 0.5px; }
  .now { height: 0.5px; }
}

.allday { display: flex; flex-wrap: wrap; gap: 5px; }
.allday .ad { height: auto; min-height: 36px; padding: 4px 9px; border-radius: var(--radius); font: 600 12px/1.25 var(--sans); cursor: pointer; white-space: normal; overflow-wrap: normal; hyphens: none; word-break: normal; text-align: left;
  color: var(--text-1); background: #000; border: 1px solid color-mix(in oklab, var(--c, var(--neon-white)) 70%, transparent); border-left: 3px solid var(--c, var(--neon-white)); }

/* ---------- allocation bar + legend ---------- */
.mix { display: flex; height: 8px; border-radius: 3px; overflow: hidden; gap: 2px; }
.mix i { display: block; height: 100%; background: var(--c); border-radius: 2px; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.legend span { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 0; font-size: 13px; color: var(--text2); overflow-wrap: anywhere; }
.legend .dot { width: 6px; height: 6px; color: var(--c); }
.legend em { font: 500 12px var(--sans); color: var(--text-2); margin-left: auto; font-style: normal; }

/* ---------- treemap ---------- */
.tm { position: relative; width: 100%; }
.tm-tile { position: absolute; z-index: 0; border-radius: var(--radius); padding: 9px 10px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer;
  background: #000; border: 1px solid color-mix(in oklab, var(--c) 70%, transparent); border-top: 3px solid var(--c); box-shadow: none;
  transition: border-color var(--d-hover-out) var(--ease-out); }
.tm-tile:hover, .tm-tile:focus-visible { border-color: var(--c); }
.tm-tile.on { border-color: #fff; }
.tm-tile .n { position: relative; font: 700 12px/1.1 var(--sans); letter-spacing: -.02em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tm-tile .v { position: relative; font: 700 17px/1.1 var(--sans); color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; letter-spacing: 0; }
.tm-tile .p { font: 500 11px/1.2 var(--sans); color: var(--text-2); margin-top: 5px; }
.tm-tile .p { overflow-wrap: anywhere; }
.tm-tile.sm { padding: 7px 8px; } .tm-tile.sm .v { font-size: 13px; } .tm-tile.sm .p { display: none; }
.tm-tile.xs { padding: 4px 6px; justify-content: center; } .tm-tile.xs .n, .tm-tile.xs .p { display: none; } .tm-tile.xs .v { font-size: 11px; }
.tm-tile.tiny { padding: 2px; } .tm-tile.tiny .n, .tm-tile.tiny .v, .tm-tile.tiny .p { display: none; }

/* ---------- sheet (event detail) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.scrim.open { opacity: 1; }
.sheet { width: min(500px, 100%); background: var(--surface-2); border: 1px solid var(--hairline-strong); border-bottom: 0; border-radius: 14px 14px 0 0; padding: 18px 18px 20px; position: relative;
  max-height: 85vh; overflow: auto; }
.sheet-x { position: absolute; top: 10px; right: 10px; }
.scrim.open .sheet { transform: none; }
.board .scrim { align-items: center; }
.board .sheet { border-radius: 14px; border-bottom: 1px solid var(--line2); }
.sheet .kick { display: inline-flex; align-items: center; gap: 7px; font: 500 13px/1.3 var(--sans); color: var(--muted); padding-right: 36px; }
.sheet .kick .dot { width: 6px; height: 6px; }
.sheet h3 { margin: 12px 0 0; font: 700 26px/1.15 var(--display); letter-spacing: -.03em; }
.sheet .when { font: 600 12px var(--sans); color: #fff; margin-top: 6px; font-variant-numeric: tabular-nums; }
.sheet .meta { display: grid; gap: 8px; margin: 14px 0 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.sheet .meta div { display: flex; gap: 10px; align-items: flex-start; }
.sheet .meta svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--dim); }
.sheet .desc { color: var(--text-2); font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; max-height: 140px; overflow: auto; margin-bottom: 14px; white-space: pre-wrap; }
.sheet .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.toast { position: fixed; left: 0; right: 0; bottom: 18px; margin: 0 auto; width: fit-content; background: var(--surface-2); border: 1px solid var(--hairline-strong); color: var(--text);
  padding: 9px 14px; border-radius: 8px; font: 500 13px/1.4 var(--sans); z-index: 60; max-width: min(440px, calc(100vw - 24px));
  opacity: 0; pointer-events: none; transform: translateY(calc(8px * var(--move)));
  transition: opacity var(--d-popover) var(--ease-out), transform var(--d-popover) var(--ease-out); }
.toast.show { opacity: 1; pointer-events: auto; transform: none; }
.toast:hover, .toast:focus-within { transition-duration: var(--d-hover-out); }
.toast.err { border-color: #FFFFFF; color: #FFFFFF; }

.empty { text-align: center; color: #E4E4E4; padding: 18px 8px; font-size: 13px; font-weight: 600; }
.empty-state { display: grid; justify-items: center; gap: 14px; padding: 56px 24px; text-align: center; background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 46%); }
.empty-state img { width: 64px; height: 64px; border-radius: 18px; }
.empty-state p { margin: 0; max-width: 34ch; font: 600 16px/1.4 var(--sans); color: #fff; }
.skeleton { background: var(--elev); border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  .ico:active, .btn:active, .qa-go:active, .lit:active { transform: none !important; }
  .ico.spin svg, .btn.spin svg { animation: none !important; }
}


/* ---------- motion: slide-in on navigation (content is already updated; this is purely visual) ---------- */
#main-view.slide { animation: slide-in var(--d-view-in) var(--ease-out) both; }
@keyframes slide-in { from { opacity: .86; transform: translateX(var(--slide, 0)); } to { opacity: 1; transform: none; } }
.smooth-scroll { scroll-behavior: smooth; }

/* ---------- command bar (Ctrl/Cmd+K) ---------- */
.cmd-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.72); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.cmd { width: min(560px, calc(100vw - 24px)); background: #000; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; }
.cmd-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 54px; border-bottom: 1px solid var(--line); }
.cmd-in input { flex: 1; background: none; border: 0; outline: 0; font: 500 16px/1.4 var(--sans); color: #fff; }
.cmd-in input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cmd-in input::placeholder { color: var(--dim); opacity: 1; }
.cmd-in kbd, .kbd { font: 500 11px/1 var(--sans); color: var(--text-2); border: 1px solid var(--line2); border-radius: 5px; padding: 4px 6px; background: #0E0E0E; }
.cmd-list { max-height: 50vh; overflow: auto; padding: 6px; }
.cmd-item { width: 100%; display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 10px 10px; border-radius: 8px; text-align: left; color: var(--text2); }
.cmd-item .ic { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--line2); font: 500 11px/1 var(--mono); color: #fff; }
.cmd-item .t { font: 500 14px var(--display); color: #fff; }
.cmd-item .d { font: 500 12px var(--sans); color: var(--text-2); }
.cmd-item[aria-selected="true"] { background: #fff; color: #000; }
.cmd-item[aria-selected="true"] .t, .cmd-item[aria-selected="true"] .d { color: #000; }
.cmd-item[aria-selected="true"] .ic { border-color: #000; color: #000; }
.cmd-foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 9px 14px; border-top: 1px solid var(--line); font: 500 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cmd-empty { padding: 18px 12px; color: var(--muted); font-size: 13px; }

/* ---------- shortcut sheet (?) ---------- */
.keys { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; padding: 8px 18px 18px; font-size: 13px; color: var(--text2); align-items: center; }
.keys .kbd { justify-self: start; }

/* ---------- area chart (KNOWN price-history style) ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis { font: 600 11px var(--sans); fill: #E8E8E8; }
.chart .val { font: 700 11px var(--sans); fill: #fff; font-variant-numeric: tabular-nums; }
.chart .avg { font: 500 11px var(--sans); fill: var(--muted); letter-spacing: .04em; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .pt.hot { filter: drop-shadow(0 0 6px rgba(255,255,255,.9)); }
.chart .tip, .tm .tip { position: absolute; pointer-events: none; background: var(--neon-white); color: #000; font: 600 12px/1.2 var(--sans); font-variant-numeric: tabular-nums; padding: 6px 9px; border-radius: 8px; white-space: nowrap; visibility: hidden; }
.chart .tip::before, .tm .tip::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,.65), 0 0 14px rgba(255,255,255,.5), 0 6px 18px rgba(255,255,255,.28);
  transition: opacity var(--d-fade) var(--ease-out); }
.chart .tip.on, .tm .tip.on { visibility: visible; }
.chart .tip.on::before, .tm .tip.on::before { opacity: 1; }
.pop { position: fixed; z-index: 40; width: min(248px, calc(100vw - 24px)); padding: 10px 10px 10px 12px; border-radius: var(--radius-lg);
  display: grid; grid-template-columns: minmax(0, 1fr) 28px; column-gap: 4px; align-items: center;
  background: var(--surface-2); color: var(--text-1); border: 1px solid var(--hairline-strong);
  box-shadow: 0 12px 32px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); backdrop-filter: none;
  animation: pop-in var(--d-popover) var(--ease-out); transform-origin: var(--ox, top) var(--oy, left); }
@keyframes pop-in { from { opacity: 0; } to { opacity: 1; } }
.pop .x { grid-area: 1 / 2; margin: 0; }
.pop b { grid-area: 1 / 1; display: block; min-width: 0; font: 600 14px/1.3 var(--sans); letter-spacing: -.02em; overflow-wrap: normal; hyphens: none; color: var(--text-1); text-shadow: none; }
.pop .when, .pop .acts, .pop input { grid-column: 1 / -1; }
.pop .when { margin-top: 4px; font: 500 13px/1.4 var(--sans); color: var(--text-2); text-shadow: none; font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
.pop .acts { display: flex; gap: 6px; margin-top: 10px; }
.pop .acts .btn { height: 28px; padding: 0 10px; font-size: 13px; }
.pop input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.45); color: #fff; font: 700 14px var(--sans); outline: 0; padding: 4px 0; }
.inline-new { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-new .when { flex: 1 0 100%; }
.inline-new input { flex: 1 1 120px; width: auto; min-width: 8em; }
.ev.dim, .ad.dim { border-color: var(--hairline); }
.ev.dim .t, .ev.dim .s, .ad.dim { color: var(--text-3); }
.col-hot { box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.jump { position: fixed; z-index: 30; background: #050505; color: #fff; border: 1px solid rgba(255,255,255,.32); border-radius: 10px; padding: 8px 10px; font: 600 13px var(--sans); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.toast button { margin-left: 10px; min-height: 28px; color: #fff; font-weight: 700; text-decoration: underline; }
.x { width: 28px; height: 28px; margin-left: auto; border: 0; border-radius: 999px; background: transparent; color: var(--text-1); font: 600 16px/1 var(--sans); cursor: pointer; }


@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
