/* Inkore AI OS · product styles on top of ../shared/base.css (body.command). A calm control room: deep teal, one glowing core. */
body.command {
  --faint: #7f999f;       /* a touch lighter than the shared token so small text stays above 4.5:1 on panels */
  --hi: #f2c28e;          /* high priority, warm */
  --mid: #8fd6de;         /* medium priority */
  --lo: #93aeb4;          /* low priority */
  --good: #8fdcb4;
  --warn: #f2c28e;
  --bad: #f0a79a;
  --glass: linear-gradient(180deg, rgba(19, 40, 45, 0.86), rgba(11, 25, 29, 0.86));
  --line-strong: rgba(120, 200, 210, 0.24);
  --gap: 16px;
  min-height: 100vh;
  background:
    radial-gradient(1200px 620px at 50% -12%, rgba(64, 170, 182, 0.16), transparent 62%),
    radial-gradient(900px 600px at 105% 105%, rgba(37, 92, 120, 0.18), transparent 60%),
    radial-gradient(700px 500px at -8% 90%, rgba(30, 90, 84, 0.16), transparent 60%),
    var(--page);
  background-attachment: fixed;
}
body.command::before { /* faint control-room grid, fading out toward the edges */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(120, 200, 210, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 200, 210, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 72%);
}
body > * { position: relative; z-index: 1; }
::selection { background: rgba(95, 196, 207, 0.35); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.grow { flex: 1; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 10px; }
.noscript { padding: 40px; text-align: center; }

/* ───────── buttons ───────── */
button { transition: background var(--fast), border-color var(--fast), color var(--fast), transform var(--fast); }
button:not(:disabled):active { transform: translateY(1px); }
.btn-ghost, .file-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: .45em .95em; cursor: pointer; font-size: 14px; white-space: nowrap; }
.btn-ghost:hover, .file-btn:hover { background: var(--hover); border-color: var(--line-strong); color: var(--ink); }
.sm { font-size: 13px; padding: .38em .85em; }
.xs { font-size: 12px; padding: .25em .65em; gap: 4px; }
.xs svg { width: 14px; height: 14px; }
.sm svg { width: 15px; height: 15px; }
button.primary { font-weight: 600; box-shadow: 0 0 0 1px rgba(95, 196, 207, 0.2), 0 6px 24px -10px rgba(95, 196, 207, 0.7); }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 10px; background: transparent; border: 1px solid transparent; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--ink); border-color: var(--line); }
.icon-btn svg { width: 16px; height: 16px; }
.chip { font-size: 12.5px; padding: .3em .8em; background: rgba(95, 196, 207, 0.06); border: 1px solid var(--line); color: var(--text); }
.chip:hover { border-color: var(--line-strong); color: var(--ink); background: rgba(95, 196, 207, 0.12); }
.chip[aria-pressed="true"] { background: rgba(95, 196, 207, 0.18); border-color: rgba(95, 196, 207, 0.5); color: var(--ink); }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-input:focus-visible + .file-btn, .file-input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; background: var(--hover); border-color: var(--line-strong); color: var(--ink); }
input::placeholder { color: var(--faint); }
input, select { border-color: var(--line); background: rgba(6, 18, 21, 0.6); }
input:hover, select:hover { border-color: var(--line-strong); }
input:focus, select:focus { border-color: rgba(95, 196, 207, 0.55); outline: none; box-shadow: 0 0 0 3px rgba(95, 196, 207, 0.15); }
input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 26px; }
kbd.kbd { font: 600 11px/1 var(--mono); color: var(--faint); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }

