/* Site Builder — the clock (hold Esc) and the launch page's Project checkout.
   Driven by timeclock.js. The same glass as the rest of the app; two series
   colours for time — people (a maroon step) and Claude working (a deep gold),
   checked together for colour-blind separation — and idle as a quiet charcoal
   hatch, since idle is what is left over rather than a category of its own.
   Every bar has its numbers written beside it; colour never carries a value
   alone. */
:root {
  --tc-people: #A33148;
  --tc-claude: #C99A14;
  --tc-idle: repeating-linear-gradient(135deg, rgba(26, 26, 26, .34) 0 1.5px, rgba(26, 26, 26, .1) 1.5px 4.5px);
}

/* ===================================================================
   The clock card — up while Esc is held, and until it is put away
   =================================================================== */
.tcc {
  position: fixed; top: 70px; left: 50%; z-index: 880;
  width: min(384px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow: auto;
  padding: 16px 16px 14px;
  background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-radius: 20px;
  backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 24px 70px rgba(26, 26, 26, .28), 0 2px 30px rgba(123, 30, 46, .1), inset 0 1px 0 rgba(255, 255, 255, .9);
  opacity: 0; transform: translate(-50%, -10px) scale(.97);
  transition: opacity .2s var(--ease-out), transform .3s var(--ease-out);
}
.tcc.open { opacity: 1; transform: translate(-50%, 0) scale(1); }

.tcc-head { display: flex; align-items: center; gap: 11px; }
.tcc-mark {
  display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 11px;
  background: #141414; color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(26, 26, 26, .25), 0 0 0 1px rgba(245, 197, 24, .18);
}
.tcc-mark svg { width: 20px; height: 20px; }
/* the hands go round — slowly, a clock rather than a spinner */
.tcc-hand-h, .tcc-hand-m { transform-box: view-box; transform-origin: 12px 12px; }
.tcc-hand-m { animation: tcc-turn 8s linear infinite; }
.tcc-hand-h { animation: tcc-turn 96s linear infinite; }
@keyframes tcc-turn { to { transform: rotate(360deg); } }
.tcc-title { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.tcc-title b { font: 700 15px var(--sans); color: var(--ink); }
.tcc-title span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcc-x {
  display: grid; place-items: center; flex-shrink: 0; width: 29px; height: 29px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line); background: var(--glass-2); color: var(--muted); cursor: pointer;
  box-shadow: var(--shadow-rest);
  transition: transform .32s var(--ease-spring), box-shadow .32s var(--ease-out), background .16s var(--ease-out), color .16s var(--ease-out), border-color .16s var(--ease-out);
}
.tcc-x svg { width: 14px; height: 14px; }
.tcc-x:hover { color: var(--ink); background: #FFFFFF; border-color: rgba(123, 30, 46, .45); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.tcc-x:active { transform: translateY(1px) scale(.94); box-shadow: 0 1px 4px rgba(26, 26, 26, .18); transition-duration: .06s; }

.tcc-hero { display: flex; flex-direction: column; margin: 14px 2px 12px; }
.tcc-big { font: 800 40px/1.05 var(--sans); letter-spacing: -.02em; color: #0D0D0D; }
.tcc-hero-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.tcc-lab { font: 700 10.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tcc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tcc-tile {
  display: flex; flex-direction: column; min-width: 0; padding: 9px 10px 8px;
  background: rgba(255, 255, 255, .62); border: 1px solid var(--line-soft); border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}
.tcc-tile.here { border-color: rgba(123, 30, 46, .28); background: rgba(123, 30, 46, .05); }
.tcc-tile b { font: 700 17px var(--sans); color: var(--ink); margin-top: 2px; white-space: nowrap; }
.tcc-tile span:last-child { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tcc-pages-head { display: flex; justify-content: space-between; margin: 16px 4px 6px; }
.tcc-pages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.tcc-pages li {
  display: grid; grid-template-columns: minmax(0, 1fr) 76px 58px 44px; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 8px;
}
.tcc-pages li.here { background: var(--accent-soft); }
.tcc-pg { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcc-pages li.off .tcc-pg { color: var(--muted); font-style: italic; }
.tcc-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--accent); box-shadow: 0 0 6px rgba(123, 30, 46, .5); }
.tcc-bar { display: block; height: 6px; border-radius: 3px; background: rgba(26, 26, 26, .07); overflow: hidden; }
.tcc-bar i { display: block; height: 100%; min-width: 2px; border-radius: 0 3px 3px 0; background: var(--tc-people); }
.tcc-t, .tcc-i { font: 500 11.5px var(--mono); text-align: right; white-space: nowrap; }
.tcc-t { color: var(--ink); }
.tcc-i { color: var(--muted); font-weight: 400; }

.tcc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.tcc-hint { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.tcc-foot .btn { flex-shrink: 0; padding: 6px 12px; font-size: 12.5px; }

/* ===================================================================
   Project checkout — the launch page's last stop
   =================================================================== */
.tco-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 22px 0 14px; }
.tco-head h2 { font: 800 22px var(--display); letter-spacing: -.01em; margin: 0 0 3px; color: #0D0D0D; }
.tco-head p { margin: 0; color: var(--ink); font-size: 13px; max-width: 58ch; }
.tco-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink); }
.tco-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tco-key { display: inline-block; width: 12px; height: 10px; border-radius: 2px 3px 3px 2px; }
.tco-key.people { background: var(--tc-people); }
.tco-key.claude { background: var(--tc-claude); }
.tco-key.idle { background: var(--tc-idle); }

.tco-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tco-kpi {
  display: flex; flex-direction: column; min-width: 0; padding: 13px 15px 12px;
  background: var(--glass); border: 1px solid var(--line-soft); border-radius: 16px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-rest), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.tco-kpi b { font: 700 24px var(--sans); letter-spacing: -.01em; color: var(--ink); margin: 3px 0 1px; white-space: nowrap; }
.tco-kpi span:last-child { font-size: 12px; color: var(--muted); line-height: 1.35; }
.tco-lab { display: block; font: 700 10.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0; }
#tco-empty { margin: 16px 2px 0; color: var(--ink); }

.tco-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.tco-card {
  min-width: 0; padding: 15px 16px 12px;
  background: var(--glass); border: 1px solid var(--line-soft); border-radius: 18px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-rest), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.tco-card > .tco-lab { margin-bottom: 8px; }
.tco-card > .tco-lab.sub { margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.tco-rows { display: flex; flex-direction: column; }
.tco-row { display: grid; grid-template-columns: minmax(0, 32%) minmax(0, 1fr) 118px; align-items: center; gap: 10px; padding: 5px 0; }
.tco-name { min-width: 0; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tco-off { color: var(--muted); font-style: italic; }
.tco-bar { display: flex; gap: 2px; height: 10px; min-width: 0; }
.tco-bar i { display: block; height: 100%; min-width: 3px; border-radius: 1px; flex-grow: 0; flex-shrink: 1; }
.tco-bar i:last-child { border-radius: 1px 4px 4px 1px; }
.tco-bar i.people { background: var(--tc-people); }
.tco-bar i.claude { background: var(--tc-claude); }
.tco-bar i.idle { background: var(--tc-idle); }
.tco-val { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; line-height: 1.25; text-align: right; }
.tco-val b { font: 500 12.5px var(--mono); color: var(--ink); white-space: nowrap; }
.tco-val em { font: 400 11px var(--mono); font-style: normal; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tco-none { margin: 2px 0 6px; font-size: 12.5px; color: var(--muted); }

.tco-long { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tco-long li { display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 8px; padding: 4px 0; }
.tco-long li b { grid-row: span 2; font: 500 12.5px var(--mono); color: var(--ink); padding-top: 1px; }
.tco-long-l { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tco-long-m { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Claude's read: one card per time consumer, the update it suggests inside */
.tco-ai {
  margin-top: 12px; padding: 18px 20px;
  background: var(--glass); border: 1px solid var(--line-soft); border-radius: 18px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-rest), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.tco-ai-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tco-ai-head > div { flex: 1; min-width: 220px; }
.tco-ai-head b { display: block; font: 700 15px var(--display); color: var(--ink); }
.tco-ai-head > div span { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.5; margin-top: 2px; }
.tco-ai-mark { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 11px; background: var(--cta-grad); color: #FFFFFF; box-shadow: var(--bloom); }
.tco-ai-mark svg { width: 17px; height: 17px; }
#tco-ai-body:empty { display: none; }
#tco-ai-body { margin-top: 14px; }
.tco-summary { margin: 0 0 4px; font-size: 13.5px; color: var(--ink); line-height: 1.55; }
.tco-reading { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 13px; color: var(--accent-deep); }
.tco-err { margin: 0 0 8px; padding: 9px 12px; border-radius: 12px; font-size: 13px; color: var(--danger-ink); background: var(--danger-bg); border: 1px solid var(--danger-line); }

.tco-sug {
  margin-top: 10px; padding: 14px 16px;
  background: rgba(255, 255, 255, .8); border: 1px solid var(--line-soft); border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  animation: tco-in .28s var(--ease-out) both;
}
@keyframes tco-in { from { opacity: 0; transform: translateY(5px); } }
.tco-sug-top { display: flex; align-items: center; gap: 11px; }
.tco-sug-n { display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: #141414; color: #FFFFFF; font: 700 12px var(--sans); }
.tco-sug-what { flex: 1; min-width: 0; }
.tco-sug-what b { display: block; font: 700 14.5px var(--sans); color: var(--ink); }
.tco-sug-time { font: 500 13px var(--mono); color: var(--ink); white-space: nowrap; }
.tco-sug-why { margin: 8px 0 0 35px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.tco-sug-upd {
  margin: 10px 0 0 35px; padding: 11px 13px 10px;
  background: rgba(123, 30, 46, .045); border: 1px solid rgba(123, 30, 46, .16); border-radius: 12px;
}
.tco-sug-upd b { display: block; font: 700 14px var(--sans); color: var(--ink); margin-top: 2px; }
.tco-sug-upd p { margin: 4px 0 0; font-size: 13px; color: var(--ink); line-height: 1.5; white-space: pre-line; }
.tco-sug-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.tco-sug-saves { font-size: 12px; color: var(--muted); }
.tco-sug-foot .btn { padding: 6px 13px; font-size: 12.5px; }

@media (max-width: 860px) {
  .tco-grid { grid-template-columns: minmax(0, 1fr); }
  .tco-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tcc { top: 12px; }
  .tcc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tcc-tiles .tcc-tile:last-child { grid-column: span 2; }
  .tco-row { grid-template-columns: minmax(0, 30%) minmax(0, 1fr) 96px; }
  .tco-sug-why, .tco-sug-upd { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tcc { transition: opacity .01s; transform: translate(-50%, 0); }
  .tcc-hand-h, .tcc-hand-m { animation: none; }
  .tcc-x, .tcc-x:hover, .tcc-x:active { transform: none; transition: none; }
  .tco-sug { animation: none; }
}
