/* ────────────────────────────────────────────────────────────────────────────
   DΛREΛKT_ ui.klik.home — the overview / landing page
   Namespace: .ui-klik-home / .ukh-*
   ──────────────────────────────────────────────────────────────────────────── */

.ui-klik-home { padding: 0.4rem 0 3rem; }

/* ── hero extras ── */
.ukh-streak {
  display: inline-flex; align-items: baseline; gap: 0.4rem; margin-top: 0.9rem;
  padding: 0.3rem 0.8rem; border-radius: 999px;
  background: color-mix(in srgb, var(--klk-accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--klk-accent) 35%, transparent);
}
.ukh-streak__n { font-size: 1.3rem; font-weight: 800; color: var(--klk-accent); }
.ukh-streak__l { font-size: 0.8rem; color: var(--klk-dim); }

/* ── progress ring (conic-gradient + hollow centre) ── */
@property --pct { syntax: "<number>"; initial-value: 0; inherits: false; }
.ukh-ring {
  --target: 0;
  width: 150px; height: 150px; flex: 0 0 auto;
  position: relative; z-index: 1;
  border-radius: 50%;
  background: conic-gradient(var(--klk-accent) calc(var(--pct) * 1%), color-mix(in srgb, var(--klk-text) 13%, transparent) 0);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--klk-text) 6%, transparent);
  animation: ukh-ring-fill 1.25s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes ukh-ring-fill { from { --pct: 0; } to { --pct: var(--target); } }
.ukh-ring__inner {
  width: 116px; height: 116px; border-radius: 50%;
  background: var(--klk-surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem;
}
.ukh-ring__pct { font-size: 2rem; font-weight: 800; color: var(--klk-text); line-height: 1; }
.ukh-ring__sub { font-size: 0.78rem; color: var(--klk-dim); font-variant-numeric: tabular-nums; }

/* ── continue card ── */
.ukh-continue {
  margin: 0 0 0.9rem;
  background:
    radial-gradient(70% 130% at 100% 0%, color-mix(in srgb, var(--klk-accent) 11%, transparent), transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, #fff 4%, var(--klk-surface)), var(--klk-surface));
  border-color: color-mix(in srgb, var(--klk-accent) 24%, transparent);
}
.ukh-continue__title { margin: 0 0 0.4rem; font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
.ukh-continue__meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }

/* ── the six-pillar map ── */
.ukh-pillars {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.9rem; margin: 0 0 0.9rem;
}
.ukh-pillar {
  --tone: var(--klk-accent);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem;
  padding: 1rem 1rem 0.85rem;
  text-align: left; font: inherit; color: inherit;
  border-radius: 16px;
  background:
    radial-gradient(90% 80% at 100% 0%, color-mix(in srgb, var(--tone) 16%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, #fff 5%, var(--klk-surface)), color-mix(in srgb, #000 8%, var(--klk-surface)));
  border: 1px solid color-mix(in srgb, var(--tone) 26%, transparent);
  box-shadow: 0 1px 2px color-mix(in srgb, #000 16%, transparent),
              0 10px 24px color-mix(in srgb, #000 16%, transparent),
              inset 0 1px 0 color-mix(in srgb, #fff 6%, transparent);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.ukh-pillar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--klk-text) 9%, transparent) 4px, transparent 4px),
    linear-gradient(90deg, color-mix(in srgb, var(--klk-text) 9%, transparent) 4px, transparent 4px);
  background-size: 30px 30px; background-position: -2px -2px;
  -webkit-mask-image: radial-gradient(130% 110% at 100% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(130% 110% at 100% 0%, #000 0%, transparent 72%);
}
.ukh-pillar > * { position: relative; z-index: 1; }
.ukh-pillar--live { cursor: pointer; }
.ukh-pillar--live:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--tone) 55%, transparent);
  box-shadow: 0 3px 6px color-mix(in srgb, #000 16%, transparent),
              0 18px 38px color-mix(in srgb, #000 26%, transparent),
              0 0 22px color-mix(in srgb, var(--tone) 22%, transparent),
              inset 0 1px 0 color-mix(in srgb, #fff 7%, transparent);
}
.ukh-pillar--live:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }
.ukh-pillar--soon { opacity: 0.78; }
.ukh-pillar__icon { --klk-ico-accent: var(--tone); display: block; margin-bottom: 0.2rem; }
.ukh-pillar__name { font-size: 1.05rem; font-weight: 700; }
.ukh-pillar__blurb { font-size: 0.78rem; color: var(--klk-dim); line-height: 1.35; min-height: 2.2em; }
.ukh-pillar__state {
  margin-top: 0.2rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--klk-dim);
}
.ukh-pillar__state--live { color: var(--tone); }

/* ── lower grid ── */
.ukh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.9rem; align-items: start; }

/* stats */
.ukh-stats__row { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.ukh-stat { display: flex; flex-direction: column; gap: 0.1rem; }
.ukh-stat__v { font-family: var(--klk-mono); font-size: 1.7rem; font-weight: 800; line-height: 1.1; color: var(--klk-spark); font-variant-numeric: tabular-nums; }
.ukh-stat__l { font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--klk-dim); }
.ukh-stats .klk-card__sub { margin-top: 0.7rem; }

/* heatmap (12 weeks) */
.ukh-heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 3px; justify-content: start; margin: 0 0 0.7rem; }
.ukh-heat__cell { width: 12px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--klk-text) 8%, transparent);
  animation: ukh-fade 0.4s ease-out both; animation-delay: calc(var(--k, 0) * 0.006s); }
.ukh-heat__cell--pad { background: transparent; animation: none; }
.ukh-heat__lv1 { background: color-mix(in srgb, var(--klk-accent) 32%, transparent); }
.ukh-heat__lv2 { background: color-mix(in srgb, var(--klk-accent) 62%, transparent); }
.ukh-heat__lv3 { background: var(--klk-accent); }
@keyframes ukh-fade { from { opacity: 0; } to { opacity: 1; } }

/* milestones — the first badges */
.ukh-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ukh-badge { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; padding: 0.2rem 0.6rem; border-radius: 999px; }
.ukh-badge--on {
  color: var(--klk-ok);
  background: linear-gradient(180deg, color-mix(in srgb, var(--klk-ok) 22%, transparent), color-mix(in srgb, var(--klk-ok) 9%, transparent));
  border: 1px solid color-mix(in srgb, var(--klk-ok) 42%, transparent);
  box-shadow: 0 0 11px color-mix(in srgb, var(--klk-ok) 22%, transparent), inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
}
.ukh-badge__tick { font-weight: 700; }
.ukh-ms-next { margin-top: 0.9rem; }
.ukh-track { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--klk-text) 10%, transparent); overflow: hidden; margin-top: 0.4rem; }
.ukh-track__fill {
  display: block; height: 100%; width: calc(var(--w, 0) * 1%);
  background: linear-gradient(90deg, color-mix(in srgb, var(--klk-accent) 70%, #fff), var(--klk-accent));
  transform-origin: left; animation: ukh-grow-x 0.9s 0.2s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes ukh-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* tip */
.ukh-tip__text { margin: 0; font-size: 1.02rem; line-height: 1.55; color: var(--klk-text); }

@media (prefers-reduced-motion: reduce) {
  .ukh-ring, .ukh-heat__cell, .ukh-track__fill { animation: none; }
  .ukh-pillar--live:hover { transform: none; }
}
