/* v7: the project cockpit is built in code instead of a cut-out raster, so edges and text stay crisp.
   Everything is sized in em against a 76em-wide frame that scales with its container. */

.cell-shot {
  container-type: inline-size;
}

.ck {
  --draw: clamp(0, var(--p, 1) * 1.6 - 0.2, 1);
  position: relative;
  width: 100%;
  aspect-ratio: 76 / 47;
  font-size: calc(100cqw / 76);
  transform-style: preserve-3d;
  transition: transform 600ms var(--ease-out);
}

.ck.is-tilting {
  transition: transform 120ms linear;
}

.ck-stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: perspective(160em) rotateX(5deg) rotateY(-9deg);
}

.ck ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ck p {
  margin: 0;
}

.ck svg {
  display: block;
  overflow: visible;
}

/* Main window: dark sidebar, warm paper body. */

.ck-main {
  position: absolute;
  left: 15em;
  top: 3em;
  width: 47em;
  height: 40em;
  display: grid;
  grid-template-columns: 9.6em 1fr;
  overflow: hidden;
  border-radius: 1.4em;
  background: #f4f0e8;
  box-shadow:
    0 0 0 0.1em rgba(244, 240, 232, 0.4),
    0 3em 6em -1.5em rgba(0, 0, 0, 0.7);
  color: #171a1f;
}

.ck-side {
  padding: 1.6em 1em;
  display: flex;
  flex-direction: column;
  gap: 1.6em;
  background: #151b23;
  color: rgba(244, 240, 232, 0.72);
  font-size: 0.82em;
}

.ck-brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  color: #faf8f2;
  font-size: 1.15em;
  font-weight: 760;
}

.ck-tile {
  width: 1.9em;
  height: 1.9em;
  display: grid;
  place-items: center;
  border-radius: 0.5em;
  background: #faf8f2;
}

.ck-tile img {
  width: 1.3em;
  height: 1.3em;
}

.ck-side ul {
  display: grid;
  gap: 0.3em;
}

.ck-side li {
  padding: 0.55em 0.6em;
  display: flex;
  align-items: center;
  gap: 0.6em;
  border-radius: 0.5em;
  font-weight: 600;
}

.ck-side li i {
  width: 0.8em;
  height: 0.8em;
  border: 0.12em solid currentColor;
  border-radius: 0.25em;
  opacity: 0.7;
}

.ck-side li.is-on {
  background: rgba(244, 240, 232, 0.08);
  color: #faf8f2;
}

.ck-side li.is-on i {
  border-color: var(--gold);
  background: rgba(199, 168, 107, 0.4);
  opacity: 1;
}

.ck-org {
  margin-top: auto;
  display: grid;
  gap: 0.2em;
  font-size: 0.85em;
}

.ck-org b {
  color: #faf8f2;
}

.ck-body {
  padding: 1.6em 1.6em 1.4em;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 1.1em;
  min-width: 0;
}

.ck-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.ck-head b {
  display: block;
  font-size: 1.7em;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.ck-head span {
  color: #6b675f;
  font-size: 0.82em;
}

.ck-head .ck-range {
  padding: 0.45em 0.8em;
  border-radius: 0.5em;
  background: #fff;
  box-shadow: 0 0 0 0.1em #e4ddd0;
  color: #171a1f;
  font-size: 0.78em;
  font-weight: 650;
}

.ck-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7em;
}

.ck-kpis > div {
  position: relative;
  padding: 0.8em 0.9em;
  display: grid;
  gap: 0.15em;
  border-radius: 0.8em;
  background: #fff;
  box-shadow: 0 0 0 0.1em #ebe5da;
}

.ck-kpis span {
  color: #6b675f;
  font-size: 0.72em;
  font-weight: 600;
}

.ck-kpis b {
  font-size: 1.35em;
  font-weight: 760;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.ck-kpis em {
  color: #8b713f;
  font-size: 0.7em;
  font-style: normal;
  font-weight: 700;
}

.ck-kpis svg {
  position: absolute;
  right: 0.8em;
  bottom: 0.9em;
  width: 3.6em;
  height: 1.2em;
}

.ck-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 0.8em;
  min-height: 0;
}

.ck-chart,
.ck-list {
  padding: 1em;
  border-radius: 0.9em;
  background: #fff;
  box-shadow: 0 0 0 0.1em #ebe5da;
  min-height: 0;
}

.ck-chart {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.8em;
}

.ck-chart > p,
.ck-list > p {
  display: flex;
  justify-content: space-between;
  font-size: 0.82em;
  font-weight: 720;
}

.ck-chart > p span {
  display: flex;
  align-items: center;
  gap: 0.4em;
  color: #6b675f;
  font-size: 0.85em;
  font-weight: 600;
}

.ck-chart > p i {
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: #171a1f;
}

.ck-chart > p i.is-copper {
  margin-left: 0.4em;
  background: #b07a55;
}

.ck-chart svg {
  width: 100%;
  height: 100%;
}

.ck-grid {
  fill: none;
  stroke: #eee8dd;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.ck-chart .ck-draw {
  stroke: #171a1f;
}

.ck-list ul {
  margin-top: 0.8em;
  display: grid;
  gap: 0.75em;
}

.ck-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5em;
  font-size: 0.74em;
  font-weight: 600;
}

.ck-list li i {
  width: 1.4em;
  height: 1.4em;
  border-radius: 0.4em;
  background: #ebe5da;
}

.ck-list li span {
  padding: 0.2em 0.6em;
  border-radius: 99em;
  background: #ebe5da;
  color: #625f58;
  font-size: 0.85em;
}

.ck-list li span.is-gold {
  background: rgba(199, 168, 107, 0.25);
  color: #6f5a30;
}

