/* -------------------------------------------------------------------------
   Belajar — article / lesson cards, the progress bar, and the reading view.
   Shared tool chrome comes from theme.css + hero-pages.css.
   ------------------------------------------------------------------------- */

.learn-page { padding-bottom: 64px; }

/* ---------- progress summary ---------- */

.progress-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
  padding: 16px 18px;
}

.progress-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.progress-head b {
  font-family: var(--font-mono);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
}

.progress-head span {
  font-size: 12px;
  color: var(--muted);
}

.progress-bar,
.learn-bar {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}

.progress-bar { height: 6px; }

.progress-bar span,
.learn-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--copper), var(--amber));
  transition: width .25s ease;
}

.progress-continue {
  align-self: flex-start;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--amber);
  text-decoration: none;
}

.progress-continue:hover { text-decoration: underline; }

/* ---------- tracks + cards ---------- */

.track { margin-top: 26px; }

.track-head h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: .01em;
}

.track-head p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.learn-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  text-decoration: none;
  transition: border-color .12s, background .12s, transform .12s;
}

.learn-card:hover {
  border-color: rgba(255, 179, 71, .55);
  background: rgba(255, 179, 71, .07);
  transform: translateY(-1px);
}

.learn-card.is-done { border-color: rgba(90, 200, 140, .35); }

.learn-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.learn-type {
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.learn-type--lesson { color: var(--amber); border-color: rgba(255, 179, 71, .5); }
.learn-type--article { color: var(--text-soft, var(--muted)); }

.learn-min {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--dim);
}

.learn-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.learn-lede {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.learn-card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  /* Pinned to the bottom so the bars line up across a row of unequal cards. */
  margin-top: auto;
  padding-top: 8px;
}

.learn-card-foot .learn-bar { flex: 1; }

.learn-status {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .05em;
  color: var(--dim);
  white-space: nowrap;
}

/* ---------- one item ---------- */

.learn-item { margin-top: 22px; }

.learn-back {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}

.learn-back:hover { color: var(--amber); }

.learn-item-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); }

.learn-item-head .display { margin: 4px 0 0; }

.learn-item-head .lede { margin: 10px 0 0; max-width: 62ch; }

.learn-item-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.learn-bar--wide { flex: 1; max-width: 340px; }

.read-body {
  max-width: 66ch;
  margin-top: 6px;
}

.read-section { margin-top: 24px; }

.read-section h2,
.learn-takeaways h2,
.step-head h2 {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: .01em;
}

.read-body p {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--text-soft, var(--muted));
}

.read-body ul {
  margin: 0 0 12px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.read-body li {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-soft, var(--muted));
}

.learn-takeaways {
  margin-top: 26px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 179, 71, .35);
  border-radius: 6px;
  background: rgba(255, 179, 71, .06);
}

.learn-takeaways ul { margin: 0; }

/* ---------- lesson steps ---------- */

.step {
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .025);
}

.step.is-done { border-color: rgba(90, 200, 140, .4); }

.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.step-head h2 { margin: 0; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.step.is-done .step-num {
  border-color: rgba(90, 200, 140, .6);
  color: var(--live);
}

.check {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
}

.check-q {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.check-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.check-option {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(0, 0, 0, .22);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}

.check-option:hover:not(:disabled) {
  border-color: rgba(255, 179, 71, .6);
  background: rgba(255, 179, 71, .08);
}

.check-option:disabled { cursor: default; opacity: .75; }

.check-option.is-right {
  border-color: rgba(90, 200, 140, .7);
  background: rgba(90, 200, 140, .12);
  color: var(--live);
  opacity: 1;
}

.check-option.is-wrong {
  border-color: rgba(220, 90, 90, .6);
  background: rgba(220, 90, 90, .1);
  color: var(--bad);
  opacity: 1;
}

.check-why {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

.check-why.is-right { color: var(--live); }

.check-retry {
  margin-top: 10px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.check-retry:hover { border-color: rgba(255, 179, 71, .6); color: var(--amber); }

/* ---------- footer nav ---------- */

.learn-item-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.learn-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.learn-back-row { margin-top: 14px; }

@media (max-width: 560px) {
  .learn-grid { grid-template-columns: 1fr; }
  .step { padding: 13px 14px; }
  .learn-nav { width: 100%; justify-content: space-between; }
}
