/* The home (STORY-04.31; the owner-approved home v3, docs/mockups/2026-11-19-home-v2/): the top card, Today, Your skills,
   Review, and "Your activity". Every block is a card on the page ground (the one page background, --paper, STORY-04.49) with
   the --line-2 border, a 13 px heading above it, 20 px between blocks, dividers (not boxes) inside a card. Phone first; the
   web from 861 px. */

.home { display: flex; flex-direction: column; gap: 20px; }
.home-card, .home-top__card, .sk-card, .review-line {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px;
}
.home-card { padding: 12px; }

/* A block's heading: 13 px, upper case, with a small label to its right ("3 steps · 44 min · 1 done"). */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 22px; margin: 0 0 6px; padding: 0 4px; }
.home-head h2 { font-family: var(--text); font-size: 13px; font-weight: 700; line-height: 22px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.home-head__label { font-size: var(--fs-s); line-height: 22px; color: var(--ink-2); white-space: nowrap; }
.home-head--start { justify-content: flex-start; }

/* The "i" beside a heading or a line: a 44 px button drawn as a small ringed "i"; its bubble floats under it. */
.home-i.chip { width: 44px; min-height: 44px; margin: -11px -8px; padding: 0; background: transparent; color: var(--teal); }
.home-i.chip::before { content: "i"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px currentColor; font: 700 12px/1 var(--display); }
.home-head .tip-wrap, .act-month__tap .tip-wrap { position: static; }
.home-i__tip { left: 0; right: 0; width: auto; text-transform: none; letter-spacing: 0; font-weight: 400; }
.home-ready { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--veil-25); }
.home-ready p + p { margin-top: var(--s2); }
.home-ready .no-level__btn { color: var(--sun); }
.home-skills, .act-month { position: relative; }

/* The page title: on the web "Good afternoon, [name]."; on the phone read out only, and the gear sits in the header. */
.home-title { margin-bottom: var(--s4); }