/* ───────── top bar ───────── */
.topbar { display: flex; align-items: center; gap: 16px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: rgba(6, 16, 19, 0.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 16px; letter-spacing: .01em; }
.brand-name b { font-weight: 600; color: var(--accent-hover); }
.brand-orb, .mini-orb { width: 20px; height: 20px; border-radius: 50%; flex: none; background: radial-gradient(circle at 38% 32%, #f2feff 0%, #a6eef3 14%, #3fb6c2 42%, #0d5560 78%); box-shadow: 0 0 12px rgba(95, 196, 207, 0.6); }
.clock { flex: 1; display: flex; justify-content: center; align-items: baseline; gap: 10px; color: var(--muted); }
.clock-time { font: 600 15px/1 var(--mono); color: var(--ink); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.clock-date { font-size: 13px; display: inline-block; }
.clock-date::first-letter { text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.mode-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; background: rgba(95, 196, 207, 0.06); }
.mode-prefix { color: var(--muted); }
.mode-prefix::after { content: " ·"; }
.mode-dot { width: 8px; height: 8px; border-radius: 50%; background: #f3d9a4; box-shadow: 0 0 8px rgba(243, 217, 164, 0.8); }
.mode-pill[data-mode="own"] .mode-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.mode-pill[data-mode="inkore"] .mode-dot { background: #c9bfe0; box-shadow: 0 0 8px #a59cb8; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang-switch button { border: 0; background: transparent; padding: .28em .7em; font-size: 12px; font-weight: 600; color: var(--muted); }
.lang-switch button[aria-pressed="true"] { background: rgba(95, 196, 207, 0.16); color: var(--ink); }

/* ───────── demo banner ───────── */
.banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 12px 22px 0; padding: 10px 12px 10px 18px; border-radius: 16px; border: 1px solid rgba(243, 217, 164, 0.22); background: linear-gradient(90deg, rgba(243, 217, 164, 0.09), rgba(243, 217, 164, 0.03)); color: #f1e3c4; }
.banner p { margin: 0; flex: 1; min-width: 220px; font-size: 14px; }
.banner-actions { display: flex; align-items: center; gap: 8px; }
.banner button { font-size: 13px; padding: .38em .9em; }
.banner .icon-btn { width: 30px; padding: 0; color: #f1e3c4; }

/* ───────── layout ───────── */
.os { display: grid; gap: var(--gap); padding: var(--gap) 22px 22px; }
.col { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; min-height: 0; }
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; min-height: 0; min-width: 0; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.panel-head { display: flex; align-items: center; gap: 8px; min-height: 32px; margin-bottom: 8px; flex-wrap: wrap; }
.panel-title { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.panel-meta { margin-left: auto; font: 600 12px/1 var(--mono); color: var(--faint); font-variant-numeric: tabular-nums; }
.panel-body { flex: 1; min-height: 0; overflow: auto; margin: 0 -6px; padding: 2px 6px; scrollbar-width: thin; scrollbar-color: rgba(120, 200, 210, 0.2) transparent; }
.panel-body:focus-visible { outline-offset: -2px; border-radius: 10px; }
.panel-foot { margin: 8px 0 0; font-size: 12px; color: var(--faint); min-height: 1em; }
.empty { color: var(--muted); font-size: 14px; margin: 8px 2px; }
.err { margin: 0 0 8px; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; color: #ffd9d2; background: rgba(240, 167, 154, 0.1); border: 1px solid rgba(240, 167, 154, 0.3); }
.status-line { margin: 0; font-size: 13px; color: var(--muted); min-height: 0; }
.status-line:empty { display: none; }
.status-line.ok { color: var(--good); }
.status-line.bad { color: var(--bad); }
.add-row { display: flex; gap: 8px; margin-bottom: 10px; }
.add-row input { flex: 1; min-width: 0; }
.add-row select { width: auto; flex: none; font-size: 13.5px; }
.add-btn { width: 40px; height: auto; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(95, 196, 207, 0.1); color: var(--accent-hover); }
.add-btn:hover { background: rgba(95, 196, 207, 0.2); }
.progress { height: 3px; border-radius: 3px; background: rgba(120, 200, 210, 0.1); margin: -2px 0 12px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3fb6c2, var(--accent-hover)); border-radius: 3px; transition: width var(--normal) var(--ease); }

/* ───────── hero and the core ───────── */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 12px 0; flex: none; }
.core { --size: 132px; position: relative; width: var(--size); height: var(--size); flex: none; display: grid; place-items: center; margin: 2px 0 6px; }
.core > span { position: absolute; border-radius: 50%; }
.core-halo { inset: -22%; background: radial-gradient(circle, rgba(95, 196, 207, 0.32) 0%, rgba(95, 196, 207, 0.1) 38%, transparent 66%); animation: breathe 6s var(--ease) infinite; }
.core-ring { inset: 7%; border: 1px solid rgba(134, 215, 223, 0.16); animation: spin 26s linear infinite; }
.core-ring::after { content: ""; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #c8f6f9; box-shadow: 0 0 10px #8fe8ef, 0 0 2px #fff; }
.core-wave { inset: 22%; border: 1px solid rgba(134, 215, 223, 0.55); opacity: 0; }
.core-orb { inset: 22%; overflow: hidden; background: radial-gradient(circle at 37% 31%, #f4feff 0%, #b2f1f5 8%, #52c6d0 28%, #167480 58%, #07363e 86%, #052a30 100%); box-shadow: 0 0 26px rgba(95, 196, 207, 0.55), 0 0 80px rgba(95, 196, 207, 0.22), inset -8px -12px 22px rgba(2, 20, 24, 0.55); transition: filter var(--normal) var(--ease), box-shadow var(--normal) var(--ease); }
.core-orb::before { content: ""; position: absolute; inset: -25%; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 18%, rgba(196, 250, 255, 0.55) 28%, transparent 42% 66%, rgba(120, 220, 230, 0.45) 78%, transparent 90%); filter: blur(9px); mix-blend-mode: screen; animation: spin 16s linear infinite; }
.core-orb::after { content: ""; position: absolute; left: 20%; top: 14%; width: 34%; height: 24%; border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 255, 255, 0.7), transparent 70%); filter: blur(2px); }
body.thinking .core-halo { animation-duration: 1.3s; background: radial-gradient(circle, rgba(120, 225, 235, 0.5) 0%, rgba(95, 196, 207, 0.16) 40%, transparent 68%); }
body.thinking .core-orb { filter: brightness(1.18) saturate(1.15); box-shadow: 0 0 34px rgba(120, 225, 235, 0.8), 0 0 110px rgba(95, 196, 207, 0.38), inset -8px -12px 22px rgba(2, 20, 24, 0.45); }
body.thinking .core-orb::before { animation-duration: 2.4s; }
body.thinking .core-ring { animation-duration: 3.2s; border-color: rgba(134, 215, 223, 0.32); }
body.thinking .core-wave { animation: wave 1.8s var(--ease) infinite; }
body.thinking .core-wave:nth-of-type(3) { animation-delay: .6s; }
body.thinking .core-wave:nth-of-type(4) { animation-delay: 1.2s; }
@keyframes breathe { 0%, 100% { transform: scale(0.94); opacity: .78; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes wave { 0% { transform: scale(0.9); opacity: .7; } 100% { transform: scale(2.1); opacity: 0; } }
.greet { min-width: 0; max-width: 100%; }
.greet-title { font-size: 28px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 4px; overflow-wrap: anywhere; }
.greet-sub { margin: 0; color: var(--muted); font-size: 14px; }
.greet-sub::first-letter { text-transform: uppercase; }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.stats li { font-size: 12.5px; color: var(--text); padding: .25em .75em; border-radius: 999px; border: 1px solid var(--line); background: rgba(6, 18, 21, 0.45); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.stats li b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.stats li.next { border-color: rgba(95, 196, 207, 0.3); }
.core-status { margin: 6px 0 0; font: 600 11.5px/1.4 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
body.thinking .core-status { color: var(--accent-hover); }

/* ───────── rich text (Kore) ───────── */
.rich { color: var(--text); font-size: 14.5px; line-height: 1.55; }
.rich p { margin: 0 0 .6em; }
.rich ul, .rich ol { margin: 0 0 .7em; padding-left: 1.15em; }
.rich li { margin: .18em 0; }
.rich li::marker { color: var(--accent); }
.rich strong { color: var(--ink); font-weight: 600; }
.rich code { font: 13px var(--mono); background: rgba(95, 196, 207, 0.1); padding: 0 .3em; border-radius: 4px; }
.rich .rich-h { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-hover); margin: .9em 0 .35em; font-weight: 700; }
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.brief-body .rich > p:first-child { color: var(--ink); font-size: 15.5px; }

/* ───────── Today ───────── */
.tasks, .notes, .metrics, .events, .chat-log { list-style: none; margin: 0; padding: 0; }
.task { display: flex; align-items: center; gap: 6px; padding: 7px 6px 7px 2px; border-radius: 12px; border: 1px solid transparent; position: relative; background: transparent; transition: background var(--fast); }
.task + .task { margin-top: 2px; }
.task:hover, .task:focus-within { background: rgba(95, 196, 207, 0.05); }
.task.focused { border-color: rgba(95, 196, 207, 0.28); background: rgba(95, 196, 207, 0.06); }
.task.dragging { z-index: 5; background: #10262b; border-color: var(--line-strong); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.8); }
.is-dragging .task:not(.dragging) { transition: background var(--fast); }
.grip, .grip-space { width: 22px; height: 30px; flex: none; }
.grip { display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--faint); border-radius: 8px; cursor: grab; touch-action: none; }
.grip svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.grip:hover { color: var(--text); background: var(--hover); }
.dragging .grip { cursor: grabbing; }
.check { position: relative; width: 20px; height: 20px; flex: none; }
.check input { position: absolute; inset: 0; margin: 0; width: 20px; height: 20px; opacity: 0; cursor: pointer; padding: 0; }
.check-ui { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--line-strong); pointer-events: none; transition: all var(--fast); }
.prio-high .check-ui { border-color: rgba(242, 194, 142, 0.7); }
.check input:checked + .check-ui { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check-ui::after { content: ""; position: absolute; left: 6px; top: 2.5px; width: 5px; height: 10px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check input:focus-visible + .check-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.task-title { flex: 1; min-width: 0; color: var(--ink); font-size: 14.5px; line-height: 1.35; cursor: pointer; padding: 2px 4px; overflow-wrap: anywhere; }
.task.done .task-title { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(120, 200, 210, 0.35); }
.prio-chip { font: 600 11px/1 var(--font); letter-spacing: .04em; padding: .42em .7em; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--lo); flex: none; }
.prio-high .prio-chip { color: var(--hi); border-color: rgba(242, 194, 142, 0.35); background: rgba(242, 194, 142, 0.07); }
.prio-medium .prio-chip { color: var(--mid); border-color: rgba(143, 214, 222, 0.28); }
.task.done .prio-chip { opacity: .55; }
/* row actions take no room until the row is hovered or focused (still reachable with Tab) */
.row-act { transition: opacity var(--fast); }
.act-space { display: inline-block; width: 30px; height: 30px; flex: none; }
@media (hover: hover) {
  li:not(:hover):not(:focus-within) .row-act { width: 0; opacity: 0; border-width: 0; overflow: hidden; }
}

/* ───────── Quick capture ───────── */
.note { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 8px; padding: 8px 6px 8px 12px; border-radius: 12px; border-left: 2px solid rgba(165, 156, 184, 0.5); background: rgba(165, 156, 184, 0.05); }
.note + .note { margin-top: 6px; }
.note-text { color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.note-time { grid-column: 1; font-size: 12px; color: var(--faint); }
.note-acts { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; }

/* ───────── Calendar ───────── */
.day + .day { margin-top: 12px; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); text-transform: capitalize; }
.day-date { font: 500 12px var(--mono); color: var(--faint); text-transform: none; }
.is-today .day-head span:first-child { color: var(--accent-hover); }
.ev { display: flex; align-items: stretch; gap: 10px; padding: 6px 4px 6px 0; border-radius: 10px; }
.ev:hover, .ev:focus-within { background: rgba(95, 196, 207, 0.05); }
.ev-time { width: 46px; flex: none; text-align: right; font: 600 13px/1.25 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; padding-top: 1px; }
.ev-time small { display: block; font-weight: 400; font-size: 11.5px; color: var(--faint); }
.ev-time.all { font: 600 10.5px/1.3 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--sand); }
.ev-bar { width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--accent), rgba(95, 196, 207, 0.3)); flex: none; }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ev-title { color: var(--ink); font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.ev-loc { color: var(--muted); font-size: 12.5px; }
.ev-tag { align-self: flex-start; margin-top: 3px; font: 600 10.5px/1 var(--font); letter-spacing: .05em; text-transform: uppercase; color: var(--warn); border: 1px solid rgba(242, 194, 142, 0.35); border-radius: 999px; padding: .3em .55em; }
.ev-tag.now { color: var(--accent-hover); border-color: rgba(95, 196, 207, 0.45); }
.ev.clash .ev-bar { background: linear-gradient(180deg, var(--warn), rgba(242, 194, 142, 0.3)); }
.ev.past { opacity: .5; }
.ev.current { background: rgba(95, 196, 207, 0.08); }
.ev-acts { display: flex; align-items: center; }
.ev-none { color: var(--muted); font-size: 13.5px; padding: 4px 2px; }
.now-line { position: relative; height: 14px; margin: 2px 0; }
.now-line::before { content: ""; position: absolute; left: 54px; right: 0; top: 50%; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.now-line span { position: absolute; left: 0; width: 46px; text-align: right; top: 0; font: 600 10.5px/14px var(--mono); color: var(--accent-hover); }

/* ───────── Numbers ───────── */
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 8px; }
.metric { padding: 8px 11px 7px; border-radius: 14px; border: 1px solid var(--line); background: rgba(6, 18, 21, 0.35); min-width: 0; }
.metric.editing { grid-column: 1 / -1; }
.m-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; min-height: 22px; }
.m-name { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.m-delta { font: 600 11.5px var(--mono); color: var(--muted); white-space: nowrap; }
.m-delta.up { color: var(--good); }
.m-delta.down { color: var(--bad); }
.m-mid { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 8px; margin-top: 1px; min-width: 0; }
.m-value { font: 600 21px/1.15 var(--font); color: var(--ink); letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.m-value.long { font-size: 17px; line-height: 1.4; }
.m-hint { display: block; font-size: 12px; color: var(--faint); margin: 8px 0 4px; }
.spark { display: block; width: 100%; height: 26px; overflow: visible; margin: 5px 0 1px; }
.spark-line { stroke: var(--accent); stroke-width: 1.8; fill: none; vector-effect: non-scaling-stroke; }
.spark-area { fill: rgba(95, 196, 207, 0.12); stroke: none; }
.spark-dot { fill: #c8f6f9; stroke: none; filter: drop-shadow(0 0 4px rgba(95, 196, 207, 0.9)); }
.m-target { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.m-target .bar { flex: 1; min-width: 16px; height: 4px; border-radius: 4px; background: rgba(120, 200, 210, 0.12); overflow: hidden; }
.m-target .m-tgt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.m-target .bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #3fb6c2, var(--accent-hover)); }
.m-top .row-act { width: 24px; height: 24px; margin-right: -6px; }
.m-add { width: 24px; height: 24px; border-radius: 8px; border: 1px solid var(--line); color: var(--accent-hover); flex: none; }
.m-add[aria-expanded="true"] { background: rgba(95, 196, 207, 0.16); }
.m-entry { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 8px; }
.m-entry[hidden] { display: none; }
.m-entry label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.m-entry input { padding: .4em .6em; font-size: 14px; }

/* ───────── Focus ───────── */
.p-focus { flex: none; }
.focus { display: flex; align-items: center; gap: 14px; }
.focus-ring { width: 62px; height: 62px; flex: none; }
.focus-ring svg { width: 62px; height: 62px; transform: rotate(-90deg); }
.focus-row { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; }
.reset-btn { border: 1px solid var(--line); border-radius: 999px; width: 32px; height: 32px; }
.focus-row + .focus-row { margin-top: 6px; }
.ring-bg { stroke: rgba(120, 200, 210, 0.12); stroke-width: 5; fill: none; }
.ring-fg { stroke: var(--accent); stroke-width: 5; fill: none; stroke-linecap: round; transition: stroke-dashoffset 300ms linear; filter: drop-shadow(0 0 5px rgba(95, 196, 207, 0.6)); }
.focus-main { flex: 1; min-width: 0; }
.focus-time { font: 600 26px/1 var(--mono); color: var(--ink); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.p-focus.running .focus-time { color: var(--accent-hover); text-shadow: 0 0 18px rgba(95, 196, 207, 0.45); }
.focus-task { font-size: 12.5px; line-height: 1.35; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; min-width: 0; flex: 1; }
.focus-task b { color: var(--ink); font-weight: 600; }
.focus-controls { display: flex; align-items: center; gap: 6px; }
.presets { display: inline-flex; gap: 4px; flex: none; }
.presets .chip { padding: .25em .6em; font: 600 12px var(--mono); }

/* ───────── Ask Kore ───────── */
.chat-body { display: flex; flex-direction: column; }
.chat-log { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.chat-hello { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.chat-hello p { margin: 0; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg.user { justify-content: flex-end; }
.msg .bubble { max-width: 88%; border-radius: 16px; padding: 9px 13px; font-size: 14.5px; }
.msg.user .bubble { background: rgba(95, 196, 207, 0.14); border: 1px solid rgba(95, 196, 207, 0.22); color: var(--ink); border-bottom-right-radius: 6px; overflow-wrap: anywhere; }
.msg.kore .bubble { background: rgba(6, 18, 21, 0.45); border: 1px solid var(--line); border-top-left-radius: 6px; }
.mini-orb { width: 22px; height: 22px; margin-top: 4px; }
.who { display: flex; align-items: center; gap: 8px; font: 700 11px/1.6 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-hover); margin-bottom: 2px; }
.who .demo-flag { font-size: 9.5px; padding: .3em .55em; }
.dots { display: inline-flex; gap: 4px; padding: 6px 2px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: dot 1.1s ease-in-out infinite; opacity: .4; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding: 0 0 2px; }
.chips .chip { white-space: nowrap; flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ask-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(4, 14, 17, 0.7); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 0 0 rgba(95, 196, 207, 0); transition: box-shadow var(--normal) var(--ease), border-color var(--fast); }
.ask-bar:focus-within { border-color: rgba(95, 196, 207, 0.55); box-shadow: 0 0 0 4px rgba(95, 196, 207, 0.12), 0 0 40px -10px rgba(95, 196, 207, 0.5); }
.ask-bar input { border: 0; background: transparent; padding: .45em 0; box-shadow: none; flex: 1; min-width: 0; font-size: 15px; }
.ask-bar input:focus { box-shadow: none; }
.ask-bar input:focus-visible { outline: none; }
.send-btn { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
body.thinking .send-btn { animation: none; }

/* ───────── dialogs ───────── */
dialog.sheet { width: min(560px, calc(100vw - 24px)); max-height: min(88vh, 860px); padding: 0; border: 1px solid var(--line-strong); border-radius: 22px; background: #0c1d21; color: var(--text); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02); }
dialog.sheet.small { width: min(440px, calc(100vw - 24px)); }
dialog.sheet[open] { display: flex; flex-direction: column; animation: rise var(--normal) var(--ease); }
dialog.sheet > form:not(.sheet-head) { display: flex; flex-direction: column; min-height: 0; }
dialog::backdrop { background: rgba(2, 8, 10, 0.66); backdrop-filter: blur(4px); }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px 22px; margin: 0; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 18px; }
.sheet-body { padding: 14px 22px 18px; overflow: auto; }
.sheet-body > label, .sheet-body .two label, .mode-fields label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.set { border: 0; padding: 0; margin: 0 0 18px; }
.set legend { padding: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-hover); margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg label { display: inline-flex; align-items: center; gap: 6px; padding: .35em .9em; border-radius: 999px; cursor: pointer; font-size: 14px; }
.seg input { width: auto; margin: 0; accent-color: var(--accent); }
.seg label:has(input:checked) { background: rgba(95, 196, 207, 0.14); color: var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two .allday { display: flex; align-items: flex-end; padding-bottom: 8px; min-width: 0; }
.two .allday label { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-size: 14px; white-space: nowrap; cursor: pointer; }
.two .allday input { width: 18px; height: 18px; margin: 0; padding: 0; flex: none; accent-color: var(--accent); }
#ev-nextday { margin-top: 6px; color: var(--accent-hover); }
.mode-fields label.remember { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--text); font-size: 13.5px; cursor: pointer; }
.remember input { width: 18px; height: 18px; margin: 0; padding: 0; flex: none; accent-color: var(--accent); }
.mode:has(input:disabled) { opacity: .62; cursor: not-allowed; }
.backup-box { margin-top: 12px; }
.backup-box > label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.backup-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.backup-row select { flex: 1 1 220px; min-width: 0; font-size: 13.5px; }
.modes { display: grid; gap: 8px; }
.mode { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; }
.mode:hover { border-color: var(--line-strong); }
.mode:has(input:checked) { border-color: rgba(95, 196, 207, 0.5); background: rgba(95, 196, 207, 0.07); }
.mode input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.mode b { display: block; color: var(--ink); font-weight: 600; font-size: 14.5px; }
.mode small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }
.mode-fields { margin-top: 6px; padding: 2px 2px 0; }
.mode-fields[hidden] { display: none; }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.hint:empty { display: none; }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.check-row[hidden] { display: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ───────── toasts ───────── */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(520px, calc(100vw - 24px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 16px; border-radius: 14px; background: #10272c; border: 1px solid var(--line-strong); color: var(--ink); font-size: 14px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8); animation: rise var(--normal) var(--ease); transition: opacity 400ms, transform 400ms; }
.toast.out { opacity: 0; transform: translateY(6px); }
@media (min-width: 1180px) {
  .toasts { top: 68px; bottom: auto; }
}

/* ───────── desktop: the whole day on one screen ───────── */
@media (min-width: 1180px) {
  .os { grid-template-columns: minmax(320px, 1fr) minmax(460px, 1.3fr) minmax(340px, 1fr); }
}
@media (min-width: 1180px) and (min-height: 800px) {
  body.command { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  .topbar { position: relative; }
  .os { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .col { height: 100%; }
  .p-today { flex: 1.5 1 0; }
  .p-capture { flex: 0.8 1 0; min-height: 150px; }
  .p-brief { flex: 1.45 1 0; }
  .p-chat { flex: 1 1 0; min-height: 252px; } /* room for the welcome line and the suggestions on two rows */
  body.has-chat .p-brief { flex: 1.1 1 0; }
  body.has-chat .p-chat { flex: 1.25 1 0; }
  .p-cal { flex: 1 1 0; min-height: 190px; }
  .p-num { flex: 0 1 auto; max-height: 56%; }
}
@media (min-width: 1180px) and (max-height: 799px) {
  .p-brief .panel-body, .p-chat .panel-body { max-height: 420px; }
  .p-today .panel-body { max-height: 460px; }
}
@media (min-width: 1180px) and (max-height: 960px) {
  .hero { flex-direction: row; justify-content: center; text-align: left; gap: 22px; padding: 2px 8px 0; }
  .greet { flex: 0 1 auto; }
  .core { --size: 112px; margin: 0; }
  .greet-title { font-size: 25px; }
  .stats { justify-content: flex-start; margin-top: 7px; }
  .core-status { margin-top: 6px; }
}
/* tablet: two columns, the core and the conversation on top */
@media (min-width: 720px) and (max-width: 1179px) {
  .os { grid-template-columns: 1fr 1fr; grid-template-areas: "hero hero" "brief chat" "today cal" "today num" "capture focus"; }
  .col { display: contents; }
  .hero { grid-area: hero; } .p-brief { grid-area: brief; } .p-chat { grid-area: chat; } .p-today { grid-area: today; }
  .p-cal { grid-area: cal; } .p-num { grid-area: num; } .p-capture { grid-area: capture; } .p-focus { grid-area: focus; }
  .p-brief .panel-body, .p-chat .panel-body { max-height: 420px; }
  .clock-date { display: none; }
}
/* phone */
@media (max-width: 719px) {
  :root { --gap: 12px; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .clock, .settings-text, .mode-prefix { display: none; }
  .brand { font-size: 14.5px; white-space: nowrap; gap: 8px; }
  .brand-orb { width: 18px; height: 18px; }
  body.mode-demo #demo-flag { display: none; }
  .mode-pill { padding: .45em .8em; }
  .top-actions { gap: 6px; margin-left: auto; }
  .settings-btn { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .banner { margin: 10px 12px 0; padding: 10px 10px 10px 14px; }
  .banner p { min-width: 0; flex-basis: 100%; }
  .os { padding: 12px 12px 90px; grid-template-columns: minmax(0, 1fr); }
  .col { display: contents; }
  .hero { order: 1; } .p-brief { order: 2; } .p-chat { order: 3; } .p-today { order: 4; }
  .p-cal { order: 5; } .p-num { order: 6; } .p-capture { order: 7; } .p-focus { order: 8; }
  .core { --size: 120px; }
  .greet-title { font-size: 25px; }
  .panel { padding: 12px 12px; }
  .p-chat .panel-body { max-height: 60vh; }
  .row-act { opacity: .85; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .two .allday { padding: 12px 0 2px; }
  .m-entry { grid-template-columns: 1fr 1fr; }
  .m-entry button { grid-column: 1 / -1; }
  .kbd { display: none; }
  dialog.sheet { max-height: 92vh; }
}
@media (prefers-reduced-motion: reduce) {
  body.thinking .core-orb { filter: brightness(1.25) saturate(1.2); }
  body.thinking .core-wave { opacity: .35; transform: scale(1.4); }
}

/* the hidden attribute always wins over display rules above */
[hidden] { display: none !important; }
