/*
 * The student home (home.js), the check start screen and the results page's
 * next step; the track page is in track-view.css. Colours come only from
 * the theme contract's variables in style.css's :root; nothing here names a
 * colour of its own. Laid out for a Chromebook (1366×768, 1280×800) first,
 * and down to a phone: below 900px the two columns become one, in the order
 * checks open now, Your results, the days, the profile, the join-code link.
 */

/* ---------- Home ---------- */

.home__grid {
  display: grid;
  gap: var(--sp-4);
  align-items: start;
}

@media (min-width: 900px) {
  .home__grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

@media (max-width: 899.98px) {
  .home__main,
  .home__side {
    display: contents;
  }

  .home__open { order: 1; }
  .home__results { order: 2; }
  .home__days { order: 3; }
  .home .profile { order: 4; }
  .home__join { order: 5; }
}

.card__title {
  margin: 0 0 var(--sp-2);
  color: var(--color-ink);
  font-size: var(--fs-h3);
  font-weight: 600;
}

/* "Up next" above the hero's title: sentence case, not an eyebrow. */
.home__next-label {
  margin: 0 0 var(--sp-1);
  color: var(--color-ink-soft);
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* On the results page the headline leads; the next step's title is one
   size down. */
.results__next .hero__title {
  font-size: var(--fs-h2);
}

.home__join {
  margin: 0;
  padding: 0 var(--sp-2);
  font-size: var(--fs-sm);
}

.home__join .link-btn {
  min-height: var(--ctl-h);
  color: var(--color-ink-soft);
}

/* ---------- Days: one card, a row per day ---------- */

.days > .day + .day {
  border-top: 1px solid var(--color-line);
}

.day__summary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 56px;
  padding: var(--sp-3) var(--sp-2);
  border-radius: var(--r-ctl);
  cursor: pointer;
  list-style: none;
}

.day__summary::-webkit-details-marker {
  display: none;
}

.day__summary:hover {
  background: var(--color-surface-2);
}

.day__summary:focus-visible {
  outline: 2px solid var(--color-accent-deep);
  outline-offset: -2px;
}

.day__text {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

.day__title {
  color: var(--color-ink);
  font-size: var(--fs-body);
  font-weight: 600;
}

.day__meta {
  color: var(--color-muted);
  font-size: var(--fs-sm);
}

.day__chevron {
  color: var(--color-muted);
}

.day[open] > .day__summary .day__chevron {
  transform: rotate(180deg);
}

.day__body {
  padding: 0 0 var(--sp-4);
}

.menu__message {
  margin: var(--sp-2) var(--sp-2) 0;
  color: var(--color-ink);
}

.menu .group-label,
.day__body > .group-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: var(--sp-4) var(--sp-2) var(--sp-1);
}

.day__track {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: var(--ctl-h);
  margin: 0 var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}

.day__track:hover {
  text-decoration: underline;
}

/* ---------- Profile ---------- */

.profile-lines {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-line {
  display: grid;
  gap: 2px;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--color-line);
}

.profile-line:last-child {
  border-bottom: 0;
}

.profile-line__text {
  color: var(--color-ink);
}

.profile-line__note,
.profile-section__intro,
.profile-section__note {
  color: var(--color-ink-soft);
  font-size: var(--fs-sm);
}

.profile-section__note {
  margin-top: var(--sp-1);
}

.profile-section + .profile-section {
  margin-top: var(--sp-5);
}

.profile-section__title {
  margin: 0 0 2px;
  color: var(--color-ink);
  font-size: var(--fs-body);
}

/* ---------- Results: what to work on next ---------- */

.more__summary {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--ctl-h);
  color: var(--color-ink);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.more__summary::-webkit-details-marker {
  display: none;
}

.more__summary:focus-visible {
  outline: 2px solid var(--color-accent-deep);
  outline-offset: 2px;
  border-radius: var(--r-ctl);
}

.more__chevron {
  color: var(--color-muted);
  transform: rotate(-90deg);
}

.more[open] .more__chevron {
  transform: none;
}

.more[open] > .rows {
  margin-top: var(--sp-2);
}