/* ---------- The top card, "the line" ---------- */
.home-top__card { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 4px; }
.home-path { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: start; }
.path__track, .path__fill { position: absolute; top: 17px; height: 2px; }
.path__track { left: 8.33%; width: 66.67%; background: var(--line-2); }
.path__track::after { content: ""; position: absolute; left: 100%; top: 0; width: 25%; border-top: 2px dashed var(--line-2); }
.path__fill { left: 8.33%; width: calc(var(--done) * 16.67%); top: 16px; height: 4px; border-radius: 2px; background: var(--teal); }
.path__stops { grid-column: 1 / 6; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); min-height: 44px; color: var(--ink); text-decoration: none; }
.path__stop { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.path__node { display: grid; place-items: center; width: 14px; height: 14px; margin-block: 11px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-strong); }
.path__node--done { width: 24px; height: 24px; margin-block: 6px; background: var(--teal); box-shadow: none; color: var(--surface); }
.path__node--done .i { width: 13px; height: 13px; stroke-width: 3; }
.path__node--flag { width: 24px; height: 24px; margin-block: 6px; color: var(--ink-2); }
.path__node--flag .i { width: 12px; height: 12px; }
.path__node--now { position: relative; width: 32px; height: 32px; margin-block: 2px; box-shadow: none; }
.path__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--teal); }
.ring { position: absolute; inset: 0; transform: rotate(-90deg); fill: none; }
.ring__track { stroke: var(--teal-soft); stroke-width: 4; }
.ring__arc { stroke: var(--teal); stroke-width: 4; stroke-linecap: round; }
.path__name { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.25; white-space: nowrap; }
.path__label { font-size: var(--fs-s); }
.path__of { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.is-now .path__label { font-weight: 700; color: var(--teal); }
/* Above the line, so the dashed end stops at the tile's box and never runs over its number (the batch 5+6 walk, m3). */
.path__tile { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 44px; color: var(--ink); text-decoration: none; }
.path__tile-box { display: grid; place-items: center; min-width: 44px; height: 36px; padding: 0 6px; border-radius: 12px; background: var(--teal); color: var(--surface); font-family: var(--display); font-size: 19px; font-weight: 800; line-height: 1; }
.path__tile-l { font-size: 12px; font-weight: 700; line-height: 1.25; color: var(--ink-2); white-space: nowrap; }
.path__tile--set { color: var(--teal); }
.path__tile--set .path__tile-box { width: 36px; min-width: 36px; background: var(--surface); color: var(--teal); box-shadow: inset 0 0 0 2px var(--teal); }
.path__tile--set .path__tile-l { color: var(--teal); }

.home-top__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "days days days" "streak points badge"; align-items: center; column-gap: 10px; }
.days { grid-area: days; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 8px 0 4px; list-style: none; border-top: 1px solid var(--line); }
.days__go { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink-2); text-decoration: none; }
.days__wd { font-size: 12px; font-weight: 700; line-height: 16px; }
.days__cell, .act-cell { position: relative; display: grid; place-items: center; width: 100%; height: 44px; border-radius: 10px; font-family: var(--display); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.c0 { background: var(--paper-2); }
.c1 { background: var(--teal-soft); }
.c2 { background: var(--c5); color: var(--on-sun); } /* a light fill in both sets: dark text */
.c3 { background: var(--teal); color: var(--surface); }
.cf { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font-weight: 500; }
.days__cell.is-today { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 4px var(--surface); }
.days__tick { position: absolute; top: 3px; right: 3px; display: flex; }
.days__tick .i { width: 11px; height: 11px; stroke-width: 3; }
.home-stat { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.home-streak { grid-area: streak; }
.home-points { grid-area: points; justify-self: end; }
.home-badge { grid-area: badge; }
.home-stat__big { font-family: var(--display); font-size: 20px; font-weight: 800; line-height: 1; }
.home-stat__unit { font-size: var(--fs-s); line-height: 1.2; color: var(--ink-2); }
.home-points__rank { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home-streak__tile { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--sun); color: var(--on-sun); }
.home-badge__art { position: relative; display: grid; place-items: center; width: 36px; height: 36px; flex: none; color: var(--teal); }
.home-badge__ring .ring__track { stroke: var(--line); stroke-width: 3; }
.home-badge__ring .ring__arc { stroke-width: 3; }
.home-badge__text { display: flex; flex-direction: column; line-height: 1.2; }
.home-badge__name { font-size: var(--fs-s); font-weight: 700; }
.home-badge__of { font-size: 12px; color: var(--ink-2); }

/* A phone narrower than the approved 390 (the card's content is 58 px less than the screen): the seven day cells and the three
   stats need 332 px, so below 390 the page widened (362 px at 320, 361 at 360) and the stats ran into each other. The cells share
   what there is, their gap moving into their links (a link is 4 px wider than its cell and the row runs 4 px into the card's
   padding), so a link stays 44 px tall and is 44 wide from 360 up (38 at 320, where seven share 286 px); the streak and the
   points stack their number over its unit; the next badge's name may wrap. At 390 and up nothing here applies. */
@media (max-width: 389px) {
  .home-top__row { grid-template-columns: auto minmax(min-content, 1fr) auto; column-gap: 6px; }
  .days { position: relative; gap: 0; margin-inline: -4px; padding-top: 9px; border-top: 0; }
  .days::before { content: ""; position: absolute; top: 0; inset-inline: 4px; border-top: 1px solid var(--line); }
  .days__go { padding-inline: 2px; }
  .home-stat { gap: 6px; }
  .home-streak { display: grid; grid-template-columns: auto auto; row-gap: 0; align-items: center; }
  .home-streak__tile { grid-row: 1 / span 2; }
  .home-streak .home-stat__big, .home-streak .home-stat__unit { grid-column: 2; }
  .home-points { flex-direction: column; gap: 2px; }
  .home-badge { white-space: normal; }
}

/* ---------- Today ---------- */
.session-panel { position: relative; isolation: isolate; padding: 0 12px 12px; }
.session-panel::before { content: ""; position: absolute; inset: 28px 0 0; z-index: -1; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; }
.session-panel > .home-head { margin: 0 -12px 18px; }
.home-today-wait { min-height: 120px; }
.session-lead, .session { display: grid; margin: 0; padding: 0; list-style: none; }
.session__row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.session-lead > .session__row:first-child { border-top: 0; padding-top: 0; }
.session-lead + .session > .session__row:first-child { border-top: 1px solid var(--line); }
.session-panel > .session > .session__row:first-child { border-top: 0; padding-top: 0; }
.session-lead + .session > .session__row:first-child { padding-top: 10px; }
.session__lead { grid-column: 1; grid-row: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-deep); font-family: var(--display); font-size: var(--fs-s); font-weight: 700; }
.session__lead.is-done, .session__row.is-current .session__lead { background: var(--teal); color: var(--surface); }
.session__lead .i { width: 16px; height: 16px; stroke-width: 3; }
.session__row--extra .session__lead { background: transparent; color: var(--teal); }
.session__go { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 44px; color: inherit; text-decoration: none; }
.session__top { display: flex; flex-wrap: wrap; gap: 6px; }
.session__title { font-family: var(--display); font-size: var(--fs-base); font-weight: 700; line-height: 1.3; }
.session__title .pill { vertical-align: 2px; }
.session__detail { font-size: var(--fs-s); line-height: 1.4; color: var(--ink-2); }
.session__min { grid-column: 3; grid-row: 1; font-size: var(--fs-s); font-weight: 700; line-height: 28px; white-space: nowrap; }
.session__quiet { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; border: 0; background: transparent; font: 700 var(--fs-m) var(--text); color: var(--teal); text-decoration: none; cursor: pointer; white-space: nowrap; }
.five-today__more { grid-column: 3; grid-row: 1; margin-top: -8px; }
.session__side { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; align-items: flex-end; align-self: end; margin-bottom: -10px; font-size: var(--fs-s); }
.session__opt { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s2); font-size: var(--fs-s); color: var(--ink-2); }
.session__opt .btn--plain { --face: transparent; box-shadow: none; padding: 0 var(--s2); color: var(--teal); }
.session__foot { display: none; }
.session__start { margin-top: var(--s3); }
.session__start .i { flex: none; }
.session__empty { padding: var(--s2) 0; }
.session__more { display: flex; flex-direction: column; align-items: center; margin-top: var(--s2); }
.session__more-toggle { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; border: 0; background: transparent; font: 700 var(--fs-m) var(--text); color: var(--teal); cursor: pointer; }
.session__more-toggle[aria-expanded="true"] .i { transform: rotate(180deg); }
.session__more-h { display: none; }
.session__more > .session { display: none; width: 100%; }
.session__more-toggle[aria-expanded="true"] ~ .session { display: grid; }
/* The phone's steps (the batch 5+6 walk, M1): a new student's day 1 keeps its main button above the tab bar for every
   test, with the owner's Feedback strip too. The pills take the step's whole width (so a skill and its kind share one
   line), the minutes sit beside the title, a done step is one quiet line under its pills with its minutes beside them,
   and "Not now" keeps its 44 px but takes no more room than its line. */
