/* ==========================================================================
   Daftar — "Naya Shehar" relocation checklist

   The differentiator. Not a directory of departments but an ordered list of
   what a person actually has to do in their first weeks somewhere new.
   Markup from renderChecklist() in js/app.js; progress in localStorage 'daftar.v1'.
   ========================================================================== */

.reloc {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

@media (min-width: 56rem) {
  .reloc { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
}

/* --- Progress aside ------------------------------------------------------ */

.reloc__aside {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  padding: var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-page);
}

.reloc__figure {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.reloc__done {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 20, "WONK" 0, "opsz" 90;
  font-size: clamp(2.5rem, 2rem + 2.4vw, 3.75rem);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
}

.reloc__of { font-size: var(--text-lg); color: var(--text-faint); }

/* Progress bar drawn as ledger ruling that fills with ink. */
.reloc__bar {
  height: 6px;
  margin-top: var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  overflow: hidden;
}

.reloc__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--saffron-deep), var(--saffron));
  border-radius: var(--radius-pill);
  transition: width var(--dur-slow) var(--ease-out);
}

.reloc__hint {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-wrap: pretty;
}

.reloc__reset {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
}

/* --- Phase group --------------------------------------------------------- */

.phase + .phase { margin-top: var(--space-5); }

.phase__label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.phase__label span {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.phase__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Task ---------------------------------------------------------------- */

.task {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-bottom: 1px solid var(--rule-soft);
  transition: background var(--dur-fast) var(--ease-out);
}

.task:hover { background: var(--bg-card); }

/* Hand-inked tick box. The check is an SVG stroke that draws on check. */
.task__box {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink-faint);
  border-radius: 3px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}

.task__box:hover { border-color: var(--accent); }

.task__box input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

/* The native checkbox is visually hidden, so its focus ring has to be
   forwarded to the box the user can actually see. */
.task__box:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.task__tick {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  transition: stroke-dashoffset var(--dur-normal) var(--ease-out);
}

.task.is-done .task__box { border-color: var(--green); background: var(--green-soft); }
.task.is-done .task__tick { stroke-dashoffset: 0; }

.task.is-done .task__title {
  color: var(--text-faint);
  text-decoration: line-through;
  text-decoration-color: var(--ink-faint);
  text-decoration-thickness: 1px;
}

.task__body { flex: 1; min-width: 0; }

.task__title {
  font-weight: 550;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
}

.task__why {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 2px;
  text-wrap: pretty;
}

.task__go {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.task__go:hover { border-bottom-color: var(--accent); }
