:root {
  --bg: #f7f7f9; --panel: #ffffff; --panel-2: #f3f4f7; --ink: #0f172a; --ink-2: #475569; --ink-3: #64748b;
  --line: #e7e8ee; --accent: #4f46e5; --accent-ink: #ffffff; --accent-soft: #eef0ff; --ok: #15803d; --warn: #b45309; --bad: #b91c1c;
  --ok-bg: #e8f5ec; --warn-bg: #fdf3e2; --bad-bg: #fdecec; --now: #fef9c3; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f14; --panel: #151821; --panel-2: #1c202b; --ink: #e8eaf0; --ink-2: #b4bac8; --ink-3: #8a93a6;
    --line: #262b37; --accent: #8b93ff; --accent-ink: #0d0f14; --accent-soft: #23264a; --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
    --ok-bg: #12291b; --warn-bg: #2d2412; --bad-bg: #2d1515; --now: #2b2a14; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f14; --panel: #151821; --panel-2: #1c202b; --ink: #e8eaf0; --ink-2: #b4bac8; --ink-3: #8a93a6;
  --line: #262b37; --accent: #8b93ff; --accent-ink: #0d0f14; --accent-soft: #23264a; --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
  --ok-bg: #12291b; --warn-bg: #2d2412; --bad-bg: #2d1515; --now: #2b2a14; --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 16px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 6px 16px; }
.brand small { display: block; color: var(--ink-3); font-size: 12px; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg,#4f46e5,#7c3aed); color: #fff; display: grid; place-items: center; font-weight: 700; }
nav { overflow-y: auto; flex: 1; margin: 0 -4px; padding: 0 4px; }
nav a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); text-decoration: none; cursor: pointer; }
nav a:hover { background: var(--panel-2); }
nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.savestate { margin-top: auto; font-size: 12px; color: var(--ink-3); padding: 8px; }
main { padding: 24px 32px 64px; min-width: 0; max-width: 1480px; }
h1 { font-size: 24px; margin: 0; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 0 0 8px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.card:has(> table) { overflow-x: auto; }
.btn { border: 1px solid var(--line); background: var(--panel); padding: 6px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--panel-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 3px 8px; font-size: 12px; }
.icon { border: 0; background: transparent; cursor: pointer; padding: 3px 6px; border-radius: 6px; color: var(--ink-3); font-size: 13px; }
.icon:hover { background: var(--panel-2); color: var(--ink); }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 8px; min-width: 0; }
textarea { width: 100%; min-height: 90px; resize: vertical; }
label.f { display: grid; gap: 4px; font-size: 12px; color: var(--ink-3); }
label.f > * { font-size: 14px; color: var(--ink); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.form .full { grid-column: 1 / -1; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--ink-3); font-weight: 600; }
td input[type=number], td input[type=text] { width: 100%; }
.chip { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); }
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
/* timeline */
.tl { display: grid; gap: 6px; }
.it { display: grid; grid-template-columns: 92px 4px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.it .time { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; padding-top: 1px; }
.it .bar { border-radius: 4px; align-self: stretch; }
.it .t { font-weight: 550; overflow-wrap: anywhere; }
.it .d { color: var(--ink-3); font-size: 12px; white-space: pre-line; margin-top: 2px; }
.it .acts { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.it.personal { background: var(--panel-2); }
.it.personal .t { font-weight: 450; }
.it.done .t { text-decoration: line-through; color: var(--ink-3); }
.it.skipped { opacity: .55; }
.it.now { outline: 2px solid #eab308; background: var(--now); }
.it .flag { color: var(--warn); font-size: 12px; margin-top: 3px; }
.statusbtn.on { background: var(--ok-bg); color: var(--ok); }
.p1 { color: var(--bad); font-weight: 700; }
/* week */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wcol { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 200px; }
.wcol.today { outline: 2px solid var(--accent); }
.wcol h4 { margin: 0 0 6px; font-size: 13px; display: flex; justify-content: space-between; }
.wi { font-size: 12px; padding: 4px 6px; border-radius: 6px; margin-bottom: 4px; background: var(--panel-2); border-left: 3px solid; cursor: pointer; overflow-wrap: anywhere; }
.wi.done { opacity: .55; text-decoration: line-through; }
/* misc */
.progress { height: 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); }
.kpi { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.list-item { padding: 8px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.list-item:hover { background: var(--panel-2); }
.list-item.on { border-color: var(--accent); background: var(--panel-2); }
.att { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.att figure { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel-2); }
.att img, .att video { width: 100%; height: 110px; object-fit: cover; display: block; background: #000; }
.att figcaption { font-size: 11px; padding: 4px 6px; display: flex; justify-content: space-between; gap: 4px; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--ink-2); }
.tabs button.on { border-color: var(--accent); color: var(--ink); font-weight: 600; }
pre.report { white-space: pre-wrap; background: var(--panel-2); padding: 12px; border-radius: 8px; font: 13px/1.5 ui-monospace, Menlo, monospace; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-card { background: var(--panel); border-radius: 14px; width: min(720px, 100%); max-height: 90vh; overflow: auto; padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; max-width: 90vw; }
.banner { position: fixed; top: 12px; right: 16px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid #eab308; border-radius: 10px; padding: 10px 14px; z-index: 40; box-shadow: var(--shadow); max-width: 380px; }
.hidden { display: none !important; }
.phase { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.phase > div { padding: 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.phase > div.cur { border-color: var(--accent); }
svg text { fill: var(--ink-3); font-size: 11px; }
@media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } .week { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 10px 16px; }
  nav { display: flex; overflow-x: auto; gap: 4px; }
  nav a { white-space: nowrap; }
  main { padding: 14px 16px 60px; }
  .it { grid-template-columns: 70px 4px minmax(0, 1fr); }
  .it .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .form { grid-template-columns: 1fr; }
  .phase { grid-template-columns: 1fr 1fr; }
  .week { grid-template-columns: 1fr; }
}

/* ===== Company OS ===== */
.navg { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 14px 10px 4px; font-weight: 600; }
.ni { width: 16px; text-align: center; opacity: .65; font-size: 12px; }
.badge { margin-left: auto; background: var(--bad); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 6px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-h h3 { margin: 0; }
.grow { flex: 1; min-width: 0; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.full { width: 100%; }
.clamp, .clamp1, .clamp2, .clamp3 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; }
.clamp { -webkit-line-clamp: 9; } .clamp1 { -webkit-line-clamp: 1; } .clamp2 { -webkit-line-clamp: 2; } .clamp3 { -webkit-line-clamp: 3; }
.ask { display: flex; gap: 8px; margin: 4px 0 18px; }
.ask input { flex: 1; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-size: 15px; box-shadow: var(--shadow); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; box-shadow: var(--shadow); }
.tile:hover { border-color: var(--accent); }
.tile-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.tile-v { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile-s { font-size: 12px; color: var(--ink-3); }
.tile-spark { margin-top: 6px; color: var(--ink-3); } .tile-spark.ok { color: var(--ok); } .tile-spark.bad { color: var(--bad); } .tile-spark.warn { color: var(--warn); }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col > .card + .card { margin-top: 16px; }
.li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.li:last-child { border-bottom: 0; }
.bar-s { width: 3px; height: 16px; border-radius: 2px; flex: none; }
.rockrow { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 13.5px; }
.progress.thin { height: 4px; margin-top: 4px; }
.prio { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; flex: none; }
.prio.p1 { background: var(--bad-bg); color: var(--bad); } .prio.p2 { background: var(--warn-bg); color: var(--warn); } .prio.p3 { background: var(--panel-2); color: var(--ink-3); }
.alert { padding: 8px 10px; border-radius: 10px; background: var(--warn-bg); margin-bottom: 6px; cursor: pointer; font-size: 13px; }
.md { font-size: 14px; } .md h3, .md h4, .md h5 { margin: 12px 0 4px; font-size: 14px; } .md p { margin: 6px 0; } .md ul, .md ol { margin: 6px 0; padding-left: 20px; } .md li { margin: 2px 0; }
.md code { background: var(--panel-2); padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.mdt { margin: 8px 0; font-size: 13px; } .mdt th { background: var(--panel-2); }
pre.plain { white-space: pre-wrap; font: inherit; margin: 0; }
.feeditem.unread { border-left: 3px solid var(--accent); }
.actions { margin-top: 10px; display: grid; gap: 6px; }
.action { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.action > div { flex: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-2 > .card + .card { margin-top: 0; }
.span2 { grid-column: 1 / -1; }
textarea.inline { border: 1px solid transparent; background: var(--panel-2); border-radius: 10px; min-height: 0; padding: 8px 10px; }
textarea.inline:focus, .title-input:focus { border-color: var(--accent); outline: none; background: var(--panel); }
.title-input { font-size: 20px; font-weight: 600; border: 1px solid transparent; background: transparent; width: min(720px, 100%); padding: 4px 6px; margin-left: -6px; border-radius: 8px; }
.swot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .swot b { font-size: 12px; color: var(--ink-3); }
.review { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--panel-2) 0); display: grid; place-items: center; flex: none; }
.ring.ok { background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--panel-2) 0); }
.ring span { width: 60px; height: 60px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-weight: 700; font-size: 14px; text-align: center; line-height: 1.1; }
.ring small { display: block; font-size: 9px; font-weight: 500; color: var(--ink-3); }
table.rocks td { vertical-align: top; } table.rocks input[type=range] { width: 90px; }
.msl { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.fngrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.fncard { cursor: pointer; } .fncard:hover { border-color: var(--accent); }
.fngrid .card + .card { margin-top: 0; }
.maturity { display: flex; gap: 4px; margin-top: 10px; } .maturity i { flex: 1; height: 5px; border-radius: 3px; background: var(--panel-2); } .maturity i.on { background: var(--accent); }
.maturity.sm { width: 80px; margin: 0; }
.scroll-x { overflow-x: auto; }
table.score td.num, table.score th.num { text-align: center; }
input.cell { width: 72px; text-align: center; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: var(--panel); }
input.cell.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; font-weight: 600; }
input.cell.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; font-weight: 600; }
input.cell.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; font-weight: 600; }
.spark-c { color: var(--accent); }
.chart { width: 100%; height: auto; } .chart .grid { stroke: var(--line); } .chart .series { stroke: var(--accent); stroke-width: 2.5; } .chart .target { stroke: var(--ink-3); stroke-dasharray: 4 4; stroke-width: 1.5; } .chart .dotp { fill: var(--accent); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); } .legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: 4px; }
.series-key { background: var(--accent); } .target-key { background: repeating-linear-gradient(90deg, var(--ink-3) 0 4px, transparent 4px 8px); }
.dash { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dash .card + .card { margin-top: 0; } .widget { position: relative; } .widget.wide { grid-column: span 2; }
.wx { position: absolute; top: 6px; right: 6px; opacity: 0; } .widget:hover .wx { opacity: 1; }
.tbars { display: grid; gap: 8px; } .tb { display: grid; grid-template-columns: 170px 1fr 70px; gap: 8px; align-items: center; }
.tbtrack { position: relative; height: 8px; background: var(--panel-2); border-radius: 99px; } .tbtrack i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 99px; }
.tbtrack b { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ink); }
.org { overflow-x: auto; } .org-node { display: flex; flex-direction: column; align-items: center; }
.org-kids { display: flex; gap: 12px; padding-top: 18px; position: relative; flex-wrap: nowrap; }
.org-kids::before { content: ''; position: absolute; top: 6px; left: 10%; right: 10%; border-top: 1px solid var(--line); }
.org-card { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--panel); text-align: center; min-width: 140px; max-width: 190px; cursor: pointer; }
.org-card:hover { border-color: var(--accent); }
.kanban { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 8px; }
.kcol { min-width: 260px; flex: 1; background: var(--panel-2); border-radius: 14px; padding: 10px; }
.kcol-h { font-weight: 600; font-size: 13px; margin-bottom: 8px; } .kcard { cursor: pointer; margin-bottom: 8px; } .kcol .card + .card { margin-top: 0; }
tr.faded { opacity: .55; }
.heat { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; max-width: 320px; }
.hc { aspect-ratio: 1; border-radius: 6px; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 2px; font-size: 12px; }
.hc.s1 { background: var(--ok-bg); } .hc.s2 { background: var(--warn-bg); } .hc.s3 { background: var(--bad-bg); }
.auto { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); } .auto:last-child { border-bottom: 0; }
.switch { position: relative; width: 38px; height: 22px; flex: none; } .switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 99px; cursor: pointer; transition: .2s; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + i { background: var(--accent); } .switch input:checked + i::after { left: 19px; }
.libcard { cursor: pointer; } .libcard:hover { border-color: var(--accent); } .grid-auto .card + .card { margin-top: 0; }
.callout { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin-top: 12px; } .callout.bad { background: var(--bad-bg); color: var(--bad); }
h2.sect { margin: 20px 0 10px; font-size: 15px; }
/* consultant */
.consult { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; height: calc(100vh - 88px); }
.threads { overflow-y: auto; padding-right: 4px; }
.pb { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 7px 10px; margin-bottom: 6px; cursor: pointer; font-size: 13px; }
.pb:hover { border-color: var(--accent); color: var(--accent); }
.chat { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.chat-h { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-h h1 { font-size: 18px; }
.msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.msg.user { align-self: flex-end; max-width: 80%; } .bubble { background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; }
.msg.assistant { max-width: 92%; } .msg-f { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.empty { margin: auto; text-align: center; max-width: 560px; } .sugg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; text-align: left; }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); } .composer textarea { min-height: 52px; border-radius: 12px; }
.thinking { color: var(--ink-3); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.thinking span:not(#elapsed) { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.thinking span:nth-child(2) { animation-delay: .2s; } .thinking span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
@media (max-width: 1200px) { .cols3 { grid-template-columns: 1fr 1fr; } .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .cols3, .grid-2, .review, .swot { grid-template-columns: 1fr; } .consult { grid-template-columns: 1fr; height: auto; } .chat { min-height: 70vh; } .sugg { grid-template-columns: 1fr; } .tb { grid-template-columns: 120px 1fr 60px; } }
@media (max-width: 760px) { nav { max-height: none; } .navg { display: none; } .dash { grid-template-columns: 1fr; } .widget.wide { grid-column: auto; } main { padding: 14px 16px 60px; } }
table.score { min-width: 860px; } table.rocks { min-width: 880px; }
.title-input { width: 100%; }
.head > div:first-child { min-width: 0; }

/* ===== GitHub-inspired extras ===== */
.searchbtn { display: flex; justify-content: space-between; align-items: center; width: 100%; margin: 0 0 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--ink-3); cursor: pointer; font-size: 13px; }
.searchbtn kbd { font: 11px ui-monospace, Menlo, monospace; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; background: var(--panel); }
.gsr { max-height: 60vh; overflow-y: auto; margin-top: 6px; }
.coach { border-left: 3px solid var(--warn); }
.timer { font: 700 28px/1 ui-monospace, Menlo, monospace; padding: 6px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.timer.over { background: var(--bad-bg); color: var(--bad); }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.steps span { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--panel-2); color: var(--ink-3); }
.steps span.on { background: var(--accent); color: var(--accent-ink); } .steps span.done { background: var(--ok-bg); color: var(--ok); }
.idsrow { padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; } .idsrow.on { border-color: var(--accent); background: var(--accent-soft); }
.bad-t { color: var(--bad); font-weight: 600; }
.streaks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.streak { text-align: center; background: var(--panel-2); border-radius: 12px; padding: 8px 4px; } .streak.on { background: var(--ok-bg); }
.streak span { font-size: 18px; display: block; } .streak b { font-size: 20px; display: block; } .streak small { font-size: 11px; color: var(--ink-3); }
table.pa th.vert { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 11px; height: 130px; vertical-align: bottom; }
.pasel { padding: 2px 4px; min-width: 44px; } .pasel.ok { background: var(--ok-bg); color: var(--ok); } .pasel.bad { background: var(--bad-bg); color: var(--bad); } .pasel.warn { background: var(--warn-bg); color: var(--warn); }
table.score th:first-child, table.score td:first-child { position: sticky; left: 0; background: var(--panel); z-index: 1; }
@media print {
  .side, .banner, .toast, .btn, .icon, .ask, .tabs, .coach, select[data-act-change] { display: none !important; }
  .app { display: block; } main { padding: 0; max-width: none; } body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; } textarea.inline { background: none; border: 0; resize: none; overflow: visible; }
}

