/* home.css — the dashboard's briefing (home.js, pick.js): the greeting, the
 * week in numbers, the last fourteen days, the reports, up next, the repos,
 * the plan's usage and the project picker. The app's palette and rules
 * (app.css): light is a source, never an outline; motion answers something,
 * lands and rests, one property at a time; numbers in Inter's own figures,
 * text in text colours — a mark's colour says what it is, the words beside it
 * stay ink. */

.scroll.home { padding-bottom: 28px; }
@media (min-width: 960px) { .scroll.home { max-width: 1040px; padding: 0 28px 40px; } }
.home a { color: inherit; text-decoration: none; }

/* -------------------------------- greeting -------------------------------- */

.hello { padding: 22px 4px 6px; }
.hello-date { font: 500 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 12px; }
.hello-title { font-size: 30px; font-weight: 800; line-height: 1.12; letter-spacing: -.025em; margin: 0 0 10px; }
.hello-title.landed { animation: name-land .9s var(--ease-out); }
@keyframes name-land { from { text-shadow: 0 0 22px rgba(108, 199, 142, .75); } }
.hello-sum { color: var(--fg-muted); font-size: 15px; max-width: 640px; }
.hello-sum p { margin: 0 0 4px; }
.hello-sum p:first-child { color: var(--fg); }
@media (min-width: 960px) {
  .hello { padding-top: 34px; }
  .hello-title { font-size: 40px; }
  .hello-sum { font-size: 16px; }
}

.hello-name { margin: 14px 0 0; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; max-width: 520px; }
.hello-name:not([hidden]) { animation: screen-in .3s var(--ease-out) both; }
.hello-name-q { display: block; font-size: 14px; color: var(--fg-muted); margin-bottom: 8px; }
.hello-name-row { display: flex; align-items: center; gap: 8px; }
.hello-name-row .link { white-space: nowrap; }

/* ------------------------------ working now ------------------------------- */

.running { display: grid; gap: 6px; margin: 14px 0 0; }
.running[hidden] { display: none; }
.run-row {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 14px;
  background: rgba(108, 199, 142, .07); border: 1px solid rgba(108, 199, 142, .22); border-radius: 12px; font-size: 14px;
}
.run-row .live-dot {
  flex: none; width: 7px; height: 7px; border-radius: 99px; background: var(--accent-2);
  animation: live-pulse 1.6s ease-out infinite;   /* computer.css: something is working, so it breathes */
}
.run-label { flex: none; font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); }
.run-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.run-where { margin-left: auto; flex: none; color: var(--fg-dim); font-size: 12.5px; }

/* --------------------------------- the head -------------------------------- */

.brief:not([hidden]).in { animation: screen-in .45s var(--ease-out) both; }
.brief-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin: 22px 0 12px; }
.brief-head h2 { margin: 0 4px 8px; }
.brief-head-text { min-width: 0; }
.brief-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 4px 11px; border-radius: 99px; font-size: 12.5px; color: var(--fg-muted);
  background: var(--well); border: 1px solid var(--border); transition: color .15s ease;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip:hover { color: var(--fg); }
.brief-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.brief-state { font-size: 12.5px; color: var(--fg-dim); text-align: right; }
.brief-state.busy::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%;
  background: var(--accent-2); vertical-align: 1px; animation: state-breathe 1.4s ease-in-out infinite;
}
@keyframes state-breathe { 50% { opacity: .3; } }
#brief-refresh:disabled { opacity: .4; cursor: default; }

