/* The 30/60/90-day plan as a tracked journey.
 *
 * Composed from the existing design tokens and components — cards, chips,
 * buttons, the assessment's progress bar, the docs pill. Nothing new is
 * introduced here beyond layout.
 */

.gk-journey {
  margin: 1rem 0 2rem;
}

.gk-journey-h {
  margin: 0 0 .3rem;
}

.gk-journey-lede {
  margin: 0 0 1rem;
  color: var(--gk-ink-2);
}

.gk-journey-eyebrow {
  margin: 0;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gk-ink-3);
}

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

.gk-journey-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: .8rem;
  margin: 0 0 1rem;
}

.md-typeset .gk-journey-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 1rem 1.1rem 1.1rem;
}

.md-typeset .gk-journey-card > h3 {
  margin: 0 0 .4rem;
  font-size: 1rem;
  text-transform: none;
}

.gk-journey-when {
  margin: 0 0 .7rem;
  font-size: .84rem;
  color: var(--gk-ink-2);
}

.gk-journey-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .15rem .7rem;
  margin: 0 0 1rem;
  font-size: .78rem;
}

.gk-journey-facts dt {
  color: var(--gk-ink-3);
  font-weight: 500;
}

.gk-journey-facts dd {
  margin: 0;
  color: var(--gk-ink);
}

/* Push the commit button to the bottom so cards of different heights line up. */
.md-typeset .gk-journey-card > .gk-btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ----------------------------------------------------------- chosen journey */

.gk-journey-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.gk-journey-progress {
  text-align: right;
}

.gk-journey-pct {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gk-brand);
}

/* The next task is the one thing to act on, so it gets the only filled box. */
.gk-journey-next {
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--gk-brand-soft);
  border-left: 3px solid var(--gk-brand);
  border-radius: var(--gk-r-md, .5rem);
  background: var(--gk-seq-track);
}

.md-typeset .gk-journey-next > h3 {
  margin: .2rem 0 .3rem;
  font-size: 1.05rem;
  text-transform: none;
}

.md-typeset .gk-journey-next > p:last-child {
  margin-bottom: 0;
}

.gk-journey-next.is-done {
  border-color: var(--gk-good);
  border-left-color: var(--gk-good);
  background: var(--gk-good-bg);
}

[data-md-color-scheme="slate"] .gk-journey-next {
  background: var(--md-code-bg-color);
}

/* -------------------------------------------------------------- the phases */

.gk-journey-phase {
  margin: 0 0 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gk-hairline);
}

.gk-journey-phase-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
}

.md-typeset .gk-journey-phase-h > h3 {
  margin: 0;
  font-size: 1rem;
  text-transform: none;
}

.md-typeset ol.gk-journey-steps {
  list-style: none;
  margin: .8rem 0 .8rem;
  padding: 0;
}

.md-typeset ol.gk-journey-steps > li {
  margin: 0 0 .5rem;
  padding: .7rem .85rem;
  border: 1px solid var(--gk-hairline);
  border-radius: var(--gk-r-sm, .35rem);
  background: var(--md-default-bg-color);
}

.gk-journey-step-h {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
}

/* A tick is the main interaction here, so it gets a real target, not the
 * browser default that is hard to hit on a phone. */
.gk-journey-step-h input[type="checkbox"] {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: .1rem 0 0;
  cursor: pointer;
  accent-color: var(--gk-brand);
}

.gk-journey-step-h label {
  cursor: pointer;
  line-height: 1.45;
}

.gk-journey-step.is-done .gk-journey-step-h strong {
  text-decoration: line-through;
  color: var(--gk-ink-3);
}

/* Done steps collapse to the tick and the title — the detail is only in the
 * way once the work is behind you. */
.gk-journey-step.is-done .gk-journey-step-b {
  display: none;
}

.gk-journey-step-b {
  margin: .6rem 0 0;
  padding-left: 1.7rem;
}

.md-typeset .gk-journey-step-b > p {
  margin: 0 0 .5rem;
  font-size: .84rem;
}

.gk-journey-note {
  color: var(--gk-ink-2);
}

.gk-journey-evidence {
  color: var(--gk-ink-2);
}

.gk-journey-fields {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem .9rem;
  margin: 0 0 .6rem;
}

.gk-journey-fields .gk-field {
  min-width: 11rem;
}

.md-typeset details.gk-journey-done {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--gk-hairline) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: .84rem;
}

.md-typeset details.gk-journey-done > summary {
  margin: 0 !important;
  padding: .5rem 0 .5rem 1.2rem !important;
  background: transparent !important;
  border: 0 !important;
  font-weight: 600;
  color: var(--gk-ink-2);
  cursor: pointer;
}

.md-typeset details.gk-journey-done > summary::before {
  display: none !important;
}

.md-typeset details.gk-journey-done > summary::after {
  top: .55rem !important;
  left: 0 !important;
  right: auto !important;
  width: .85rem;
  height: .85rem;
  background-color: var(--gk-ink-3);
}

.gk-journey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 1rem 0 .6rem;
}

.gk-journey-foot {
  font-size: .78rem;
}

@media (max-width: 45em) {
  .gk-journey-head {
    flex-direction: column;
  }
  .gk-journey-progress {
    text-align: left;
  }
}

/* Printing a journey should give you the plan, not the controls. */
@media print {
  .gk-journey-actions,
  .gk-journey-fields,
  .gk-journey-next p:last-child {
    display: none;
  }
  .gk-journey-step.is-done .gk-journey-step-b {
    display: block;
  }
}