.subnav { display: flex; gap: 4px; margin: -6px 0 18px; padding: 4px; background: var(--panel-2); border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; }
.subnav button { border: 0; background: none; padding: 6px 14px; border-radius: 9px; cursor: pointer; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.subnav button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }

.confirm { border-left: 3px solid var(--accent); } .confirm a { cursor: pointer; color: var(--ink); text-decoration: none; } .confirm a:hover { color: var(--accent); }
.chip.stale { font-size: 10px; vertical-align: middle; }

/* ===================== Futuristic layer ===================== */
:root { --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #06b6d4 100%); --glass: rgba(255,255,255,.66); --glass-line: rgba(15,23,42,.08); --glow: 0 10px 40px -12px rgba(99,102,241,.35); --radius: 18px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glass: rgba(21,24,33,.62); --glass-line: rgba(255,255,255,.08); --glow: 0 10px 50px -10px rgba(139,147,255,.35); } }
:root[data-theme="dark"] { --glass: rgba(21,24,33,.62); --glass-line: rgba(255,255,255,.08); --glow: 0 10px 50px -10px rgba(139,147,255,.35); }
body { background: var(--bg); overflow-x: hidden; }
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; width: 46vw; height: 46vw; border-radius: 50%; filter: blur(90px); opacity: .22; animation: drift 26s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: #6366f1; top: -14vw; left: 8vw; }
.aurora i:nth-child(2) { background: #06b6d4; bottom: -18vw; right: -6vw; animation-duration: 32s; }
.aurora i:nth-child(3) { background: #a855f7; top: 30vh; left: 45vw; width: 30vw; height: 30vw; opacity: .14; animation-duration: 38s; }
@keyframes drift { to { transform: translate3d(6vw, 4vh, 0) scale(1.12); } }
.app { position: relative; z-index: 1; }
.side { background: var(--glass); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); border-right: 1px solid var(--glass-line); }
.logo { background: var(--grad); box-shadow: var(--glow); }
nav a.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.card, .tile, .chat, .kcol, .org-card { background: var(--glass); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border: 1px solid var(--glass-line); border-radius: var(--radius); }
.btn { border-radius: 10px; border-color: var(--glass-line); background: var(--glass); transition: transform .15s ease, box-shadow .2s ease, background .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -8px rgba(15,23,42,.25); }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: var(--glow); }
.btn.glass { backdrop-filter: blur(10px); }
h1 { letter-spacing: -0.025em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: stretch; margin-bottom: 18px; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 8px 4px; }
.hero-title { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.05; font-weight: 750; }
.hero-sub { color: var(--ink-2); font-size: 15px; }
.hero .ask { margin: 6px 0 2px; }
.hero3d { position: relative; min-height: 340px; border-radius: 26px; overflow: hidden; border: 1px solid var(--glass-line);
  background: radial-gradient(120% 90% at 50% 100%, rgba(99,102,241,.22), transparent 60%), radial-gradient(80% 60% at 80% 0%, rgba(6,182,212,.18), transparent 60%), var(--glass); box-shadow: var(--glow); }
.hero3d-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; cursor: grab; }
.hero3d-cap { position: absolute; left: 16px; bottom: 14px; font-size: 12px; color: var(--ink-2); background: var(--glass); backdrop-filter: blur(8px); padding: 4px 10px; border-radius: 99px; border: 1px solid var(--glass-line); z-index: 2; }
.hero3d .replay { position: absolute; right: 12px; top: 12px; z-index: 2; background: var(--glass); border-radius: 99px; }
.hero3d.no3d::after { content: '3D unavailable on this device'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; }
/* tiles: 3D tilt + spotlight */
.tile { position: relative; transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: transform .25s ease, box-shadow .25s ease; overflow: hidden; }
.tile::before, .fncard::before, .libcard::before { content: ''; position: absolute; inset: 0; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(99,102,241,.14), transparent 60%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.tile:hover::before, .fncard:hover::before, .libcard:hover::before { opacity: 1; }
.tile:hover { box-shadow: var(--glow); }
.fncard, .libcard { position: relative; overflow: hidden; transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: transform .25s ease; }
.tile-v { font-size: 30px; }
/* entrance */
.enter { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.ring { background: conic-gradient(from -90deg, #6366f1, #06b6d4 calc(var(--p) * 1%), var(--panel-2) 0); }
.ring.ok { background: conic-gradient(from -90deg, #10b981, #06b6d4 calc(var(--p) * 1%), var(--panel-2) 0); }
.ring.warn, .pace-ring.warn .ring { background: conic-gradient(from -90deg, #f59e0b, #ef4444 calc(var(--p) * 1%), var(--panel-2) 0); }
.ring.big { width: 128px; height: 128px; } .ring.big span { width: 104px; height: 104px; font-size: 30px; } .ring.big small { font-size: 11px; }
.subnav { background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--glass-line); }
.tabs button.on { border-image: var(--grad) 1; }
/* PACE */
.pace-hero { display: grid; gap: 10px; }
.pace-rings { display: flex; gap: 28px; justify-content: space-around; flex-wrap: wrap; padding: 8px 0; }
.pace-ring { display: grid; justify-items: center; gap: 8px; padding: 12px 18px; border-radius: 22px; transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: transform .25s; }
.pace-ring b { font-size: 15px; letter-spacing: .02em; }
.stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.stage { padding: 12px; border-radius: 14px; border: 1px solid var(--glass-line); background: var(--panel-2); cursor: pointer; transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: transform .2s, box-shadow .2s; }
.stage.on { background: var(--grad); color: #fff; box-shadow: var(--glow); } .stage.on .small { color: rgba(255,255,255,.85); } .stage.past { opacity: .7; }
.tree > div { padding: 8px 12px; border-radius: 10px; margin-bottom: 6px; font-size: 13px; }
.t-fruit { background: rgba(239,68,68,.12); } .t-branch { background: rgba(16,185,129,.12); } .t-trunk { background: rgba(161,98,7,.14); } .t-root { background: rgba(99,102,241,.12); } .t-seed { background: rgba(6,182,212,.12); }
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 10px 0; }
.calc > div { background: var(--panel-2); border-radius: 12px; padding: 10px; text-align: center; } .calc b { display: block; font-size: 20px; } .calc small { color: var(--ink-3); font-size: 11px; }
table.pacet td { vertical-align: middle; } table.pacet input, table.pacet select { min-width: 0; } table.pacet { min-width: 900px; }
.abcd { font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.abcd-A { background: var(--ok-bg); color: var(--ok); } .abcd-B { background: rgba(99,102,241,.14); color: var(--accent); } .abcd-C { background: var(--panel-2); color: var(--ink-2); } .abcd-D { background: var(--bad-bg); color: var(--bad); }
.ndp { margin-bottom: 14px; } .ndpg { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 6px; align-items: start; margin-top: 6px; } .ndpg b { font-size: 12px; color: var(--ink-3); padding-top: 6px; }
table.nine th.vert span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 11px; display: inline-block; max-height: 190px; overflow: hidden; }
.ph-Strategy { color: #6366f1; } .ph-System { color: #06b6d4; } .ph-Team { color: #10b981; }
.iceberg { border: 1px solid var(--glass-line); border-radius: 16px; padding: 12px; margin-top: 12px; display: grid; gap: 8px; }
.ice { display: grid; gap: 0; border-radius: 14px; overflow: hidden; }
.ice .above { background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(186,230,253,.35)); padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ice .below { background: linear-gradient(180deg, rgba(14,116,144,.25), rgba(30,58,138,.35)); padding: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ice span { grid-column: 1 / -1; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
td.eg { cursor: pointer; font-size: 12px; position: relative; transition: background .2s; } td.eg:hover { background: var(--panel-2); }
td.eg.now { background: rgba(245,158,11,.14); } td.eg.aim { background: rgba(99,102,241,.14); } td.eg.now.aim { background: linear-gradient(135deg, rgba(245,158,11,.2), rgba(99,102,241,.2)); }
td.eg .tag { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; padding: 0 6px; border-radius: 99px; background: #f59e0b; color: #fff; } td.eg .tag.aim { background: #6366f1; }
.flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .flow span { padding: 6px 10px; border-radius: 10px; background: var(--panel-2); font-size: 13px; } .flow i { color: var(--ink-3); font-style: normal; }
.bucket { border: 1px solid var(--glass-line); border-radius: 14px; padding: 10px; margin-bottom: 10px; } .emog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.topics { margin-top: 8px; } .obj { border-top: 1px dashed var(--glass-line); padding-top: 8px; margin-top: 8px; display: grid; gap: 4px; }
@media (max-width: 1000px) { .hero { grid-template-columns: 1fr; } .hero3d { min-height: 280px; } .stages { grid-template-columns: 1fr 1fr; } .emog { grid-template-columns: 1fr 1fr; } .ice .below { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .aurora i, .enter { animation: none !important; } .tile, .fncard, .libcard, .stage, .pace-ring { transform: none !important; } }
@media print { .aurora, .hero3d { display: none !important; } }

/* ===== Task page (drawer) ===== */
.drawer { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.drawer-bg { position: absolute; inset: 0; background: rgba(8,10,20,.28); opacity: 0; transition: opacity .2s; pointer-events: auto; }
.drawer-p { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--panel); border-left: 1px solid var(--glass-line); box-shadow: -20px 0 60px rgba(0,0,0,.18); transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); overflow-y: auto; padding: 18px 20px 40px; pointer-events: auto; }
.drawer.open .drawer-bg { opacity: 1; } .drawer.open .drawer-p { transform: none; }
.drawer-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; } .drawer-h h2 { margin: 4px 0 0; font-size: 19px; line-height: 1.3; }
.drawer-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.dsec { border-top: 1px solid var(--line); padding: 12px 0; } .dsec summary { font-weight: 600; cursor: pointer; } .dsec p { margin: 6px 0; color: var(--ink-2); }
.dtodo { display: flex; gap: 8px; align-items: flex-start; padding: 6px 4px; border-radius: 8px; } .dtodo:hover { background: var(--panel-2); }
.dtodo span { flex: 1; } .dtodo input:checked + span { text-decoration: line-through; color: var(--ink-3); } .dtodo .icon { opacity: 0; } .dtodo:hover .icon { opacity: 1; }
#dnotes { width: 100%; margin-top: 6px; min-height: 140px; font: 13.5px/1.5 ui-monospace, Menlo, monospace; }
a.res { display: flex; gap: 8px; align-items: center; padding: 6px 4px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 13.5px; } a.res:hover { background: var(--panel-2); color: var(--accent); }
.chip.li { background: #0a66c2; color: #fff; border-color: transparent; }
.tlink { cursor: pointer; } .tlink:hover { color: var(--accent); }
/* ===== Kanban ===== */
.kanban2 { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol2 { background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--glass-line); border-radius: 16px; padding: 10px; min-height: 360px; transition: background .15s, box-shadow .15s; }
.kcol2.over { box-shadow: inset 0 0 0 2px var(--bad); } .kcol2-h { display: flex; justify-content: space-between; align-items: center; }
.kdrop { display: grid; gap: 8px; margin-top: 8px; min-height: 60px; }
.dropover { background: var(--accent-soft) !important; box-shadow: inset 0 0 0 2px var(--accent); }
.kc { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 9px 10px; cursor: grab; transition: transform .12s, box-shadow .12s; }
.kc:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -10px rgba(15,23,42,.35); } .kc.dragging { opacity: .5; } .kc.late { border-color: var(--bad); border-left-color: var(--c); }
.kc-t { font-size: 13.5px; font-weight: 550; } .kc-m { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }
.kempty { border: 1.5px dashed var(--line); border-radius: 12px; padding: 16px; text-align: center; color: var(--ink-3); font-size: 12px; }
/* ===== Matrix ===== */
.matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .mq { border-radius: 18px; padding: 12px; border: 1px solid var(--glass-line); min-height: 240px; background: var(--glass); }
.mq-IU { box-shadow: inset 0 3px 0 #10b981; } .mq-IN { box-shadow: inset 0 3px 0 #6366f1; } .mq-NU { box-shadow: inset 0 3px 0 #f59e0b; } .mq-NN { box-shadow: inset 0 3px 0 #ef4444; }
.deleg { margin: -4px 0 4px; justify-self: start; }
.vbar-p { fill: var(--panel-2); } .vbar-d { fill: url(#none); fill: #6366f1; }
/* ===== Today simplification ===== */
.nownext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.nn { border-radius: 16px; padding: 14px; border: 1px solid var(--glass-line); background: var(--glass); cursor: pointer; } .nn:hover { border-color: var(--accent); }
.nn.now { background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(6,182,212,.12)); } .nn .eyebrow { margin-bottom: 4px; } .nn b { font-size: 15px; }
.seg { display: inline-flex; background: var(--panel-2); border-radius: 10px; padding: 3px; } .seg button { border: 0; background: none; padding: 5px 12px; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-size: 13px; } .seg button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.dayprog { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin: 6px 0 12px; } .dayprog i { display: block; height: 100%; background: var(--grad); }
.it .acts .icon.more { font-weight: 700; }
/* ===== Guide / tour ===== */
.helpbtn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); cursor: pointer; font-weight: 700; color: var(--accent); flex: none; }
.helpbox { background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; margin: -6px 0 16px; font-size: 13.5px; } .helpbox ul { margin: 6px 0 0; padding-left: 18px; } .helpbox .gl { margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.tour-dim { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.tour-hole { position: fixed; z-index: 91; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(8,10,20,.55), 0 0 0 3px #8b5cf6; transition: all .3s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.tour-card { position: fixed; z-index: 92; width: min(360px, calc(100vw - 32px)); background: var(--panel); border-radius: 16px; padding: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35); transition: all .3s cubic-bezier(.2,.8,.2,1); }
.tour-card h3 { margin: 0 0 6px; } .tour-card .row { margin-top: 12px; justify-content: space-between; }
.daycard ol { margin: 8px 0; padding-left: 20px; } .daycard li { margin: 6px 0; }
@media (max-width: 900px) { .nownext, .matrix { grid-template-columns: 1fr; } }

/* ===== Focus & Day board ===== */
.focus { border-radius: 16px; padding: 14px; margin: 8px 0 12px; border: 1px solid var(--glass-line); background: linear-gradient(135deg, rgba(245,158,11,.14), rgba(99,102,241,.10)); }
.focus.aft { background: linear-gradient(135deg, rgba(16,185,129,.14), rgba(6,182,212,.10)); } .focus.off { background: var(--panel-2); opacity: .85; }
.focus-grid { display: grid; grid-template-columns: 1fr 1.3fr 1.3fr; gap: 10px; margin: 10px 0; } .focus-grid > div { background: var(--glass); border-radius: 12px; padding: 10px; font-size: 13px; }
.focus-grid span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 4px; } .focus-grid b { font-size: 14px; }
.focus-todos { display: grid; gap: 2px; margin-bottom: 6px; }
.dbgroup { margin-bottom: 18px; } .dbg-h { font-weight: 700; font-size: 17px; color: var(--g); margin-bottom: 6px; }
.dbt-table { min-width: 900px; border-left: 4px solid var(--g); background: var(--glass); border-radius: 0 12px 12px 0; } .dbt-table th { background: var(--panel-2); } .dbt-table td { vertical-align: middle; }
.dbt a { cursor: pointer; color: var(--ink); text-decoration: none; font-weight: 500; } .dbt a:hover { color: var(--accent); }
.docbtn { border: 1px dashed var(--line); background: none; border-radius: 8px; padding: 3px 8px; cursor: pointer; font-size: 12px; color: var(--ink-3); } .docbtn.has { border-style: solid; color: var(--accent); }
.wsel { border-left: 4px solid var(--c); font-size: 12px; padding: 3px 6px; max-width: 170px; }
@media (max-width: 900px) { .focus-grid { grid-template-columns: 1fr; } }

@media (max-width: 760px) { .app { grid-template-columns: minmax(0, 1fr); } .side { min-width: 0; } nav { max-width: 100%; } .searchbtn kbd { display: none; } .head .row { flex-wrap: wrap; } pre.report { overflow-wrap: anywhere; } }

.playbook { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; } .playbook .card + .card { margin-top: 0; }
.pb-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); } .pb-row:last-child { border-bottom: 0; }
.pb-t { width: 92px; flex: none; font-size: 12px; color: var(--accent); font-weight: 600; }
.focus select { max-width: 100%; min-width: 0; } .focus .row { min-width: 0; }

/* ===== iPhone / phone layout ===== */
.tabbar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .side { padding-top: calc(10px + env(safe-area-inset-top)); position: sticky; top: 0; z-index: 30; }
  .side nav, .side .savestate { display: none; } .side.open nav { display: block; max-height: 62vh; overflow-y: auto; } .side.open .navg { display: block; }
  .side .brand { padding-bottom: 8px; } .searchbtn { margin-bottom: 4px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: var(--glass); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); border-top: 1px solid var(--glass-line); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); text-decoration: none; padding: 4px 0; cursor: pointer; }
  .tabbar a span { font-size: 18px; line-height: 1; } .tabbar a.on { color: var(--accent); font-weight: 600; }
  input, select, textarea { font-size: 16px !important; } /* stops iPhone zooming into fields */
  .it .acts .icon { min-width: 40px; min-height: 36px; font-size: 15px; } .btn { min-height: 36px; }
  .drawer-p { width: 100vw; padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .hero3d { min-height: 220px; display: grid; place-items: center; } .show3d { position: relative; z-index: 2; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); } .banner { top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); left: 12px; right: 12px; max-width: none; }
  .tour-card { left: 16px !important; } .kanban2 { grid-template-columns: repeat(5, 82vw); scroll-snap-type: x mandatory; } .kcol2 { scroll-snap-align: start; }
  .aurora i { opacity: .14; }
}
@media (display-mode: standalone) { .side { padding-top: calc(10px + env(safe-area-inset-top)); } }
.devices .dev-step { border-left: 3px solid var(--line); padding: 6px 0 6px 12px; margin: 10px 0; } .devices .dev-step.ok { border-color: var(--ok); } .devices ol { margin: 6px 0; padding-left: 18px; }
.tabbar a.on { background: none; box-shadow: none; }

/* ---------- Plan studio ---------- */
.pstudio { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pchat { display: flex; flex-direction: column; padding: 0; overflow: hidden; height: calc(100vh - 170px); min-height: 460px; position: sticky; top: 12px; }
.pchat .msgs { flex: 1; overflow: auto; padding: 16px; }
.pchat .composer { border-top: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; }
.pchat .composer textarea { flex: 1; resize: vertical; }
.pside .tabs { margin-bottom: 10px; }
.plist { display: grid; gap: 6px; margin-top: 8px; }
.prow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; }
.prow.bad { opacity: .6; }
.prow input { margin-top: 3px; }
.pbar { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.tiles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.tiles3 div { background: var(--panel-2); border-radius: 10px; padding: 10px; text-align: center; }
.tiles3 b { display: block; font-size: 22px; }
.tiles3 span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; }
.rgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.rcol { display: grid; gap: 6px; align-content: start; }
.rslot { text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 8%, var(--panel)); border-radius: 8px; padding: 6px 7px; cursor: pointer; display: grid; gap: 2px; color: var(--ink); font: inherit; font-size: 12px; min-width: 0; }
.rslot b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rslot:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 40%, transparent); }
.hbar { display: grid; grid-template-columns: 150px 1fr 54px; gap: 8px; align-items: center; font-size: 12px; margin: 5px 0; }
.hbar i { display: block; height: 8px; border-radius: 4px; min-width: 2px; }
.hbar b { text-align: right; }
.callout.warn { border-color: var(--warn); }
iframe.emailprev { width: 100%; max-width: 700px; min-height: 900px; border: 1px solid var(--line); border-radius: 14px; background: #f1f5f9; display: block; }
@media (max-width: 1100px) { .pstudio { grid-template-columns: minmax(0, 1fr); } .pchat { position: static; height: 70vh; } }
@media (max-width: 760px) { .rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hbar { grid-template-columns: 110px 1fr 46px; } }

/* ---------- Workstream spaces ---------- */
.wscard { cursor: pointer; border-top: 3px solid var(--c); transition: transform .15s; }
.wscard:hover { transform: translateY(-2px); }
.wsname { outline: none; border-bottom: 1px dashed transparent; } .wsname:focus { border-bottom-color: var(--line); }
.head .row.small label { display: inline-flex; gap: 4px; align-items: center; color: var(--ink-3); }

/* ---------- Notes (Notion-style) ---------- */
.nlayout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.nside { position: sticky; top: 12px; max-height: calc(100vh - 120px); overflow: auto; padding: 10px; }
.ntree { display: flex; gap: 6px; align-items: center; padding: 5px 6px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.ntree:hover { background: var(--panel-2); } .ntree.on { background: var(--accent-soft); font-weight: 600; }
.ntw { width: 12px; color: var(--ink-3); font-size: 11px; }
.npage { padding: 22px 28px 26px; }
.ntitle { font-size: 30px; font-weight: 700; border: 0; background: transparent; width: 100%; padding: 4px 0; color: var(--ink); outline: none; }
.nicon { font-size: 30px; border: 0; background: transparent; cursor: pointer; border-radius: 8px; padding: 2px 4px; } .nicon:hover { background: var(--panel-2); }
.nprops { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.nprops label { display: inline-flex; gap: 6px; align-items: center; }
.nprops input, .nprops select { padding: 3px 6px; font-size: 12px; }
.nedit { display: grid; gap: 1px; }
.blk { display: flex; gap: 4px; align-items: flex-start; border-radius: 6px; position: relative; }
.blk .bh { opacity: 0; cursor: grab; color: var(--ink-3); font-size: 12px; padding: 4px 2px; user-select: none; letter-spacing: -2px; width: 16px; flex: none; }
.blk:hover .bh, .blk:focus-within .bh { opacity: .7; }
.bc { flex: 1; min-width: 0; display: flex; gap: 6px; align-items: flex-start; }
.bt { flex: 1; min-width: 0; outline: none; padding: 3px 2px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; min-height: 1.6em; }
.bt:empty:focus::before, .b-p .bt:empty:hover::before { content: attr(data-ph); color: var(--ink-3); opacity: .6; }
.bt.h1 { font-size: 26px; font-weight: 700; margin-top: 12px; } .bt.h2 { font-size: 20px; font-weight: 700; margin-top: 10px; } .bt.h3 { font-size: 16px; font-weight: 700; margin-top: 6px; }
.bt.struck { text-decoration: line-through; color: var(--ink-3); }
.btodo { margin-top: 7px; width: 16px; height: 16px; accent-color: var(--accent); }
.bmark { min-width: 18px; text-align: right; padding-top: 3px; color: var(--ink-2); user-select: none; } .btog { cursor: pointer; text-align: center; }
.binner { margin: 2px 0 4px 2px; padding-left: 10px; border-left: 2px solid var(--line); color: var(--ink-2); }
.bcall { display: flex; gap: 10px; flex: 1; background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; } .bcall > span { font-size: 18px; }
.bquote { border-left: 3px solid var(--ink); padding-left: 12px; font-style: italic; }
.bcode { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--panel-2); border-radius: 8px; padding: 10px 12px; }
.bdiv { flex: 1; border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.bmedia { max-width: 100%; border-radius: 10px; margin: 4px 0; } figure.bmedia { margin: 4px 0; display: grid; gap: 6px; justify-items: start; } figure.bmedia img { max-width: 100%; max-height: 520px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
video.bmedia { max-height: 420px; background: #000; }
.baudio { display: flex; gap: 8px; align-items: center; background: var(--panel-2); border-radius: 999px; padding: 4px 12px; } .baudio audio { height: 34px; max-width: 280px; }
.bfile, .bpage { display: inline-flex; gap: 6px; padding: 4px 8px; border-radius: 8px; cursor: pointer; } .bfile:hover, .bpage:hover { background: var(--panel-2); }
.mention { color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 0 4px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.nadd { padding: 10px 20px; cursor: text; border-radius: 8px; } .nadd:hover { background: var(--panel-2); }
.nback { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.nmenu { position: fixed; z-index: 1200; width: 280px; max-height: 300px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.18); padding: 6px; display: grid; gap: 1px; }
.nmenu button { display: flex; gap: 10px; align-items: center; text-align: left; border: 0; background: transparent; padding: 7px 8px; border-radius: 8px; cursor: pointer; color: var(--ink); font: inherit; font-size: 13px; }
.nmenu button.on, .nmenu button:hover { background: var(--accent-soft); }
.nmi { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; background: var(--panel); flex: none; }
.modal-card.wide { width: min(1000px, 100%); }
.scanvas { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: block; cursor: crosshair; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); cursor: pointer; } .swatch.on { box-shadow: 0 0 0 2px var(--accent); }
.vrec { display: flex; gap: 12px; align-items: center; justify-content: center; font-size: 34px; margin: 18px 0 8px; }
.vdot { width: 16px; height: 16px; border-radius: 50%; background: #dc2626; animation: vpulse 1s infinite; } @keyframes vpulse { 50% { opacity: .3; } }

/* ---------- Brand calendar ---------- */
.ccal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ccal-h { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; padding: 0 4px; }
.cday { min-height: 104px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: grid; gap: 4px; align-content: start; cursor: pointer; }
.cday:hover { border-color: var(--accent); } .cday.out { opacity: .45; } .cday.today { box-shadow: 0 0 0 2px var(--accent); }
.cchip { font-size: 11px; padding: 3px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 14%, var(--panel)); border-left: 3px solid var(--c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: grab; margin: 2px 0; }
.cchip span { font-weight: 700; color: var(--c); margin-right: 4px; }

@media (max-width: 900px) { .nlayout { grid-template-columns: minmax(0, 1fr); } .nside { position: static; max-height: 260px; } .npage { padding: 16px; } }
@media (max-width: 760px) { .ccal { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; } .cday { min-height: 70px; padding: 3px; } .cchip { font-size: 9px; padding: 2px 3px; } .cchip span { display: none; } .ntitle { font-size: 24px; } .blk .bh { opacity: .5; } }
a.btn { text-decoration: none; color: inherit; display: inline-flex; align-items: center; }
.cmts { display: grid; gap: 6px; margin-top: 6px; } .cmt { background: var(--panel-2); border-radius: 8px; padding: 6px 9px; font-size: 13px; }

/* ================= QUADE brand layer — electric blue, logo grey, geometric type, chamfered corners ================= */
:root {
  --q-blue: #0088FF; --q-blue-deep: #0066D6; --q-grey: #F3F3F4;
  --bg: #F3F3F4; --panel: #FFFFFF; --panel-2: #EEF0F3; --ink: #0A1424; --ink-2: #3D4A5C; --ink-3: #66748A; --line: #E2E6EC;
  --accent: #0088FF; --accent-ink: #FFFFFF; --accent-soft: #E5F3FF;
  --grad: linear-gradient(135deg, #0066D6 0%, #0088FF 55%, #3AA6FF 100%);
  --glow: 0 10px 34px -12px rgba(0,136,255,.45); --radius: 12px;
  --font-display: "Chakra Petch", "Rajdhani", Inter, -apple-system, "Segoe UI", sans-serif;
  --chamfer: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #060B14; --panel: #0C1422; --panel-2: #121D30; --ink: #E9EFF7; --ink-2: #B3C0D3; --ink-3: #8090A8; --line: #1B2A42;
  --accent: #2E9BFF; --accent-ink: #FFFFFF; --accent-soft: #0B2747; --glass: rgba(12,20,34,.66); --glass-line: rgba(120,170,255,.10); --glow: 0 10px 40px -10px rgba(46,155,255,.45); } }
:root[data-theme="dark"] {
  --bg: #060B14; --panel: #0C1422; --panel-2: #121D30; --ink: #E9EFF7; --ink-2: #B3C0D3; --ink-3: #8090A8; --line: #1B2A42;
  --accent: #2E9BFF; --accent-ink: #FFFFFF; --accent-soft: #0B2747; --glass: rgba(12,20,34,.66); --glass-line: rgba(120,170,255,.10); --glow: 0 10px 40px -10px rgba(46,155,255,.45); }
h1, h2, .hero h1, .kpi, .tile-v, .brand b, .ntitle, .jv-h b { font-family: var(--font-display); letter-spacing: .2px; }
h1 { font-weight: 700; } .kpi, .tile-v { font-weight: 600; }
.eyebrow { letter-spacing: 1.6px; }
.logo { background: none !important; box-shadow: none !important; width: 38px; height: 38px; border-radius: 8px; overflow: hidden; padding: 0; }
.logo img { width: 100%; height: 100%; display: block; }
.brand b { letter-spacing: 3px; font-size: 16px; }
.btn.primary { background: var(--q-blue); background-image: var(--grad); clip-path: var(--chamfer); border-radius: 0; }
.btn.primary:hover { box-shadow: none; filter: brightness(1.06); }
nav a.on { box-shadow: inset 3px 0 0 var(--q-blue); }
.aurora i:nth-child(1) { background: #0088FF; } .aurora i:nth-child(2) { background: #5EC2FF; } .aurora i:nth-child(3) { background: #0047B3; opacity: .12; }
.ring { background: conic-gradient(from -90deg, #0066D6, #3AA6FF calc(var(--p) * 1%), var(--panel-2) 0); }
.nn.now { background: linear-gradient(135deg, rgba(0,136,255,.16), rgba(94,194,255,.10)); }
.tile::before, .fncard::before, .libcard::before { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(0,136,255,.14), transparent 60%); }
.hero { background: radial-gradient(120% 90% at 50% 100%, rgba(0,136,255,.20), transparent 60%), radial-gradient(80% 60% at 80% 0%, rgba(94,194,255,.16), transparent 60%), var(--glass); }
.chip.ok { border-color: transparent; }
/* the logo's tile motif: a thin blue corner on cards that carry numbers */
.tile, .wscard { position: relative; }
.tile::after { content: ''; position: absolute; top: 0; left: 0; width: 18px; height: 18px; background: linear-gradient(135deg, var(--q-blue) 0 50%, transparent 50%); opacity: .9; border-top-left-radius: var(--radius); pointer-events: none; }

/* ---------- Jarvis ---------- */
#jarvis { position: fixed; right: 20px; bottom: 20px; z-index: 900; }
.jv-fab { width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; background: var(--panel); box-shadow: 0 10px 30px -8px rgba(0,136,255,.55), 0 0 0 1px var(--glass-line); display: grid; place-items: center; }
.jv-orb { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #BFE4FF, #0088FF 45%, #003E80 100%); box-shadow: 0 0 18px rgba(0,136,255,.7); animation: jvpulse 3.2s ease-in-out infinite; }
.jv-orb.sm { width: 22px; height: 22px; } .jv-orb.live, .jv-mic.live { animation: jvlive .8s ease-in-out infinite; }
@keyframes jvpulse { 50% { transform: scale(.9); box-shadow: 0 0 8px rgba(0,136,255,.5); } } @keyframes jvlive { 50% { transform: scale(1.15); box-shadow: 0 0 26px rgba(0,136,255,.9); } }
.jv-panel { display: none; position: absolute; right: 0; bottom: 68px; width: min(420px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 120px)); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0,30,80,.45); overflow: hidden; flex-direction: column; }
#jarvis.open .jv-panel { display: flex; }
.jv-h { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, rgba(0,136,255,.10), transparent); }
.jv-msgs { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; min-height: 160px; }
.jv-msgs .msg.user { align-self: flex-end; max-width: 85%; } .jv-msgs .md { font-size: 14px; }
.jv-bar { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: center; }
.jv-bar input { flex: 1; }
.jv-mic { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; font-size: 18px; cursor: pointer; flex: none; }
.jv-mic:disabled { opacity: .4; cursor: not-allowed; }
.cite { font-weight: 600; text-decoration: none; cursor: pointer; }
.memhit:hover { background: var(--panel-2); }
@media (max-width: 760px) { #jarvis { right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); } .jv-fab { width: 50px; height: 50px; } .jv-panel { position: fixed; left: 8px; right: 8px; width: auto; bottom: calc(136px + env(safe-area-inset-bottom)); max-height: calc(100vh - 220px); } }
@media print { #jarvis { display: none; } }
