/* Learn StoveTab (design Revisions 16 and 16b): the /learn hub, lesson articles and the practice player.
   Slate means practice and nothing else. It always comes with the word PRACTICE and a dashed edge, never alone. */
:root { --slate: #3F5D78; --slate-bg: #E3EAF0; --slate-ink: #2C4458; --slate-band: #3F5D78; --on-slate: #FFFCF7; }
@media (prefers-color-scheme: dark) {
  :root { --slate: #7F9DB8; --slate-bg: #1E2A35; --slate-ink: #B8CCE0; --slate-band: #2C4458; --on-slate: #E3EAF0; }
}

/* The hub */
.learn-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px; align-items: center; }
.learn-hero__art { position: relative; display: grid; grid-template-columns: 3fr 2fr; gap: 12px; padding: 28px 16px 16px; border: 2px dashed var(--slate); border-radius: var(--radius-xl); background: var(--card); }
.learn-hero__art > .practice__label { position: absolute; top: -12px; left: 16px; }
.learn-hero__page, .learn-hero__panel { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-md); background: var(--paper); border: 1px solid var(--rule); }
.learn-hero__page strong { font: 500 20px/24px var(--font-display); }
.learn-hero__lit { padding: 8px 10px; border-radius: 10px; background: var(--honey-bg); color: var(--honey-ink); outline: 2px solid var(--honey-ink); font-size: 14px; line-height: 20px; }
.learn-hero__panel .now__label { align-self: flex-start; font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--honey-ink); }
.learn-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--space-4); }
.learn-path { padding: 20px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; }
.learn-path h3 { font: italic 400 21px/26px var(--font-display); }
.learn-path ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.learn-list { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--space-3); }
.learn-item__link { position: relative; height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius-md); background: var(--card); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.learn-item__link:hover { border-color: var(--muted); color: var(--ink); }
.learn-item__title { font: 500 20px/25px var(--font-display); }
.learn-item__done { position: absolute; top: 14px; right: 14px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--sage-bg); color: var(--sage-ink); font-weight: 600; }

/* The article */
.lesson { display: flex; flex-direction: column; gap: 32px; }
.lesson__article { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.crumbs a { color: var(--muted); }
.lesson .how__step h3 { font: italic 400 21px/26px var(--font-display); }
.lesson__rules li { font-size: 17px; line-height: 26px; }
.lesson__related { margin-top: 32px; color: var(--muted); }

/* The practice: band, dashed frame, coach */
.practice { display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 16px; }
.practice__band { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 16px; border-radius: var(--radius-md); background: var(--slate-band); color: var(--on-slate); font-size: 14px; font-weight: 600; }
.practice__band-text { flex: 1 1 240px; }
.practice__label { display: inline-flex; padding: 3px 9px; border-radius: 4px; background: var(--slate-bg); color: var(--slate-ink); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.practice__band .practice__label { background: var(--on-slate); color: var(--slate-band); }
.practice__leave { min-height: 36px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid currentColor; background: transparent; color: inherit; font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; }
.practice__leave:hover { color: inherit; background: rgba(255, 255, 255, .12); }
.practice__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 24px; align-items: start; }
.practice__app { position: relative; padding: 28px 18px 18px; border: 2px dashed var(--slate); border-radius: var(--radius-xl); background: var(--linen); min-width: 0; }
.practice__tag { position: absolute; top: -12px; left: 18px; padding: 3px 10px; border-radius: 4px; background: var(--slate); color: var(--on-slate); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.practice__dialog { max-width: 420px; padding: 24px; border: 2px dashed var(--slate); border-radius: var(--radius-lg); background: var(--card); color: var(--ink); }
.practice__dialog[open] { display: flex; flex-direction: column; gap: 12px; }
.practice__dialog::backdrop { background: rgba(35, 28, 23, .5); }

/* Inside the frame: the blog page beside the panel, a phone, or a browser page */
.practice-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, 1fr); gap: 14px; }
.practice-page, .practice-panel, .practice-phone, .practice-web { border-radius: var(--radius-md); background: var(--paper); border: 1px solid var(--rule); padding: 16px; min-width: 0; }
.practice-page { display: flex; flex-direction: column; gap: 8px; background: var(--card); }
.practice-page__url { padding: 6px 12px; border-radius: var(--radius-pill); background: var(--linen); color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.practice-page__title { font: 500 24px/28px var(--font-display); }
.practice-page__lines { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.practice-page__lines li { padding: 8px 10px; border-radius: 10px; font-size: 15px; line-height: 22px; }
.practice-page__lines li.is-lit { background: var(--honey-bg); color: var(--honey-ink); outline: 2px solid var(--honey-ink); }
.practice-phone { max-width: 380px; margin: 0 auto; border-radius: 32px; padding: 22px 16px; border: 8px solid var(--ink); }
.practice-web { padding-top: 40px; position: relative; }
.practice-web::before { content: "stovetab.com"; position: absolute; top: 10px; left: 16px; right: 16px; padding: 3px 12px; border-radius: var(--radius-pill); background: var(--linen); color: var(--muted); font-size: 12px; }
.practice-screen { display: flex; flex-direction: column; gap: 12px; }
.practice-screen__title { font: 500 22px/26px var(--font-display); }
.practice-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.practice-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--rule); color: var(--ink); text-align: left; font: inherit; }
.practice-row__text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.practice-row__main { font-size: 15px; line-height: 21px; }
button.practice-row--target { cursor: pointer; box-shadow: 0 0 0 3px var(--slate-bg), 0 0 0 5px var(--slate); }
button.practice-row--target:hover { background: var(--slate-bg); }
button.practice-row--target.is-waiting { cursor: not-allowed; box-shadow: 0 0 0 2px var(--rule-strong); }
.practice-row.is-hit { border-color: var(--sage); }
.practice-row.is-added { animation: practice-in .3s ease-out both; }
@keyframes practice-in { from { opacity: 0; transform: translateY(-6px); } }
.practice-chip { flex: none; padding: 3px 9px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; white-space: nowrap; }
.practice-chip--now { background: var(--honey-bg); color: var(--honey-ink); }
.practice-chip--done { background: var(--sage-bg); color: var(--sage-ink); }
.practice-chip--warn { background: var(--warn-bg); color: var(--warn-ink); }
.practice-chip--practice { background: var(--slate-bg); color: var(--slate-ink); }
.practice-chip--button { background: var(--persimmon); color: var(--on-persimmon); }

