/* frappe — « progrès » (view "progress", js/game/progress.js). Classes are prefixed pg-. Phone first: the countdown,
   today's plan and the streak, the skills on the way to NCLC 7, the overall level; two columns from 760 px. */

.pg-h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}
.pg-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--main);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.pg-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

/* the countdown */
.pg-count {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pg-count-big {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem 0.7rem;
}
.pg-count-big b {
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  color: var(--main);
}
.pg-weeks {
  font-size: 1rem;
}
.pg-count-sub {
  margin: 0;
}
.pg-status {
  margin: 0.2rem 0 0;
}
.pg-status[data-tone="bad"],
.pg-status[data-tone="warn"] {
  color: var(--g-err-ink);
}
.pg-status[data-tone="good"] {
  color: var(--g-ok-ink);
}

.pg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--g-gap);
}
@media (min-width: 760px) {
  .pg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* today's plan: the minutes ring, the steps, the next one */
.pg-plan,
.pg-streak,
.pg-skills,
.pg-overall {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}
.pg-plan-h {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
}
.pg-plan-h p {
  margin: 0.2rem 0 0;
}
.pg-ring {
  width: 4.2rem;
  height: 4.2rem;
}
.pg-ring circle {
  fill: none;
  stroke-width: 7;
}
.pg-ring-bg {
  stroke: var(--bg);
}
.pg-ring-fg {
  stroke: var(--main);
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease;
}
.pg-ring text {
  fill: var(--text);
  font-family: "Lexend Deca", sans-serif;
  font-size: 15px;
  font-weight: 600;
}
.pg-steps {
  display: grid;
  gap: 0.4rem;
}
.pg-step.done b {
  color: var(--g-gloss);
  text-decoration: line-through;
}
.pg-check {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--g-edge);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
}
.pg-step.done .pg-check {
  border-color: var(--g-ok);
  background: var(--g-ok);
  color: #10301a;
}
.pg-alldone {
  margin: 0;
  color: var(--g-ok-ink);
  font-weight: 500;
}

/* the streak and its four weeks */
.pg-streak-h {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
}
.pg-streak-h p {
  margin: 0.15rem 0 0;
}
.pg-flame {
  font-size: 2rem;
}
.pg-streak-n {
  font-size: 1.3rem;
  font-weight: 600;
}
.pg-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
  max-width: 18rem;
}
.pg-day {
  aspect-ratio: 1;
  border-radius: 0.35rem;
  background: var(--bg);
}
.pg-day.some {
  background: color-mix(in srgb, var(--g-coin) 35%, var(--bg));
}
.pg-day.met {
  background: var(--g-coin);
}
.pg-day.today {
  outline: 2px solid var(--main);
  outline-offset: 1px;
}
.pg-cal-t {
  margin: -0.2rem 0 0;
}

/* the skills on the way to NCLC 7 */
.pg-gate {
  margin: 0;
}
.pg-rows {
  display: grid;
  gap: 0.5rem;
}
.pg-skill {
  grid-template-areas: "ic name val" "goal goal goal";
  gap: 0.35rem 0.6rem;
  padding: 0.65rem 0.75rem;
}
.pg-ic {
  grid-area: ic;
  font-size: 1.3rem;
}
.pg-skill-t {
  grid-area: name;
  line-height: 1.2;
}
.pg-skill-t b {
  font-weight: 500;
}
.pg-val {
  grid-area: val;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
}
.pg-goal {
  grid-area: goal;
}
.pg-goal > .g-sub {
  font-size: 0.78rem;
}

/* the overall level on the A1 → B2 track */
.pg-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  margin-top: 0.4rem;
}
.pg-seg {
  padding: 0.3rem 0;
  border-radius: 0.4rem;
  color: #111;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}
.pg-seg[data-lv="A1"] {
  background: var(--g-a1);
}
.pg-seg[data-lv="A2"] {
  background: var(--g-a2);
}
.pg-seg[data-lv="B1"] {
  background: var(--g-b1);
}
.pg-seg[data-lv="B2"] {
  background: var(--g-b2);
}
.pg-you {
  position: absolute;
  top: -0.45rem;
  bottom: -0.45rem;
  width: 4px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--text);
  box-shadow: 0 0 0 2px var(--sub-alt);
}
.pg-track-t {
  margin: 0;
}
.pg-overall > .g-btn {
  align-self: flex-start;
}
