/* Hyperlearn: the weekly queue is calculated in front of the visitor, one signal at a time, with the scroll.
   Landing-page tokens only; solid colours, no canvas. */
.hyperlearn {
  --hl-rh: 60px; --hl-rg: 8px; --hl-cut: 32px;
  --hl-inc: #9CCB3B; --hl-gap: var(--coral); --hl-urg: var(--violet);
  --hl-brand: 64px; --hl-heading: 32px;
  padding: 96px 0 80px; scroll-margin-top: 16px;
}
.hl-heading { display: grid; grid-template-columns: 1.12fr 1fr; gap: 48px; align-items: end; margin-bottom: 40px; }
.hl-brand { display: block; font: 600 var(--hl-brand)/1 var(--display); letter-spacing: -.06em; color: var(--ink); }
.hl-brand sup { display: inline-block; vertical-align: top; margin: 8px 0 0 4px; font: 500 20px/1 var(--text); letter-spacing: 0; }
.hl-heading h2 { margin-top: 20px; max-width: 18ch; font-size: var(--hl-heading); line-height: 1.12; }
.hl-intro { max-width: 44ch; padding-bottom: 4px; font-size: 18px; color: var(--muted); line-height: 1.65; }
.hl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The gear behind the platform: the stage keeps the SVG's frame (1160 × 420, from y = 110), so the cards sit level with
   their gears */
.gear-stage { position: relative; aspect-ratio: 1160 / 420; container-type: inline-size; }
.gear-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gear-big path { fill: var(--ink); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.gear-big-ring { fill: none; stroke: var(--ink-2); stroke-width: 2; }
.gear-big-core { fill: var(--lime); }
.gear-small path { fill: #fff; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill .45s var(--ease); }
.gear-small.is-on path { fill: var(--lime); }
.gear-small-hub { fill: var(--ink); }
.gear-icon { fill: none; stroke: var(--lime); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.gear-links line { stroke: var(--ink); stroke-opacity: .28; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: .1 9; stroke-dashoffset: calc(var(--flow, 0) * 1px); transition: stroke-opacity .45s var(--ease); }
.gear-links line.is-on { stroke-opacity: 1; }

.gear-core { position: absolute; left: 50%; top: 50%; display: grid; justify-items: center; gap: 1.1cqw; transform: translate(-50%, -50%); pointer-events: none; }
.gear-core-brand { color: var(--ink); font: 600 2.5cqw/1 var(--display); letter-spacing: -.05em; white-space: nowrap; }
.gear-core-brand sup { display: inline-block; vertical-align: top; margin: .15em 0 0 .1em; font: 500 .4em/1 var(--text); letter-spacing: 0; }
.gear-core-signals { display: grid; justify-items: center; gap: .45cqw; }
.gear-core-signals b { padding: .3cqw .9cqw; border-radius: 999px; font: 600 .95cqw/1.25 var(--text); white-space: nowrap; }
.gear-core-signals .is-inc { background: var(--ink); color: var(--lime); }
.gear-core-signals .is-gap { background: var(--coral-soft); color: var(--coral-ink); }
.gear-core-signals .is-urg { background: var(--violet-soft); color: var(--violet); }

.gear-parts { position: absolute; inset: 0; pointer-events: none; }
.gear-part { position: absolute; top: var(--y); width: calc(260 / 1160 * 100%); display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-1); transform: translateY(-50%); pointer-events: auto; transition: border-color .45s var(--ease), box-shadow .45s var(--ease); }
.gear-part:nth-child(-n+3) { left: 0; }
.gear-part:nth-child(n+4) { right: 0; }
.gear-part:nth-child(3n+1) { --y: calc((186.3 - 110) / 420 * 100%); }
.gear-part:nth-child(3n+2) { --y: 50%; }
.gear-part:nth-child(3n) { --y: calc((453.7 - 110) / 420 * 100%); }
.gear-part.is-on { border-color: var(--ink); box-shadow: var(--shadow-3); }
/* Beside the gears the card needs no icon: the gear next to it carries one. Listed under the machine (narrow screens),
   the card shows a small copy of its gear's hub. */
.gear-part-icon { display: none; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--lime); }
.gear-part-icon .i { width: 16px; height: 16px; }
.gear-part h3 { color: var(--ink); font: 600 15px/1.3 var(--display); letter-spacing: -.01em; }
.gear-part p { margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.45; text-wrap: pretty; }
/* Without the script there are no gears to point at: the cards read as a plain list */
.gear-stage:not(.is-ready) { aspect-ratio: auto; }
.gear-stage:not(.is-ready) .gear-svg, .gear-stage:not(.is-ready) .gear-core { display: none; }
.gear-stage:not(.is-ready) .gear-parts { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gear-stage:not(.is-ready) .gear-part { position: static; width: auto; transform: none; }

.hl-bridge { display: flex; align-items: center; gap: 16px; margin: 56px 0 24px; }
.hl-bridge-label { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: var(--lime); font-size: 12px; font-weight: 600; line-height: 1.3; }
.hl-bridge p { color: var(--muted); font-size: 16px; line-height: 1.5; }

/* Theater: pinned while the scroll walks the five steps */
.hl-scroll-track { position: relative; }
.hl-scroll-track.is-pinned .hl-theater { position: sticky; top: var(--hl-pin-top, 100px); }
.hl-theater { border-radius: var(--r-xl); background: var(--soft); border: 1px solid var(--line); overflow: hidden; }
.hl-experience { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr); align-items: center; }
.hl-stage { position: relative; min-width: 0; padding: 40px 16px 64px 40px; }

/* Board: the queue as the app shows it */
.hl-board { position: relative; padding: 20px 20px 28px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-2); }
.hl-board-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 4px 16px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.hl-board-title span { display: block; font-size: 12px; color: var(--muted); }
.hl-board-title strong { display: block; margin-top: 2px; font: 600 20px/1.2 var(--display); letter-spacing: -.02em; color: var(--ink); }
.hl-status { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 600; transition: background-color .35s var(--ease), color .35s var(--ease); }
.hl-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: hl-pulse 1.4s ease-in-out infinite; }
.hl-status .i { display: none; width: 14px; height: 14px; }
.hl-status.is-ready { background: var(--lime); color: var(--lime-ink); }
.hl-status.is-ready::before { display: none; }
.hl-status.is-ready .i { display: block; }
@keyframes hl-pulse { 50% { opacity: .25; } }