.ck-list li span.is-done {
  background: #171a1f;
  color: #f4f0e8;
}

/* Shared chart strokes: they draw in as the cell scrolls into view. */

.ck-draw {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--draw));
  vector-effect: non-scaling-stroke;
}

.ck-draw.is-copper {
  stroke: #b07a55;
}

.ck-chart .ck-draw.is-copper {
  stroke: #b07a55;
}

.ck-fill {
  fill: rgba(199, 168, 107, 0.16);
  opacity: var(--draw);
}

/* Floating glass cards at different depths. */

.ck-card {
  position: absolute;
  padding: 1.1em 1.2em;
  border-radius: 1.2em;
  background:
    linear-gradient(180deg, rgba(244, 240, 232, 0.1), rgba(244, 240, 232, 0.03)),
    rgba(21, 27, 35, 0.82);
  box-shadow:
    inset 0 0.08em 0 rgba(244, 240, 232, 0.14),
    inset 0 0 0 0.1em rgba(244, 240, 232, 0.1),
    0 2.5em 4em -1.5em rgba(0, 0, 0, 0.75);
  color: #f4f0e8;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.ck-card-head {
  margin-bottom: 0.9em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ck-card-head b {
  font-size: 0.95em;
  font-weight: 720;
}

.ck-card-head span {
  color: var(--gold);
  font-size: 0.72em;
  font-weight: 700;
}

.ck-tasks {
  left: 0;
  top: 5em;
  width: 18em;
  transform: translateZ(5em);
}

.ck-tasks li {
  padding: 0.55em 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6em;
  border-top: 0.08em solid rgba(244, 240, 232, 0.08);
  font-size: 0.76em;
}

.ck-tasks li i {
  width: 1.1em;
  height: 1.1em;
  border: 0.14em solid rgba(244, 240, 232, 0.4);
  border-radius: 0.3em;
}

.ck-tasks li i.is-done {
  border-color: var(--gold);
  background: var(--gold);
}

.ck-tasks li b {
  font-weight: 650;
}

.ck-tasks li span {
  color: rgba(244, 240, 232, 0.55);
  font-size: 0.9em;
}

.ck-status {
  left: 3em;
  top: 26em;
  width: 19em;
  transform: translateZ(9em);
}

.ck-donut {
  position: relative;
  float: left;
  width: 6.6em;
  height: 6.6em;
  margin-right: 1em;
}

.ck-donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ck-seg {
  fill: none;
  stroke: rgba(244, 240, 232, 0.16);
  stroke-width: 9;
  stroke-dasharray: 100;
}

/* Segments: 8, 6 and 7 of 24 projects, drawn in as the cell scrolls in. */
.ck-seg.is-a {
  stroke: var(--gold);
  stroke-dasharray: calc(33.3 * var(--draw)) 100;
}

.ck-seg.is-b {
  stroke: #b07a55;
  stroke-dasharray: calc(25 * var(--draw)) 100;
  stroke-dashoffset: -33.3;
}

.ck-seg.is-c {
  stroke: #f4f0e8;
  stroke-dasharray: calc(29.2 * var(--draw)) 100;
  stroke-dashoffset: -58.3;
}

.ck-donut b {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  font-size: 1.5em;
  font-weight: 760;
  line-height: 1;
  text-align: center;
}

.ck-donut small {
  display: block;
  margin-top: 0.2em;
  color: rgba(244, 240, 232, 0.55);
  font-size: 0.42em;
  font-weight: 600;
}

.ck-legend {
  display: grid;
  gap: 0.45em;
  padding-top: 0.4em !important;
  font-size: 0.74em;
}

.ck-legend li {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.ck-legend li i {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: rgba(244, 240, 232, 0.25);
}

.ck-legend li i.is-a { background: var(--gold); }
.ck-legend li i.is-b { background: #b07a55; }
.ck-legend li i.is-c { background: #f4f0e8; }

.ck-legend li b {
  margin-left: auto;
}

.ck-analytics {
  right: 0;
  top: 1.5em;
  width: 17em;
  transform: translateZ(6em);
}

.ck-big {
  font-size: 1.6em;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.ck-big em {
  margin-left: 0.4em;
  color: var(--gold);
  font-size: 0.5em;
  font-style: normal;
}

.ck-analytics svg {
  width: 100%;
  height: 4.4em;
  margin: 0.6em 0 0.8em;
}

.ck-mini {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5em;
  color: rgba(244, 240, 232, 0.55);
  font-size: 0.62em;
}

.ck-mini span {
  display: grid;
  gap: 0.2em;
}

.ck-mini b {
  color: #f4f0e8;
  font-size: 1.3em;
}

.ck-messages {
  right: 0.5em;
  top: 25.5em;
  width: 18em;
  transform: translateZ(8em);
}

.ck-messages li {
  padding: 0.6em 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.6em;
  border-top: 0.08em solid rgba(244, 240, 232, 0.08);
  font-size: 0.74em;
}

.ck-messages li i {
  grid-row: 1 / 3;
  width: 2.3em;
  height: 2.3em;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(199, 168, 107, 0.22);
  color: var(--gold);
  font-size: 0.85em;
  font-style: normal;
  font-weight: 760;
}

.ck-messages li b {
  font-weight: 700;
}

.ck-messages li span {
  grid-column: 2 / 4;
  color: rgba(244, 240, 232, 0.55);
}

.ck-messages li em {
  color: rgba(244, 240, 232, 0.45);
  font-size: 0.88em;
  font-style: normal;
}

@media (prefers-reduced-motion: reduce) {
  .ck {
    --draw: 1;
    transition: none;
  }
}