/* ------------------------------- the numbers ------------------------------- */

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 13px 15px 14px; min-width: 0; }
.kpi-label { font-size: 12.5px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { font-size: 30px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px; }
.kpi-sub { font-size: 12px; color: var(--fg-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* -------------------------------- the cards -------------------------------- */

.brief-grid { display: grid; gap: 0 12px; }
@media (min-width: 960px) { .brief-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px 12px; margin-bottom: 12px; }
.card[hidden] { display: none; }
.card-head { margin-bottom: 4px; }
.card-title { font-size: 15px; font-weight: 650; }
.card-sub { font-size: 12.5px; color: var(--fg-dim); margin-top: 1px; }
.card-empty { color: var(--fg-dim); font-size: 14px; margin: 10px 0 4px; }

/* The last fourteen days: thin bars from one baseline, rounded only at the
   data end. Today in the accent; the other days a step back in the same hue. */
.act { display: flex; gap: 2px; height: 128px; margin: 10px 0 2px; }
.act-col { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; outline: none; cursor: default; }
.act-track { position: relative; width: 100%; height: 104px; display: flex; justify-content: center; align-items: flex-end; border-bottom: 1px solid var(--border-2); }
.act-bar { position: relative; display: block; width: 100%; max-width: 22px; border-radius: 4px 4px 0 0; background: #2d5039; transform-origin: bottom; }
.act-col.today .act-bar { background: var(--accent-2); }
.act-col:hover .act-bar, .act-col:focus-visible .act-bar { background: var(--accent-3); }
.act.grow .act-bar { animation: bar-grow .6s var(--ease-out) both; }
@keyframes bar-grow { from { transform: scaleY(0); } }
.act-n { position: absolute; bottom: calc(100% + 3px); left: 50%; translate: -50% 0; font-size: 11px; font-weight: 600; color: var(--fg-muted); }
.act-day { font: 500 10.5px/1 var(--mono); color: var(--fg-dim); margin-top: 7px; }
.act-col.today .act-day { color: var(--fg); }
/* Hover or tap a day: its date and count, above it. */
.act-col::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; translate: -50% 0; z-index: 2;
  padding: 5px 9px; border-radius: 8px; background: var(--bg-card-2); border: 1px solid var(--border-2);
  font-size: 12px; color: var(--fg); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s ease;
}
.act-col:nth-child(-n+3)::after { left: 0; translate: 0 0; }
.act-col:nth-last-child(-n+3)::after { left: auto; right: 0; translate: 0 0; }
.act-col:hover::after, .act-col:focus-visible::after { opacity: 1; }

/* A report: per project, its chats (open them), what was done and planned. */
.rep-group { margin-top: 12px; }
.rep-group + .rep-group { margin-top: 16px; }
.rep-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rep-project { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; }
.rep-project .ui-ico { color: var(--accent-2); }
.rep-project span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-project:hover span { color: var(--accent-3); }
.rep-writeup { flex: none; font-size: 13px; }
.rep-list { list-style: none; margin: 4px 0 0; padding: 0; }
.rep-item { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 0 6px 2px; border-top: 1px solid var(--border); font-size: 14px; }
.rep-item:first-child { border-top: 0; }
.rep-item > .ui-ico, .rep-chat > .ui-ico { color: var(--fg-dim); }
.rep-chat { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.rep-chat:hover .rep-text { color: var(--accent-3); }
.rep-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-time { flex: none; font: 11.5px/1 var(--mono); color: var(--fg-dim); }
.rep-item.done > .ui-ico { color: var(--accent-2); }
.rep-item.done .rep-text { color: var(--fg-muted); }
.rep-item.more { color: var(--fg-dim); font-size: 13px; min-height: 30px; }
.rep-more:hover { color: var(--accent-3); }

/* Up next: tick a task off from here. */
.tick {
  flex: none; width: 20px; height: 20px; margin: 0; padding: 0; display: grid; place-items: center; cursor: pointer;
  border: 1.5px solid var(--border-2); border-radius: 6px; background: var(--well); color: #06210f;
  transition: background-color .2s ease, border-color .2s ease;
}
.tick .ui-ico { width: 13px; height: 13px; stroke-width: 3; opacity: 0; transition: opacity .15s ease; }
.tick:not(:disabled):hover { border-color: var(--accent-2); }
.tick:disabled { cursor: default; opacity: .5; }
.rep-item.task .rep-text { transition: color .25s ease; }
.rep-item.ticking .tick { background: var(--accent-2); border-color: var(--accent-2); opacity: 1; }
.rep-item.ticking .tick .ui-ico { opacity: 1; }
.rep-item.ticking .rep-text { color: var(--fg-dim); text-decoration: line-through; }

/* Repos: branch and what isn't committed. */
.repo-list { list-style: none; margin: 4px 0 0; padding: 0; }
.repo-list li + li { border-top: 1px solid var(--border); }
.repo-row { display: block; padding: 9px 0; }
.repo-top { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.repo-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-row:hover .repo-name { color: var(--accent-3); }
.repo-branch { display: inline-flex; align-items: center; gap: 4px; min-width: 0; margin-left: auto; font: 12px/1.3 var(--mono); color: var(--fg-muted); }
.repo-branch .ui-ico { color: var(--accent-2); }
.repo-branch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.repo-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 2px; font-size: 12.5px; color: var(--fg-dim); }
.repo-meta .add { color: var(--accent-2); font-weight: 600; }
.repo-meta .del { color: #e88c80; font-weight: 600; }
.repo-when { margin-left: auto; }

/* The plan: a meter per window. The fill says how close; the track is the
   same hue a step lighter; the words say it too. */
.meter { margin-top: 12px; }
.meter-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.meter-pct { font-weight: 600; font-variant-numeric: tabular-nums; }
.meter-track { height: 6px; margin-top: 6px; border-radius: 99px; overflow: hidden; background: rgba(108, 199, 142, .14); }
.meter-fill { display: block; height: 100%; border-radius: 99px; background: var(--accent-2); transition: width .5s var(--ease-out); }
.meter.warn .meter-track { background: rgba(226, 155, 80, .16); }
.meter.warn .meter-fill { background: var(--warn); }
.meter.high .meter-track, .meter.limited .meter-track { background: rgba(226, 104, 90, .16); }
.meter.high .meter-fill, .meter.limited .meter-fill { background: var(--danger); }
.meter-foot { display: flex; gap: 10px; margin-top: 5px; font-size: 12px; color: var(--fg-dim); }
.meter-flag { color: var(--fg); font-weight: 600; }
.meter-flag::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--danger); vertical-align: 1px; }

/* -------------------------------- the picker ------------------------------- */

.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(2, 4, 3, .66); }
.sheet[hidden] { display: none; }
.sheet-card {
  width: 100%; max-width: 580px; max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border-2); border-bottom: 0; border-radius: 18px 18px 0 0;
  padding-bottom: var(--safe-bottom); animation: sheet-in .28s var(--ease-out) both;
}
@keyframes sheet-in { from { transform: translateY(24px); } }
@media (min-width: 720px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-card { border-bottom: 1px solid var(--border-2); border-radius: 18px; }
}
.sheet-head { padding: 18px 20px 6px; }
.sheet-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.sheet-sub { margin: 6px 0 0; font-size: 13.5px; color: var(--fg-muted); }
.sheet-body { overflow-y: auto; padding: 4px 20px 8px; }
.sheet-foot { display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding: 12px 20px 16px; border-top: 1px solid var(--border); }

.pick-group { margin-top: 14px; }
.pick-head { display: flex; align-items: center; gap: 8px; }
.pick-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.pick-dot.on { background: var(--accent-2); }
.pick-device { font-weight: 650; font-size: 14.5px; }
.pick-clear { margin-left: auto; font-size: 13px; }
.pick-note { margin: 4px 0 6px; font-size: 12.5px; color: var(--fg-dim); }
.pick-list { list-style: none; margin: 0; padding: 0; }
.pick-list li + li { border-top: 1px solid var(--border); }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 9px 2px; cursor: pointer; }
.pick-row input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent-2); }
.pick-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-name { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-path { font: 11.5px/1.4 var(--mono); color: var(--fg-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-when { flex: none; font-size: 12px; color: var(--fg-dim); }