.hl-grid { display: grid; grid-template-columns: 28px minmax(0, 1fr) 64px 10px 64px 10px 64px 10px 48px; column-gap: 8px; align-items: center; }
.hl-cols { padding: 0 12px 10px; color: var(--muted); font-size: 12px; }
.hl-col-subject { grid-column: 1 / 3; }
.hl-col { justify-self: center; padding: 4px 8px; border-radius: 999px; white-space: nowrap; transition: background-color .35s var(--ease), color .35s var(--ease); }
.hl-col.is-score { justify-self: end; }
.hl-col.is-on.is-inc { background: var(--lime); color: var(--lime-ink); }
.hl-col.is-on.is-gap { background: var(--coral-soft); color: var(--coral-ink); }
.hl-col.is-on.is-urg { background: var(--violet-soft); color: var(--violet); }
.hl-col.is-on.is-score { background: var(--ink); color: var(--lime); }
.hl-op { color: var(--muted); font-size: 13px; text-align: center; opacity: .55; }

.hl-rows-box { position: relative; height: calc(4 * var(--hl-rh) + 3 * var(--hl-rg) + var(--hl-cut)); }
.hl-row { position: absolute; top: 0; left: 0; right: 0; z-index: var(--z, 1); height: var(--hl-rh); padding: 0 12px; border-radius: var(--r-md); background: var(--soft); color: var(--ink); transform: translate3d(0, var(--y, 0), 0) scale(var(--s, 1)); box-shadow: 0 calc(var(--lift, 0) * 18px) calc(var(--lift, 0) * 32px) calc(var(--lift, 0) * -14px) rgba(11,23,20,.3); transition: background-color .4s var(--ease), color .4s var(--ease); }
.hl-row:nth-child(2) { --y: calc(var(--hl-rh) + var(--hl-rg)); }
.hl-row:nth-child(3) { --y: calc(2 * (var(--hl-rh) + var(--hl-rg))); }
.hl-row:nth-child(4) { --y: calc(3 * (var(--hl-rh) + var(--hl-rg)) + var(--hl-cut)); }
.hl-row.is-in { background: var(--lime); }
.hl-row.is-out { color: var(--muted); }
.hl-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #fff; color: var(--muted); font: 600 12px/1 var(--text); font-variant-numeric: tabular-nums; transition: background-color .4s var(--ease), color .4s var(--ease); }
.hl-row.is-in .hl-rank { background: var(--ink); color: var(--lime); }
.hl-name { display: grid; min-width: 0; }
.hl-name strong { overflow: hidden; font: 600 15px/1.3 var(--text); white-space: nowrap; text-overflow: ellipsis; }
.hl-name small { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.hl-row.is-in .hl-name small { color: var(--lime-ink); opacity: .72; }
.hl-cell { display: grid; gap: 6px; text-align: center; }
.hl-cell b { font: 600 14px/1 var(--text); font-variant-numeric: tabular-nums; opacity: var(--o, 1); }
.hl-bar { display: block; height: 4px; overflow: hidden; border-radius: 999px; background: rgba(11,23,20,.08); }
.hl-bar > span { display: block; width: calc(var(--v, 0) * 100%); height: 100%; border-radius: inherit; background: var(--c); }
.hl-cell.is-inc { --c: var(--hl-inc); }
.hl-cell.is-gap { --c: var(--hl-gap); }
.hl-cell.is-urg { --c: var(--hl-urg); }
.hl-score { text-align: right; }
.hl-score b { font: 600 18px/1 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; opacity: var(--o, 1); }
.hl-cut { position: absolute; left: 4px; right: 4px; top: calc(3 * var(--hl-rh) + 2 * var(--hl-rg) + (var(--hl-rg) + var(--k, 1) * var(--hl-cut)) / 2); display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; opacity: var(--k, 1); transform: translateY(-50%); }
.hl-cut::before { content: ''; flex: 1; border-top: 1.5px dashed var(--ink); opacity: .45; }

/* One context card per step, under the board */
.hl-notes { position: absolute; left: 72px; bottom: 16px; }
.hl-note { position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-3); white-space: nowrap; opacity: 0; transform: translateY(10px); transition: opacity .3s var(--ease), transform .5s var(--ease); pointer-events: none; }
.hl-note.is-on, .hyperlearn:not(.hl-scroll-ready) .hl-note[data-hl-note="3"] { opacity: 1; transform: none; }
.hl-note-icon { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--c); color: var(--ink); }
.hl-note-icon .i { width: 18px; height: 18px; }
.hl-note-icon.is-inc { --c: var(--lime); }
.hl-note-icon.is-gap { --c: var(--coral-soft); color: var(--coral-ink); }
.hl-note-icon.is-urg { --c: var(--violet-soft); color: var(--violet); }
.hl-note-icon.is-score { --c: var(--ink); color: var(--lime); }
.hl-note-icon.is-done { --c: var(--mint-soft); color: var(--green); }
.hl-note small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.hl-note strong { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; color: var(--ink); font: 600 18px/1.2 var(--display); }
.hl-note strong .i { width: 14px; height: 14px; align-self: center; color: var(--muted); }
.hl-note em { color: var(--muted); font: 400 12px/1.2 var(--text); font-style: normal; }
.hl-chips { display: flex; gap: 4px; margin-top: 4px; }
.hl-chips b { padding: 3px 8px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.2; }
.hl-chips b:first-child { background: var(--lime); color: var(--lime-ink); }

