/* /how-to-learn-faster/ : learning-curve race, evidence meters, swap table, self-check, 7-day plan */

/* ---------- Race ---------- */
/* All status lines sit in one grid cell (JS adds hidden copies), so the box is as tall as the longest one: no layout shift. */
.lf-status { display: grid; min-height: 1.4em; margin: 0 0 16px; font-size: 17px; line-height: 1.4; color: var(--text); font-weight: 600; letter-spacing: -0.01em; }
.lf-status > span { grid-area: 1 / 1; }
.lf-status .lf-ghost { visibility: hidden; }
.prose .lf-ytitle { margin: 0 0 8px; font-size: 13px; line-height: 1.3; color: var(--text-3); }
.lf-plot { position: relative; height: clamp(240px, 30vw, 280px); }
.lf-chart { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lf-band { fill: rgba(255, 255, 255, 0.03); }
.lf-testline { stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 4 6; }
.lf-a, .lf-b { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lf-a { stroke: #75757b; stroke-width: 2.5; }
.lf-b { stroke: url(#lfGrad); stroke-width: 3.5; }
/* Each dot rides a plot-sized track moved with transform (percent of the plot), so it never causes layout shift */
.lf-dots { position: absolute; inset: -10px; overflow: hidden; pointer-events: none; }
.lf-track { position: absolute; left: 10px; top: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
.lf-dot { position: absolute; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; }
.lf-dot-a { background: #9a9aa0; }
.lf-dot-b { width: 14px; height: 14px; margin: -7px 0 0 -7px; background: #fff; }
.lf-band-label { position: absolute; top: 10px; transform: translateX(-50%); font-size: 13px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.lf-ends { transition: opacity 0.6s var(--ease); }
.lf-race.is-running .lf-ends { opacity: 0; }
.lf-tag { position: absolute; right: 18px; font-size: 15px; font-weight: 600; white-space: nowrap; line-height: 1.2; }
.lf-tag-b { bottom: calc(69% + 8px); color: var(--text); }
.lf-tag-a { top: calc(65% + 10px); color: var(--text-2); }
.lf-x { position: relative; height: 20px; margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--text-3); }
.lf-x span { position: absolute; top: 0; left: 0; white-space: nowrap; }
.lf-x .lf-x-mid { left: 50%; transform: translateX(-50%); }
.lf-x span:last-child { left: auto; right: 0; }
.lf-key-a { background: #75757b !important; }

/* ---------- Evidence meters ---------- */
.lf-scale { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 14px; color: var(--text-2); }
.lf-scale-title { color: var(--text-3); font-weight: 600; }
.lf-key { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.lf-key i { flex: none; width: 18px; height: 8px; border-radius: 4px; background: var(--c); }
.lf-key.is-unrated i { background: none; border: 1.5px dashed var(--c); }
.prose .lf-group { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin-top: 1.6em; }

.prose .lf-rank { list-style: none; padding: 0; display: grid; gap: 10px; }
.prose .lf-rank li + li { margin-top: 0; }
.lf-tech { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px 20px; }
.lf-tech-head { display: flex; align-items: center; gap: 12px; }
.lf-n {
    flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
}
.prose .lf-tech h4 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; color: var(--text); }
.lf-meter { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 6px 14px; margin: 12px 0 8px; }
.lf-bar {
    position: relative; height: 8px; border-radius: 4px; overflow: hidden;
    background: repeating-linear-gradient(90deg, var(--surface-2) 0 calc(25% - 2px), transparent calc(25% - 2px) 25%);
}
.lf-bar i { position: absolute; inset: 0; border-radius: 4px; background: var(--c); transform-origin: left; transform: scaleX(var(--lv)); }
.lf-js .lf-bar i { transform: scaleX(0); transition: transform 1.1s var(--ease); }
.lf-js .is-in .lf-bar i { transform: scaleX(var(--lv)); }
/* Not rated in the review: a dashed outline with no fill, so it can't be read as a score */
.is-unrated .lf-bar { background: none; border: 1.5px dashed var(--c); }
.is-unrated .lf-bar i { display: none; }
.lf-rating { font-size: 14px; font-weight: 600; color: var(--c); line-height: 1.35; }
.prose .lf-tech p { margin: 0; font-size: 16px; line-height: 1.6; }

/* The weak five: one panel, rows instead of cards */
.prose .lf-rank.is-weak { gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.lf-rank.is-weak .lf-tech { background: none; border: 0; border-radius: 0; padding: 16px 22px; }
.lf-rank.is-weak .lf-tech + .lf-tech { border-top: 1px solid var(--line); }
.prose .lf-rank.is-weak h4 { font-size: 17px; }
.lf-rank.is-weak .lf-meter { margin: 8px 0 6px; }
.prose .lf-rank.is-weak p { font-size: 15px; color: var(--text-2); }

/* ---------- Swap table ---------- */
.lf-swaps { min-width: 0; }
.lf-swaps tbody th { width: 46%; }
.lf-swaps tr { transition: background 0.4s ease; }
.lf-swaps tr.is-hit th, .lf-swaps tr.is-hit td { background: rgba(127, 210, 124, 0.09); }

/* ---------- Self-check ---------- */
.lf-qs { display: grid; gap: 4px; counter-reset: q; }
.lf-qs li { counter-increment: q; }
.lf-qs fieldset { border: 0; padding: 12px 0; margin: 0; display: grid; grid-template-columns: 1fr 150px; gap: 10px 20px; align-items: center; border-bottom: 1px solid var(--line); }
.lf-qs li:last-child fieldset { border-bottom: 0; }
.lf-qs legend { float: left; padding: 0; font-size: 16px; line-height: 1.45; color: var(--text); }
.lf-qs legend::before { content: counter(q) '. '; color: var(--text-3); font-variant-numeric: tabular-nums; }
.lf-qs .seg span { height: 40px; }
.lf-result { margin-top: 18px; }
.lf-result-wait { font-size: 15px; color: var(--text-3); }
.lf-result-lead { font-size: 15px; color: var(--text-2); margin-bottom: 12px; }
.lf-picks { display: grid; gap: 10px; }
.lf-pick { padding: 16px 18px; border-radius: 16px; background: rgba(127, 210, 124, 0.07); border: 1px solid rgba(127, 210, 124, 0.3); animation: lf-in 0.5s var(--ease); }
.lf-pick s { display: block; color: var(--text-3); font-size: 15px; text-decoration-color: rgba(255, 255, 255, 0.35); }
.lf-pick b { display: block; color: var(--text); font-size: 17px; margin-top: 2px; }
.lf-result .tool-actions { margin-top: 14px; }
@keyframes lf-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 7-day plan ---------- */
.prose .lf-week { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.prose .lf-week li + li { margin-top: 0; }
.lf-week li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 15px; line-height: 1.55; }
.lf-week li:last-child { border-color: rgba(127, 210, 124, 0.35); grid-column: 1 / -1; }
.lf-day { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); margin-bottom: 6px; }
.lf-week b { display: block; color: var(--text); font-size: 17px; letter-spacing: -0.015em; margin-bottom: 4px; }

@media (max-width: 640px) {
    .lf-status { font-size: 16px; min-height: 2.8em; }
    .lf-band-label { font-size: 12px; top: 8px; }
    .lf-tag { font-size: 14px; right: 14px; }
    .lf-x { font-size: 12px; }
    .lf-tech, .lf-rank.is-weak .lf-tech { padding: 16px 16px 18px; }
    .lf-meter { grid-template-columns: 56px 1fr; gap: 6px 10px; }
    .lf-rating { font-size: 13px; }
    .prose .lf-tech h4 { font-size: 18px; }
    .prose .lf-rank.is-weak h4 { font-size: 17px; }
    .lf-swaps thead { display: none; }
    .lf-swaps, .lf-swaps tbody, .lf-swaps tr, .lf-swaps th, .lf-swaps td { display: block; width: auto !important; }
    .lf-swaps tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
    .lf-swaps tr:last-child { border-bottom: 0; }
    .lf-swaps th, .lf-swaps td { padding: 0; border: 0; background: none !important; }
    .lf-swaps tbody th { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.3); font-weight: 500; }
    .lf-swaps td.is-us { color: var(--text); font-weight: 600; margin-top: 4px; }
    .lf-swaps td.is-us::before { content: '→ '; color: var(--green); }
    .lf-swaps tr.is-hit { background: rgba(127, 210, 124, 0.09); }
    .lf-qs fieldset { grid-template-columns: 1fr 104px; gap: 8px 14px; }
    .lf-qs legend { font-size: 15px; }
    .lf-week li { padding: 14px 16px; }
    .lf-day { display: inline; margin: 0 8px 0 0; }
    .lf-week b { display: inline; }
    .lf-week p { margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    .lf-js .lf-bar i, .lf-ends, .lf-swaps tr { transition: none; }
    .lf-pick { animation: none; }
}