@media (max-width: 860px) {
  .session__row, .session-lead + .session > .session__row:first-child { padding-block: 8px; }
  .session-lead > .session__row:first-child, .session-panel > .session > .session__row:first-child { padding-top: 0; }
  .session__go { grid-column: 2 / -1; grid-row: 1 / span 3; display: grid; grid-template-columns: subgrid; grid-template-rows: subgrid; row-gap: 4px; align-content: start; }
  .session__go > * { grid-column: 1; }
  .session__go > .session__top { grid-column: 1 / -1; grid-row: 1; }
  .session__go > .session__title { grid-row: 2; }
  /* The "Sample" tag on a title keeps the title's own line height (a 28 px pill made the row 8 px taller and pushed day 1's
     main button under the tab bar at 390): the same words and size, less height, centred on the line. */
  .session__title .pill { min-height: 0; padding: 1px var(--s2); line-height: 1.2; vertical-align: middle; }
  .session__go > .session__detail { grid-row: 3; }
  .session__min { grid-row: 2; line-height: 1.3; }
  .five-today__more { grid-row: 1 / span 2; }
  .session__side { grid-row: 2 / span 2; }
  .session__opt { grid-column: 2 / -1; grid-row: 4; }
  .session__opt .btn { margin-block: -10px -8px; }
  .session__row[data-done]:not(.five-today) .session__go > .session__top { grid-column: 1; }
  .session__row[data-done]:not(.five-today) .session__go > .session__title { grid-column: 1 / -1; font: 600 var(--fs-s)/1.4 var(--text); color: var(--ink-2); }
  .session__row[data-done]:not(.five-today) .session__min { grid-row: 1; line-height: 28px; }
}

