:root {
  --bg: #f7f7f5; --panel: #fff; --ink: #1d1d1f; --ink2: #3b3b3d; --muted: #8e8e93; --faint: #b9b9bd; --ph: #c2c2c6;
  --line: #efefef; --line2: #e6e6e8; --hover: #f5f5f4; --orange: #e8642c; --accent: #c96442;
  --cb: #d3d3d7; --cb-hover: #b4b4b9; --done: #9d9ea3;
  --yellow: #f2bf1d; --red: #ec4b6e; --green: #4cbf3a; --blue: #2f86eb; --purple: #9a52e0; --orange-c: #f27a30;
  --radius: 14px; --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.2, .9, .25, 1.18);
  --shadow: 0 1px 2px rgba(0,0,0,.03), 0 2px 10px rgba(0,0,0,.025);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 13px/1.45 var(--font); color: var(--ink); background: var(--bg); overflow: hidden; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
.rbtn, .ibtn, .chip, .btn, .seg button, .daynav button, .arrows button { transition: background .15s, color .15s, transform .12s var(--ease); }
.rbtn:active, .ibtn:active, .chip:active, .btn:active, .seg button:active, .daynav button:active, .arrows button:active { transform: scale(.94); }

/* ---------- shell ---------- */
.shell { position: fixed; inset: 0; display: flex; }
.rail { width: 56px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 14px 0 14px; gap: 4px; z-index: 5; }
.logo { width: 30px; height: 30px; color: #0a0a0a; display: grid; place-items: center; margin-bottom: 16px; }
.logo svg { width: 21px; height: 24px; }
.rbtn { position: relative; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #9a9a9f; }
.rbtn svg { width: 19px; height: 19px; }
.rbtn:hover { background: #ededeb; color: var(--ink); }
.rbtn.on { color: var(--ink); background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04); }
.rbtn[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 46px; top: 50%; transform: translateY(-50%); background: #1d1d1f; color: #fff; font-size: 11.5px; font-weight: 500; padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 50; animation: tipIn .15s var(--ease); }
@keyframes tipIn { from { opacity: 0; transform: translate(-4px, -50%); } }
.rbtn .dot { position: absolute; top: 5px; right: 4px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--orange); color: #fff; font-size: 9.5px; font-weight: 600; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.rail .grow { flex: 1; }
.ask-btn { color: var(--accent); }
.ask-btn:hover { color: #b4532f; }
.me-btn { margin-top: 6px; }
.av { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 600; flex: none; letter-spacing: .02em; }
.av.lg { width: 34px; height: 34px; font-size: 13px; }
.av.xs { width: 16px; height: 16px; font-size: 8px; }
.main { flex: 1; min-width: 0; position: relative; overflow: auto; }

/* ---------- lists & items ---------- */
.list { display: flex; flex-direction: column; gap: 1px; }
.item, .add { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 4px 26px 4px 6px; border-radius: 7px; min-height: 28px; }
.item { cursor: pointer; transition: background .15s, max-height .22s var(--ease), opacity .22s, padding .22s, transform .22s var(--ease); }
.item:hover { background: var(--hover); }
.item.open { background: #f0f0ee; }
.cb { flex: none; width: 17px; height: 17px; margin-top: 1px; border: 1.5px solid var(--cb); border-radius: 5px; background: #fff; display: grid; place-items: center;
  box-shadow: inset 0 1px 1.5px rgba(0,0,0,.035); transition: border-color .15s, background .15s, transform .15s var(--spring), box-shadow .15s; }
.cb svg { width: 11px; height: 11px; opacity: 0; transition: opacity .12s; }
.cb path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 14; }
.item:hover .cb { border-color: var(--cb-hover); }
.item .cb:hover { border-color: #8e8e93; transform: scale(1.07); }
.item:not(.done) .cb:hover svg { opacity: 1; }
.item:not(.done) .cb:hover path { stroke: #c9c9cd; } /* a faint preview of the tick */
.item .cb:active { transform: scale(.9); }
.item.done .cb { background: var(--done); border-color: var(--done); box-shadow: none; }
.item.done .cb svg { opacity: 1; }
.item.done .tx { color: var(--done); }
.tx { flex: 1; min-width: 0; outline: none; overflow-wrap: anywhere; white-space: pre-wrap; }
.item .tx[contenteditable] { cursor: text; }
.meta { display: inline-flex; align-items: center; gap: 5px; flex: none; margin-top: 2px; color: var(--faint); }
.meta svg { width: 12px; height: 12px; }
.meta .est { font-size: 10.5px; font-weight: 500; color: #9a9a9f; background: #f1f1ef; border-radius: 4px; padding: 0 4px; line-height: 16px; }
.meta .ai { color: var(--accent); }
.meta .rem { display: inline-flex; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 500; color: #8e8e93; }
.meta .rem svg { width: 11px; height: 11px; }
.item.done .meta { opacity: .6; }
.more { position: absolute; right: 4px; top: 3.5px; width: 20px; height: 18px; border-radius: 4px; display: grid; place-items: center; color: #8d8d91; opacity: 0; transition: opacity .12s, background .12s; }
.more svg { width: 14px; height: 14px; }
.item:hover .more, .more.open { opacity: 1; }
.more:hover, .more.open { background: #e8e8e6; color: var(--ink); }
.star-btn { position: absolute; right: 25px; top: 3.5px; width: 20px; height: 18px; border-radius: 4px; display: grid; place-items: center; color: #a9a9ad; background: var(--hover); opacity: 0; transition: opacity .12s, color .12s, transform .15s var(--spring); }
.star-btn svg { width: 13px; height: 13px; }
.item:hover .star-btn { opacity: 1; }
.item.open .star-btn { background: #f0f0ee; }
.star-btn:hover { color: #e9a400; transform: scale(1.15); }
.meta .st { display: grid; place-items: center; color: #f0a800; transition: transform .15s var(--spring); }
.meta .st svg { width: 13px; height: 13px; }
.meta .st:hover { transform: scale(1.2); }
.item.starred .tx { font-weight: 600; }
.item.starred.enter .st { animation: cbPop .42s var(--spring); }
.cell .star-btn, .wcell .star-btn { right: 22px; top: 2px; }
.addhint { display: flex; align-items: center; gap: 10px; margin: -1px 0 4px 29px; font-size: 11.5px; color: var(--accent); font-weight: 500; animation: itemIn .25s var(--spring) both; }
.addhint .k { color: var(--faint); font-weight: 400; }
.cell .addhint, .wcell .addhint, .card .addhint { margin-left: 24px; flex-wrap: wrap; gap: 2px 8px; }
.add .cb { border-color: transparent; background: transparent; }
.add .tx { cursor: text; }
.add .tx:empty::before { content: attr(data-ph); color: var(--ph); }
.add .tx:focus:empty::before { color: #d6d6d9; }
.add:focus-within .cb { border-color: var(--cb); background: #fff; }
.item.dragging { opacity: .3; }
.item.enter { animation: itemIn .38s var(--spring) both; }
@keyframes itemIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.item.flash { animation: itemIn .38s var(--spring) both, flash 2.6s ease-out; }
@keyframes flash { 0%, 30% { background: #fff1c9; } 100% { background: transparent; } }
.item.just-done .cb { animation: cbPop .42s var(--spring); }
.item.just-done .cb path { animation: draw .3s .06s ease-out both; }
.item.just-done .tx { animation: fadeOut .45s ease both; }
@keyframes cbPop { 0% { transform: scale(.72); } 55% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes draw { from { stroke-dashoffset: 14; } to { stroke-dashoffset: 0; } }
@keyframes fadeOut { from { color: var(--ink); } }
.item.leaving { opacity: 0; transform: translateX(10px); max-height: 0 !important; padding-top: 0; padding-bottom: 0; min-height: 0; overflow: hidden; }
.item.c-yellow .cb { border-color: var(--yellow); } .item.c-yellow.done .cb { background-color: var(--yellow); }
.item.c-red .cb { border-color: var(--red); } .item.c-red.done .cb { background-color: var(--red); }
.item.c-green .cb { border-color: var(--green); } .item.c-green.done .cb { background-color: var(--green); }
.item.c-blue .cb { border-color: var(--blue); } .item.c-blue.done .cb { background-color: var(--blue); }
.item.c-purple .cb { border-color: var(--purple); } .item.c-purple.done .cb { background-color: var(--purple); }
.item.c-orange .cb { border-color: var(--orange-c); } .item.c-orange.done .cb { background-color: var(--orange-c); }
.drop-line { position: fixed; height: 2px; background: var(--blue); border-radius: 2px; pointer-events: none; z-index: 60; transition: top .08s; }
.drop-line::before { content: ''; position: absolute; left: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.drop-zone { background: rgba(47,134,235,.04) !important; }

/* break lines: lunch, gym, a pause — part of the day, not a task */
.item.break { align-items: center; gap: 8px; padding-top: 5px; padding-bottom: 5px; min-height: 26px; cursor: pointer; }
.item.break .bl { flex: 1; height: 0; border-top: 1.5px dashed #dcdcdf; min-width: 12px; }
.item.break .tx { flex: none; max-width: 75%; font-size: 10.5px; font-weight: 600; color: #9a9a9f; letter-spacing: .07em; text-transform: uppercase; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.break .meta { margin-top: 0; }
.item.break:hover .bl { border-color: #c4c4c8; }
.item.break.c-yellow .bl { border-color: var(--yellow); } .item.break.c-red .bl { border-color: var(--red); } .item.break.c-green .bl { border-color: var(--green); }
.item.break.c-blue .bl { border-color: var(--blue); } .item.break.c-purple .bl { border-color: var(--purple); } .item.break.c-orange .bl { border-color: var(--orange-c); }
.dhead .bicon { display: flex; color: #a3a4a6; margin-top: 3px; }
.dhead .bicon svg { width: 20px; height: 20px; }

/* ---------- views ---------- */
.view-in { animation: viewIn .34s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
.slide-next .hcol:not(.life), .slide-next .grid, .slide-next .cal-months { animation: slideNext .32s var(--ease) both; }
.slide-prev .hcol:not(.life), .slide-prev .grid, .slide-prev .cal-months { animation: slidePrev .32s var(--ease) both; }
@keyframes slideNext { from { opacity: .15; transform: translateX(24px); } }
@keyframes slidePrev { from { opacity: .15; transform: translateX(-24px); } }

/* ---------- horizons ---------- */
.horizons { position: absolute; inset: 12px 30px 12px 0; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(300px, 1.85fr) repeat(4, minmax(170px, 1fr)); overflow: auto; }
.hcol { position: relative; border-left: 1px solid var(--line); padding: 18px 12px 12px; display: flex; flex-direction: column; min-width: 0; }
.hcol:first-child { border-left: 0; padding-left: 16px; }
.hcol .list { margin-bottom: 40px; }
.hhead { display: flex; align-items: baseline; gap: 9px; height: 34px; margin: 0 0 12px 6px; position: relative; }
.hhead h2 { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -.025em; white-space: nowrap; }
.hhead .sub { font-size: 12px; color: var(--faint); white-space: nowrap; }
.hacts { margin-left: auto; display: flex; gap: 2px; align-self: center; opacity: 0; transition: opacity .15s; }
.hcol:hover .hacts, .hacts.open { opacity: 1; }
.ibtn { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #8d8d91; }
.ibtn svg { width: 15px; height: 15px; }
.ibtn:hover, .ibtn.open { background: var(--hover); color: var(--ink); }
.daynav { position: sticky; bottom: 4px; margin: 40px auto 0; margin-top: auto; align-self: center; width: max-content; display: flex; align-items: center; gap: 2px; background: #f4f4f2; border-radius: 9px; padding: 2px; }
.daynav button { height: 26px; min-width: 26px; border-radius: 7px; display: grid; place-items: center; color: #707074; padding: 0 4px; }
.daynav button svg { width: 14px; height: 14px; }
.daynav button:hover { background: #e9e9e7; color: var(--ink); }
.daynav .label { padding: 0 9px; font-size: 12.5px; }
.daynav .label.dim { color: var(--faint); }

/* ---------- calendar ---------- */
.calendar { padding: 12px 30px 30px 0; min-width: 980px; }
.cal-grid8 { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); padding: 10px 8px 10px; position: relative; box-shadow: var(--shadow); }
.card .ctitle { display: flex; align-items: center; gap: 6px; margin: 0 6px 6px; height: 20px; font-size: 13px; font-weight: 600; }
.card .ctitle .grow { flex: 1; }
.card .item, .card .add { font-size: 12px; min-height: 22px; padding-top: 2px; padding-bottom: 2px; }
.card .cb { width: 15px; height: 15px; border-radius: 4.5px; margin-top: 1.5px; }
.card .cb svg { width: 10px; height: 10px; }
.arrows { display: flex; gap: 0; opacity: .8; }
.arrows button { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #8d8d91; }
.arrows button:hover { background: var(--hover); color: var(--ink); }
.arrows svg { width: 13px; height: 13px; }
.cal-life { grid-column: 1 / span 2; margin-bottom: 8px; }
.cal-year { grid-column: 1 / span 2; display: flex; margin-bottom: 8px; }
.cal-year .card { flex: 1; border-radius: var(--radius) 0 0 var(--radius); }
.peek { width: 24px; flex: none; background: #fbfbfa; border: 1px solid var(--line2); border-left: 0; border-radius: 0 var(--radius) var(--radius) 0; color: #a3a3a7; font-size: 11px; font-weight: 500; writing-mode: vertical-rl; display: flex; align-items: center; padding-top: 10px; transition: background .15s, color .15s; }
.peek:hover { background: #fff; color: var(--ink); }
.cal-months { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 8px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line2); box-shadow: var(--shadow); }
.cal-months .card { border-radius: 0; min-height: 150px; border: 0; border-left: 1px solid var(--line); box-shadow: none; }
.cal-months .card:first-child { border-left: 0; }
.cal-months .card.ghost { background: #fbfbfa; }
.cal-months .card.ghost .ctitle { color: #9a9a9f; cursor: pointer; font-weight: 500; }
.cal-months .card.ghost .ctitle:hover { color: var(--ink); }
.grid { background: var(--panel); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line2); box-shadow: var(--shadow); }
.week { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.week:first-child { border-top: 0; }
.cell, .wcell { position: relative; min-height: 150px; padding: 8px 6px 12px; border-left: 1px solid var(--line); cursor: text; transition: background .15s; }
.cell:first-child { border-left: 0; }
.wcell { border-left: 1px solid var(--line2); background: #fcfcfb; }
.chead { display: flex; align-items: center; gap: 4px; height: 20px; margin: 0 4px 3px; font-size: 11.5px; font-weight: 600; color: var(--ink2); cursor: default; }
.chead .wd { margin-left: auto; font-weight: 400; color: var(--faint); font-size: 11px; visibility: hidden; }
.week.labels .chead .wd { visibility: visible; }
.cacts { display: flex; gap: 0; opacity: 0; transition: opacity .15s; }
.cell:hover .cacts, .wcell:hover .cacts, .cacts.open { opacity: 1; }
.cacts .ibtn { width: 18px; height: 18px; }
.cacts .ibtn svg { width: 13px; height: 13px; }
.cell.today .num { color: #fff; background: var(--orange); border-radius: 6px; padding: 0 5px; margin-left: -5px; }
.wcell.now .num { color: var(--orange); }
.cell .item, .cell .add, .wcell .item, .wcell .add { font-size: 12px; min-height: 22px; padding: 2px 22px 2px 4px; gap: 7px; }
.cell .cb, .wcell .cb { width: 15px; height: 15px; border-radius: 4.5px; margin-top: 1.5px; }
/* in narrow day cells the icons drop under the title instead of squeezing it */
.cell .item:not(.break), .wcell .item:not(.break), .card .item:not(.break) { flex-wrap: wrap; row-gap: 1px; }
.cell .item:not(.break) .tx, .wcell .item:not(.break) .tx, .card .item:not(.break) .tx { min-width: 58%; }
.cell .item:not(.break) .meta, .wcell .item:not(.break) .meta, .card .item:not(.break) .meta, .cell .item .when { margin-left: auto; }
.cell .cb svg, .wcell .cb svg { width: 10px; height: 10px; }
.cell .more, .wcell .more { top: 2px; right: 2px; }
.cell .add, .wcell .add { opacity: 0; transition: opacity .15s; }
.cell:hover .add, .wcell:hover .add, .cell .add:focus-within, .wcell .add:focus-within { opacity: 1; }
.cell.out { background: #fafaf9; }
.cell.out > * { opacity: .45; }
.cell.out:hover > * { opacity: .8; }

.wk-btn { font: inherit; color: inherit; border-radius: 6px; padding: 0 5px; margin-left: -5px; transition: background .15s, color .15s; }
.wk-btn:hover { background: #ececea; color: var(--ink); }
@media (min-width: 761px) {
  .week { transition: box-shadow .45s cubic-bezier(.22, 1, .36, 1); }
  .week .cell, .week .wcell { transition: min-height .5s cubic-bezier(.22, 1, .36, 1), background .2s; }
  .week > * > * { transition: opacity .35s ease; }
  .week.dim .add { pointer-events: none; }
  .calendar { padding-bottom: 38vh; } /* room to center the last weeks of the month too */
  .week.dim .cell, .week.dim .wcell { min-height: 92px; cursor: zoom-in; }
  .week.dim > * > * { opacity: .62; }
  .week.dim:hover > * > * { opacity: .9; }
  .week.focus { position: relative; z-index: 1; box-shadow: 0 0 0 1px #e2e2e4, 0 14px 40px rgba(0,0,0,.08); }
  .week.focus .cell, .week.focus .wcell { min-height: max(330px, 46vh); }
  .week.focus .chead { font-size: 13px; height: 26px; margin-bottom: 6px; }
  .week.focus .item, .week.focus .add { font-size: 13px; min-height: 26px; }
  .week.focus .add { opacity: 1; }
  .week.focus .wcell { background: #fbfbfa; }
}

/* ---------- team board ---------- */
.team { padding: 12px 30px 30px 0; min-height: 100%; display: flex; flex-direction: column; }
.team-head { display: flex; align-items: center; gap: 12px; margin: 6px 4px 14px 4px; }
.team-head h2 { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -.025em; }
.team-head .sub { color: var(--faint); font-size: 12px; }
.team-head .grow { flex: 1; }
.seg { display: inline-flex; background: #ededeb; border-radius: 9px; padding: 2px; }
.seg button { height: 26px; padding: 0 12px; border-radius: 7px; font-size: 12.5px; color: #6f6f73; white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 500; }
.tcols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; flex: 1; align-items: start; }
.tcol { background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 10px 12px; animation: viewIn .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); min-height: 200px; }
.tcol.me { border-color: #e2dcd6; }
.thead { display: flex; align-items: center; gap: 10px; margin: 0 4px 10px; }
.thead .who { min-width: 0; flex: 1; }
.thead b { display: block; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thead span { color: var(--muted); font-size: 11.5px; }
.tstats { margin: 0 4px 12px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11.5px; }
.bar { flex: 1; height: 4px; background: #efefed; border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 4px; transition: width .5s var(--ease); }
.tsec { margin: 4px 0 10px; border-radius: 8px; padding: 2px 0; }
.tsec > h4 { margin: 0 6px 4px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tsec.late > h4 { color: var(--red); }
.when { color: var(--faint); font-size: 10.5px; flex: none; margin-top: 3px; white-space: nowrap; }
.when.late { color: var(--orange); font-weight: 500; }

/* ---------- Notes: the floating list on the right ---------- */
.notes-card { position: fixed; top: 12px; right: 12px; bottom: 12px; width: 314px; z-index: 15; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line2); border-radius: 16px; box-shadow: 0 18px 48px rgba(0,0,0,.09), 0 1px 3px rgba(0,0,0,.04);
  padding: 16px 12px 12px; overflow: auto; animation: notesIn .34s var(--ease); }
@keyframes notesIn { from { opacity: 0; transform: translateX(18px); } }
.nhead { display: flex; align-items: center; gap: 8px; margin: 0 4px 2px 6px; }
.nhead h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.nhead .ncount { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #f1f1ef; color: #6f6f73; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.nhead .grow { flex: 1; }
.nsub { margin: 2px 6px 12px; color: var(--faint); font-size: 11.5px; line-height: 1.4; }
.notes-card .list { gap: 2px; }
.notes-card .add { background: #f6f6f4; border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; min-height: 40px; font-size: 13.5px; transition: background .15s, box-shadow .15s; }
.notes-card .add:focus-within { background: #fff; box-shadow: 0 0 0 1px var(--line2), 0 4px 14px rgba(0,0,0,.05); }
.notes-card .add .cb { margin-top: 1px; }
.notes-card .add .tx:empty::before { color: #b0b0b4; }
.notes-card .addhint { margin: -4px 0 8px 33px; }
.notes-card .item { font-size: 13.5px; }
.notes-card.drop-zone, .notes-card:has(.drop-zone) { box-shadow: 0 0 0 2px rgba(47,134,235,.35), 0 18px 48px rgba(0,0,0,.09); }
.horizons, .docs { transition: right .34s var(--ease); }
.calendar, .team { transition: padding-right .34s var(--ease); }
@media (min-width: 1100px) { /* the views make room for the Notes card instead of hiding under it */
  body.notes-open .horizons, body.notes-open .docs { right: 340px; }
  body.notes-open .calendar, body.notes-open .team { padding-right: 340px; }
}

/* ---------- side panels (profile) ---------- */
.inbox-tab { position: fixed; right: 0; top: 50%; transform: translateY(-50%); width: 28px; padding: 14px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; color: #9a9a9f; font-size: 10px; letter-spacing: .14em; font-weight: 500; z-index: 6; transition: color .15s; }
.inbox-tab span { writing-mode: vertical-rl; transform: rotate(180deg); }
.inbox-tab b { font-weight: 600; font-size: 10px; letter-spacing: 0; color: #fff; background: #a3a4a6; border-radius: 8px; min-width: 16px; padding: 1px 4px; text-align: center; }
.inbox-tab:hover { color: var(--ink); }
.side { position: fixed; top: 12px; right: 12px; bottom: 12px; width: 330px; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); box-shadow: 0 16px 50px rgba(0,0,0,.12); padding: 18px 14px 30px; overflow: auto; z-index: 20; animation: slidein .26s var(--ease); }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } }
.side .hacts { opacity: 1; }
.profile { width: 380px; z-index: 30; }
.psec { border-top: 1px solid var(--line); padding: 14px 4px; }
.psec:first-of-type { border-top: 0; }
.psec h4 { margin: 0 0 8px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.psec p { margin: 0 0 10px; color: var(--ink2); font-size: 12.5px; line-height: 1.55; }
.prow { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.prow .grow { flex: 1; min-width: 0; }
.field { width: 100%; height: 34px; border: 1px solid var(--line2); border-radius: 9px; padding: 0 10px; font: 13px var(--font); outline: none; background: #fff; transition: border-color .15s, box-shadow .15s; }
.field:focus { border-color: #c9c9cc; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
select.field { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") right 8px center/14px no-repeat; padding-right: 28px; }
.member { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.member .who { flex: 1; min-width: 0; }
.member b { display: block; font-size: 13px; font-weight: 500; }
.member small { color: var(--muted); font-size: 11.5px; }
.member select.field { width: 128px; height: 28px; font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; background: #eef7ec; color: #2f8a22; font-size: 11.5px; font-weight: 500; }
.pill.off { background: #f3f3f1; color: var(--muted); }
.toggle { width: 34px; height: 20px; border-radius: 10px; background: #dcdcde; position: relative; transition: background .2s; flex: none; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .22s var(--spring); }
.toggle.on { background: var(--ink); }
.toggle.on::after { transform: translateX(14px); }
.copyrow { display: flex; gap: 8px; align-items: center; background: #f4f4f2; border-radius: 9px; padding: 6px 6px 6px 10px; font: 11.5px ui-monospace, SFMono-Regular, Menlo, monospace; }
.copyrow span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn { height: 32px; padding: 0 13px; border-radius: 9px; background: #1d1d1f; color: #fff; font-weight: 500; font-size: 12.5px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn:hover { background: #000; }
.btn.light { background: #fff; color: var(--ink); border: 1px solid var(--line2); }
.btn.light:hover { background: #f7f7f5; }
.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.danger { color: #c0392b; }
.linkbtn { color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { color: var(--ink); }

/* ---------- docs ---------- */
.docs { position: absolute; inset: 12px 30px 12px 0; display: grid; grid-template-columns: 230px minmax(0, 1fr); background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.doclist { border-right: 1px solid var(--line); padding: 14px 10px; overflow: auto; display: flex; flex-direction: column; gap: 2px; background: #fcfcfb; }
.newdoc { margin-bottom: 10px; width: 100%; }
.docrow { text-align: left; padding: 8px 10px; border-radius: 8px; transition: background .15s; animation: itemIn .3s var(--spring) both; }
.docrow b { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docrow small { color: var(--muted); font-size: 11px; }
.docrow:hover { background: var(--hover); }
.docrow.on { background: #efefed; }
.editor { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding-top: 12px; }
.etools { display: flex; align-items: center; gap: 8px; padding: 0 16px 4px; }
.etools .grow { flex: 1; }
.doc-status { color: var(--faint); font-size: 11.5px; }
.convert.busy span { animation: spin 1.4s linear infinite; }
.convert:disabled { opacity: .8; cursor: progress; }
.dt-title { border: 0; outline: 0; font: 700 27px/1.25 var(--font); letter-spacing: -.022em; padding: 20px 0 8px; width: min(720px, calc(100% - 48px)); margin: 0 auto; background: none; color: var(--ink); }
.dt-title::placeholder { color: #d0d0d3; }
.dt-body { flex: 1; min-height: 0; border: 0; outline: 0; resize: none; font: 15px/1.75 var(--font); color: var(--ink2); width: min(720px, calc(100% - 48px)); margin: 0 auto; padding: 6px 0 30vh; background: none; tab-size: 2; }
.dt-body::placeholder { color: #c4c4c8; }
.editor.empty { align-items: center; justify-content: center; gap: 12px; color: var(--muted); text-align: center; padding: 20px; }
.plan-wrap { padding-top: 7vh; }
.plan { width: min(680px, calc(100vw - 32px)); display: flex; flex-direction: column; max-height: 82vh; }
.plan-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.plan-head .spark { color: var(--accent); display: flex; margin-top: 2px; }
.plan-head .spark svg { width: 18px; height: 18px; }
.plan-head > div { flex: 1; min-width: 0; }
.plan-head b { display: block; font-size: 15px; letter-spacing: -.01em; }
.plan-head small { color: var(--muted); font-size: 12px; line-height: 1.45; display: block; margin-top: 2px; }
.plan-body { overflow: auto; padding: 4px 12px 14px; }
.pgroup h4 { margin: 14px 8px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.prow2 { display: flex; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; animation: itemIn .3s var(--spring) both; }
.prow2:hover { background: var(--hover); }
.prow2 input { margin-top: 3px; accent-color: #1d1d1f; width: 15px; height: 15px; flex: none; }
.prow2.exists { opacity: .55; }
.pt { flex: 1; min-width: 0; }
.ptitle { font-size: 13.5px; font-weight: 500; display: flex; gap: 6px; align-items: center; }
.pstar { color: #f0a800; display: flex; }
.pstar svg { width: 13px; height: 13px; }
.pmeta { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.pmeta:empty { display: none; }
.pnotes { color: #8e8e93; font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fafaf9; }
.plan-foot .grow { flex: 1; }
.plan-foot .btn:disabled { opacity: .45; cursor: default; }
.librow { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.librow .grow { flex: 1; min-width: 0; }
.librow b { display: block; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.librow small { display: block; color: var(--muted); font-size: 11px; }
.libadd { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-top: 8px; }
.libadd .field { height: 30px; font-size: 12px; }

/* ---------- task details ---------- */
.detail { position: fixed; z-index: 80; width: 390px; max-height: calc(100vh - 24px); overflow: auto; background: #fff; border-radius: 16px; border: 1px solid var(--line2);
  box-shadow: 0 24px 64px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.05); padding: 16px 16px 12px; animation: popIn .26s var(--spring); }
.detail.closing { animation: popOut .16s ease forwards; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes popOut { to { opacity: 0; transform: translateY(4px) scale(.98); } }
.dhead { display: flex; align-items: flex-start; gap: 10px; }
.dhead .item { flex: 1; padding: 0; background: none !important; cursor: default; min-height: 0; }
.dhead .cb { width: 21px; height: 21px; border-radius: 6px; margin-top: 2px; cursor: pointer; }
.dhead .cb svg { width: 13px; height: 13px; }
.dtitle { font-size: 17px; font-weight: 600; letter-spacing: -.015em; line-height: 1.35; outline: none; cursor: text; border-radius: 6px; padding: 1px 4px; margin: -1px -4px; }
.dtitle:hover { background: #f7f7f5; }
.dtitle:focus { background: #f4f4f2; }
.dtitle:empty::before { content: 'Untitled'; color: var(--ph); }
.dhead .ibtn { flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: #f4f4f2; color: var(--ink2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip svg { width: 13px; height: 13px; color: #8e8e93; }
.chip:hover { background: #ebebe9; }
.chip.on { background: #1d1d1f; color: #fff; }
.chip.on svg { color: #fff; }
.chip.ai.on { background: #fbeee8; color: #a8482a; }
.chip.ai.on svg { color: var(--accent); }
.chip.prio.on { background: #fdf3d8; color: #9a6b00; }
.chip.rem.on { background: #eaf2fe; color: #2459a8; }
.chip.rem.on svg { color: #2f86eb; }
.chip.prio.on svg { color: #f0a800; }
.chip .av { width: 17px; height: 17px; font-size: 8px; }
.chip.dim { color: var(--muted); }
.cdots { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 4px; }
.cdots button { width: 14px; height: 14px; border-radius: 50%; position: relative; transition: transform .15s var(--spring); }
.cdots button:hover { transform: scale(1.2); }
.cdots button.on::after { content: ''; position: absolute; inset: -3px; border: 1.5px solid #1d1d1f; border-radius: 50%; }
.notes { width: 100%; min-height: 70px; resize: none; border: 1px solid transparent; border-radius: 10px; background: #f7f7f5; padding: 9px 11px; font: 13px/1.5 var(--font); color: var(--ink); outline: none; transition: border-color .15s, background .15s; overflow: hidden; display: block; }
.notes:focus { background: #fff; border-color: var(--line2); }
.notes::placeholder { color: var(--ph); }
.dlinks { margin: 10px 0 6px; display: flex; flex-direction: column; gap: 4px; }
.dlink { display: flex; align-items: center; gap: 9px; padding: 7px 8px 7px 10px; border-radius: 9px; border: 1px solid var(--line); text-decoration: none; transition: background .15s, border-color .15s, transform .15s var(--ease); }
.dlink:hover { background: #fafaf9; border-color: var(--line2); transform: translateX(2px); }
.dlink .ico { width: 24px; height: 24px; border-radius: 7px; background: #f1f1ef; display: grid; place-items: center; flex: none; color: #6f6f73; }
.dlink .ico svg { width: 13px; height: 13px; }
.dlink.claude .ico { background: #fbeee8; color: var(--accent); }
.dlink .lt { flex: 1; min-width: 0; }
.dlink .lt b { display: block; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlink .lt small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlink .x { opacity: 0; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #8e8e93; }
.dlink:hover .x { opacity: 1; }
.dlink .x:hover { background: #eee; color: var(--ink); }
.dlink .x svg { width: 12px; height: 12px; }
.addlink { width: 100%; height: 32px; border: 1px dashed var(--line2); border-radius: 9px; padding: 0 10px; font: 12.5px var(--font); outline: none; background: none; transition: border-color .15s; }
.addlink:focus { border-style: solid; border-color: #c9c9cc; background: #fff; }
.dfoot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; }
.dfoot .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- menus ---------- */
.menu { position: fixed; z-index: 100; min-width: 200px; max-height: 70vh; overflow: auto; background: #1f1f21; color: #f2f2f3; border-radius: 10px; padding: 5px; box-shadow: 0 12px 36px rgba(0,0,0,.28); font-size: 12.5px; animation: pop .14s var(--ease); }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.menu .mi { width: 100%; display: flex; align-items: center; gap: 9px; height: 29px; padding: 0 8px; border-radius: 6px; text-align: left; white-space: nowrap; }
.menu .mi svg { width: 15px; height: 15px; color: #c9c9cc; flex: none; }
.menu .mi .ico { width: 15px; flex: none; }
.menu .mi .av { width: 18px; height: 18px; font-size: 8px; }
.menu .mi .chev { margin-left: auto; color: #8e8e92; }
.menu .mi .chev svg { width: 12px; height: 12px; }
.menu .mi .check { margin-left: auto; }
.menu .mi .hint { margin-left: auto; color: #8e8e92; font-size: 11.5px; padding-left: 12px; }
.menu .mi:hover, .menu .mi.open { background: #343437; }
.menu .mi.danger:hover { background: #4a2328; }
.menu .sep { height: 1px; background: #38383b; margin: 5px 4px; }
.menu .colors { display: flex; gap: 6px; padding: 6px 7px 7px; }
.menu .dot { width: 16px; height: 16px; border-radius: 50%; position: relative; transition: transform .15s var(--spring); }
.menu .dot.on::after { content: ''; position: absolute; inset: -3px; border: 1.5px solid #fff; border-radius: 50%; }
.menu .dot:hover { transform: scale(1.15); }
.menu .datepick { display: flex; align-items: center; gap: 8px; padding: 4px 8px 6px; }
.menu input[type=time], .menu input[type=date] { background: #2d2d30; color: #f2f2f3; border: 1px solid #424246; border-radius: 6px; font: inherit; padding: 4px 6px; color-scheme: dark; }
.menu .mhead { color: #8e8e92; font-size: 11px; padding: 6px 8px 3px; }

/* ---------- ask Claude ---------- */
.ask-wrap { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding-top: 13vh; background: rgba(247,247,245,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
.ask { width: min(640px, calc(100vw - 32px)); background: #fff; border-radius: 16px; border: 1px solid var(--line2); box-shadow: 0 28px 80px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.05); overflow: hidden; animation: dropIn .3s var(--spring); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.ask-row { display: flex; align-items: center; gap: 11px; padding: 0 16px; height: 56px; }
.ask-row .spark { display: flex; color: var(--accent); flex: none; }
.ask-row .spark svg { width: 19px; height: 19px; }
.ask-row.busy .spark { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ask-row input { flex: 1; min-width: 0; border: 0; outline: 0; font: 15px var(--font); color: var(--ink); background: none; }
.ask-row input::placeholder { color: var(--ph); }
.ask-row kbd { font: 11px var(--font); color: var(--muted); border: 1px solid var(--line2); border-radius: 5px; padding: 1px 5px; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 14px; }
.suggest button { height: 28px; padding: 0 11px; border-radius: 14px; background: #f4f4f2; color: var(--ink2); font-size: 12px; transition: background .15s, transform .12s var(--ease); animation: itemIn .3s var(--spring) both; }
.suggest button:hover { background: #ebebe9; }
.suggest button:active { transform: scale(.95); }
.ask-log { border-top: 1px solid var(--line); padding: 12px 16px 14px; max-height: 46vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.ask-log:empty { display: none; }
.msg { font-size: 13.5px; line-height: 1.55; animation: itemIn .3s var(--ease) both; }
.msg.user { color: var(--muted); }
.msg.bot { color: var(--ink); }
.msg.bot ul { margin: 4px 0; padding-left: 18px; }
.msg.bot li { margin: 2px 0; }
.msg.bot p { margin: 0 0 4px; }
.msg.bot a { color: var(--blue); }
.msg.err { color: #c0392b; }
.thinking { display: inline-flex; gap: 4px; padding: 4px 0; }
.thinking i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: bounce 1s infinite; }
.thinking i:nth-child(2) { animation-delay: .15s; } .thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.ask-foot { border-top: 1px solid var(--line); background: #fafaf9; padding: 9px 16px; display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); }
.ask-foot .grow { flex: 1; }

/* ---------- toast, confetti, login ---------- */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #1d1d1f; color: #fff; padding: 9px 10px 9px 14px; border-radius: 11px; font-size: 12.5px; display: flex; align-items: center; gap: 12px; z-index: 120; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: rise .28s var(--spring); max-width: calc(100vw - 32px); }
.toast button { color: #ffb18f; font-weight: 600; padding: 2px 4px; }
@keyframes rise { from { transform: translate(-50%, 12px) scale(.96); opacity: 0; } }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 200; }
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; overflow: auto; }
.login form { width: min(370px, 100%); background: #fff; border: 1px solid var(--line2); border-radius: 18px; padding: 28px 26px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.07); display: flex; flex-direction: column; gap: 10px; animation: dropIn .4s var(--spring); }
.login .wordmark { display: block; width: 190px; height: auto; margin: 2px 0 6px -2px; }
.login p { margin: 0 0 4px; color: var(--muted); }
.login .field { height: 40px; font-size: 14px; }
.login .btn { height: 40px; font-size: 14px; margin-top: 4px; }
.login .err { color: #c0392b; font-size: 12.5px; min-height: 18px; }
.login .switch { text-align: center; color: var(--muted); font-size: 12.5px; }
.login .switch button { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.boot { position: fixed; inset: 0; display: grid; place-items: center; color: var(--muted); }

/* ---------- phones & small screens ---------- */
@media (max-width: 760px) {
  body { font-size: 14px; }
  .shell { flex-direction: column-reverse; }
  .rail { width: 100%; height: calc(56px + env(safe-area-inset-bottom)); flex-direction: row; justify-content: space-around; padding: 6px 10px env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line2); }
  .rail .logo, .rail .grow { display: none; }
  .rbtn[data-tip]:hover::after { display: none; }
  .me-btn { margin-top: 0; }
  .horizons { inset: 8px; display: flex; scroll-snap-type: x mandatory; }
  .hcol { flex: 0 0 86vw; scroll-snap-align: start; }
  .more { opacity: .55; }
  .hacts, .cacts { opacity: 1; }
  .calendar, .team { min-width: 0; padding: 8px 8px 30px; }
  .cal-grid8 { display: block; }
  .cal-months { display: block; }
  .cal-months .card { min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
  .cal-months .card.ghost { display: none; }
  .week { display: block; }
  .cell, .wcell { min-height: 0; border-left: 0; border-top: 1px solid var(--line); padding-bottom: 6px; }
  .cell.out { display: none; }
  .chead .wd { visibility: visible; }
  .cell .add, .wcell .add { opacity: 1; }
  .team-head .sub { display: none; }
  .tcols { grid-auto-columns: 86vw; scroll-snap-type: x mandatory; }
  .tcol { scroll-snap-align: start; }
  .inbox-tab { display: none; }
  .docs { inset: 8px; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .doclist { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .newdoc { width: auto; margin: 0; flex: none; }
  .docrow { flex: none; max-width: 170px; padding: 6px 10px; }
  .dt-title { font-size: 22px; width: calc(100% - 32px); }
  .dt-body { width: calc(100% - 32px); }
  .libadd { grid-template-columns: 1fr; }
  .side, .profile, .notes-card { left: 8px; right: 8px; top: 8px; bottom: calc(64px + env(safe-area-inset-bottom)); width: auto; }
  .notes-card { z-index: 25; }
  .detail { left: 8px !important; right: 8px; top: auto !important; bottom: calc(64px + env(safe-area-inset-bottom)); width: auto; max-height: 75vh; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