/* The coach */
.coach { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--rule); }
.coach:focus { outline: none; }
.coach:focus-visible { outline: 2px solid var(--slate); outline-offset: 2px; }
.coach__kicker, .coach__beat { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.coach__beat { display: block; margin-bottom: 4px; }
.coach__title { font: 400 26px/31px var(--font-display); }
.coach__body { color: var(--ink-soft); }
.coach__q { font-weight: 600; }
.coach__options { display: flex; flex-direction: column; gap: 8px; }
.coach__option { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--rule); background: var(--card); color: var(--ink); text-align: left; font-size: 14px; line-height: 19px; }
.coach__option:hover:not(:disabled) { border-color: var(--ink); }
.coach__option:disabled { cursor: default; color: var(--ink); }
.coach__option.is-picked { border-color: var(--ink); }
.coach__option.is-right { border-color: var(--sage); }
.coach__mark { width: 22px; height: 22px; flex: none; border-radius: var(--radius-pill); border: 1.5px solid var(--rule-strong); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.coach__option.is-picked .coach__mark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.coach__option.is-right .coach__mark { background: var(--sage); border-color: var(--sage); color: #FFFCF7; }
.coach__feedback { padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 20px; }
.coach__feedback.is-right { background: var(--sage-bg); color: var(--sage-ink); }
.coach__feedback.is-wrong { background: var(--linen); color: var(--ink-soft); }
.coach__fill { min-height: 44px; padding: 0 16px; border-radius: var(--radius-pill); border: 2px dashed var(--slate); background: var(--slate-bg); color: var(--slate-ink); font-weight: 600; }
.coach__rule { padding: 14px; border-radius: var(--radius-md); background: var(--slate-bg); color: var(--slate-ink); }
.coach__rule p { color: var(--ink); }
.coach__nav { display: flex; gap: 10px; }
.coach__nav .button:disabled { background: var(--linen); color: var(--muted); border-color: var(--linen); cursor: not-allowed; }
.coach__dots { display: flex; gap: 3px; }
.coach__dots span { flex: 1; height: 5px; border-radius: 999px; background: var(--rule); }
.coach__dots .is-done { background: var(--sage); }
.coach__dots .is-now { background: var(--honey); }
.coach__question { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.coach__question legend { font-weight: 600; margin-bottom: 8px; }
.coach__answers { display: flex; flex-direction: column; gap: 6px; color: var(--ink-soft); }

/* The Practice Blog: a plain blog post for the real panel to open on */
.practice-blog .practice__band { border-radius: 0; }
.practice-blog__post { max-width: 720px; margin: 0 auto; padding: 32px 16px 64px; display: flex; flex-direction: column; gap: 12px; }

/* Phones: the coach becomes a sheet under the band, the page above the panel */
@media (max-width: 860px) {
  .practice__body { grid-template-columns: 1fr; }
  /* The coach is a sheet pinned to the bottom, under the app: the band and the row to tap stay in view above it. */
  .coach { position: sticky; top: auto; bottom: 0; z-index: 2; max-height: 48vh; overflow-y: auto; padding: 16px 18px; gap: 10px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: 0 -12px 32px rgba(35, 28, 23, .18); }
  .coach__title { font-size: 22px; line-height: 27px; }
  .practice-split { grid-template-columns: 1fr; }
  .practice__app { padding: 24px 10px 10px; }
}
@media (prefers-reduced-motion: reduce) { .practice-row.is-added { animation: none; } }
.practice__band--panel { border-radius: 0; padding: 8px 14px; font-size: 13px; }

/* First-run offer (design Revision 16, 3a) */
.tour-offer { position: static; display: flex; flex-direction: column; gap: 10px; width: auto; max-width: 560px; margin: 0 0 24px; padding: 20px 22px; border: 2px dashed var(--slate); border-radius: var(--radius-lg); background: var(--card); color: var(--ink); }
.tour-offer:not([open]) { display: none; }
.tour-offer form { margin: 0; }
.coach__next { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.learn-item__done--inline { position: static; }