/* ---------- Your skills ---------- */
.home-skills__line { padding: 0 4px 4px; font-size: var(--fs-m); line-height: 1.45; }
.sk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.sk-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; }
.sk-card__name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; } /* a long name ("Compréhension orale") goes under its icon, never cut inside a word (STORY-04.4) */
.sk-card__icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--teal-tint); color: var(--teal); }
.sk-card__title { min-width: 0; font-family: var(--display); font-size: var(--fs-base); font-weight: 700; line-height: 1.25; }
.sk-card__vs { display: flex; flex-direction: column; gap: 4px; }
.sk-card__line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sk-card__now { min-width: 0; font-family: var(--display); font-size: var(--fs-l); font-weight: 700; line-height: 1.2; overflow-wrap: break-word; }
/* "Why?" and its bubble sit above the card's stretched link (the card is one link; "Why?" is a button of its own). */
.sk-card__line .tip-wrap, .sk-card .no-level__btn { position: relative; z-index: 2; }
.sk-card .no-level__btn { min-height: 44px; min-width: 44px; margin: -12px 0 -12px -4px; padding: 0 6px; background: transparent; color: var(--teal); font: 700 var(--fs-s)/1 var(--text); text-decoration: underline; text-underline-offset: 3px; }
.sk-card__target { font-size: var(--fs-s); color: var(--ink-2); white-space: nowrap; }
.vs-badge { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 1px 10px; border-radius: 13px; font: 700 var(--fs-s)/1.2 var(--text); white-space: nowrap; }
.vs-badge .i { width: 14px; height: 14px; }
.vs-badge--on { background: var(--teal-tint); color: var(--teal-deep); }
.vs-badge--nearly { background: var(--sun-tint); color: var(--sun-ink); }
.vs-badge--below { background: var(--coral-tint); color: var(--coral-deep); }
.lvl-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
.lvl-row__c { display: grid; place-items: center; height: 22px; border-radius: 5px; background: var(--paper-2); color: var(--ink-2); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lvl-row__c.is-on { background: var(--teal); color: var(--surface); }
.lvl-row__c.is-below { background: var(--teal-soft); color: var(--teal-deep); }
.lvl-row__c.is-target { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3px var(--surface); }
.sk-card__next { padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.4; }
.sk-card__done { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.sk-card__bar { display: block; height: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.sk-card__bar > span { display: block; height: 100%; border-radius: 3px; background: var(--teal); }
.sk-card__open { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 46px; padding-top: 8px; border-top: 1px solid var(--line); font-family: var(--display); font-size: var(--fs-m); font-weight: 700; color: var(--teal); text-decoration: none; }
.sk-card__open::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.sk-card__open .i { transition: transform 180ms ease-out; }

/* ---------- Review: one line ---------- */
.review-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; color: var(--ink); text-decoration: none; }
.review-line__tile { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--teal-tint); color: var(--teal); }
.review-line__text { display: flex; flex-direction: column; min-width: 0; }
.review-line__n { font-family: var(--display); font-size: var(--fs-l); font-weight: 700; line-height: 1.3; }
.review-line__parts { font-size: var(--fs-s); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-line__parts--wrap { white-space: normal; }
.review-line__go { min-height: 44px; box-shadow: none; }

/* ---------- Your activity ---------- */
.act__side { display: flex; flex-direction: column; gap: 20px; }
.act-streak__top { display: flex; align-items: center; gap: 12px; }
.act-streak__n { display: grid; place-items: center; min-width: 56px; height: 56px; padding: 0 8px; border-radius: 16px; background: var(--sun); box-shadow: var(--lip) var(--sun-deep); font-family: var(--display); font-size: 30px; font-weight: 800;  color: var(--on-sun);}
.act-streak__title { font-family: var(--display); font-size: 20px; font-weight: 700; }
.act-streak__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.act-streak__stats dt { font-size: var(--fs-s); color: var(--ink-2); }
.act-streak__stats dd { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 700; }
.act-month__bar { position: relative; display: flex; align-items: center; justify-content: space-between; }
.act-nav { display: grid; place-items: center; width: 44px; height: 44px; color: var(--teal-deep); }
.act-month__tap { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-s); font-weight: 700; color: var(--ink-2); }
.act-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.act-grid--head { margin: 8px 0 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: center; }
.act-cell { border: 0; cursor: pointer; }
.act-cell:disabled { cursor: default; }
.act-cell.is-chosen { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.act-cell__dot { position: absolute; bottom: 4px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--ink); }
.act-cell.c3 .act-cell__dot { background: var(--surface); }
.act-key { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 12px 0 0; padding: 10px 0 0; list-style: none; border-top: 1px solid var(--line); font-size: var(--fs-s); color: var(--ink-2); }
.act-key li { display: inline-flex; align-items: center; gap: 6px; }
.act-key__box { width: 12px; height: 12px; border-radius: 3px; }
.act-key__box.c0 { box-shadow: inset 0 0 0 1px var(--line-2); }
.act-day__min { font-family: var(--display); font-size: var(--fs-l); font-weight: 700; }
.act-day__met { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; margin-top: var(--s2); padding: 2px 12px; border-radius: 14px; background: var(--sun); font-size: var(--fs-s); font-weight: 700;  color: var(--on-sun);}
.act-day .wk { margin-top: var(--s2); }
.wk__planned { display: inline-flex; align-items: center; min-height: 26px; padding: 1px 10px; border-radius: 13px; box-shadow: inset 0 0 0 1px var(--line-strong); font: 700 var(--fs-s)/1.2 var(--text); color: var(--ink-2); }
.act-day .wk__day { border-top: 0; padding-bottom: 0; }

/* ---------- The skill page (views/test-skills.js sectionView) ---------- */
.sk-page__facts { display: flex; flex-wrap: wrap; gap: 6px; margin: calc(-1 * var(--s3)) 0 var(--s4); padding: 0; list-style: none; }
.sk-page__fact { display: inline-flex; align-items: center; min-height: 26px; padding: 1px 10px; border-radius: 13px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font: 700 var(--fs-s)/1.2 var(--text); }
.sk-page__card { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.sk-page__weak { font-size: var(--fs-s); }
.sk-page__next { margin-top: 4px; min-height: 48px; padding: 8px 16px; white-space: normal; }
.sk-tabs__bar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin-bottom: 8px; padding: 4px; border-radius: 14px; background: var(--line); }
.sk-tabs__tab { min-height: 44px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; font: 700 var(--fs-m) var(--text); color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.sk-tabs__tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 0 var(--line-2); }
.sk-tabs__panel .items { margin: 0; padding: 0; list-style: none; }
.sk-page .ts-list .item__sub, .sk-page .item__state { display: inline; font-size: var(--fs-s); color: var(--ink-2); }
.sk-page .item__title + .pill { margin-left: 6px; vertical-align: 2px; }
.sk-page__every { margin: var(--s3) 0 var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); font: 700 var(--fs-s) var(--text); }
@media (min-width: 861px) {
  .sk-page { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
}

/* ---------- Motion: on the web a card lifts 2 px over 180 ms with a darker border and a 4 px edge, its arrow moves 4 px
   right, and the skill's icon moves once (200 to 220 ms); on the phone a pressed card scales to 98% for 120 ms with a darker
   border. With reduced motion only the border changes. Nothing is reached by hover alone. ---------- */
.sk-card { transition: transform 180ms ease-out, border-color 180ms ease-out, box-shadow 180ms ease-out; }
@media (hover: hover) and (pointer: fine) {
  .sk-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 4px 0 var(--line-2); }
  .sk-card:hover .sk-card__open .i { transform: translateX(4px); }
  .sk-card:hover .sk-card__icon--listening { animation: sk-ring 210ms ease-out 1; }
  .sk-card:hover .sk-card__icon--reading .i { animation: sk-page 210ms ease-out 1; }
  .sk-card:hover .sk-card__icon--writing .i { stroke-dasharray: 60; animation: sk-pen 210ms ease-out 1; }
  .sk-card:hover .sk-card__icon--speaking .i { animation: sk-pop 210ms ease-out 1; }
}
@media (hover: none) {
  .sk-card { transition: transform 120ms ease-out, border-color 120ms ease-out; }
  .sk-card:active { transform: scale(0.98); border-color: var(--line-strong); }
}
@keyframes sk-ring { from { box-shadow: 0 0 0 0 var(--teal-soft); } to { box-shadow: 0 0 0 6px transparent; } }
@keyframes sk-page { 50% { transform: rotateY(40deg); } }
@keyframes sk-pen { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }
@keyframes sk-pop { 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) {
  .sk-card, .session__row { transition-property: border-color; }
  .sk-card:hover, .sk-card:active, .session__row:hover { transform: none; box-shadow: none; }
  .sk-card:hover .sk-card__open .i { transform: none; }
  .sk-card:hover [class*="sk-card__icon"], .sk-card:hover [class*="sk-card__icon"] .i { animation: none; }
}