/* Narrative */
.hl-detail { min-width: 0; padding: 40px 48px 40px 32px; }
.hl-steps { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.hl-steps-bar { display: grid; flex: 1; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-width: 200px; }
.hl-steps-bar i { position: relative; height: 4px; overflow: hidden; border-radius: 999px; background: var(--line); }
.hl-steps-bar i::after { content: ''; position: absolute; inset: 0; background: var(--ink); transform: scaleX(var(--f, 1)); transform-origin: left; }
.hyperlearn:not(.hl-scroll-ready) .hl-steps-bar i:last-child::after { transform: scaleX(0); }
.hl-steps-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.hl-panels { display: grid; }
.hl-panel { grid-area: 1 / 1; min-width: 0; }
.hl-panel[hidden] { display: none; }
.hl-scroll-ready .hl-panel { transition: opacity .45s var(--ease), transform .6s var(--ease), visibility 0s; }
.hl-scroll-ready .hl-panel[hidden] { display: block; visibility: hidden; opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .2s ease, transform .2s ease, visibility 0s .2s; }
.hl-scroll-ready[data-hl-dir="up"] .hl-panel[hidden] { transform: translateY(-14px); }
.hl-step-caption { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: var(--muted); font-size: 14px; }
.hl-step-caption span { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.hl-step-caption .is-inc { --c: var(--hl-inc); }
.hl-step-caption .is-gap { --c: var(--hl-gap); }
.hl-step-caption .is-urg { --c: var(--hl-urg); }
.hl-step-caption .is-score { --c: var(--ink); }
.hl-step-caption .is-done { --c: var(--green); }
.hl-panel h3 { max-width: 16ch; color: var(--ink); font: 600 var(--hl-heading)/1.12 var(--display); letter-spacing: -.035em; }
.hl-panel p { max-width: 36ch; margin-top: 16px; color: var(--muted); font-size: 16px; line-height: 1.6; }

.hl-footer { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-top: 32px; }
.hl-footer-copy strong { display: block; color: var(--ink); font: 600 20px/1.4 var(--display); }
.hl-footer-copy p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.hl-footer-actions { display: flex; align-items: center; gap: 24px; }
.hl-footer .link-arrow { font-size: 14px; }

/* Mid widths: narrower cards, smaller type */
@media (min-width: 901px) and (max-width: 1180px) {
  .gear-part { padding: 10px 14px; }
  .gear-part h3 { font-size: 14px; }
  .gear-part p { font-size: 12.5px; line-height: 1.4; }
}
/* Narrow: the machine on top (framed on the gears, see js/engrenagem.js) and the six parts listed below it */
@media (max-width: 900px) {
  .gear-stage.is-ready { aspect-ratio: auto; }
  .gear-stage.is-ready .gear-svg { position: relative; display: block; height: auto; aspect-ratio: 548 / 400; }
  .gear-stage.is-ready .gear-core { top: calc(100cqw * 200 / 548); gap: 1.4cqw; }
  .gear-links { display: none; }
  .gear-core-brand { font-size: 5.4cqw; }
  .gear-core-signals { gap: 1cqw; }
  .gear-core-signals b { padding: .4cqw 1.9cqw; font-size: max(10px, 2.1cqw); }
  .gear-stage .gear-parts, .gear-stage:not(.is-ready) .gear-parts { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
  .gear-stage .gear-part { position: static; width: auto; padding: 12px 16px 12px 12px; transform: none; }
  .gear-part-icon { display: grid; }
  .hl-bridge { margin-top: 48px; }
}
@media (max-width: 560px) {
  .gear-stage .gear-parts, .gear-stage:not(.is-ready) .gear-parts { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hl-bridge { flex-direction: column; gap: 10px; margin: 40px 0 20px; text-align: center; }
  .hl-bridge p { font-size: 15px; }
}
@media (max-width: 1180px) {
  .hl-grid { grid-template-columns: 24px minmax(0, 1fr) 54px 8px 54px 8px 54px 8px 44px; column-gap: 6px; }
  .hl-col { padding: 4px 6px; }
  .hl-stage { padding: 32px 12px 64px 28px; }
  .hl-board { padding: 16px 16px 24px; }
  .hl-cols, .hl-row { padding-inline: 10px; }
  .hl-rank { width: 24px; height: 24px; }
  .hl-detail { padding: 32px 32px 32px 24px; }
}
@media (max-width: 1080px) {
  .hyperlearn { --hl-brand: 56px; }
  .hl-footer-actions { flex-direction: column; gap: 4px; }
}
/* Stacked: board on top, text below */
@media (max-width: 960px) {
  .hl-experience { grid-template-columns: minmax(0, 1fr); }
  .hl-stage { padding: 28px 28px 64px; }
  .hl-board { max-width: 640px; margin-inline: auto; }
  .hl-grid { grid-template-columns: 28px minmax(0, 1fr) 64px 10px 64px 10px 64px 10px 48px; column-gap: 8px; }
  .hl-notes { left: max(56px, 50% - 264px); }
  .hl-detail { padding: 4px 32px 32px; text-align: center; }
  .hl-steps { justify-content: center; margin-bottom: 20px; }
  .hl-step-caption { justify-content: center; }
  .hl-panel h3, .hl-panel p { margin-inline: auto; }
  .hl-panel h3 { max-width: 20ch; }
  .hl-panel p { max-width: 44ch; }
}
@media (max-width: 760px) {
  .hyperlearn { --hl-brand: 48px; padding: 64px 0; }
  .hl-heading { grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; text-align: center; }
  .hl-heading h2 { margin: 20px auto 0; }
  .hl-intro { max-width: 40ch; margin-inline: auto; font-size: 16px; }
  .hl-footer { flex-direction: column; gap: 24px; text-align: center; }
  .hl-footer-actions { gap: 8px; width: 100%; }
  .hl-footer-actions .btn { max-width: 100%; }
}
/* Phones: two lines per subject, the three signals under the name */
@media (max-width: 640px) {
  .hyperlearn { --hl-rh: 66px; --hl-rg: 6px; --hl-cut: 28px; --hl-heading: 24px; }
  .hl-theater { border-radius: var(--r-lg); }
  .hl-stage { padding: 12px 12px 0; }
  .hl-board { padding: 14px 12px 12px; border-radius: 20px; }
  .hl-board-head { padding: 0 2px 12px; margin-bottom: 10px; }
  .hl-board-title strong { font-size: 18px; }
  .hl-grid { grid-template-columns: 24px repeat(3, minmax(0, 1fr)) 40px; column-gap: 8px; }
  .hl-op, .hl-col-subject, .hl-name small { display: none; }
  .hl-cols { padding: 0 10px 8px; }
  .hl-cols .hl-col.is-inc { grid-column: 2; }
  .hl-cols .hl-col.is-gap { grid-column: 3; }
  .hl-cols .hl-col.is-urg { grid-column: 4; }
  .hl-cols .hl-col.is-score { grid-column: 5; }
  .hl-row { align-content: center; row-gap: 8px; padding: 0 10px; }
  .hl-rank { grid-row: 1 / 3; grid-column: 1; }
  .hl-name { grid-row: 1; grid-column: 2 / 5; }
  .hl-row .hl-cell.is-inc { grid-row: 2; grid-column: 2; }
  .hl-row .hl-cell.is-gap { grid-row: 2; grid-column: 3; }
  .hl-row .hl-cell.is-urg { grid-row: 2; grid-column: 4; }
  .hl-score { grid-row: 1 / 3; grid-column: 5; }
  .hl-cell { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px; text-align: left; }
  .hl-cell b { font-size: 12px; }
  .hl-score b { font-size: 16px; }
  .hl-notes { display: none; }
  .hl-detail { padding: 20px 20px 24px; }
  .hl-steps { margin-bottom: 14px; }
  .hl-step-caption { margin-bottom: 10px; font-size: 12px; }
  .hl-panel p { margin-top: 10px; font-size: 15px; line-height: 1.55; }
}
@media (max-width: 380px) {
  .hyperlearn { --hl-brand: 40px; }
  .hl-grid { column-gap: 6px; }
  .hl-cell { grid-template-columns: minmax(0, 1fr); gap: 4px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .hyperlearn *, .hyperlearn *::before, .hyperlearn *::after { animation: none !important; transition: none !important; }
}