/* ---------- The phone ---------- */
@media (max-width: 860px) {
  .main:has(.home) { padding-top: var(--s4); }
  .home-title h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .home-title { margin: 0; }
  .path__label, .path__of--web { display: none; }
  .is-now .path__label { display: block; }
  .act-key { gap: 6px; }
  .act .page-head { margin-bottom: var(--s4); }
  .sk-card .tip { position: relative; z-index: 3; }
}

/* ---------- The web ---------- */
@media (min-width: 861px) {
  .path__of--phone { display: none; }
  .path__of--web { font-size: 13px; font-weight: 400; }
  .path__label { font-size: var(--fs-s); }
  .path__tile-box { font-size: 22px; }
  .home-top__card { padding: 20px 24px 12px; gap: 16px; }
  .home-top__row { grid-template-columns: auto auto auto auto; grid-template-areas: none; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
  .home-top__row > * { grid-area: auto; }
  .home-points__rank { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .days { grid-template-columns: repeat(7, 56px); gap: 6px; padding: 0; border-top: 0; }

  /* Today: the steps as cards on a numbered line, three across, or two or four where three would leave one card alone
     in its row (data-across, views/today.js; the batch 5+6 walk, m4); the main button in the step it opens. */
  .session-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 12px; padding: 0; }
  .session-panel[data-across="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .session-panel[data-across="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .session__start-what { display: none; }
  .session-panel::before { display: none; }
  .session-panel::after { content: ""; position: absolute; left: 14px; right: 14px; top: 42px; height: 2px; background: var(--line-2); z-index: -2; }
  .session-panel > .home-head, .session-panel > .session__more, .session-panel > .session__empty, .session-panel > .session__start { grid-column: 1 / -1; margin: 0; }
  .session-panel > .home-head { margin-bottom: -6px; }
  .session-lead, .session-panel > .session { display: contents; }
  .session__row, .session-lead > .session__row:first-child, .session-panel > .session > .session__row:first-child, .session-lead + .session > .session__row:first-child { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 54px 16px 16px; border: 0; }
  .session__row::before { content: ""; position: absolute; inset: 40px 0 0; z-index: -1; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; transition: transform 180ms ease-out, border-color 180ms ease-out, box-shadow 180ms ease-out; }
  .session__row.is-current::before { border: 2px solid var(--teal); }
  .session__lead { position: absolute; top: 0; left: 0; box-shadow: 0 0 0 6px var(--paper-2); }
  .session__row.is-current .session__lead { box-shadow: 0 0 0 2px var(--paper-2), 0 0 0 4px var(--teal), 0 0 0 8px var(--paper-2); }
  .session__min { position: absolute; top: 0; left: 36px; padding-right: 8px; background: var(--paper-2); }
  .five-today__more, .session__side { position: static; margin: 0; align-self: flex-end; }
  .session__title { font-size: var(--fs-l); }
  /* A step's pills and title take the card's width (STORY-04.59, OF e570575c): shrink-wrapped to their content, Today's five's
     two pills filled their box to the pixel, so any wider measure of their text (the owner's Feedback picture) put the second
     pill on the title's line. */
  .session__row > .session__go { align-self: stretch; }
  .session__more .session__row > .session__go { align-self: auto; }
  .session__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); font-size: var(--fs-s); color: var(--ink-2); }
  .session__row.is-current .session__foot { display: none; }
  .session__open { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--teal); }
  .session__row .session__start { margin-top: 8px; }
  .session__more { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; padding: 0 4px; }
  .session__more-toggle { display: none; }
  .session__more-h { display: block; margin: 0; font: 400 var(--fs-s) var(--text); color: var(--ink-2); }
  .session__more > .session { display: flex; flex-wrap: wrap; gap: 4px 16px; width: auto; }
  .session__more .session__row { display: flex; flex-direction: row; align-items: center; gap: 8px; padding: 0; }
  .session__more .session__row::before, .session__more .session__lead, .session__more .session__foot { display: none; }
  .session__more .session__go { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; }
  .session__more .session__title { font: 700 var(--fs-s) var(--text); color: var(--teal); text-decoration: underline; }
  .session__more .session__min { position: static; padding: 0; background: none; color: var(--teal); }
  @media (hover: hover) and (pointer: fine) {
    .session__row:hover::before { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 4px 0 var(--line-2); }
    .session__row:hover .session__open .i { transform: translateX(4px); transition: transform 180ms ease-out; }
  }

  .sk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .review-line { padding: 6px 8px 6px 16px; }
  .review-line__text { flex-direction: row; align-items: baseline; gap: 16px; }
  .review-line__parts { font-size: var(--fs-m); }
  .act { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
}
@media (max-width: 860px) {
  .review-line__go { display: none; }
}
